Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Low impact] The PR appears safe to merge; both previous findings are addressed and no new blocking issue was found. SummaryThe PR makes bundle errors name the section that differs from the canonical form.
Reviews (2) · Last reviewed commit: "test(evidence): align canonical diagnost..." · Reviewed by Greptile |
|
TL;DR: I ran the PR's 3 changed test files on Node 22.23.4, 24.22.1 and 26.12.1. All 57 tests passed on each version. With
Each file's new check fails without the fix and passes with it. In the Node 24.22.1 log, the three failures are:
CI on a73c373:
The head is 928 commits behind main b81da90. GitHub says the PR is mergeable, and its merge state is blocked. Not run
Test setup
Commandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/domain/evidenceBundle.test.ts tests/boundary/cli/reconstructionObligationLedgerCli.test.ts tests/boundary/mcp/reconstructionObligationLedgerMcp.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
Any canonical-form mismatch reported "Evidence bundle manifests are not canonical", so a bundle whose records were out of order, or whose unknowns differed, blamed unchanged manifests. The error now names the top-level sections that differ from canonical form, for example "Evidence bundle sections are not canonical: records". Fixes #7330 Based on #7358 by zzrs-xxxr, which split records from manifests; this reports every differing section instead, so unknowns or several sections are attributed correctly. Co-Authored-By: zzrs-xxxr <[email protected]> Co-Authored-By: gensokyo-dev <[email protected]>
Any canonical-form mismatch reported "Evidence bundle manifests are not canonical", so a bundle whose records were out of order, or whose unknowns differed, blamed unchanged manifests. The error now names the top-level sections that differ from canonical form, for example "Evidence bundle sections are not canonical: records". Fixes #7330 Based on #7358 by zzrs-xxxr, which split records from manifests; this reports every differing section instead, so unknowns or several sections are attributed correctly. Co-Authored-By: zzrs-xxxr <[email protected]> Co-Authored-By: gensokyo-dev <[email protected]>
Any canonical-form mismatch reported "Evidence bundle manifests are not canonical", so a bundle whose records were out of order, or whose unknowns differed, blamed unchanged manifests. The error now names the top-level sections that differ from canonical form, for example "Evidence bundle sections are not canonical: records". Fixes #7330 Based on #7358 by zzrs-xxxr, which split records from manifests; this reports every differing section instead, so unknowns or several sections are attributed correctly. Co-Authored-By: zzrs-xxxr <[email protected]> Co-Authored-By: gensokyo-dev <[email protected]>
|
Thank you. #10499 reimplemented this fix and credits this PR (see the PR table), so I'm closing it as superseded. |
Summary
evidence-importcorrectly rejects a bundle whoserecordsare out of canonical order, but the diagnostic blames the manifests (reproduced in #7330). This violates theAGENTS.mdrequirement to preserve meaningful failure reasons. Fixes #7330.Problem and expected behavior
Smallest trigger: import a bundle identical to an accepted canonical bundle except that
recordsare reversed. Violated invariant: the failure reason must identify the constraint that actually failed. Observed:Evidence bundle manifests are not canonicaleven though every manifest section is byte-identical. Expected: continue rejecting under the same authenticated canonical-form contract, but describe the violated record-order constraint accurately; a genuinely inconsistent manifest keeps a manifest diagnostic.Change and scope
authenticateBundlecompares the parsed bundle against the canonical projection; on mismatch it now attributes the violation to the section that actually differs:recordsdiffer →Evidence bundle records are not in canonical orderEvidence bundle manifests are not canonicalThe error class gains an optional
sectionparameter defaulting to"manifests", so external behaviour is unchanged for every pre-existing construction site. The fix stays at the producing boundary (src/domain/evidenceBundle.ts) where the canonical comparison already knows both objects; no downstream reinterpretation was added. Acceptance, rejection, classification, and retryability are intentionally unchanged. Contribution scope: not applicable (ordinary diagnostic fix within existing boundaries, no new provider or capability).Contract and boundary impact
evidenceBundledomain authentication (canonical-form check); consumers are the CLI/MCP integrity error projections which forward the message verbatim. No superseded paths removed.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
tsxagainst the source modules) on the affected base: canonical bundle parses; reversed-records bundle is rejected with the record-order message only after the fix — on the base it fails with the manifest message; a genuinely inconsistent provider manifest keeps the manifest message; a bundle violating both still reports the manifest diagnostic. Matches the restoration criteria in [Bug] Record-order validation incorrectly reports noncanonical manifests #7330.For evidence-bearing changes:
Validation performed
npx tsxbehaviour script againstsrc/domain/evidenceBundle.ts— canonical parses; reversed records → "Evidence bundle records are not in canonical order"; bad manifest → "Evidence bundle manifests are not canonical"; both violated → manifest message.npx prettier --check src/domain/evidenceBundle.ts src/domain/evidenceBundle.test.ts— all matched files use Prettier code style.npx tsc --noEmit— reports only pre-existing Playwright-typing errors unrelated to this change; no new errors in touched files.npx vitest run src/domain/evidenceBundle.test.ts— did not execute: suite fails at collection on the unmodified baseline in this Windows checkout (environment limitation; CI runs the suite).npm run test:local -- src/domain/evidenceBundle.test.ts— 9 passed on macOS, Node 24.22.1.npm run test:focused -- tests/boundary/cli/reconstructionObligationLedgerCli.test.ts tests/boundary/mcp/reconstructionObligationLedgerMcp.test.ts— 48 passed on macOS.npm run check:fast— passed on macOS.Compatibility, safety, and release
Author readiness
Human owner: @zzrs-xxxr
Before merge
type(scope): outcome.