Repository navigation
feat(analysis): add opt-in retained inventory and WASM views - #2122
Conversation
Keep complete inspection output and historical Evidence input parsing intact. Add exact path selection and graph pages with source completeness, distinct view IDs and parent provenance. Verify SDK-converted schemas, portable CLI input and session export/close/import behavior.
…aults Keep delivery options out of inventory execution, preserve legacy request parameters on omission, and retain both complete inspection and atomic source Evidence. Reuse shared summary projection and advertise only its exact artifact summary carrier. Verify complete, summary, extraction and missing-retention behavior through public MCP contracts.
Share the named contract, factory, command and retryable lifetime across CLI and MCP. Preserve existing constructors, complete output and provider selection. Read retained WASM summaries and exact source forms without rerunning WABT; validate decoded WAT identity at its owning model and reuse Unicode-safe text paging. Verify transport overflow recovery, portable input integrity and cleanup retry through public contracts.
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d6f7eb1cc
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae291b4d83
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Reviewed head The final CI run is complete: 27 checks pass. Apple E2E and test shards 2, 3 and 4 pass. The only originating failures are the existing empty prompt-completion assertion (shard 1) and both Darwin packaged-completion checks; exact logs match main's earlier failed run, and the affected implementation/fixture files are byte-identical. Coverage/timing and CI-required fail because those lanes fail. This is not a green CI gate, and those existing failures remain unfixed as requested. All 12 generated result JSON receipts were archived and byte-verified outside the checkout. The final PR tree keeps scripts, corpus inputs and Markdown findings instead. The required co-author trailer is on the recent commits and prepared squash message. The maintainer explicitly authorized a verified merge, with no version publication. Normal merging of this feature branch only updates the release proposal ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52649c43eb
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Preserve upstream HAR API-surface views, portable capture admission, exact layout/JavaScript summary carriers and existing CLI tests alongside the inventory/WASM pilot. Build, full static checks and generated documentation checks pass after resolving the three conflicts. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Pin post-main-integration verification separately from earlier model trials. Record 123 focused assertions, installed-package WABT cases, genuine old Evidence roundtrips, unchanged Obsidian complete delivery and explicit summary fact conservation. Preserve resource events and remaining coverage limits; keep complete managed producer tables outside Git with curated identities, selected records and payload digests. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Keep complete-graph description checks semantic across capitalization and document why reported WASM execution/network metadata grants no execution authority. Preserve all lifecycle/effects assertions and leave production logic unchanged. Record exact main-versus-PR attribution for pre-existing prompt-completion and Darwin package failures; those remain outside this PR. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Archive all twelve checkpoint JSON files byte-for-byte outside the checkout and ignore generated experiment results. Preserve reproduction inputs, measured findings, exact runtime and migration identities, resource qualifications and public main-versus-PR CI evidence in Markdown. Keep historical checkpoints intact. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
…ction Preserve the authenticated parent subject and reuse one owning inventory subject/digest/format rule for both carriers. Reject null subjects and inconsistent root identity before summary or page projection. Keep generic historical Evidence parsing and valid source/view identities unchanged. Verified with 37 focused assertions, full static/docs gates, actual public SDK before/after reproduction using original Obsidian records, genuine old SQLite/Obsidian import/view/export, and unchanged Obsidian summary facts and delivery bytes. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Require explicit declaration of inherited REA/Hopper and Ghidra/Java configuration in both SDK and real-model drivers. Validate string settings and fingerprint the shared declaration policy. Fail before starting a measured server or creating an isolated model profile; never clear caller selections or serialize ambient values. Qualify historical selected-settings receipts. Both contaminated-environment probes reject before output/profile creation without logging the sentinel value. Source/static/docs checks and a real Obsidian workflow pass. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Require a known original subject with the exact reported WASM path and byte digest before deriving a summary or facet. Share this identity rule with the producer workflow and preserve valid source records and original caller paths. 26 focused assertions and type/lint checks pass. Actual WABT inspection of the published VS Code INI grammar reproduces accepted null/wrong-path records on the frozen runtime; the corrected runtime rejects both with WABT unavailable. Genuine old SQLite/Obsidian records still import/view/export unchanged. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
52649c4 to
2ef0467
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ef0467bbd
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Share the owning subject/digest/format validator across atomic and outer inspection carriers. Six additional public MCP assertions reject missing or inconsistent outer subjects. Move identity checks to the small real format workflow while preserving the large ZIP capacity test and its deadline. Actual Obsidian SDK calls reproduce acceptance on the frozen parent and invalid_request after correction. Focused boundary, build, fast static and docs checks pass. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Hash the effective inherited or explicitly selected provider PATH without retaining its value or the ambient environment. Reject different or absent search-path fingerprints in SDK comparisons. Real Obsidian replays preserve facts while a changed inherited PATH is correctly classified as non-comparable. Historical receipt and executable-replacement limits remain explicit. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18e5d62759
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Attempt a final cgroup event snapshot before wait/cleanup and mark disappearing, incomplete or still-owned scopes unverified. Keep last observations separately. Missing final counters no longer grade as zero; soft/hard/task-limit events cannot establish an unrestricted resource pass. Related parser and actual short-command probes pass; regrading an existing correct SQLite model answer rejects only its unverified resource conditions. No unrelated build, provider, schema or package checks are repeated. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Rebase onto latest main after #2122 merges. Seven relevant WASM MCP workflows and one fresh real-WABT SQLite SDK request pass, preserving selected facts and original source identity. Keep original cohort fingerprints and counter qualifications; do not repeat unrelated provider/model/package tests for this integration. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Summary
Let agents read the facts needed for an investigation from retained inventory and WASM Evidence while keeping existing complete CLI/MCP requests usable. Add precise known nested inventory output, explicit summary/path/page delivery, and a small internal static WASM descriptor. Refs #2016.
Problem and expected behavior
A manifest/path question previously delivered the entire inventory. A completed SQLite WASM result can exceed the MCP frame even when the question needs only counts and a few exports. Callers should be able to select those facts without repeating analysis, losing the original Evidence, or changing existing default output.
The post-integration public Obsidian comparison delivers 937,404 compact JSON bytes through the unchanged complete workflow versus 16,322 bytes through explicit summary plus exact path views (about 98.3% less). Selected facts and atomic source identity agree. These are delivery bytes, not exact token counts or a general engine speedup.
Change and scope
inspect_artifactsummary delivery and retained/portable inventory views with exact path selection. Retain complete inspection and atomic source records; delivery selection does not reach the producer.c22111eca.Contract and boundary impact
Representative opt-in MCP flow:
{"name":"inspect_artifact","arguments":{"detail":"summary"}}Use its
normalized_result.parent_evidence_idas the exact source reference:{ "name":"inspect_analysis_view", "arguments":{ "source":{"kind":"retained-evidence","evidence_id":"<parent_evidence_id from receipt>"}, "view":{"kind":"inventory","collection":"occurrences","logical_paths":["package.json","main.js"],"offset":0,"limit":32} } }Omitting
detailretains the original complete inspection.Evidence and regression coverage
Tests: public SDK-converted schemas, complete/summary delivery, exact/empty path selection, partial-source coverage, portable views after source deletion, authenticated import/export, oversized-response continuation, Unicode paging, invalid digest and cleanup retry.
Executed baseline evidence: frozen
42b0ed12and explicitly recorded candidate runtimes; unchanged target SHA-256, source identities and selected facts. Genuine old SQLite/Obsidian records are imported or passed inline to the integrated runtime with WABT unavailable, then viewed/exported without another producer run; the entire original WASM record is deeply equal.Real artifacts/models: shipped jq, NewPipe, ShareX assemblies, OpenWrt, Obsidian and SQLite; published historical WETH bytecode; owned Excalidraw/Chromium capture. Earlier real Codex CLI trials keep their original revision/configuration fingerprints. One same-question SQLite pair changes calls from 42 to 3 and reported input tokens from 304,698 to 74,387 after exact summary guidance; this is one stochastic pair, not a statistical/general causal claim.
Remaining gaps: native PE, DOS, other OS/engine lanes and deeper runtime/firmware questions remain progressive work. JavaScript model output omits full coverage provenance; browser model output loses accessibility metadata to client context clipping. These are incomplete answers, not full model passes. WETH deployment authenticity is unverified.
Observed, derived and inferred claims remain distinguishable.
Artifact identity, source provenance and failed attempts remain preserved.
Unsupported, incomplete, unavailable and uncertain outcomes remain visible.
Validation performed
Post-main-integration verification is pinned independently from the earlier experiments:
npm run build:cached,npm run docs:generate,npm run check,npm run docs:check— passed.npm run test:focused --ten relevant domain/service/parser/MCP/cleanup files — 112/112 passed.npm run test:focused -- tests/boundary/cli/analysisViewCli.test.ts— 10/10 passed.npm run test:focused -- tests/boundary/mcp/contractPresentation.test.ts— 1/1 passed, unchanged deadline, isolated. The earlier pinned combined run's timeout remains recorded.npm run verify:wasm:package— 42 real WABT 1.0.42 CLI/MCP cases passed after actual package creation and private-prefix installation.verify-migration.mjsand a fresh baseline/integrated Obsidian SDK cohort — original records/IDs, default complete output and selected summary/path facts preserved.Post-integration verification, CI attribution and measured findings. The archived JSON files are byte-verified and indexed locally; reproduction does not depend on local outputs.
CI attribution and current review checkpoint
The first PR run exposed two description-related test mismatches;
00d51e0fcupdated only those expectations. Historical prompt-completion and Darwin package
failures also occurred in main at
c22111eca,with byte-identical affected source/fixtures. Those failures were left for the
team as requested. Main subsequently repaired provider-readiness fixtures in
621cee192andfe4b94a66; this PR is rebased onto main60259a91d.Current head
534a6271e571b925341c93397e8e5f118ca43676is pushed; required CI ispending/queued, so the current complete remote gate is not yet verified green.
The maintainer authorized a verified merge. Earlier exact-head merging was
rejected by the required coverage/timing gate; repository protection is unchanged
and auto-merge is disabled. No release or deployment is authorized or performed.
Six substantive review findings have been reproduced and addressed: atomic and
outer inventory subject/digest/format identity, exact WASM source path/digest,
undeclared inherited provider controls, effective provider PATH comparability, and unknown final resource counters.
Missing final counters now remain unverified rather than grading as zero. Related parser/short-command probes and existing-model regrading cover this driver-only correction; unrelated checks were not repeated. Earlier resource receipts retain last-sampled observations and do not prove final counters. Original records and valid source identities remain unchanged. Actual public SDK
before/after probes use original shipped Obsidian and published VS Code grammar
producer data. Boundary assertions cover summary and collection projections.
Fresh differing-PATH Obsidian replays preserve facts but correctly fail settings
comparability. Missing PATH fingerprints also cannot certify equal settings.
The latest three inventory MCP workflows, runtime build, fast static gate and
generated docs pass. An initial negative-case placement exceeded the existing
large ZIP test deadline; checks were moved to the small real format workflow,
retaining the original capacity/retention coverage and deadline. The final scope
records one soft memory-high event, no hard/task-limit abort and no OOM/OOM-kill;
this is static/test verification, not a valid performance trial. Earlier recorded
focused/package/model results keep their original runtime scope.
Compatibility, safety and release
memory.highevents and the subsequent cold pre-push scope records 37; neither reaches the hard limit or OOM; the earlier 192-task browser abort and qualified 256-task retry remain recorded. Disposable model profiles/authentication copies are removed; ambient environment is not persisted.check:prand the complete generic package verifier were not run; CI and reviewers own the broader gate. Newly discovered out-of-scope REA findings remain in the separate local team-handoff document rather than being repaired in this change.Review checklist
Substantive review fixes and latest-main integration
Three real findings are addressed: atomic inventory views validate the authenticated subject/digest/format; WASM views validate exact original subject path/digest through the same identity rule as the producer; experiment drivers reject undeclared inherited provider controls before server/profile creation. Generic historical Evidence input parsing and valid original records/IDs remain unchanged.
The identity issues have actual public-SDK before/after reproductions with shipped Obsidian data and the published VS Code INI grammar. The related runs pass 37 inventory/view and 26 WASM/service/parser assertions. Genuine baseline SQLite/Obsidian import/view/export still preserves whole original records and source/view identities; fresh Obsidian summary delivery remains 16,322 bytes with identical selected facts. Both contaminated-environment probes reject before output/profile creation without logging values.
Rebased onto main
60259a91dand verified unchanged reviewed code through the three integration resolutions. Upstream provider-readiness tests, managed CLI selection, binary-plist recognition and WABT leading-BOM preservation are retained. Post-rebase build, type/lint, docs and five focused files pass (42 assertions). The previous completion CI failures have since been repaired on main by the team; the earlier red-run attribution stays historical. Current-head CI is running and is not claimed green before completion.The maintainer authorized a verified merge; no publication/version/deployment is authorized. First-call WASM summary is a separate follow-up branch, with this reviewed runtime as its frozen control. Generated detailed receipts remain outside the final PR tree.