Skip to content

test: strengthen integration oracles and verification - #8295

Merged
morluto merged 28 commits into
mainfrom
codex/test-oracle-audit-20261031
Oct 31, 2026
Merged

morluto merged 28 commits into
mainfrom
codex/test-oracle-audit-20261031

Conversation

@morluto

@morluto morluto commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Strengthen test and CI verification where a passing result did not establish the intended behavior, and move duplicated format cases to public CLI coverage while retaining distinct boundary and lifecycle checks. This follows a test-suite audit; there is no linked issue.

Problem and expected behavior

Some tests accepted success without checking the recovered Evidence, the completed process, or the intended request and cleanup behavior. CI scope selection also omitted inputs to real browser and packet-capture verification, and the SQLite lane could silently omit a named test. Tests should exercise the relevant boundary and assert the facts that establish the outcome.

Change and scope

  • Strengthen CLI/MCP Evidence, recovery, process completion, cleanup and provider diagnostic assertions; consolidate redundant cases into public workflows where their distinct coverage is retained.
  • Supervise the POSIX source-test process group during cancellation and add coverage for the development runner. Expand real-browser request checks and the packet-capture verifier and CI scope selection.
  • Keep this within existing test infrastructure and provider authority. No new provider or target execution capability is introduced; a maintainer scope decision is not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: test fixtures, verification scripts, CI scope selection and development test-runner supervision; production domain and provider owners are unchanged.
  • Contribution scope fit and linked maintainer decision: existing test and verification workflows; not applicable.
  • CLI and MCP/tool-catalog contract: no production contract or catalog change intended.
  • Provider, bridge, target-format, or platform compatibility: test coverage and verifier expectations change; platform and real-provider gaps are listed below.
  • Evidence, artifact, provenance, or reconstruction contract: tests assert existing Evidence and artifact outcomes more precisely; no production contract change intended.
  • Target selection, authority, upstream behavior, and cleanup: existing fixture targets and process supervision; cancellation and cleanup assertions are strengthened.
  • Generated metadata, package, or installation impact: none intended.

Evidence and regression coverage

  • Updated public CLI/MCP and boundary tests cover recovered qlog packet Evidence, timed CLI output, ASAR content digests, MCP cleanup results and provider diagnostics. Focused fault injections exposed false-green tests; these were test-oracle probes, not reproductions of production defects.
  • An earlier four-project boundary run was interrupted at its 30-minute guard after 994 passed file lines and eight failed files; final failure diagnostics were lost. A later grouped rerun passed 61 tests across those eight files after test changes. Apart from two corrected Mach-O expectations, the original failures remain unexplained. An earlier OpenCode acceptance failure and four boundary failures also passed isolated probes without a confirmed cause.
  • Bounded lifecycle acknowledgements now release and join fixture work even if expected progress never arrives. SQLite compatibility requires each explicitly named test file. Additional public tests verify complete paging, extraction receipts, provider arguments and signed bytecode fields; redundant regex, JVM archive and iNES cases are consolidated into existing boundary or CLI/MCP coverage.
  • A POSIX reproduction showed that an independently detached provider can outlive cancellation of the test process group; verified descendant ownership across reparenting remains unresolved. The change does not claim to clean up those detached helpers.
  • Provider-switch cancellation after profile resolution is covered; cancellation specifically during the provider-switch drain remains unverified.
  • Simulated providers and generated fixtures do not establish behavior for every real provider or platform.

Validation performed

  • On b6fa73b8d, pre-created provider release gates cover startup that arrives after the acknowledgement deadline. An isolated delayed-stat probe hung in the original test and exited with the expected deadline error in the revised test. The source file passed all 72 tests; check:fast, formatting and diff checks passed. CI for this commit is pending.

  • Follow-up commits through f46bdad70 bound the reviewed Rizin and native startup waits, strengthen selected-record, error and digest assertions, and make MCP teardown failures visible. Focused Node 24.22.1 runs passed 176 tests (21 skipped), 28 tests, 26 tests (one skipped), 129 tests, 153 tests (two skipped), 38 tests, and a separate two-test artifact file; the final three fixture files passed 2, 2 and 8 tests. check:fast, formatting and diff checks passed. Fault injections verified the corrected assertions and cleanup paths. Fixtures do not establish real-provider behavior; the process finalization and filesystem cases use real child processes. CI for the pushed head is pending.

  • On follow-up commit 0ac43cfb6, 99 focused tests passed across 13 files on Node 24.22.1, with one Linux-only case skipped; check:fast, formatting and diff checks passed. Isolated probes showed that wrong errors, wrong trace identities and missing lifecycle acknowledgements previously passed or hung. Provider and capture fixtures are synthetic; CI for this commit is pending.

  • On follow-up commit af000f362, 274 focused tests passed across 16 files on Node 24.22.1; 39 Linux-only PCAP cases were skipped on macOS. check:fast, formatting and diff checks passed. Isolated early-settlement and wrong-input probes demonstrated previously hanging or false-green tests. ADB, SEA and provider fixtures are simulated; Linux PCAP and real-device behavior remain for their respective CI/provider checks. CI for this commit is pending.

  • On follow-up commit 85eac2a53, 289 focused tests passed across 15 files on Node 24.22.1, including real child-process progress cases; check:fast, formatting and diff checks passed. Controlled probes demonstrated false-green Evidence projections and close failures, and showed missing lifecycle acknowledgements fail promptly. These probes do not establish real-provider coverage beyond the explicitly described real-process cases. CI for this commit is pending.

  • After merging main at a989c0e45, the startup gate uses a bounded acknowledgement raced against the request. An isolated invalid-tool probe failed promptly and exited normally. On Node 24.22.1, 241 focused tests passed across 11 files, including the moved WASM CLI regression and overlapping Evidence/MCP paths; 34 Python context tests, check:fast, formatting, discovery (2,919 files) and diff checks passed. Providers in fixture-based cases are simulated. CI for the merged head is pending.

Earlier-tree results are identified below and do not validate the final PR tree:

  • Source lane: 1,204 files passed, 22,219 tests passed and 28 skipped. Acceptance lane: 1,849 tests passed and 15 skipped across 315 selected files. MCP boundary rerun: 252 files passed and two skipped; 1,654 tests passed and 11 skipped. Python lane: 135 tests passed. These broad runs preceded later edits.

  • Later focused checks recorded 78 passed and two skipped across five setup/capture acceptance files; 20 MCP cleanup tests, four ASAR MCP settings tests, 21 Ghidra extension tests and 11 Hopper instruction tests passed. check:fast, formatting and git diff --check passed on that earlier tree.

  • Real Ghidra COM, RISC-V and raw verification passed with Ghidra 12.1.4 and JDK 21 on macOS arm64 using generated fixtures.

  • On earlier base 23de10bb2, npm run test:focused -- src/domain/firmware/espImage.test.ts tests/acceptance/espImageCli.test.ts tests/boundary/filesystem/ciChangeScope.test.ts tests/boundary/cli/developmentTests.test.ts tests/acceptance/pcapVerifier.test.ts — 435 passed, one Linux-only TShark test skipped on macOS.

  • On the same tree, npm run test:focused for the HTTP, managed, mobile, official-tool and advertised-schema MCP tests plus ASAR settings, qlog capture and CLI timing tests — 35 passed, one platform-specific qlog fallback skipped.

  • npm run test:python, npm run check:fast, npm run format:check, and git diff --check passed; npm run verify:test-discovery found all 2,909 tests exactly once. gitleaks protect --staged --redact reported no leaks.

  • On PR commit 7e3998419, the required CI run passed, including all eight test shards, Python and the Windows lane. The following commits need their own CI run.

  • Follow-up local validation on Node 24.22.1: Ghidra MCP harness and consumers 80 tests; Kuna boundary suite 379; browser MCP 17; process progress, compact schema and ownership lifecycle 23; mobile graph examples 9; test-project selectors 15. Focused Godot, BEAM, PyInstaller, firmware, packet, PE, JEB and reconciliation suites also passed. Providers in these checks are fixtures unless stated otherwise. check:fast, formatting, discovery and diff checks passed.

  • On PR commit 758603e04, required CI passed, including all eight shards, Python and Windows. Subsequent commits need their own CI run.

  • Follow-up local checks on Node 24.22.1 covered PE import and HEX consolidation, route paging, package-gate diagnostics, guided MCP startup, GDB/Rizin cancellation and cleanup, Cutter descriptor lifecycle, MCP recovery and argument validation, and process-fixture timeout behavior. Focused tests and check:fast, formatting, discovery and diff checks passed; simulated providers do not establish real-provider behavior.

Compatibility, safety, and release

  • Breaking changes or migration steps: none intended.
  • Real Hopper/Ghidra, browser, or OS coverage: Ghidra coverage is limited to the earlier runs above. Linux TShark/Wireshark passed in CI on the earlier PR commit; Linux-only Wakaru changes were not verified locally; Windows paths, including descendant cleanup, were not verified on Windows. MIPS/PPC verification lacked GNU readelf locally; WABT 1.0.42 was unavailable.
  • On PR commit 38844303, Linux real TShark executed the new verifier regression and passed; real browser and all eight main test shards also passed. The Python producer job aborted in build-plan parsing before tests with an allocator error; its cause remains unproven.
  • Follow-up checks on 4b8bb2eb9: SQLite compatibility 202 passed and three skipped on Node 24; lifecycle regressions 58 passed; browser MCP 16 passed; mobile CLI/MCP 9 passed; the cancellation fixture passed; check:fast, formatting and diff checks passed. Other Node-version matrix entries remain for CI.
  • On PR commit 4b8bb2eb9, CI required passed, including all eight test shards, Python producer tests, all four SQLite versions and the Windows lane. The earlier allocator abort did not recur; its cause remains unproven.
  • Follow-up commits 1c3c8b110 and 7e3998419: focused managed paging (16), retained inventory (4), ZIP and uImage extraction (2), iNES (41), JVM archives (2), JEB fixture and consumers (49), MCP cleanup (34), JavaScript cancellation (5), and Python CLI/MCP (23 plus a subsequent 6-test MCP rerun) passed. The regex suites passed 50 after consolidating duplicates. check:fast, formatting, test discovery (2,908 files) and diff checks passed locally. New CI is pending.
  • Package or release metadata impact: none intended.
  • Security, privacy, process, or containment review: POSIX test-runner cancellation and MCP cleanup passed the focused checks above; no new target authority intended.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@morluto
morluto marked this pull request as ready for review October 31, 2026 10:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T15:37:06.849950Z b6fa73b New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] The reviewed follow-up appears safe to merge; the reported gate-release issue is fixed.

Summary

Strengthens CLI/MCP assertions, fixture cleanup, and CI verification.

  • Tests check the exact results returned by CLI and MCP workflows.
  • Cancelled source tests wait for their process group to stop.
  • Browser and packet checks include their real verification inputs in CI.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Create gate and release function] --> B[Start request]
  B --> C[Wait for acknowledgement]
  C --> D[Check cancellation or shutdown]
  C -->|Request settles early or deadline expires| E[Cleanup]
  D --> E
  E --> F[Release gate]
  F --> G[Wait for request to finish]
  G --> H[Close service and remove fixture]
Loading

Reviews (8) · Last reviewed commit: "test: release provider gates before late..." · Reviewed by Greptile

@greptile-apps

This comment has been minimized.

@morluto
morluto merged commit 6014928 into main Oct 31, 2026
50 of 55 checks passed
@morluto
morluto deleted the codex/test-oracle-audit-20261031 branch October 31, 2026 16:15
Entrpi added a commit to Entrpi/rea that referenced this pull request Oct 31, 2026
The merge is clean. Main's changes to GhidraRiscvProfile.test.ts (morluto#8295), GhidraProviderClient.ts and docs/testing.md touch other regions than this branch.
coyoteXujie pushed a commit to coyoteXujie/rea that referenced this pull request Nov 2, 2026
* test: strengthen integration oracles and verification

* test: bound lifecycle gates and strengthen workflow checks

* test: verify complete paged and extracted results

* test: preserve bytecode and cancellation evidence

* test: strengthen retained evidence and fixture cleanup

* test: require cross-projection bridge identities

* test: retain fixture owners through cleanup failures

* test: verify graph examples and project selectors

* test: tighten provider and lifecycle regressions

* test: consolidate hex coverage and bound cutter cleanup

* test: bound subprocess output waits and strengthen graph checks

* test: check mcp recovery and preserve cleanup owners

* test: verify structured mcp argument failures

* test: preserve artifact cleanup and gdb limit evidence

* test: preserve evidence identities and bound provider gates

* test: retain browser and comparison cleanup owners

* test: bound startup and strengthen fixture oracles

* test: bound lifecycle gates and verify recovered evidence

* test: verify public outcomes and lifecycle ownership

* test: assert precise evidence and release lifecycle gates

* test: verify selected facts and bound cleanup waits

* test: check retained evidence and decoded records

* test: verify final reports and retain cleanup ownership

* test: bound reviewed startup gates and retain cleanup

* test: verify PE errors and preserve MCP cleanup

* test: preserve MCP fixture cleanup ownership

* test: release provider gates before late startup
@morluto morluto added the area: tests Test suite and verification label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants