Repository navigation
refactor(evidence): unify retained inputs across domains - #8299
Conversation
Derive source borrowing and exact reference selection from declared contracts. Share CLI/MCP workflows while retaining source ownership, closure and admission. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
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. |
[High impact] The reviewed changes appear safe to merge, with no new blocking issue found. SummaryThe PR shares inline and retained Evidence selection across domain workflows and adds explicitly selected bundles to existing CLI commands.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
Inline[Complete inline Evidence] --> Select[Shared request resolver]
Ledger[Current MCP ledger] --> Select
Bundle[Explicit CLI bundle] --> Select
Select --> Owner[Domain owner authenticates sources]
Owner --> Workflow[Shared application workflow]
Workflow --> Result[Derived Evidence and source records]
Result --> Retain[Retain sources when a recorder exists]
Retain --> Deliver[CLI or MCP reply]
Reviews (7) · Last reviewed commit: "fix(evidence): preserve source paths thr..." · Reviewed by Greptile |
Authenticate process input files before admitting later sources and compare their parsed facts through the shared application owner. Keep fixed-server WASM inline composition available with explicit caller-owned retention. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Keep public CLI command names in JSON syntax errors while canonical workflow operations still own dispatch. Verify caller-owned sources on fixed MCP ports and retain native malformed-source diagnostics from the Evidence owner. Record all thirteen real public-transport attempts across nine domain lanes, including fresh imports, supported CLI parity, failures and resource bounds. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70db1e8164
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…w checks Keep native Evidence-integrity diagnostics distinct from reconciliation input errors. Record the current-head full/compact MCP probe and explain why the reported null-source refinement path is unreachable. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Assert canonical Evidence integrity diagnostics after borrowing admission, including the selected side, parameters field and exact nesting bound. Verify that normal comparison still works afterward and no provider is opened. Record the six-file diagnostic and lifecycle gate and its resource evidence. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
…osure Check the actual missing dependency for complete inline comparison sources and the missing comparison for retained selectors. Both forms recover to complete, equal Evidence after importing the originating bundle. Record the affected acceptance workflows and resource measurements. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Retain the original source-owner failure and diagnostics while adding its schema-declared input path only when absent. Keep owner paths and error identity intact without another source parse. Verify compact default HTTP failures, capacity and recovery, resolver ownership, all ADB CLI cases, and a fresh genuine retained native replay. Record the unreproduced CI timeout and actual resource evidence without changing its limit. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Upstream morluto#8299 and morluto#8267 declare Evidence inputs once for 20 composition tools, which covers feat-evidence-source-contract (78da95a) and feat-evidence-sources-process-managed (31dbe14, which contains it). Reverse their net patch against 317bf3f (57 files), so main's version takes their files. Also restore morluto#8015's managedFieldConstantsComparison.test.ts, which this branch had adapted to the stack's async executeManagedMemberComparison. No topic uses the stack's names. Both branches stay on the fork.
Declare logical Evidence sources once and resolve exact retained inputs through shared application workflows across 20 composition tools. Preserve domain-owned authentication, source closure, caller choices, coverage and resource admission. Validation includes public CLI/MCP regressions, local Codex terra/high trials and fresh-import real-artifact workflows. Measurements, failed attempts and coverage limits are recorded in docs/verification/evidence-input-composition-2026-10-31.md. Fixes morluto#8293. Fixes morluto#8281. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Summary
Fixes #8293. Fixes #8281.
Completed analysis could remain retained while a downstream tool still required its full payload. Two real Ghidra dossiers could exceed the default input budget just to build a call path. Logical Evidence inputs now share exact inline/reference selection across domains, so producers can return summaries and consumers can reuse complete parent IDs.
Change and scope
--evidence-bundle, read once without modifying it. CLI/MCP use shared workflows; existing artifact-path commands retain their interfaces. Skill instructions and owning guides are updated.Contribution scope: ordinary composition within existing local analysis authority; no new provider, target execution, injection, mutation or protection recovery capability. Maintainer scope decision: not applicable.
Contract and boundary impact
evidence_integrity_mismatch) in both schema profiles; other workflows keep their owner-specific projections; invalid request envelopes/reference grammar remain request errors. CLI JSON syntax diagnostics preserve their public command names. Source IDs, caller values and complete Evidence access remain available.Expected effects:
Evidence and regression coverage
The focused run passed 508 checks. Coverage includes inline/ref equality, missing/wrong sources, independent inline admission, parent IDs, source closure, caller identities, real SDK full/compact conversion, CLI bundle immutability, capacity and late cancellation. SDK tests were subsequently moved into the MCP boundary project and rerun. Review follow-up passed 103 related checks plus ten selected schema/CLI checks: process files authenticate sequentially through shared parsed facts, and fixed-server WASM comparisons explicitly retain caller ownership without weakening provider-source requirements. Existing authentic process captures still produce the exact original comparison ID. An additional seven-file run passed 161 checks, including 17 fixed-server/inline-view cases, both schema profiles, JSON diagnostics, selected identities and file/view source boundaries. A final-head public MCP review probe passed two valid controls and 24 malformed-source rejections across full/compact profiles, with correct source paths, zero provider calls and verified cleanup; the reported null dereference was not reachable. A subsequent six-file run passed 104 MCP checks; process-depth coverage now checks the canonical owner diagnostic, exact depth/field, successful recovery and zero provider startup. Runtime code was unchanged. Five related acceptance files also passed 17 checks: supplied inline comparisons report missing linked dependencies, retained selectors report a missing comparison, and importing the full bundle restores complete equal outputs. The rebuilt final gate passed nine files / 75 checks, including all 41 ADB CLI cases and default HTTP/stdio admission. HTTP boundary errors retain the source path and stay under 4KiB; the 1,024-element allowance is unchanged. A fresh target-free replay of the genuine Ghidra bundle returned all three complete native results equal to their original goldens, without producer calls.
Real local Codex CLI 0.165.0 explicitly requested
gpt-6.1-terra/ high for 14 attempts across jq/Ghidra, NuGet, Obsidian, agent-browser, CSS WASM, Rectangle/Apple, NewPipe, Shark APP/HAP and authentic jq captures. Failures and unknowns are preserved: Obsidian's existing timeout/oversized feature output is partial (#8296); the first supplemental JS task wandered and was stopped. Later scoped tasks are labeled separately.The real WASM CLI pair produced byte-identical output and the same MCP Evidence ID: inline request 27,823,017 bytes versus 261 bytes plus the selected existing bundle. Observed elapsed/CPU/peak: 2.832s / 2.612s / 370.5MB and 2.632s / 2.385s / 310.0MB. This single ordered pair has uncontrolled shared caches; no general speedup or token-saving estimate is claimed. Actual model tokens, common producer cost, failed attempts and proof gaps are in the verification record and accompanying JSON.
A separate real public-transport matrix completed nine lanes across JS, native, managed, Android, Harmony APP/HAP, Apple/artifact, WASM and process. Sources were exported, original connections closed, and imported into fresh target-free consumers; supported inline/CLI forms produced complete equal Evidence without producer replay. Thirteen attempts retain three corrected harness assumptions and one actual SDK transport refusal. The approximately 28MB WASM inline pair exceeds the SDK default 10MiB frame limit; retained inputs and both CLI forms succeed without raising limits. Cross-domain native/process correlation remained an explicit unresolved hypothesis. This scripted matrix makes no autonomous-selection or model-token claim.
Validation performed
check:fastlint exceeded the local early-stop budget, so its whole-process form is not claimed as passed. Local Git hooks are skipped after these equivalent bounded checks; CI retains its full gate.npm run docs:check(including nine README checks) and finalnpm run format:check(6,581 files): passed.Compatibility, safety, and release
Additive successful-input contracts and canonical malformed-source diagnostics; no migration or manual package-version bump. Real Ghidra/WABT, public shipped artifacts and controlled Linux process captures were exercised. Real Hopper, IDA, Windows capture, devices, Harmony execution and passive browser reconciliation remain unverified. No original source recovery or runtime equivalence is claimed.
Author readiness
Human owner: @gensokyo-dev
The owner explicitly delegated implementation, final-diff review, verification, readiness declarations and merge to this agent. The agent performed the review and checks and fills these declarations under that instruction; a separate human inspection is not claimed.
Before merge
type(scope): outcome.