Repository navigation
feat(evidence): name a standalone Evidence record with detected_kind on every bundle refusal - #11039
Conversation
…on every bundle refusal The file reader, inline bundle reader and investigation ledger refused a single Evidence record with only a message saying so. The file reader's wrong-kind failure now carries detected_kind "evidence-record" (as it already did for analysis snapshots), and the inline and ledger refusals carry it on their input issue through one domain helper. Tests assert the field instead of the sentence. The inline CLI/MCP case now asserts full parity: since compact input schemas, MCP reaches the same domain reader.
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Medium impact] This PR appears safe to merge; the new error facts preserve existing record checks and refusal behavior. SummaryAdds
Reviews (1) · Last reviewed commit: "feat(evidence): name a standalone Eviden..." · Reviewed by Greptile |
Summary
Refs #10508 (Phase 6.1). Supplying one Evidence record where a bundle is required was refused by three producers (the bundle file reader, the inline
evidence_bundlereader of the reconstruction tools, and the investigation ledger's import), and only the message said why. Each refusal now carriesdetected_kind: "evidence-record", matching the existingdetected_kind: "analysis-snapshot"on the file reader.Problem and expected behavior
Change and scope
evidenceErrors.ts:EvidenceFileDetectedKind = "analysis-snapshot" | "evidence-record"forEvidenceFileError.detectedKind(already projected asdetails.detected_kind).EvidenceBundleFiles.ts: thewrong-kindrefusal for a record setsdetectedKind: "evidence-record".evidenceBundle.ts:singleEvidenceRecordIssue(path, message)builds theinvalid_valueissue withobserved: { detected_kind: "evidence-record" };readEvidenceBundleuses it at the caller's argument path, andEvidenceLedger.importuses it at the input root (it previously had no issue, so its projection had no details).inlineEvidenceBundleKind.test.tswas failing onmainbefore this change: since compact input schemas (feat(mcp): project compact input schemas into the portable advertised dialect #10632), MCP no longer rejects the altered record by schema, so it reaches the domain reader like the CLI. The test now asserts CLI and MCP return the same error (includingdetected_kindfor the record cases, andevidence_integrity_mismatchfor the altered record) instead of a schema-onlyinvalid_request.Not included: message text is unchanged; no other refusal kinds gain
detected_kind.Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
describeEvidenceBundleFailure(domain) still classifiessingle-record;singleEvidenceRecordIssue(domain) owns its input-issue projection;EvidenceBundleFilesowns the file reader'swrong-kindfacterror.details.detected_kind: "evidence-record"on file refusals;error.details.issues[].observed.detected_kindon inline and ledger refusals. Codes, categories and messages unchangeddocs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): noneExpected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
detected_kind; the record'sevidence_id(caller data) is still checked in the message where it was beforeanalysis-snapshotand the issue's to another value, 5 of 89 tests fail, one per producer pathrea evidence-import record.json --json→{"code":"invalid_request","category":"invalid_input","details":{"path":"…/record.json","detected_kind":"evidence-record",…}}For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/filesystem/evidenceBundleFiles.test.ts tests/boundary/mcp/bundleComparisonMcp.test.ts tests/boundary/cli/evidenceBundleCommands.test.ts tests/boundary/cli/inlineEvidenceBundleKind.test.ts src/application/investigation/EvidenceLedger.test.ts: 89 passed (28.8 s wall incl. build)tests/boundary/cli/inlineEvidenceBundleKind.test.tson unmodifiedorigin/main(53f1b62): 1 failed (MCP returnedevidence_integrity_mismatchwhere the test expectedinvalid_request)npm run check:fast: passedcommand— resultCompatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.