Skip to content

test(ghidra): verify current MIPS admission and orphan cleanup - #2919

Open
Bobtoshi wants to merge 10 commits into
morluto:mainfrom
Bobtoshi:codex/mips1-verification
Open

Bobtoshi wants to merge 10 commits into
morluto:mainfrom
Bobtoshi:codex/mips1-verification

Conversation

@Bobtoshi

@Bobtoshi Bobtoshi commented Oct 13, 2026 •

Copy link
Copy Markdown

Adds real Ghidra MIPS boundary checks and catches surviving provider processes after reparenting. Ghidra gives each target its own run ID, so the verifier records the actual session ID and native ownership evidence while the provider is running. It checks every recorded provider ID and the outer verifier ID after transport closure. Cleanup failure preserves the diagnostic workspace.

The controls cover both byte orders. Declared-o32 MIPS I and unsupported GNU soft float are refused through CLI and MCP. Recordless MIPS I and MIPS32 produce real Ghidra dossiers and exact loaded bytes through MCP. The verifier checks input hashes and does not execute the targets. Failed analysis prevents a pass. Cleanup evidence covers the recorded provider sessions.

Merged main 0b028cc75. Git carried the documentation edits into docs/providers/ghidra-mips.md. The seven-file diff still contains the verifier, tests, documentation and its Knip entry. Production MIPS admission and metadata parsing follow main.

Validation on 3569da292180726033ae454c791619a29a3e4439 with Node 24.22.1 and npm 11.16.0

  • 135 focused tests passed across src/ghidra/GhidraMipsProfile.test.ts (75), tests/boundary/filesystem/mipsAbiFlags.test.ts (57), and tests/boundary/process/verifierTokenCleanup.test.ts (3). The live orphan regression follows the production launcher’s token override and confirms identity-checked teardown.
  • Fresh typecheck and lint, formatting on the seven changed files, and the nine documentation tests passed.
  • Real Ghidra 12.1.4 on macOS arm64 passed both byte orders. All four provider session IDs differed from the outer ID. All five cleanup checks passed with empty descendants, unchanged source hashes and platform inspection diagnostics retained.
  • Independent Linux results cover the prior commit 11edd85fb, both byte orders with real Ghidra and the cleanup tests on Node 22, 24 and 26. The real verifier was not rerun on Linux or Windows after this refresh. Local full-suite and package E2E checks were not run. The controls do not establish MIPS I load-delay correctness.
  • Greptile’s review reports 5/5 on the refreshed commit. Upstream CI awaits maintainer approval.
  • Fork CI finished with all six test shards passing. Forty jobs passed and two were skipped by selection. Two upstream failures caused the required CI summary to fail. Both failures also appear on upstream main.
  • The Knip failure matches [Bug] main static gate rejects standalone Ghidra function-bundle verifier #9295. The check passes on this branch when testing fix(build): register the standalone function-bundle verifier with Knip #9300’s proposed entry in a temporary config. The Apple verifier reads the obsolete cause.stdout field at dispatch.mjs:397. A local probe reproduced the error and passed both malformed-file fixtures after reading VerifierCommandExitError.snapshot.stdout.text, preserving the CLI and MCP refusal assertions. That probe covers the failing path.

Related to #2734.

Author readiness

Human owner: @Bobtoshi

  • 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.

@Bobtoshi

Copy link
Copy Markdown
Author

@greptileai please review this MIPS I contribution at head 7eeb8ed. It adds a narrow recordless ELF32 ET_EXEC lane with explicit o32 headers, pins Ghidra's language, and preserves floating-point uncertainty. The real-provider verifier passed for little- and big-endian fixtures through production MCP, including loaded bytes, saved Evidence, replay and unchanged input hashes. The little-endian fixture also passed the production CLI. The fixtures were never executed. This does not claim a firmware corpus or Windows verification.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The reviewed changes appear safe to merge, with no actionable issue found.

Summary

Adds MIPS admission controls for both byte orders and checks cleanup using each provider’s actual run UUID.

  • The verifier checks every Ghidra run before reporting cleanup.
  • The Ghidra verifier checks MIPS controls in both byte orders.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Capture prelaunch identities] --> B[Check refusal controls through CLI and MCP]
  B --> C[Analyze admitted controls with Ghidra]
  C --> D[Read validated provider run UUID]
  D --> E[Retain native ownership evidence]
  E --> F[Close target and transport]
  F --> G[Sweep outer UUID and every provider UUID]
  G --> H{Analysis and cleanup passed?}
  H -->|Yes| I[Remove workspace and report passed]
  H -->|No| J[Fail and retain workspace]
Loading

Reviews (12) · Last reviewed commit: "chore: merge upstream into MIPS verifier..." · Reviewed by Greptile

Comment thread scripts/verify-real-ghidra-mips1.mjs Resolved
Comment thread scripts/verify-real-ghidra-mips1.mjs Resolved
@Bobtoshi

Copy link
Copy Markdown
Author

@greptileai please re-review head 652ee67. Both verifier findings are addressed.

The fixture check now observes the conditional beq at 0x401004 and its exact destination 0x401010, alongside the decoded instruction at 0x401008. The old delay_slot: true report overstated the available contract: it now explicitly reports instruction decoding at the expected slot address and marks the delay-slot relationship as not exposed by the instruction contract. The PR description uses that same narrower claim.

Child stderr is inherited so startup and cleanup diagnostics remain visible when verification fails. A fresh real Ghidra 12.1.4/macOS arm64 run passed both endian MCP fixtures, byte/branch checks, retained FP uncertainty, snapshot replay, and LE production CLI. Original target hashes remain unchanged; targets were never executed. Native Linux/Windows, firmware corpus, FP semantics and the delay-slot relationship remain unverified. Pre-push typecheck/lint passed. Full upstream CI limitations are linked in the description.

@Bobtoshi
Bobtoshi marked this pull request as ready for review October 13, 2026 17:53
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T01:50:12.215474Z 3569da2 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 652ee67cf0

ℹ️ 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".

Comment thread src/ghidra/GhidraMipsProfile.ts Resolved
Comment thread src/ghidra/GhidraMipsProfile.ts Resolved
@morluto
morluto force-pushed the codex/mips1-verification branch from 652ee67 to 992216e Compare October 13, 2026 18:08
@greptile-apps

greptile-apps Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 992216e8d1

ℹ️ 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".

Comment thread src/ghidra/GhidraMipsProfile.ts Resolved
Comment thread src/ghidra/GhidraMipsProfile.ts Resolved
@morluto
morluto force-pushed the codex/mips1-verification branch from 992216e to 2b5c34b Compare October 13, 2026 18:24
@morluto
morluto force-pushed the codex/mips1-verification branch from 2b5c34b to d8630ea Compare October 13, 2026 18:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8630eaf13

ℹ️ 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".

Comment thread scripts/verify-real-ghidra-mips1.mjs Resolved
Preserve the MIPS I refusal until load-delay semantics are verified. Decode
typed GNU attribute presence before making recordless ABI assumptions, and
exercise both refusal paths plus existing MIPS32 controls through CLI/MCP.

BREAKING CHANGE: ELF32 MIPS inputs with SHT_GNU_ATTRIBUTES are refused until
those ABI declarations are parsed and reconciled. Preserve the original
input and use a tool that understands its declared ABI; stripping metadata
does not establish compatible semantics.
@Bobtoshi Bobtoshi changed the title feat(ghidra): admit verified recordless MIPS I o32 executables fix(mips)!: refuse uninspected GNU ABI attributes Oct 13, 2026
@Bobtoshi

Copy link
Copy Markdown
Author

@greptileai please review narrowed head 5ec1a57.

Both high-priority findings are addressed structurally. GNU attributes are detected by their typed section header and refused before ABI assumptions or section-payload allocation. The metadata regression fails on the previous reader. The MIPS I admission/profile and its provider claims were removed: generic Ghidra's immediate load assignment does not establish MIPS I load-delay semantics, so decoding an integer probe is insufficient. MIPS I stays unsupported with an explicit reason.

133 tests plus static/docs/discovery checks passed. Both endian MIPS I and GNU-attribute controls were refused through production CLI/MCP; GNU readelf independently decoded the soft-float attribute. Existing recordless MIPS32 controls still produced real Ghidra dossiers and exact loaded bytes. Input hashes remained unchanged and no target code was executed. GNU attribute parsing/reconciliation and MIPS I processor semantics remain future work. The description includes the refusal's compatibility change and migration guidance.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ec1a57a29

ℹ️ 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".

@Bobtoshi

Copy link
Copy Markdown
Author

@greptileai please review latest head 05e2366. The replacement verifier now isolates both CLI/MCP children from ambient REA settings, propagates a process-run token, requires verified empty descendants before success, and pins GNU readelf to the C locale. A real both-endian run passed under a poisoned ambient seed/analyzer configuration and conflicting parent locale, with unchanged input hashes and no target execution. All 135 focused tests and static/docs checks passed. MIPS I admission remains withdrawn; GNU ABI attributes are refused until parsed and reconciled.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05e23666d8

ℹ️ 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".

Comment thread src/application/MipsElfMetadata.ts Resolved
@morluto morluto added area: domain Domain logic, errors, and pure functions bug Something isn't working labels Oct 14, 2026
morluto added a commit that referenced this pull request Oct 14, 2026
Share tagged readiness observations, retain partial provider facts, authenticate bridge identity, bound diagnostics, and preserve cancellation and lost-session reasons. Fail closed for unparsed MIPS ABI attributes and macOS saved Hopper databases without a script-capable bridge route.

Reviewed fixes: #2010, #2108, #2513, #2695, #2731, #2771, #2828, #2867, #2868, #2870, #2880, #2919, #2945, #2961, #2981, #2998, #3000, #3002.

Validation: 285 focused source/boundary tests passed. Real Ghidra, IDA, Linux Hopper, and Windows provider runs were not repeated.

BREAKING CHANGE: MIPS targets with unresolved GNU ABI attributes and saved Hopper databases on macOS are refused rather than advertised as supported.
@CassieFox23

CassieFox23 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Heads up: main covers this in its own way in d4bd65c. The code is in src/application/MipsElfMetadata.ts, and MIPS GNU attribute parsing shows it. It is listed on tracker #3582. If this PR still adds something main doesn't have, please say so here and I'll take it off the list. Thanks for the fix!

Edit (24 Oct): I re-read the branch on e389016, without running anything. The follow-up is here.

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@Bobtoshi Bobtoshi changed the title fix(mips)!: refuse uninspected GNU ABI attributes test(ghidra): verify MIPS declaration and cleanup boundaries Oct 14, 2026
@Bobtoshi

Copy link
Copy Markdown
Author

@greptileai please review latest head e389016. The branch is merged with current upstream, preserving its GNU attribute parser and incomplete-declaration gate. Both endian partial-section-header regressions, 149 focused tests and static/docs/discovery checks pass. Real CLI/MCP refusal and MIPS32 positive controls pass on Ghidra 12.1.4/macOS arm64 with unchanged source hashes and verified empty descendants. Windows is now rejected before workspace/provider startup. No target execution or native Linux/Windows claim.

Maintainers: the upstream Actions runs show action_required for fork-origin code. Please approve the current-head PR workflows so required CI can run; local results are reported above.

@IvenKooLab

IvenKooLab commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Happy to help unblock this — the branch had fallen into merge conflicts against main's recent churn. Resolution notes, in case you want to apply the same sync:

  • Sync the branch with current main (d0067ba). The only textual conflict is knip.json (both sides added ignore entries): resolve as the union of both additions.
  • Afterwards, drop this PR's scripts/run-exact-tests.mjs entry from knip.json — current main makes it a redundant pattern (knip reports it as such otherwise).

Verification on the merged tree: GhidraMipsProfile.test.ts + mipsAbiFlags.test.ts 124/124 passed; tsc --noEmit clean; knip clean after build:cached; oxfmt --check knip.json clean. Not exercised on this host: the real-Ghidra verify-real-ghidra-mips-boundaries.mjs controls and the docs build (no Ghidra here); your Ghidra 12.1.4 evidence from e389016 should still apply since the MIPS sources are unchanged by the merge.

@CassieFox23

CassieFox23 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: I re-read the branch on e389016 without running anything. The overlap I raised on 14 Oct is gone, because the branch now uses main's GNU attribute parser. It still adds a real-Ghidra verifier and a MIPS I test that main lacks. But its MIPS I refusal now contradicts main's #7014 (97194c4), and the branch conflicts with main.

Edit (7 Nov): I ran this PR at head 11edd85 in a VM, and the results are here.

This follows my heads-up of 14 Oct, which asked whether the PR still adds something main lacks.

What I said or found Now What I read
Main already parses GNU MIPS attributes (d4bd65c) addressed (read) The author merged main on 14 Oct (0a8f70f). The head holds d4bd65c and 9387282, and the PR diff has no parser of its own. MipsGnuAttributes.ts is identical to main's. MipsElfMetadata.ts differs from main's by 8 lines.
Does the PR still add something main lacks? yes (read) Not on main: scripts/verify-real-ghidra-mips-boundaries.mjs (a real-Ghidra check for both byte orders), tests/conformance/ghidra/mips1-fixture.mjs (its fixture builder), a test for a partial final GNU section header in mipsAbiFlags.test.ts, and a MIPS I refusal in GhidraMipsProfile.ts. Main has its own tests for partial declaration coverage. I did not compare them line by line.
The MIPS I refusal against main (new) conflicts with main The PR returns "MIPS I remains unsupported" for a zero ISA field. Its unit test expects that refusal, and its verifier checks for MIPS I.*load-delay semantics. Main admits recordless MIPS-I headers since #7014 (97194c4, merged 24 Oct) and says so in docs/ghidra-mips.md. After a merge, the two disagree.
Greptile's open thread: the verifier's cleanup check can miss a Ghidra process that survives (14 Oct) not addressed The thread has no reply. The PR's last commit is older than the thread, so nothing in the branch answers it.

Conflict with main. GitHub says the branch conflicts. A text merge of main (aba487e) and the head conflicts in 2 of the 5 files that both sides changed. One is knip.json, where both sides added entries. The other is src/ghidra/GhidraMipsProfile.ts, at the MIPS I lines above. The other 3 shared files merge cleanly. IvenKooLab's note of 21 Oct listed only knip.json, because #7014 landed after it. A text merge is not a build.

GitHub's checks (secondhand): On e389016 the CI run from 14 Oct succeeded, with its usual jobs. One PR title run says action_required and a second one succeeded. All of that ran before #7014 and before today's main.

The author's reply says 149 focused tests and a real Ghidra 12.1.4 run on macOS arm64 passed. I did not check that.

Not run

  • Nothing was built or run: no npm, no tests, no Ghidra, no REA. This is a read of the diff, of main and of GitHub's check list.
  • Whether the new verifier works, on any platform. The author says Linux and Windows native runs are still unrun.
  • Whether the PR's tests pass, alone or after a merge with main.
  • A comparison, test by test, of the PR's partial header test with main's own tests for partial declarations.

Thanks, Bobtoshi, for merging main, so the branch carries main's parser. Thanks, IvenKooLab, for the notes on the conflicts.

What I read
  • The PR diff against its base (efbc486) is 7 files, 364 insertions: docs/ghidra-mips.md, knip.json, scripts/verify-real-ghidra-mips-boundaries.mjs, src/ghidra/GhidraMipsProfile.ts, src/ghidra/GhidraMipsProfile.test.ts, tests/boundary/filesystem/mipsAbiFlags.test.ts and tests/conformance/ghidra/mips1-fixture.mjs. Neither scripts/verify-real-ghidra-mips-boundaries.mjs nor tests/conformance/ghidra/mips1-fixture.mjs exists on main.
  • Main's GhidraMipsProfile.ts admits EF_MIPS_ARCH_1 through the recordless lane. fix(ghidra): admit recordless MIPS-I legacy targets #7014 changed these files:
    • GhidraMipsProfile.ts
    • its test file
    • GhidraProviderClient.ts
    • docs/ghidra-mips.md
  • fix(ghidra): admit recordless MIPS-I legacy targets #7014 also added the elf32-exec-mips1-legacy-pinned-v1 lane name to the tests. The PR's base refused MIPS I too, so this is a change of main's, not of the PR's.
  • When I commented, the head was 05e2366. The author's merge 0a8f70f and the commit e389016 came after. e389016 changes only two MCP test files.
Test setup

🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@Bobtoshi Bobtoshi changed the title test(ghidra): verify MIPS declaration and cleanup boundaries test(ghidra): verify current MIPS admission and orphan cleanup Nov 6, 2026
@Bobtoshi

Bobtoshi commented Nov 6, 2026

Copy link
Copy Markdown
Author

@greptileai please review head 2d2f2f8. Current main is merged. The obsolete MIPS I refusal and duplicate declaration tests are removed; this now adds only source-owned real-Ghidra boundary controls and independent run-token cleanup. The live orphan probe and 134 focused tests cover the previous PPID-only false green. Real Ghidra 12.1.4/macOS arm64 controls pass. The body distinguishes executed checks, retained host diagnostics and the full typed-lint/package/Linux/Windows checks that were not completed. Human readiness declarations remain for the owner to complete.

Comment thread scripts/lib/verifier-token-cleanup.mjs Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@Bobtoshi

Bobtoshi commented Nov 6, 2026

Copy link
Copy Markdown
Author

Codex technical review completed at 11edd85fb0a4b81c03e46c89af575455d2518f83, including an independent source review of the seven-file verifier/test/docs diff and relevant process-ownership code. No remaining source blocker was found for the scoped successful-provider cleanup fix. The actual launcher regression and real Ghidra evidence are summarized in the updated body; incomplete full-gate and platform checks remain explicit.

@IvenKooLab, thanks for the earlier merge and test notes. Could you, or another qualified MIPS/process-ownership contributor or maintainer, review this bounded change and explicitly accept human ownership under CONTRIBUTING? This is a request for a human handoff. The readiness declarations remain unchecked, and @Bobtoshi remains the listed owner until another human explicitly accepts. No human review has been attested by the agent.

@Bobtoshi

Bobtoshi commented Nov 6, 2026

Copy link
Copy Markdown
Author

@greptileai please review 11edd85fb0a4b81c03e46c89af575455d2518f83, especially the fix for discussion_r4487757214. This now retains actual Ghidra session UUIDs after lazy provider startup and token-verified native ownership before close, then scans every recorded provider run plus the outer wrapper. The regression follows the real production launcher token override and a detached survivor, with identity-checked observed teardown. 135 focused tests and real Ghidra 12.1.4/macOS arm64 both-endian controls pass. The PR body distinguishes completed checks, retained host uncertainty and remaining full-gate/platform gaps. This request is automated technical review; human readiness remains unchecked pending the requested ownership handoff.

@Bobtoshi

Bobtoshi commented Nov 6, 2026

Copy link
Copy Markdown
Author

The exact-head fork CI run for 11edd85fb0a4b81c03e46c89af575455d2518f83 succeeded: all six test shards, static/deep-static checks, documentation, package build, native package/platform lanes and Ghidra bridge source compilation passed (43 successful jobs, two selector-excluded lanes skipped). The updated body keeps the real-Ghidra platform and local-validation limits explicit. Greptile’s updated source review reports 5/5 with no actionable issue, and the latest PR-readiness status passes.

@morluto or another maintainer: please approve the current-head fork-origin upstream CI run and the title workflow, then review the PR for merging. They currently report action_required; the successful fork run cannot satisfy those upstream gates. There is no new author-side code finding to address at this head.

@CassieFox23

CassieFox23 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: I ran this PR at head 11edd85 in a VM on Linux x86-64, with real Ghidra 12.1.4. The new MIPS boundary check passes for both byte orders, and the PR's one new test file passes on Node 22, 24 and 26. Still open: GitHub says the branch conflicts with main. I also couldn't tell which files make up the author's 135 tests.

Edit (7 Nov): The author named the files behind the 135 tests, and they all pass at 3569da2. Results are here.

This follows my review above, which was a read only. I tested the head alone, not merged with main.

Check Node 22.23.4 Node 24.22.1 Node 26.12.1
npm ci, npm run prepare, npm run test:prepare not run pass not run
tests/boundary/process/verifierTokenCleanup.test.ts (3 tests) pass pass pass
scripts/verify-real-ghidra-mips-boundaries.mjs, little and big endian not run pass (43 s) not run
In my review above Now What the runs show
The MIPS I refusal contradicted main's #7014 (97194c4) gone (run) The PR's diff has no src/ file, and the head holds 97194c4. The verifier's recordless MIPS I control gets a real Ghidra dossier and the exact loaded bytes, in both byte orders. A MIPS I header that declares an ABI is refused by both the CLI and MCP.
Greptile's open thread: the cleanup check can miss a surviving Ghidra process newest commit sweeps each session (run) Commit 11edd85 sweeps every Ghidra session ID. In the run it swept 5 run IDs (the outer run and 4 Ghidra sessions). All reported cleaned: true, none needed a signal, and no descendants were left. No process survived, so the real run did not test the survivor path. The unit test for a reparented survivor passes on all 3 Nodes.
The branch conflicts with main still conflicts, per GitHub GitHub says the branch is dirty (not a run of mine). Main moved docs/ghidra-mips.md to docs/providers/ghidra-mips.md in a67525c (#2791). It is the only one of the PR's 7 files that main changed since the merge base. So the two files I named before are no longer a problem: knip.json is unchanged on main since the base, and the PR no longer touches GhidraMipsProfile.ts. A text merge of that one file, done in scratch, has no conflict. I did not run a full merge, and I don't know why GitHub says dirty.
The author's focused tests: 149 in my review, 135 in the newest comment not matched The PR adds one test file with 3 tests. Its body says "135 focused profile, metadata and cleanup tests" and names no files. I ran 3 existing MIPS test files with it on Node 24: 93 tests pass. I don't know which files make 135, or why the author's count went from 149 to 135.

Unguarded reads. The verifier reads process_lineage.snapshots and descendants at lines 165-178 without a full guard. It did not throw. In the output schema, process_lineage must be there whenever analysis_run is set. snapshots is read with ?.. And descendants is read only for a verified snapshot. So under that schema I see no throw path. The run's snapshots were all verified, so the unavailable branch did not run.

Still not run

  • Windows and macOS. This was Linux only.
  • The full typed-lint and package checks, npm run check:pr, and npm run docs:check.
  • The verifier on Node 22 and 26, and install and test:prepare on those two.
  • A full merge with main, and the PR's tests after one.
  • The other tests behind the author's 135, since I do not know which files they are.
  • Whether the MIPS I instruction set and load delays are handled right. The verifier says it does not check them.
  • Upstream CI. The author says fork CI passed 43 jobs at this head; I did not check.

Thanks, Bobtoshi, for removing the MIPS I refusal. Your both-endian controls from macOS arm64 also pass on Linux x86-64.

Test setup
  • Box: Fedora 44 VM (4 vCPUs, 8 GB) on my PC, Linux 7.2.11-200.fc44.x86_64
  • Node: 22.23.4, 24.22.1, 26.12.1
  • Head / base: 11edd85 / a7574d4 (merge base); main was 015a02d
  • Other: Ghidra 12.1.4 (Apache-2.0), OpenJDK 21.0.12.1 (GPL-2.0-only WITH Classpath-exception-2.0), GNU readelf 2.46.1 (GPL-3.0-or-later). test:prepare built dist/ once on Node 24; the Node 22 and 26 runs reused it (all build tasks cached).
Commands

All in the VM, npm_config_cache pointing at an offline cache, each under timeout. Paths below are in the VM.

Command Exit Time
npm --prefix ~/pr-2919/src ci --offline (Node 24; its prepare script ran inside) 0 14 s
npm --prefix ~/pr-2919/src run prepare (Node 24) 0 under 1 s
npm --prefix ~/pr-2919/src run test:prepare (Node 24) 0 12 s
npm --prefix ~/pr-2919/src run test:focused -- tests/boundary/process/verifierTokenCleanup.test.ts (Node 24) 0 2 s; 3 tests passed
GHIDRA_INSTALL_DIR=~/.local/opt/ghidra_12.1.4_PUBLIC JAVA_HOME=~/.local/opt/jdk-21.0.12.1+1 node ~/pr-2919/src/scripts/verify-real-ghidra-mips-boundaries.mjs (Node 24) 0 43 s; "status": "passed"
the same test:focused command (Node 22.23.4) 0 2 s; 3 tests passed
the same test:focused command (Node 26.12.1) 0 2 s; 3 tests passed
test:focused with the changed file plus tests/boundary/filesystem/mipsAbiFlags.test.ts, tests/boundary/filesystem/mipsSharedLoad.test.ts and tests/composition/analysis-sessions/mips-identity.test.ts (Node 24) 0 3 s; 93 tests passed

I grepped each test file for doctor first and none calls it.

🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊

@Bobtoshi

Bobtoshi commented Nov 8, 2026 •

Copy link
Copy Markdown
Author

Thanks @CassieFox23 for running the verifier on Linux. The 135 tests for 11edd85fb were these three suites. The same suites passed after the refresh.

  • src/ghidra/GhidraMipsProfile.test.ts — 75
  • tests/boundary/filesystem/mipsAbiFlags.test.ts — 57
  • tests/boundary/process/verifierTokenCleanup.test.ts — 3

The branch now includes main 0b028cc75. Git carried the MIPS documentation edits to their new path, and GitHub reports the PR is mergeable at 3569da292. Fresh typecheck, lint, formatting and docs checks passed. Real Ghidra 12.1.4 on macOS arm64 passed both byte orders, with all five cleanup checks successful. The description records your Linux evidence against the prior commit.

@morluto, could you approve the refreshed branch’s upstream workflows when you have a chance? CI, PR title, and CodeQL currently show action_required. The fork CI run finished on the same commit. All six test shards and 40 jobs passed. The two upstream failures below caused the required CI summary to fail.

The fork run has found two failures that also appear on upstream main. The Knip failure matches #9295. The check passes locally when testing #9300’s proposed entry in a temporary config. The Apple verifier failure matches the upstream JSON error at dispatch.mjs:397. Both checks are outside the MIPS verifier diff. Greptile completed on the refreshed commit at 5/5.

The Apple failure is reproducible in the malformed-file checks. The command owner returns stdout through VerifierCommandExitError.snapshot.stdout.text. Reading that field let both fixtures pass the existing CLI and MCP assertions in a local probe. The correction belongs in the upstream Apple verifier.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3569da2921

ℹ️ 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".

detail: "complete",
}),
);
assert.ok(dossier.pseudocode.length > 0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify the MIPS-I language pin

When the recordless MIPS-I override is missing or wrong, Ghidra still imports this fixture but auto-selects a 64-bit MIPS language (as documented in docs/providers/ghidra-mips.md:46-49), so nonempty pseudocode and exact read_bytes can both pass without exercising the pinned MIPS:<LE|BE>:32:default lane. The sibling real-MIPS verifier explicitly checks inspect_native_load_image().observations.language_id; add that assertion for this MIPS-I control before reporting its admission as exercised.

AGENTS.md reference: AGENTS.md:L31-L33

Useful? React with 👍 / 👎.

@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: The three files you named make 135 tests, and all pass at 3569da2 on Node 22, 24 and 26. The real-Ghidra MIPS check passes there too, in both byte orders.

I ran them at 3569da2, which has main 0b028cc merged in, in a Fedora 44 VM on Linux x86-64.

File Node 22.23.4 Node 24.22.1 Node 26.12.1
src/ghidra/GhidraMipsProfile.test.ts 75 pass 75 pass 75 pass
tests/boundary/filesystem/mipsAbiFlags.test.ts 57 pass 57 pass 57 pass
tests/boundary/process/verifierTokenCleanup.test.ts 3 pass 3 pass 3 pass

That is 135 on each Node, the same as your count.

I also ran scripts/verify-real-ghidra-mips-boundaries.mjs at 3569da2 with real Ghidra 12.1.4 on Node 24. It passed for both byte orders in 45 seconds. All 5 run IDs it swept were cleaned, none needed a signal, and no child processes were left. As in my last run, it says it does not check the MIPS I instruction set or load delays.

On this head, only Greptile Review and Validate author declaration have run so far. The CI, PR title and CodeQL runs still wait for approval.

Thanks, Bobtoshi, for naming the three files.

Commands
npm ci --offline
npm run test:prepare
npm run test:focused -- src/ghidra/GhidraMipsProfile.test.ts tests/boundary/filesystem/mipsAbiFlags.test.ts tests/boundary/process/verifierTokenCleanup.test.ts
GHIDRA_INSTALL_DIR=<ghidra 12.1.4> JAVA_HOME=<jdk 21.0.12.1> node scripts/verify-real-ghidra-mips-boundaries.mjs

Install and test:prepare ran on Node 24.22.1, exit 0 each. The VM had 4 vCPUs and 8 GB, Linux 7.2.11.

🤖 Written and tested with Claude Code (Opus 5.5), posted with my OK 🦊

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants