Repository navigation
test(analysis): verify real preset snapshot and cleanup boundaries - #2349
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Add public CLI/MCP Ghidra verifiers for actual stored snapshot entries, profile mismatch in both directions, source/provenance preservation, token/start-identity verified cancellation and real permission cleanup retry. Keep selected analyzer defaults and product contracts unchanged. Record failed observer assumptions and resource-qualified limits; raw artifacts remain outside Git. GNU true workflows pass; broader jq verification is still running. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Record actual jq default/disabled snapshot boundaries and exact CLI/MCP replay. Verify named invalid-analyzer failures and healthy EVM peers, preserving failed observer assumptions. Keep timings scoped to existing snapshot verification rather than claiming new model or preset performance gains. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Independently confirm the recovered bridge socket directory is absent after permission restoration and close retry. Preserve the recovered ownership manifest for review. Both actual Ghidra profiles pass the related lifecycle workflow again; wider artifact/model matrices are not repeated. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
The shard-6 failure is independently present on the exact main base used by this PR's CI merge:
Both fail Main subsequently fixed the synthetic fixture in Separately, final review adds direct absence verification for the recovered socket directory after cleanup retry and records the recovered ownership manifest. Both real Ghidra profiles pass that related workflow again; wider provider/model matrices were not repeated. |
c526fd5 to
67f817e
Compare
Summary
Part of #2016. Add reproducible real Ghidra CLI/MCP verification for the remaining task-scoped preset lifecycle boundaries: actual stored snapshot entries, profile mismatch in both directions, startup cancellation, recovery and cleanup retry.
The existing production default remains unchanged. The prior disabled-switch jq experiment changed a callee body, so this PR introduces no general fast-preset recommendation or runtime/API change.
Problem and expected behavior
Equal content-addressed replies do not prove snapshot reuse, a logical run ID does not identify a process generation, and a failed cleanup must retain its resource for another close. The new verifiers check those boundaries against real Ghidra and kernel/process observations instead of relying on those assumptions.
Change and scope
verify-preset-snapshot.mjsruns real default/disabled analysis, validates an actual exported query entry, checks fresh MCP and CLI reuse, rejects both wrong-profile snapshots before headless startup, and verifies original records/source bytes. It records the known headless launch command through caller-supplied strace.verify-preset-lifecycle.mjsobserves a token/start-identity verified JVM before endpoint readiness, cancels via the public SDK, confirms cleanup with production read-only token sweeps, and proves successful fresh work. A permission fault affects only its verified user-owned temporary project; restored permissions allow the retained-resource close retry.Contract and boundary impact
Expected effects:
Evidence and regression coverage
true: real default/disabled profile digests, storedanalyze_functionentry, exact SDK/CLI task facts, two-sided snapshot rejection, valid default restoration and headless launch counts pass.0x403a50: the same complete snapshot/profile/CLI workflow passes. The selected entry agrees across profiles; this does not establish call-graph or whole-app equivalence.true, both profiles: actual pending startup cancellation, native start-identity proof of recovery, read-only token cleanup, realcleanup_incomplete/EACCES with retained resource, restored-permission retry and unchanged source bytes pass.execution_failurediagnostics. MCP retains a healthy bundled EVM peer. CLI uses an error string with sibling fields; saved replies were regraded against that actual envelope without rerunning the provider.For evidence-bearing changes:
Validation performed
f76163c2467db623f9de0bda757c9d8610ca9565; their exact source hashes and private receipts are documented.node --check/ focusedoxlint— both scripts pass with no warnings.npm run check— pass under the unchanged one-CPU/4 GiB hard/3 GiB early-stop controls. The valid typecheck cache is reused by the full gate; its near-limit memory and soft-limit events are excluded from efficiency claims.npm run docs:check— pass.Compatibility, safety and release
Existing users keep their API/default/provider choices. The scripts require explicit local inputs and new private output directories; no install or configuration migration is introduced. Revision is caller-supplied and should accompany the built/frozen runtime receipt.
Timings include discovery, tracing, profile inspection, rejection and cleanup. They verify the existing explicit JSON snapshot mechanism and are not new architecture speedups, repeated whole-question performance claims or model token measurements. Final completed-scope cgroup counters remain unknown; sampled values do not establish absent late OOM/limit events. Wider native/OS/domain cases remain scoped to their earlier checkpoints.
No release, deployment or version change. Existing REA defects remain in the requested private
/tmprecord.Detailed pins, actual observations, corrections and reproduction.
Before merge
67f817e3653efad35f7044e68fbd6f163b86864b: all 36 checks succeed. CI receipt. Bot review quota is exhausted; automated approval is not claimed.Latest-main review checkpoint
Rebased onto main
3ee6ff43c1696a5a5269bd4aa5de72f7e5f40627, which independently fixes the exact shard-6 fixture mismatch also observed on the prior main base. The related MCP file passes all five focused cases; missing coverage remains unknown. Final review additionally checks that the recovered socket directory is absent after permission-restoration cleanup retry and records its ownership manifest. Both actual profiles pass that related workflow again; broader artifact/model matrices were not repeated.The native single-task typecheck and required fast checks pass with the unchanged 3 GiB early-stop/4 GiB hard bounds. A guarded typecheck stop and an overly restrictive 128 MiB docs heap attempt remain archived; the docs-only retry uses the existing 512 MiB Node heap and passes (434 MB sampled family peak). Final counters remain unverified. Current head is
67f817e3653efad35f7044e68fbd6f163b86864b; new current-head CI is still running.