From 77367acceb8f0dbe6348a5a0f5ef60a334f427f6 Mon Sep 17 00:00:00 2001 From: Polyglot AI <293096396+polyglotAI-bot@users.noreply.github.com> Date: Tue, 1 Dec 2026 20:58:33 +0000 Subject: [PATCH] docs(agents): issue priority: workarounds, errors, triggers, performance, security issues Rules from the review of the clickhouse-connect rules (ClickHouse/clickhouse-connect#1264): - issue-priority: a reasonable workaround; the severity of a wrong exception; a write that stays after an error; the same rules for every reporter; check the contract first; rate by the trigger; performance by its effect; no comment, close, or lock on the public issue of a vulnerability that is not public yet. - issue-classification (shared text): a write that stays although the call reported an error is Data integrity; boundary "Bytes on the wire". No Priority that is set changes: triage never changes a set value. Part of #640 Co-Authored-By: Claude Opus 5.5 --- .claude/skills/issue-classification/SKILL.md | 15 +++-- .claude/skills/issue-priority/SKILL.md | 59 ++++++++++++++++---- 2 files changed, 58 insertions(+), 16 deletions(-) diff --git a/.claude/skills/issue-classification/SKILL.md b/.claude/skills/issue-classification/SKILL.md index dcaebabb..836ff5a5 100644 --- a/.claude/skills/issue-classification/SKILL.md +++ b/.claude/skills/issue-classification/SKILL.md @@ -52,16 +52,21 @@ repository" at the end. | Impact | Use when | |---|---| | **Security** | Two parts. A **vulnerability**: a defect makes the protection weaker: it exposes credentials or data (also a secret that leaks to a log, an error message, a URL, or another host), lets a value change the meaning of a query (injection), skips or weakens a TLS or identity check, corrupts memory (an out-of-bounds write, a use after free), or lets input that the application takes from its users stop the client; also a vulnerability in a dependency. The boundaries "Hostile server or network" and "Dependencies" below say when these count. **Authentication**: an authentication method that does not work or is missing, or how the client takes credentials (for example a token provider or a credentials file); a secret that leaks is a vulnerability, not authentication. Say which part applies: the priority rules of a repo rate the two parts differently. | -| **Data integrity** | Data that the caller wrote, or a result that the caller reads, is missing, incomplete, or different from the value given or stored, and the client reports no error. This includes a failed operation that the client reports as a success, a server error that the client ignores, overflow, lost precision, a time zone shift, a wrong decode, a stream that loses synchronization, a duplicate write, and a write to the wrong table. | +| **Data integrity** | Data that the caller wrote, or a result that the caller reads, is missing, incomplete, or different from the value given or stored, and the client reports no error. A write that stays although the client reports an error counts too (see the boundaries). This includes a failed operation that the client reports as a success, a server error that the client ignores, overflow, lost precision, a time zone shift, a wrong decode, a stream that loses synchronization, a duplicate write, and a write to the wrong table. | | **Stability** | The process stops in a way that the caller cannot handle as a normal error (abort, segmentation fault, unrecovered panic, stack overflow), a call does not return (deadlock, hang), or a resource leaks until none is left (connections, sockets, memory). Also a thread-safety defect. | | **Performance** | The result is correct, but the operation is too slow, or uses too much memory or CPU. Also a request to make an operation faster. | Boundaries: -- **Data integrity needs "no error".** When the client rejects a value with an error, the - issue has no Data integrity impact. When the caller gets an error, but the error is wrong - or not clear, the issue has no Data integrity impact either: it has the area API & - diagnostics. +- **Data integrity needs "no error".** When the client rejects a value with an error and + stores nothing, the issue has no Data integrity impact. When the caller gets an error, but + the error is wrong or not clear, the issue has no Data integrity impact either: it has the + area API & diagnostics. One exception: a write that stays in the table although the call + reported an error is Data integrity, because the caller cannot know that the data is there + (for example, a retry after an error writes the rows a second time). So for a write, check + the stored rows, also after an error. +- **Bytes on the wire.** Other bytes on the wire are not wrong data when the stored and the + returned values are correct. - **Security and values that are not quoted.** A value or an identifier that the client does not quote or escape gets Security only when the issue shows a path from untrusted input. A string value that leaves its literal because the client does not escape it is diff --git a/.claude/skills/issue-priority/SKILL.md b/.claude/skills/issue-priority/SKILL.md index 39d829f9..62a1e604 100644 --- a/.claude/skills/issue-priority/SKILL.md +++ b/.claude/skills/issue-priority/SKILL.md @@ -13,7 +13,8 @@ description: > This skill is the single source of truth for the **Priority** of `ClickHouse/clickhouse-cpp` issues. People and automated triage use the same -rules. +rules. Apply them in the same way to every reporter: a report of a workload, a +trace, or a reproduction with the public API is evidence, whoever sends it. The value goes into the org issue field **Priority** (`Urgent`, `High`, `Medium`, `Low`). The field is visible to org members only. An automated tool @@ -51,9 +52,10 @@ vulnerability that is not public yet"). (**Security** → **Report a vulnerability**), never in a public issue, comment, or pull request. If a public issue reports it, copy the title, the text, and the comments of the issue into the report first. -- Set no Priority on the public issue. Close it with a comment that gives no - details, and ask a repository administrator to delete it: closing does not - hide the text of the issue. +- Set no Priority on the public issue, and do not comment on it, close it, or + lock it. A maintainer decides whether to close or lock it, or to ask a + repository administrator to delete it: closing does not hide the text of the + issue. - Rate the vulnerability with the rules below, and put the level and its reason into the private report as the proposed severity. @@ -70,6 +72,25 @@ the columns (`clickhouse/columns/factory.cpp`). So a parser defect for a common type is Core, and a parser defect that only an unusual type name reaches is Narrow. +**Then look at the trigger**: the input, the type, the option, or the setup +that the defect needs. A common method or type alone says little. Rate the +trigger of the defect, not the trigger of the reproduction in the issue: a +short reproduction often uses a rare value for a defect that common values also +show. + +- When the defect needs a trigger that few applications have, use **Narrow**, + also when the API is Core or Common. Examples: an input that few applications + send (control characters in an `Enum` name), an option that is not the + default and that no common setup sets, a rare server setting. +- A trigger that is not the default can still be common, for example a setting + that a proxy, a common tool, or a framework sets, or SQL that a common tool + generates. Then keep the tier of the API. +- Count a trigger once: when the tier table already gives a tier to the option + (for example compression with `SetCompressionMethod`, which is Common), the + option does not lower the tier again. +- When you cannot tell how common the trigger is, keep the tier of the API. +- The trigger never gives Satellite, and never raises the tier. + | Tier | Public paths | | --------- | ------------ | | Core | `Client` connect, handshake, and authentication; `Execute()`, `Select()`, `Insert()`, `Ping()`, `ResetConnection()`; endpoint failover (`SetEndpoints`); timeouts and keep-alive in `ClientOptions`; TLS (`SetSSLOptions`, `WITH_OPENSSL`; ClickHouse Cloud needs it); error handling (`ServerException`, `ProtocolError`, and the connection state after an error); `Block` and the Native codec for `(U)Int8`–`(U)Int64`, `Float32`, `Float64`, `String`, `FixedString`, `Date`, `DateTime`, `DateTime64`, `Decimal32`–`Decimal128`, `UUID`, `Nullable(T)`, `Array(T)`, and `LowCardinality(String)`; the CMake build with the default options on a platform and compiler that CI tests | @@ -84,7 +105,12 @@ build flag `-DCH_USE_ABSEIL_FOR_BIGNUM=OFF` (severity "Workaround exists"). ## 2. Severity -First name the **impacts** of the issue with the classification skill of this +**Check the contract first.** Compare the reported behavior with the docs, the +tests, and the earlier decisions of the maintainers. A request to change a +behavior that the docs or the tests define is a proposal: rate it as a feature +request (last row), not as a defect. + +Then name the **impacts** of the issue with the classification skill of this repository ([`../issue-classification/SKILL.md`](../issue-classification/SKILL.md)): none, one, or more of Security (part vulnerability or part authentication), Data @@ -95,10 +121,17 @@ highest row applies: | Severity | Use when | | ----------------------- | -------- | -| Wrong data or security | impact **Data integrity**: the client returns or stores wrong or incomplete data with no error (this includes a block stream that goes out of sync with no error), or reports success for a query that failed; or impact **Security** with a vulnerability: a security defect: a leak of credentials or data, a TLS verification that does not occur, SQL built from a caller value without escaping, memory corruption (an out-of-bounds write, a use after free), or a vulnerability in a dependency, only when the client calls the vulnerable code. A hang, or a crash with no memory corruption, that only a hostile server or network causes does not use this row: rate it by the failure | -| Broken, no workaround | the feature fails (an exception, a hang, a crash, an abort, a leak that ends in a crash or in exhausted sockets), and the caller has no reasonable workaround; also a `Client` that stays unusable after an error, and a build that fails on a supported toolchain; also a wrong or incomplete error with no workaround: the failure is reported, but its type, code, or message is wrong or lost. The impact **Stability** (a hang, a crash, such a leak) uses this row when the caller has no reasonable workaround | -| Workaround exists | the feature fails, but the caller can avoid the failure with a small change in their own code or build flags (name the workaround in the reason); also impact **Performance** of a defect: a result that is correct but slow or uses too much memory (a request to make an operation faster is a feature request: last row) | -| Cosmetic, docs, feature | wrong log or message text, a compiler warning, documentation, a feature request (this includes support for a new type or a new package manager); also a request to make an operation faster, and a dependency update (also one for a vulnerability in a dependency, in code that the client does not call) | +| Wrong data or security | impact **Data integrity**: the client returns or stores wrong or incomplete data with no error (this includes a block stream that goes out of sync with no error), or reports success for a query that failed, or keeps a write although it reported an error; or impact **Security** with a vulnerability: a security defect: a leak of credentials or data, a TLS verification that does not occur, SQL built from a caller value without escaping, memory corruption (an out-of-bounds write, a use after free), or a vulnerability in a dependency, only when the client calls the vulnerable code. A hang, or a crash with no memory corruption, that only a hostile server or network causes does not use this row: rate it by the failure | +| Broken, no workaround | the feature fails (an exception, a hang, a crash, an abort, a leak that ends in a crash or in exhausted sockets), and the caller has no reasonable workaround; also a `Client` that stays unusable after an error, and a build that fails on a supported toolchain; also an exception of the wrong type or code, when the error handler that the docs describe does not catch it (an exception message that is only wrong or not clear is in the last row). The impact **Stability** (a hang, a crash, such a leak) uses this row when the caller has no reasonable workaround; also impact **Performance** when a supported workload can no longer finish within its time or memory budget | +| Workaround exists | the feature fails, but the caller can avoid the failure with a small change in their own code or build flags (name the workaround in the reason); also impact **Performance** of a defect: a correct result with a measured slowdown or memory use that materially delays a workload, and a Performance defect with no measurement yet (a request to make an operation faster is a feature request: last row) | +| Cosmetic, docs, feature | wrong log or message text (also an exception message that is wrong, not clear, or incomplete when the type and the code of the exception are correct, for example for an input that is not valid and that the client rejects with an awkward message), a compiler warning, documentation, a feature request (this includes support for a new type or a new package manager); also a request to make an operation faster, and a dependency update (also one for a vulnerability in a dependency, in code that the client does not call); also impact **Performance** of a defect with a small measured effect on the workload (for example 5% slower) | + +**A reasonable workaround** keeps the result that the caller asked for, in the +caller's setup, with a small and safe change (name it in the reason). These are +not reasonable workarounds: a change to another protocol or transport, skipping +a required authentication or TLS check, and a check of every returned row or +value. When the only workaround is one of these, use the row "Broken, no +workaround". An issue that has the impact Security with no vulnerability (an authentication method that does not work or is missing) does not use the first row. Rate an @@ -155,8 +188,12 @@ Write one line with the value: ` () · · · → .` -Name the workaround when the severity is "Workaround exists". When the -confidence is `LOW`, say what is missing. +Name the workaround when the severity is "Workaround exists". When the trigger +sets the tier, name it after the path, for example +`Narrow (Select() of Enum8; trigger: control characters in an Enum name)`. +For the impact Performance, give the measurements before and after, and the +limit that the workload hits. When the confidence is `LOW`, say what is +missing. ## 7. Labels from earlier triage