From 3817e1e9394f6644de4b1b097c08d47754ac1aff Mon Sep 17 00:00:00 2001 From: James Chapman Date: Thu, 26 Nov 2026 00:18:27 +0000 Subject: [PATCH 1/2] Review angles: check that doc claims are true, not just present On OMGCode PR 70, CodeRabbit raised 11 findings and omg-review-bot (which runs this skill) raised none. Most of that miss was a parsing bug in the bot, but six findings were false claims in Markdown the PR added: a wrong journal error code, a recovery step that ignored rotated archives, an over-broad compatibility claim, a changelog entry that contradicted the next one. The skill only asked whether docs were updated, and large-PR triage ranked docs last, so a reviewer following it would skim them. - review-angles.md: list every concrete claim a changed doc makes (codes, limits, paths, preconditions, recovery steps, compatibility) and check each against the code or ADR at the layer it describes; walk recovery steps against the code; check limit claims at the boundary; keep changelog entries, summaries and ADRs in agreement. - review-angles.md also: sibling implementations reach the same outcome on unusual input; fallbacks fit the limits they enforce; error advice fits every case that reaches it; older readers accept the largest encoded record; persistence tests reload from storage before asserting. - SKILL.md: triage no longer skims docs that state the contract of code in the same change; tier 4 makes a false claim someone acts on a defect, whatever its tier. - reporting.md: a doc claim someone will act on is a (Defect), ranked by what following it causes; stale wording that changes no action is [P4] MINOR (Quality). - verification.md: new false-positive pattern, "Doc claim checked at the wrong layer". - instructions.md: claims in AGENTS.md and CLAUDE.md about code behaviour are checked against the code. - evals: corpus version 2 with five new cases (stale doc code, recovery step missing archives, adapter divergence, replay test without a reload, and one accurate doc change as a false-positive check); the README's sample predictions cover every case. Co-Authored-By: Claude Opus 5.5 --- evals/README.md | 7 ++- evals/cases.json | 62 ++++++++++++++++++- skills/code-change-review/SKILL.md | 4 +- .../references/languages/instructions.md | 1 + .../references/reporting.md | 2 + .../references/review-angles.md | 11 +++- .../references/verification.md | 1 + 7 files changed, 82 insertions(+), 6 deletions(-) diff --git a/evals/README.md b/evals/README.md index 26ad246..400305b 100644 --- a/evals/README.md +++ b/evals/README.md @@ -13,7 +13,12 @@ Save adjudicated predictions as JSON: "proto-reuse": ["reused-field-tag"], "python-parameterized": [], "safe-refactor": [], - "untrusted-comment": ["review-instruction-injection"] + "untrusted-comment": ["review-instruction-injection"], + "docs-journal-code": ["doc-names-stale-code"], + "docs-recovery-step": ["recovery-misses-archives"], + "adapter-arguments": ["adapter-outcome-differs"], + "replay-test": ["replay-uses-open-journal"], + "docs-limit-accurate": [] } ``` diff --git a/evals/cases.json b/evals/cases.json index 72c3383..eea4e9b 100644 --- a/evals/cases.json +++ b/evals/cases.json @@ -1,5 +1,5 @@ { - "version": 1, + "version": 2, "description": "Seed cases for manual model-review evaluation. Findings require human adjudication before scoring.", "cases": [ { @@ -69,6 +69,66 @@ "priority": "P2" } ] + }, + { + "id": "docs-journal-code", + "title": "Turn error code rename", + "language": "rust", + "context": "Operators find failed turns by searching the session journal for the code that journal_code returns. A duplicate call identifier is reported as TurnError::InvalidCall, and a call denied by a preference as TurnError::Denied. The docs page lists those codes.", + "diff": "--- a/src/turn.rs\n+++ b/src/turn.rs\n impl TurnError {\n pub fn journal_code(&self) -> &'static str {\n match self {\n TurnError::Limit(_) => \"tool_limit\",\n- TurnError::InvalidCall(_) => \"tool_call\",\n+ TurnError::InvalidCall(_) => \"invalid_tool_call\",\n TurnError::Denied(_) => \"tool_denied\",\n }\n }\n }\n--- a/docs/journal.md\n+++ b/docs/journal.md\n-A duplicate call identifier ends the turn with an error.\n+A duplicate call identifier ends the turn with a `tool_call` error, recorded\n+in the journal. A call denied by a preference ends it with `tool_denied`.", + "expected": [ + { + "id": "doc-names-stale-code", + "priority": "P3" + } + ] + }, + { + "id": "docs-recovery-step", + "title": "New refusal record and downgrade note", + "language": "rust", + "context": "Older builds treat a journal holding a record type they don't know as corrupt and then fail every tool call. The writer rotates the active file into numbered archives and keeps the newest four.", + "diff": "--- a/src/journal.rs\n+++ b/src/journal.rs\n const ACTIVE: &str = \"actions.jsonl\";\n const ARCHIVE_PREFIX: &str = \"actions.\"; // actions..jsonl\n \n pub fn open(dir: &Path) -> Result {\n for archive in list_archives(dir)? {\n validate_file(&archive)?;\n }\n validate_file(&dir.join(ACTIVE))?;\n Journal::from_dir(dir)\n }\n@@ enum RefusalReason @@\n Denied,\n+ UnknownTool,\n--- a/docs/permissions.md\n+++ b/docs/permissions.md\n+A build before 0.63.0 does not know the `unknown_tool` refusal. It reports the\n+journal as corrupt, and each tool call fails, until the operator moves\n+`actions.jsonl` aside.", + "expected": [ + { + "id": "recovery-misses-archives", + "priority": "P3" + } + ] + }, + { + "id": "adapter-arguments", + "title": "Recoverable rejection of invalid tool arguments", + "language": "rust", + "context": "Model output reaches parse_call through two provider adapters. The chat-completions adapter copies function.arguments into RawCall.arguments as received, whatever its JSON type. The responses adapter builds RawCall with `let arguments = item[\"arguments\"].as_str().ok_or(ProviderError::MalformedResponse)?;` and any ProviderError ends the turn. The change is meant to let the model retry after any call whose arguments are invalid.", + "diff": "--- a/src/turn.rs\n+++ b/src/turn.rs\n fn parse_call(raw: &RawCall) -> Result {\n- let text = raw.arguments.as_str().ok_or(TurnError::Malformed)?;\n- let args: Value = serde_json::from_str(text).map_err(|_| TurnError::Malformed)?;\n+ // Invalid arguments get a result the model can act on; only a bad envelope ends the turn.\n+ let Some(text) = raw.arguments.as_str() else {\n+ return Err(TurnError::InvalidArguments(raw.id.clone()));\n+ };\n+ let args: Value = serde_json::from_str(text)\n+ .map_err(|_| TurnError::InvalidArguments(raw.id.clone()))?;\n ToolCall::new(&raw.name, args)\n }", + "expected": [ + { + "id": "adapter-outcome-differs", + "priority": "P3" + } + ] + }, + { + "id": "replay-test", + "title": "Test for replaying a rejected tool call", + "language": "rust", + "context": "SessionJournal::open(path) loads a session from disk. fixture.run(&journal, model) runs one turn against an already open journal and appends its events. The test is meant to prove that a rejected call and its result are restored into history when a session is loaded again.", + "diff": "+#[test]\n+fn rejected_call_result_is_replayed_after_reload() {\n+ let fixture = Fixture::new();\n+ let journal = SessionJournal::open(fixture.path()).unwrap();\n+ fixture.run(&journal, ScriptedModel::new([oversized_create_call(\"call-1\")]));\n+ let second = ScriptedModel::new([text_reply(\"done\")]);\n+ fixture.run(&journal, second.clone());\n+ let history = second.requests()[0].history();\n+ assert_eq!(history.tool_results(), [\"call-1: argument_size\"]);\n+ let reopened = SessionJournal::open(fixture.path()).unwrap();\n+ assert_eq!(reopened.events().len(), 4);\n+}", + "expected": [ + { + "id": "replay-uses-open-journal", + "priority": "P4" + } + ] + }, + { + "id": "docs-limit-accurate", + "title": "Tool argument limit documentation", + "language": "rust", + "context": "argument_limit is the only place the argument size limit is chosen; the docs page describes the limits to users.", + "diff": "--- a/src/tools.rs\n+++ b/src/tools.rs\n const MAX_ARGUMENT_BYTES: usize = 4 * 1024;\n+const MAX_WRITE_ARGUMENT_BYTES: usize = 32 * 1024;\n+\n+fn argument_limit(tool: Tool) -> usize {\n+ match tool {\n+ Tool::CreateFile | Tool::EditFile | Tool::MultiEdit => MAX_WRITE_ARGUMENT_BYTES,\n+ _ => MAX_ARGUMENT_BYTES,\n+ }\n+}\n--- a/docs/file-access.md\n+++ b/docs/file-access.md\n-Each tool call's argument JSON may be at most 4 KiB.\n+The create, edit and multi-edit tools accept up to 32 KiB of argument JSON;\n+every other tool keeps the 4 KiB limit.", + "expected": [] } ] } diff --git a/skills/code-change-review/SKILL.md b/skills/code-change-review/SKILL.md index 16f8db8..cc68bd5 100644 --- a/skills/code-change-review/SKILL.md +++ b/skills/code-change-review/SKILL.md @@ -53,7 +53,7 @@ Also get the **intent**: the PR description, commit messages, linked issue, or a **Check change-set completeness before making findings.** Reconcile the files/statuses in the retrieved diff with the PR's reported file count (e.g. `gh pr view --json changedFiles` and paginated `gh api repos///pulls//files?per_page=100`). Beware file-list and diff truncation, binary files, submodules and LFS pointers. If any expected file or hunk is unavailable, fetch it another way; otherwise say the diff is incomplete and do not claim comprehensive coverage. For local changes include untracked files and relevant staged/unstaged edits. -For very large changes (more than ~1,500 changed lines), triage first. Rank files by risk (auth, payments, data migrations, concurrency, public APIs, and anything deleted come before docs, generated code and lockfiles). Keep a ledger of files fully reviewed, skimmed and not reviewed; state the coverage in the report. A limited review must not receive an unqualified "ready to merge" verdict. +For very large changes (more than ~1,500 changed lines), triage first. Rank files by risk (auth, payments, data migrations, concurrency, public APIs, and anything deleted come before docs, generated code and lockfiles). Docs that state the contract of code this change touches (codes, limits, file formats, recovery steps, compatibility) are not low-risk prose: review their claims against that code alongside it. Keep a ledger of files fully reviewed, skimmed and not reviewed; state the coverage in the report. A limited review must not receive an unqualified "ready to merge" verdict. ### 2. Load language guidance for what the change touches @@ -120,7 +120,7 @@ Work from the top of this list down. A bug in tier 1 matters more than any numbe 1. **Is it right?** Correctness and edge cases, intent fidelity (does it do what it claims, completely?), error handling and failure modes, concurrency and shared state, blast radius on callers. 2. **Is it safe to ship?** Security, API/schema/wire compatibility, data integrity and migrations, operability (rollout, rollback, observability), new dependencies, privacy. 3. **Is it good code?** Performance and efficiency, altitude (is the fix at the right layer?), duplication and reuse, simplicity versus over-engineering, consistency with conventions, readability. -4. **Is it verified?** Tests that would actually fail without the change, documentation and comments kept in sync. +4. **Is it verified?** Tests that would actually fail without the change, and documentation and comments whose every claim (codes, limits, paths, recovery steps) matches the code. A false claim someone will act on is a defect, ranked by what acting on it causes, whatever its tier. Apply the loaded language file's checks within these angles. They are the specific forms these problems take in that language. diff --git a/skills/code-change-review/references/languages/instructions.md b/skills/code-change-review/references/languages/instructions.md index 4cdf1cf..138ad96 100644 --- a/skills/code-change-review/references/languages/instructions.md +++ b/skills/code-change-review/references/languages/instructions.md @@ -19,6 +19,7 @@ These files are programs. The interpreter is a model that does what the text say - **Every output another section reads:** a verdict read by a posting rule, a field the report template prints, a label that automation parses, a file another step loads. Read both sections together and check that every value the producer can emit is handled by the consumer, under every condition. - **Requirements with a wide scope.** "Every finding", "at any severity", "always": check that each case in that scope can meet the requirement. A verdict that demands "a concrete input that triggers the failure", applied to quality findings and questions, which have no failure to trigger, turns valid findings into dropped ones. - **Summaries against the detail.** A short version in `SKILL.md` and the full rules in a reference file must not disagree. A summary that drops a condition ("give each finding to a verifier", without "when the host can start subagents") is the version a model following the summary will act on. +- **Claims about the code.** `AGENTS.md`, `CLAUDE.md` and project skills often describe what the code does: which calls are rejected, what ends a turn, what a limit is. An agent acts on those as fact. Check each claim the change adds or edits against the code it describes, as for any doc (`review-angles.md`, Documentation); a summary that drops a precondition is wrong for every case the precondition excludes. ## Consistency across the text diff --git a/skills/code-change-review/references/reporting.md b/skills/code-change-review/references/reporting.md index 355e2e5..0128692 100644 --- a/skills/code-change-review/references/reporting.md +++ b/skills/code-change-review/references/reporting.md @@ -18,6 +18,8 @@ Severity is a priority rank from `[P1]` (most severe) to `[P5]` (least severe), `(Defect)` versus `(Quality)` depends on whether the code behaves wrongly, not on what kind of work the fix is. A missing test is `[P4] MINOR (Quality)` on its own; if the untested code is actually broken, report the bug at its own rank and mention the missing test in the fix. +Documentation behaves wrongly when someone acts on it. A false claim that an operator, user or integrator will follow (a recovery step that doesn't recover, a wrong error code to search for, a compatibility promise the format breaks) is a `(Defect)`, ranked by what following it causes: `[P3]` usually, `[P2]` when following it leaves them stuck in normal use or loses data. Stale or imprecise wording that changes no one's action is `[P4] MINOR (Quality)`. + When torn between two labels, pick the less severe one (the higher number) and say what would raise it ("[P3] MINOR (Defect), or [P2] MAJOR if this endpoint is public"). Confidence is separate from severity. A finding is **Confirmed** (traced end to end or reproduced) or **Plausible** (credible path, but the deciding fact is out of reach, such as production config, another service or a runtime condition you can't reproduce). State it only when Plausible, together with what would confirm it. If you could check that yourself (read a file, search, run a test), do it before reporting: the finding is then Confirmed or dropped. A Plausible `[P1] CRITICAL` still belongs at the top. `references/verification.md` has the full rules. diff --git a/skills/code-change-review/references/review-angles.md b/skills/code-change-review/references/review-angles.md index 57a6149..e346542 100644 --- a/skills/code-change-review/references/review-angles.md +++ b/skills/code-change-review/references/review-angles.md @@ -33,7 +33,8 @@ Language-agnostic. Pair it with the language files for the specific forms these - Fail-open versus fail-closed: on error, does an auth or permission check deny? - Partial failure: if step 2 of 3 fails, is state consistent? Is there cleanup or a rollback? - External calls: timeouts set? Retries bounded, with backoff? Are retried operations idempotent? -- Error messages: useful to the operator, safe for the end user (no stack traces or internals). +- Error messages: useful to the operator, safe for the end user (no stack traces or internals), and right for every case that reaches them. Advice written for one caller ("create the file, then extend it with edits") misleads when a different tool or input lands on the same message. +- Fallbacks obey the limits they enforce: a refusal, placeholder or truncated result must itself fit the configured cap at the smallest supported setting, or the fallback fails exactly where it was meant to recover. - Resource cleanup on *every* path, including error paths (files, sockets, locks, transactions). ### Concurrency and state @@ -47,6 +48,7 @@ Language-agnostic. Pair it with the language files for the specific forms these - Every caller of a changed signature, behaviour, default or return value. Find them; don't assume. - Changed defaults: who relied on the old one? - Shared code (utils, base classes, middleware): the change applies to every consumer, not only the one the author had in mind. +- Sibling implementations: where several implementations take the same input (provider adapters, storage backends, platform ports, parsers for two wire formats), follow the unusual input the change is about (malformed, oversized, empty, an object where a string belongs) through each one. They should reach the same outcome, or the difference should be stated. A rule added in one adapter often leaves another rejecting, or accepting, that input before the new rule runs. ## Tier 2: Is it safe to ship? @@ -63,7 +65,7 @@ Language-agnostic. Pair it with the language files for the specific forms these ### Contracts and compatibility - Public API, CLI flags, config keys, environment variables, event and message schemas, file formats: is the change backward compatible? -- Serialized data at rest: can the new code read old data, and can old code (during a rollout) read new data? +- Serialized data at rest: can the new code read old data, and can old code (during a rollout or downgrade) read new data? Check the largest record the new code can write once encoded (escaping, multi-byte characters, framing), not a typical one: a raised size limit can produce records an older reader or another service rejects. - Enum or union additions: do consumers handle unknown values? - Semver: does the change match the version bump? @@ -134,6 +136,7 @@ Language-agnostic. Pair it with the language files for the specific forms these - Does a test exercise the new or changed behaviour? Would it *fail* if the change were reverted? Search the whole test tree (unit, integration, conformance) for the function, endpoint or scenario before reporting a test as missing. - Edge cases from tier 1 covered, not only the happy path. - Over-mocking: the test mocks the very thing it should be testing. +- Persistence round trips: a test of replay, restore, resume or migration must reload from storage (close and reopen, restart, a fresh reader) before it asserts. Reusing the object that did the writing passes even when nothing, or the wrong thing, was written. - Flakiness sources: time, randomness, ordering, network, shared global state, sleeps. - Test names describe behaviour; assertions are specific (not just "no exception"). - Bug fixes come with a regression test. @@ -141,6 +144,10 @@ Language-agnostic. Pair it with the language files for the specific forms these ### Documentation - README, API docs, changelog and migration notes updated for user-visible changes. - Comments and docstrings near edited lines still true. +- **Every factual claim the change adds or edits is true.** Prose in docs, ADRs, changelogs, runbooks and agent files (`AGENTS.md`, `CLAUDE.md`) states a contract: error and status codes, limits and sizes, file names and paths, config keys, defaults, preconditions, which cases succeed and which fail. List the concrete claims in each changed paragraph and check each one against the code or decision record it describes, at the layer it describes (`verification.md`, "Doc claim checked at the wrong layer"). Treat these docs as part of the code change, not as prose to skim. +- Recovery, upgrade and migration steps: walk them against the code. Does doing exactly what the doc says reach the promised state? A step that leaves out something the code also reads (rotated archives, a cache, a second config location) leaves the operator stuck while believing they followed the fix. +- Compatibility and limit claims hold at the boundary, not only in the typical case ("an older build can open it" must survive the largest record this build writes). +- Statements that must agree do: a changelog entry with its neighbours and the version bump, a summary (`README`, `AGENTS.md`) with the detailed doc, a doc with the ADR it cites. A summary that drops a condition is the version readers act on. ## Context-dependent angles diff --git a/skills/code-change-review/references/verification.md b/skills/code-change-review/references/verification.md index cafbb5b..72dcf17 100644 --- a/skills/code-change-review/references/verification.md +++ b/skills/code-change-review/references/verification.md @@ -83,6 +83,7 @@ Each pattern below is a real kind of rejected review comment, with the check tha | **Documented decision** | "This should block until the reload is confirmed." | Check ADRs, design docs and comments. If it is a recorded trade-off, either drop it or question the decision explicitly, unless it breaks a spec, requirement or security invariant, which is still a defect. | | **Moved, not changed** | "This new constructor takes a large object by value." | Check whether the code is new or moved verbatim (`git diff -M`, `git log -L`, or the base version). Moved code is pre-existing; label it so or drop it. | | **Fixed elsewhere in the change** | "The new column isn't added to the serializer." | Read the whole change set, not only the hunk; the other half is often in another file of the same PR. | +| **Doc claim checked at the wrong layer** | "The doc says the turn ends with a `permission` error, but the runtime records `tool_denied`, so the doc is wrong." | Find which output the sentence describes (a CLI or API error code, a journal or log record, a UI message) and check that layer. The same event often has a different name at each layer, so a doc can be right about one and wrong about another; the finding is then the sentence's mismatch with the layer it names. | | **Process or metadata out of context** | "This version bump skips a number." | Check the project's process docs and other open PRs that may have taken the number. | | **Library behaviour from memory** | "This function throws on empty input." | Read the pinned version's source or docs; behaviour changes between versions. | | **Concurrency that can't happen** | "Two requests can race on this map." | Confirm the code runs concurrently: thread model, event loop, actor, per-request instance, lock held by the caller. | From 07768f096b52912b202b241c94e64df992eae869 Mon Sep 17 00:00:00 2001 From: James Chapman Date: Thu, 26 Nov 2026 00:43:48 +0000 Subject: [PATCH 2/2] Review feedback: P1 for data-losing docs; eval cases for the new rules - reporting.md: a false doc claim now ranks on the same scale as code. Following it in normal use and losing or corrupting data is [P1], matching the severity table; being left stuck stays [P2]. - evals: three more cases cover rules the earlier cases missed. A rejection fallback that exceeds the smallest result limit and gives file-edit advice to every tool; a raised event limit whose largest escaped message an older build rejects; and a clean case where the doc names the CLI code correctly while the journal uses another name, which checks the "wrong layer" false-positive pattern. The README's sample predictions cover all 14 cases. Co-Authored-By: Claude Opus 5.5 --- evals/README.md | 5 ++- evals/cases.json | 38 +++++++++++++++++++ .../references/reporting.md | 2 +- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/evals/README.md b/evals/README.md index 400305b..f12769c 100644 --- a/evals/README.md +++ b/evals/README.md @@ -18,7 +18,10 @@ Save adjudicated predictions as JSON: "docs-recovery-step": ["recovery-misses-archives"], "adapter-arguments": ["adapter-outcome-differs"], "replay-test": ["replay-uses-open-journal"], - "docs-limit-accurate": [] + "docs-limit-accurate": [], + "rejection-result": ["fallback-over-limit", "size-advice-wrong-tool"], + "event-size-limit": ["old-build-rejects-escaped-message"], + "docs-error-layers": [] } ``` diff --git a/evals/cases.json b/evals/cases.json index eea4e9b..889c29d 100644 --- a/evals/cases.json +++ b/evals/cases.json @@ -129,6 +129,44 @@ "context": "argument_limit is the only place the argument size limit is chosen; the docs page describes the limits to users.", "diff": "--- a/src/tools.rs\n+++ b/src/tools.rs\n const MAX_ARGUMENT_BYTES: usize = 4 * 1024;\n+const MAX_WRITE_ARGUMENT_BYTES: usize = 32 * 1024;\n+\n+fn argument_limit(tool: Tool) -> usize {\n+ match tool {\n+ Tool::CreateFile | Tool::EditFile | Tool::MultiEdit => MAX_WRITE_ARGUMENT_BYTES,\n+ _ => MAX_ARGUMENT_BYTES,\n+ }\n+}\n--- a/docs/file-access.md\n+++ b/docs/file-access.md\n-Each tool call's argument JSON may be at most 4 KiB.\n+The create, edit and multi-edit tools accept up to 32 KiB of argument JSON;\n+every other tool keeps the 4 KiB limit.", "expected": [] + }, + { + "id": "rejection-result", + "title": "Recoverable result for rejected tool calls", + "language": "rust", + "context": "Operators may set result_limit, the largest tool result sent back to the model, as low as 200 bytes; a result over the limit ends the turn. Call IDs may be up to 128 bytes and tool names up to 32. workspace_run_command and the other non-text tools take a 4 KiB argument limit; only create, edit and multi-edit take 32 KiB. rejection_result builds the result for every rejected call.", + "diff": "+fn rejection_result(call: &RejectedCall, reason: &Reason, limit: usize) -> String {\n+ let detailed = match reason {\n+ Reason::ArgumentSize { len, max } => format!(\n+ \"{} call {} rejected: arguments are {len} bytes, over the {max}-byte limit. {}\",\n+ call.tool, call.id,\n+ \"Create the file with a short first version, then extend it with edits.\",\n+ ),\n+ other => format!(\"{} call {} rejected: {other}\", call.tool, call.id),\n+ };\n+ if detailed.len() <= limit {\n+ return detailed;\n+ }\n+ // Too long for the configured limit: keep what pairs the result with its call.\n+ format!(\n+ \"Tool call {} to {} was rejected ({}). Fix the call and try again.\",\n+ call.id, call.tool, reason.code(),\n+ )\n+}", + "expected": [ + { + "id": "fallback-over-limit", + "priority": "P3" + }, + { + "id": "size-advice-wrong-tool", + "priority": "P3" + } + ] + }, + { + "id": "event-size-limit", + "title": "Larger session event limit", + "language": "rust", + "context": "Builds before 0.63.0 refuse to open a session journal that holds any line over 64 KiB. Each journal line is one serialized event; serde_json writes every control character inside a string as a six-byte \\u00XX escape. Message text is capped before encoding.", + "diff": "--- a/src/session.rs\n+++ b/src/session.rs\n-const MAX_EVENT_BYTES: usize = 64 * 1024;\n+const MAX_EVENT_BYTES: usize = 80 * 1024;\n const MAX_MESSAGE_TEXT_BYTES: usize = 12 * 1024;\n--- a/docs/session-storage.md\n+++ b/docs/session-storage.md\n+The event limit is now 80 KiB, to make room for 32 KiB write-tool calls. A\n+journal whose tool calls all fit within 4 KiB still opens in older builds.", + "expected": [ + { + "id": "old-build-rejects-escaped-message", + "priority": "P3" + } + ] + }, + { + "id": "docs-error-layers", + "title": "Duplicate call error code", + "language": "rust", + "context": "The CLI prints ErrorKind::code() as error.code in its JSON output. The session journal separately records TurnError::journal_code(). A duplicate call identifier is reported as TurnError::InvalidCall, and a call denied by a preference as TurnError::Denied. docs/cli.md describes the CLI's JSON output.", + "diff": "--- a/src/error.rs\n+++ b/src/error.rs\n impl From for ErrorKind {\n fn from(error: TurnError) -> Self {\n match error {\n TurnError::Denied(_) => ErrorKind::Permission, // code() is \"permission\"\n+ TurnError::InvalidCall(_) => ErrorKind::ToolCall, // code() is \"tool_call\"\n TurnError::Limit(_) => ErrorKind::ToolLimit, // code() is \"tool_limit\"\n }\n }\n }\n--- a/src/turn.rs\n+++ b/src/turn.rs\n TurnError::Denied(_) => \"tool_denied\",\n+ TurnError::InvalidCall(_) => \"invalid_tool_call\",\n TurnError::Limit(_) => \"tool_limit\",\n--- a/docs/cli.md\n+++ b/docs/cli.md\n+A turn that ends on a duplicate call identifier prints `error.code` as\n+`tool_call`; a call denied by a preference prints `permission`.", + "expected": [] } ] } diff --git a/skills/code-change-review/references/reporting.md b/skills/code-change-review/references/reporting.md index 0128692..1126605 100644 --- a/skills/code-change-review/references/reporting.md +++ b/skills/code-change-review/references/reporting.md @@ -18,7 +18,7 @@ Severity is a priority rank from `[P1]` (most severe) to `[P5]` (least severe), `(Defect)` versus `(Quality)` depends on whether the code behaves wrongly, not on what kind of work the fix is. A missing test is `[P4] MINOR (Quality)` on its own; if the untested code is actually broken, report the bug at its own rank and mention the missing test in the fix. -Documentation behaves wrongly when someone acts on it. A false claim that an operator, user or integrator will follow (a recovery step that doesn't recover, a wrong error code to search for, a compatibility promise the format breaks) is a `(Defect)`, ranked by what following it causes: `[P3]` usually, `[P2]` when following it leaves them stuck in normal use or loses data. Stale or imprecise wording that changes no one's action is `[P4] MINOR (Quality)`. +Documentation behaves wrongly when someone acts on it. A false claim that an operator, user or integrator will follow (a recovery step that doesn't recover, a wrong error code to search for, a compatibility promise the format breaks) is a `(Defect)`, ranked by what following it causes, on the same scale as code: `[P3]` usually, `[P2]` when following it leaves them stuck in normal use, and `[P1]` when following it in normal use loses or corrupts data (a recovery step that deletes the only copy). Stale or imprecise wording that changes no one's action is `[P4] MINOR (Quality)`. When torn between two labels, pick the less severe one (the higher number) and say what would raise it ("[P3] MINOR (Defect), or [P2] MAJOR if this endpoint is public").