Skip to content

feat(ghidra): admit caller-selected matching dSYM companions - #2025

Open
jimpablo wants to merge 65 commits into
morluto:mainfrom
jimpablo:feat/dsym-companion-admission
Open

jimpablo wants to merge 65 commits into
morluto:mainfrom
jimpablo:feat/dsym-companion-admission

Conversation

@jimpablo

@jimpablo jimpablo commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #1193. REA now admits a caller-selected .dSYM bundle for Mach-O executable targets (dsym_path through MCP, --dsym-path on the CLI) and stages it beside the private Ghidra import, so DWARF recovers parameter names, data types, and source-anchored type identity that the stripped executable cannot provide. Admission requires a proven LC_UUID and selected-slice CPU identity match; a non-matching companion is rejected as caller input instead of silently loading wrong types.

Problem and expected behavior

  • Smallest trigger: an analyst owns a linked Mach-O executable plus its matching .dSYM (built with clang -g + dsymutil). REA's ephemeral import copies the executable into a private runtime root, so the bundle beside the original file is never visible to the session, and every function reports signature_source: "default" with low type confidence.
  • New behavior: with dsym_path, admission (1) validates the bundle shape, (2) requires a DWARF member whose LC_UUID matches the target image's selected slice (with matching CPU type and base CPU subtype), and (3) stages only the matched member inside REA's runtime root under the snapshot's name — the naming Ghidra's DSymSectionProvider requires — leaving the caller's bundle untouched. The staged member digest, source path, and matched UUID are retained as target-admission evidence. Omitting dsym_path keeps today's bare-target behavior.

Change and scope

  • src/domain/machoDebugCompanion.ts + src/domain/apple/machoArchitecturePolicy.ts (new): pure Mach-O LC_UUID reading for thin and universal (32/64-bit, big/little-endian FAT) containers with bounds checks and structured ParseFailureError reporting, selected-slice CPU type / base CPU subtype attribution, and the matching rule (an all-zero UUID is a placeholder that never matches; targets with no usable UUID or ambiguous duplicate CPU slices are rejected explicitly).
  • src/application/DebugCompanionAdmission.ts (new): bundle-shape validation (.dSYM directory + Contents/Resources/DWARF), bounded header reads (64 KiB window, 64 MiB workflow I/O budget, max 16 DWARF entries, max 1 GiB member/digest cap) through the resolver's open target handle, member digesting, and UUID/slice matching.
  • BinaryTargetResolver: optional dsymPath; pairing rejections (dsym_path with any explicit format selection — raw-binary, dos-com, gamecube-dol, or esp-flash-image — or non-Mach-O targets including ELF/PE and Hopper/IDA analysis databases) and admission failures carry a new debug_companion_rejected constraint; the admitted identity rides BinaryTarget.debugCompanion (Mach-O variants only).
  • Contracts and CLI: open_binary gains optional absolute dsym_path with contract-level pairing validation against explicit format selections (scripts/verify/advertised-schemas/tools/open_binary.json updated); CLI --dsym-path joins nativeTarget in src/cli/options.ts (CLI help parity fixtures updated), so one-shot native commands accept it; DirectAnalysis, BinarySessionOpen, and the MCP open handler thread it through.
  • Ghidra provider and staging: GhidraClientOptions.debugCompanion → GhidraAnalysisProfile commits debug_companion { source_path, uuid, member_sha256 } into the profile digest so bare and companion sessions never share Program checkpoints; fresh imports stage the matched member beside the snapshot (GhidraDebugCompanion.ts, digest-verified copy under the shared artifact file owners, with partial staged entries owned and cleaned up by the private runtime root after retained descriptors settle); checkpoint-restored sessions skip redundant restaging (staged_member: null) because DWARF is already ingested in the restored archive; existing-project sessions (REA_GHIDRA_PROJECT_PATH, -process -noanalysis) explicitly reject dsym_path instead of ignoring it.
  • Error projection: debug_companion_rejected maps to invalid_request/invalid_input (tracked in docs/user-visible-errors.csv) with remediation naming dsym_path, following the load_selection_rejected pattern from fix(targets): project invalid raw-binary loads as caller input #2004.
  • Docs: new docs/providers/dsym.md (+ VitePress sidebar in docs/.vitepress/documentation.ts and docs/README.md entries, route /dsym). Earlier tracked spec/plan/tasks docs were removed per docs: remove tracked planning and architecture records #12856.
  • Not included: implicit sibling .dSYM auto-staging (see overlap with fix(ghidra): stage sibling dSYM beside target snapshot for DWARF analysis #10768 / [Design] Include .dSYM sidecars in Ghidra target snapshots #11364), source-file resolution from DWARF, per-slice companion selection inside the bundle, and Hopper/IDA staging (other providers leave dsym_path unused).

Contract and boundary impact

  • Semantic owner and earliest changed stage: companion admission at target resolution (src/domain/machoDebugCompanion.ts + src/application/DebugCompanionAdmission.ts), before any provider starts.
  • CLI and MCP/tool-catalog contract: open_binary input schema gains optional dsym_path (scripts/verify/advertised-schemas/tools/open_binary.json input hash and CLI help parity fixtures updated; ignored catalog validated by docs:check). open_binary compact output schema hash is unchanged; liveBinaryTargetSummary adds optional debug_companion on Mach-O variants.
  • Provider, bridge, target-format, or platform compatibility: fresh Ghidra imports stage the companion; REA_GHIDRA_PROJECT_PATH existing-project sessions reject dsym_path; other providers leave it unused (documented). No bridge changes — Ghidra's own DWARF analyzer does the ingestion.
  • Evidence, artifact, provenance, or reconstruction contract: target admission evidence gains dsym { source_path, member_sha256, uuid, staged_member } (staged_member: null when restored from a verified Program checkpoint); persisted AnalysisSnapshot, GhidraAnalysisProfile, and live target summaries record debug_companion on Mach-O targets.
  • Process execution, authorization, cleanup, or containment impact: one additional private-runtime copy (0600, digest-verified under shared artifact file owners), removed with the existing runtime-root cleanup once retained descriptors settle.
  • Generated metadata, package, or installation impact: scripts/verify/advertised-schemas/tools/open_binary.json, docs/user-visible-errors.csv, and CLI parity fixtures updated; Documentation (docs:check) and package baselines green in CI.
  • Related / overlapping work: open PR fix(ghidra): stage sibling dSYM beside target snapshot for DWARF analysis #10768 and design issue [Design] Include .dSYM sidecars in Ghidra target snapshots #11364 address implicit sibling <target>.dSYM staging in GhidraTargetSnapshot.ts / GhidraCheckpoint.ts; both PRs stage under <runtimeRoot>/<snapshotName>.dSYM/Contents/Resources/DWARF/<snapshotName> with exclusive wx creation, so merge order / coordination should account for that shared staging path.

Evidence and regression coverage

  • Tests added or updated:

    • Domain & contracts: src/domain/machoDebugCompanion.test.ts (thin/universal 32/64-bit big/little-endian UUID reading, ParseFailureError reporting, CPU type/base subtype matching, zero-UUID and duplicate-slice rejections), src/domain/analysisSnapshot.test.ts, src/contracts/sessionLifecycleInputs.test.ts (explicit format pairing across raw-binary, dos-com, gamecube-dol, and esp-flash-image).
    • CLI & MCP boundaries: tests/boundary/cli/dsymPathCli.test.ts, tests/boundary/cli/cliCommandRegistry.test.ts, tests/boundary/cli/cliContractCommandParity.test.ts, tests/boundary/mcp/absoluteLocalPathSchema.test.ts, tests/boundary/mcp/liveBinaryTargetSummary.test.ts, tests/boundary/mcp/sessionMcp.test.ts.
    • Filesystem, admission, & staging lifecycle: tests/boundary/filesystem/targetDiagnostics.test.ts (explicit format rejections, Hopper/IDA database rejections, darwin real clang -g + dsymutil matching/mismatching bundles), tests/boundary/filesystem/ghidraDebugCompanion.test.ts, tests/process-global/debugCompanionAdmissionFailures.test.ts, tests/process-global/ghidraDebugCompanionStagingLifetime.test.ts.
    • Ghidra provider & checkpoints: src/ghidra/GhidraProvider.behavior.test.ts (profile commitment, existing-project refusal, companion mismatch checks), tests/boundary/providers/ghidra/ghidraCheckpointLifecycle.test.ts (bare vs companion checkpoint isolation and staged_member: null skip on checkpoint restore).
  • Earlier real-provider verification (recorded pre-checkpoint-merge and pre-feat(ghidra)!: verify the bridge on Ghidra 12.2 #12081 on macOS 27 arm64 with Ghidra 12.1.4 + native mac_arm_64 decompiler), compiled fixture pair.c → clang -O0 -g -c → link → dsymutil:

    • Before (no companion): signature_source: "default", return-type confidence low.
    • After rea function <pair> _pair_sum --provider ghidra --dsym-path <pair.dSYM> --json: signature int __cdecl pair_sum(Pair p), signature_source: "imported", parameter p of data type Pair (8 bytes, x0:8, confidence high, type-lock evidence), pseudocode local_8 = p.a; uStack_4 = p.b; return local_8 + uStack_4;, value-flow parameter type /DWARF/pair.c/Pair.
    • Rejections exercised through the public CLI: another binary's bundle → invalid_request/invalid_input, debug_companion_rejected, "contains no DWARF member whose LC_UUID matches"; --dsym-path paired with --target-format raw-binary → pairing rejection (pairing rejection now covers all explicit format selections: raw-binary, dos-com, gamecube-dol, and esp-flash-image); an unclassifiable blob with --dsym-path keeps its format refusal (ordering preserved).
  • Remaining proof gaps:

    • Live Ghidra 12.2 / JDK 25 CLI runs (after feat(ghidra)!: verify the bridge on Ghidra 12.2 #12081 upgraded the verified Ghidra baseline from 12.1.x to 12.2 / JDK 25) were not locally executed on this host because no local Ghidra 12.2 / JDK 25 installation is present.
    • Because the earlier live Ghidra 12.1.4 CLI runs preceded both the upstream Program-checkpoint merge and feat(ghidra)!: verify the bridge on Ghidra 12.2 #12081, post-merge checkpoint companion isolation, checkpoint-restore staging skip (staged_member: null), existing-project refusal, and universal-target companions have not been exercised end-to-end against a live Ghidra 12.2 install; they are verified via ghidraCheckpointLifecycle.test.ts, GhidraProvider.behavior.test.ts, domain/boundary/process-global suites, and remote CI (including ghidra_bridge / Compile packaged Ghidra bridge sources and Real Apple artifact CLI/MCP E2E).
  • Observed, derived, and inferred claims remain distinguishable.

  • Artifact identity, source provenance, and failed attempts remain preserved.

  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • Current 336d28c05 remote GitHub Actions ci:full (run 44871766201) and PR checks — 54 passed, 4 skipped, 0 failed:
    • CI required, Static checks, Deep static checks, Documentation (docs:check), Build package, Portable tests, all 12 Test shard jobs, Real Apple artifact CLI/MCP E2E, ghidra_bridge / Compile packaged Ghidra bridge sources, Native package baseline (darwin arm64, darwin x64, linux arm64, linux x64), Windows capability and package lane (capabilities, package), Conventional PR title, and Greptile Review (5/5, 52 files reviewed, 0 comments) — all passed.
    • Skipped: Source tests and Python producer tests (superseded by the 12 ci:full shards), and CodeQL production (Select production languages, Analyze production).
    • Automated reviews on 336d28c05: Greptile Review 5/5 (0 new findings), Codex Review completed (0 new findings), 98/98 review threads resolved.
  • Earlier real-Ghidra 12.1.4 macOS arm64 CLI validation (historical, pre-checkpoint-merge and pre-feat(ghidra)!: verify the bridge on Ghidra 12.2 #12081): rea function / rea analyze runs with and without --dsym-path as summarized above. Live Ghidra 12.2 / JDK 25 CLI runs were not locally executed on this host.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. All inputs are optional; omission preserves current behavior.
  • Real Hopper/Ghidra, browser, or OS coverage: remote ci:full covers linux x64/arm64, darwin x64/arm64, Windows capability/package lanes, ghidra_bridge compilation, and Real Apple artifact CLI/MCP E2E; earlier live Ghidra 12.1.4 macOS arm64 CLI run predates feat(ghidra)!: verify the bridge on Ghidra 12.2 #12081 and live Ghidra 12.2 / JDK 25 CLI execution remains a proof gap above; Hopper/browser not applicable.
  • Package or release metadata impact: scripts/verify/advertised-schemas/tools/open_binary.json, docs/user-visible-errors.csv, and CLI parity fixtures updated; ignored generated catalog validated in CI.
  • Security, privacy, process, or containment review: the companion is copied into REA's private runtime root with digest verification and 0600 permissions under the shared artifact file owners; the caller's bundle is never modified; no new subprocess or network capability.

Review checklist

  • This PR addresses a concrete problem, not an unscoped refactor.
  • The PR has one focused outcome, and the title follows type(scope): outcome.
  • Related issue is linked.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated.
  • User-visible CLI/MCP changes include representative output (tabled above).
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

Author readiness

Human owner: @jimpablo

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-21T05:46:27.094863Z 336d28c 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: d6b92bb7fc

ℹ️ 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/application/BinaryTargetResolver.ts Resolved
Comment thread src/application/BinaryTargetResolver.ts Resolved
Comment thread src/domain/machoDebugCompanion.ts Resolved
@jimpablo

jimpablo commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

All seven review findings are addressed in 560db80:

  1. Session/snapshot identity (P1) — snapshotTarget now projects the companion's UUID and member digest into AnalysisSnapshotTarget.debug_companion (nullable, defaulting so pre-companion snapshots parse as null), and snapshotMatchesTarget requires it to agree. This is the single comparison behind both the retained-session fast path and persisted-snapshot replay, so reopening the same executable with an added, omitted, or changed dSYM no longer reuses the previous analysis. Unit test added covering add/omit/change/legacy-snapshot partitions.
  2. Selected-slice UUID matching (P1) — readMachoUuidEntries now returns each LC_UUID with its declaring cputype (slice-attributed for universal containers), and admission filters the executable side to the cputypes of the selected architecture before matching; a companion matching only an unselected slice is rejected. Regression: a darwin/arm64-gated test compiles a universal (arm64+x86_64) fixture, extracts an x86_64-only DWARF member via lipo -thin, and asserts the rejection.
  3. TOCTOU digest — the matched member is digested through the same handle that passed UUID validation, with an fstat identity check; the path is never reopened.
  4. Early non-executable returns — dsym_path on a .hop database or any detected artifact format now rejects with debug_companion_rejected naming the detected format (tested with a zip).
  5. Cancellation — the resolver signal threads through admission and is checked between chunks while hashing and between member candidates.
  6. Bundle scanning — a non-Mach-O or unreadable DWARF member (e.g. .DS_Store) is skipped; rejection happens only after all members (tested with a planted .DS_Store).
  7. Byte order — load commands decode with the accessor matching the observed magic; a big-endian thin-image test was added.

Real-Ghidra re-verification on this host after the changes: the matching fixture still reports int __cdecl pair_sum(Pair p) / signature_source: "imported", and the mismatch rejection carries the new selected-slice reason.

@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: 560db80968

ℹ️ 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/domain/analysisSnapshot.ts Resolved

@dandgabr dandgabr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review corrections

  • P2 — Support little-endian universal Mach-O containers during UUID admission. readMachoFileUuidEntries() recognizes only big-endian FAT_MAGIC/FAT_MAGIC_64 before falling back to thin-image parsing. The target parser accepts FAT_CIGAM/FAT_CIGAM_64 too, so a valid little-endian universal target or dSYM member is detected but rejected as non-Mach-O when dsym_path is selected. Parse the CIGAM table using little-endian fields while preserving per-slice CPU attribution.
  • P2 — Bound dSYM enumeration, hashing, and staging. admitDebugCompanion() enumerates every entry in the caller-selected DWARF directory, then hashes the entire first UUID-matching member; the staging path copies that whole file. There is no entry-count or member-size budget, so a crafted bundle can cause unbounded filesystem work, CPU use, and private-runtime disk consumption before analysis. Add explicit limits and reject oversized bundles/members before hashing or staging.

@jimpablo

Copy link
Copy Markdown
Contributor Author

Both points addressed in a6a83bd, together with the three follow-up findings from the second Codex pass:

  1. Little-endian universal containers — UUID admission now recognizes all four FAT magics (FAT_MAGIC, FAT_MAGIC_64, FAT_CIGAM, FAT_CIGAM_64) at both the file reader and the domain parser, reading the architecture table with the observed container byte order while preserving per-slice CPU attribution. Regression: a byte-swapped container fixture in the domain tests.
  2. Bounded admission — two explicit resource budgets now reject before any unbounded work: at most 16 DWARF member files per bundle (real bundles carry one per architecture), and at most 1 GiB per member, checked from fstat before any hashing or staging (the staging copy is thereby bounded too). Regressions: a 17-member bundle and a sparse >1 GiB member both reject as caller input.

The same commit also keeps legacy snapshot query IDs valid (a null companion is stripped from the hash input, so snapshots written before this change still pass integrity validation) and sizes header reads by the declared load-command span instead of a fixed 64 KiB window.

@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: a6a83bdfcb

ℹ️ 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/GhidraClient.ts Resolved
Comment thread src/domain/machoDebugCompanion.ts Resolved
@jimpablo
jimpablo force-pushed the feat/dsym-companion-admission branch from a6a83bd to f5e27ac Compare October 12, 2026 10:47
@jimpablo

Copy link
Copy Markdown
Contributor Author

The third CI round's failures (prompt completion in shard 1/4 and both darwin package baselines) came from the pre-fix versions of tests/boundary/mcp/promptCompletion.test.ts and scripts/verify-package-prompts.mjs that this branch carried from its original base; upstream hardened exactly those files in fe4b94a ("test(mcp): align completion checks with provider readiness") plus the sourcemaps follow-ups and the 6.5.0 release, after this branch forked.

The branch is now rebased onto current main (f5e27ac). Re-validated locally after the rebase: typecheck, full npm run check, docs:check, catalog regeneration, the prompt-completion suite (6/6 with the hardened tests), the companion domain/boundary suites (57/57), and the real-Ghidra end-to-end (pair_sum(Pair p) / signature_source: "imported").

@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: f5e27ac667

ℹ️ 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/domain/machoDebugCompanion.ts Resolved
Comment thread src/domain/machoDebugCompanion.ts Resolved
Comment thread src/domain/machoDebugCompanion.ts Resolved
@jimpablo

Copy link
Copy Markdown
Contributor Author

The last CI round after the rebase is green across every code-bearing job — all four test shards, both darwin package baselines, the real Apple E2E, docs, and static gates. The single lane failure is environmental: web_runtime / real-web-runtime aborted with BrowserStartupError: Chrome CDP startup timeout (Chrome on the ubuntu runner failed to start within 20 s, with the usual dbus noise), which this lane does not hit on current main runs. It needs a rerun rather than a code change; I don't have permission to rerun it myself.

@jimpablo

Copy link
Copy Markdown
Contributor Author

All eight findings from the rebase review are addressed in fe386fd:

  1. Provenance in successful output — binaryTargetSummary now carries debug_companion { source_path, uuid, member_sha256 } for admitted Mach-O targets, so open_binary results, one-shot CLI output, and Evidence target summaries distinguish companion-derived analysis from bare-executable analysis. The Java bridge handshake schema stays untouched: it is a strict bridge identity contract, and the staged admission already flows into Ghidra diagnostics for failures.
  2. Exact FAT slice — admission mirrors the target parser's selection: only the first slice of each CPU family contributes UUIDs, so a same-family sibling (x86_64h) companion cannot match. Regression: a darwin-gated test compiles an x86_64+x86_64h universal fixture, extracts the x86_64h-only member, and asserts rejection.
  3. FAT_CIGAM_64 literal — corrected to 0xbfbafeca in both the file reader and the domain parser (it was a typo'd 0xbebafbfa); a byte-swapped FAT64 fixture now passes.
  4. FIFO race on member open — admission opens members with O_RDONLY | O_NONBLOCK, matching the staging copy's primitive.
  5. 128 MiB span ceiling — removed; the declared sizeofcmds is bounded by the reader's region (file/slice size), and the walker validates exact consumption of the declared span.
  6. Short-prefix crash — a complete 28/32-byte header is required before any field access; an 8–19 byte member is now a typed rejection (tested).
  7. Span-bounded walking — load commands are read only within header + sizeofcmds, and the declared count must fill the span exactly; a UUID payload beyond the declared span is not accepted (tested).
  8. Ambiguous UUIDs — a second LC_UUID in one image is rejected as a conflicting identity instead of joining the match set (tested), matching the machoUuid parser's precedent.

Domain 15/15 and boundary 27/27 locally, full check/docs:check green, and the real-Ghidra end-to-end still reports pair_sum(Pair p) / signature_source: "imported".

@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: fe386fd486

ℹ️ 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/domain/analysisSnapshot.ts Resolved
@jimpablo

Copy link
Copy Markdown
Contributor Author

All three follow-up findings are addressed in 6cf3f75:

  1. Span allocation — the declared load-command span is now bounded by an explicit 16 MiB resource budget (COMMAND_SPAN_LIMIT_BYTES): a binary declaring more is rejected with a typed reason before any whole-span allocation, so a sparse Mach-O cannot exhaust the process through dsym_path. The budget sits beside the existing member-count and member-size budgets with the same rationale (the span is walked only to locate LC_UUID).
  2. Lifecycle output schema — detectedLifecycleTargetSchema now declares the optional debug_companion { source_path, uuid, member_sha256 }, so the advertised SDK-converted output agrees with structuredContent for open_binary/binary_session; the tool catalog was regenerated.
  3. Restage on path change — the companion's source_path is now part of the snapshot/session reuse identity (snapshotTarget projects it, snapshotMatchesTarget compares it), so reopening with a byte-identical copy at another path is a different selection that restages instead of reporting the old bundle. Legacy snapshots without the key keep validating (absence still hashes like a bare target), and a unit test covers the copied-bundle partition.

Local verification: domain 10/10, boundary suites green, full check + docs:check + catalog, and the real-Ghidra end-to-end still reports pair_sum(Pair p) / signature_source: "imported".

@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: 6cf3f75f81

ℹ️ 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/GhidraProviderClient.ts 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.

@jimpablo

Copy link
Copy Markdown
Contributor Author

All three findings addressed in bd0434a:

  1. Profile commitment — resolveGhidraAnalysisProfile now includes debug_companion { source_path, uuid, member_sha256 } in the committed parameters for admitted Mach-O targets, so a companion run and a bare run of the same executable commit different analysis_profile.digest (and therefore different Evidence identity). Verified end to end: the real-Ghidra run's analysis_profile.parameters now carries the companion.
  2. UUID-less first slice — per-slice UUID observations keep their place with a null marker, and first-of-family selection honors the earlier slice even when it declares no LC_UUID; a same-family sibling can no longer lend its UUID. Regression: a synthetic universal target (first x86_64-family slice without LC_UUID, sibling with one) plus a valid bundle carrying the sibling's member is rejected with "declares no LC_UUID for the selected slice".
  3. Traversal cancellation and budget — the resolver signal threads through the FAT traversal and is checked between slices, and one admission's command-region reads are bounded by an aggregate 64 MiB traversal budget (per-slice spans already capped at 16 MiB), so a crafted multi-slice file cannot hold a cancelled open_binary hostage.

Local: domain + boundary suites green (28/28 in the companion boundary file), full check/docs:check, and the real-Ghidra end-to-end still reports pair_sum(Pair p) / signature_source: "imported" with the companion visible in the committed profile.

@jimpablo
jimpablo force-pushed the feat/dsym-companion-admission branch from bd0434a to 55eddb0 Compare October 12, 2026 16:32
@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.

@jimpablo

Copy link
Copy Markdown
Contributor Author

The 16:02 CI round failed before running any tests: it compiled the PR merge ref against a main that had since split the thin mach-o and mach-o-universal target variants and added the riscv family, and the automatic merge placed the debugCompanion field on only the universal variant (my branch itself type-checked cleanly — the same bd0434a1 tree compiles locally with --incremental false).

The branch is rebased onto current main in 55eddb0 and adapted: the field now lives on both Mach-O variants, and the cputype map covers riscv (no Mach-O cputype; ELF-only, so a companion can never match it). Re-validated locally: typecheck without incremental state, full check/docs:check, catalog regeneration, the companion suites (57/57), prompt completion and contracts (70 passed), and the real-Ghidra end-to end (pair_sum(Pair p) / signature_source: "imported").

@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge, with both numbered previous findings fixed and no new blocking issue found.

Summary

Adds caller-selected dSYM companions for Mach-O targets through dsym_path and --dsym-path.

  • REA admits a dSYM only when its DWARF member matches the Mach-O target.
  • CLI and MCP callers can pass a dSYM path when opening a binary.
  • Fresh Ghidra imports stage the matched DWARF member beside the private target.
  • Target summaries and saved analyses now keep the selected dSYM identity.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["CLI or MCP selects dsym_path"] --> B["Check bundle and selected target slice"]
  B --> C{"CPU identity and UUID match?"}
  C -- No --> D["Reject caller input"]
  C -- Yes --> E["Hash matching member"]
  E --> F["Commit companion identity to profile and snapshot"]
  F --> G{"Verified Ghidra checkpoint?"}
  G -- Yes --> H["Restore Program without restaging"]
  G -- No --> I["Copy beside private target snapshot"]
  I --> J{"Digest and file checks pass?"}
  J -- Yes --> K["Start Ghidra import"]
  J -- No --> L["Stop startup; close handles before removing runtime"]
Loading

Reviews (42) · Last reviewed commit: "fix(ghidra): preserve dSYM parse failure..." · Reviewed by Greptile

Comment thread src/ghidra/GhidraDebugCompanion.ts Resolved
Comment thread src/domain/machoDebugCompanion.ts Resolved
Comment thread src/ghidra/GhidraDebugCompanion.ts Resolved
Comment thread src/domain/binaryTargetTypes.ts Resolved
Comment thread docs/providers/dsym.md Resolved
@jimpablo

Copy link
Copy Markdown
Contributor Author

All six Greptile findings are addressed in da1222e:

  1. Traversal budget (P1) — the ledger now charges only bytes actually read (probe plus any span extension) instead of each slice's full size, and one shared ledger covers the target and every member candidate for the whole admission. A five-slice companion with large slices now admits on its real read volume.
  2. Stale UUID / weak file-state check — admission reuses sameRegularFileState (which also compares mode and nanosecond timestamps) instead of the weaker dev/ino/size/mtime tuple, and the digest loop is bounded by the admitted initial.size.
  3. Staging copy limit — the admitted member size is carried on the companion identity and the staging transform stops with a typed artifact-changed error the moment the stream exceeds it, so a member grown or replaced after admission cannot stream past the 1 GiB budget that admitted it.
  4. Directory limits — member enumeration checks cancellation per entry and rejects as soon as the 16-member budget is exceeded instead of walking the whole directory first.
  5. Short-slice magic read — a sub-4-byte slice is a typed rejection before the magic is read; regression added.
  6. Sibling test fixture — the second slice now carries the same 0x01000007 cputype as the first (distinguished only by its UUID), so the same-family deduplication is what the test actually exercises.

Local verification: typecheck without incremental state, full check (all six gates) and docs:check, companion suites 58/58 including the strengthened sibling case, and the real-Ghidra end-to-end still reports pair_sum(Pair p) / signature_source: "imported".

@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: da1222e844

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

@jimpablo

Copy link
Copy Markdown
Contributor Author

The shard-1 failure in the latest round is an upstream test, not this branch: dylibResolutionCli.test.ts > reports each same-named slice's own embedded dyld environment is new on current main (it is not present in this branch's tree) and fails identically on unmodified upstream/main — reproduced locally on a clean upstream/main checkout (same expected 1 to be +0 assertion; on the linux runner it surfaces as "FAT binary has no host-compatible x64 architecture"). Main's own CI runs from today are all cancelled or queued, so upstream has not observed it yet. The Portable tests and CI required failures are downstream of that shard result.

No change on this branch is needed for it; the branch itself remains green in its own suite (all companion/dylib boundary tests pass on this tree, 10/10 including the rest of dylibResolutionCli).

@jimpablo

Copy link
Copy Markdown
Contributor Author

Thank you for finishing touches on the branch — the pre-allocation budget check in readUuidRegion and the documented budget semantics in docs/dsym.md are exactly the right sharpening of the admission rules, and the merge brings in the dylib fixture fix we traced earlier. Local is synced to d15fe94; happy to help with anything further.

@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: 4f4079ec3e

ℹ️ 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/GhidraDebugCompanion.ts Resolved
@jimpablo

jimpablo commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks again for the re-test and the careful read @CassieFox23! Picked up those items along with the main merge at 57f2edcbf:

  • Normalized dsym_path in validateDsymBundleDirectory (extname(basename(absoluteCallerPath(dsymPath))) === ".dSYM"), so selected.dSYM/ and selected.dSYM/. still work while a folder not named .dSYM rejects consistently across both CLI and MCP (not_dsym_bundle).
  • Restored the remediation and limit-reason text assertions alongside the structured diagnostics checks in targetDiagnostics.test.ts and GhidraProvider.behavior.test.ts, plus added domain tests pinning the shared FAT container validation in machoDebugCompanion.test.ts and MCP lifecycle coverage in sessionMcp.test.ts.

All checks and review threads are green again on the merged head.

@CassieFox23

CassieFox23 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: Thanks, jimpablo, for listing the changes. At 57f2edc, all 10 changed test files passed on three Node versions. I have one question about the cleanup path in readMemberWithBorrowedResources.

Edit (8 Nov): I ran the new head, 9560a44, in a VM, and the results are here.

Check Node 22.23.4 Node 24.22.1 Node 26.12.1
Test files pass (10 passed) pass (10 passed) pass (10 passed)
Tests pass (445 passed, 7 skipped) pass (445 passed, 7 skipped) pass (445 passed, 7 skipped)

In my comment above, I ran six test files on all three Node versions, and five of them are in this set. I ran GhidraProvider.behavior on Node 24 only. This time all 10 files ran on all three.

From reading the code, line 1103 of src/application/DebugCompanionAdmission.ts checks the folder name extension. It must be .dSYM, as the reply says. The code not_dsym_bundle appears in tests/boundary/filesystem/ghidraDebugCompanion.test.ts, tests/boundary/filesystem/targetDiagnostics.test.ts and tests/boundary/mcp/sessionMcp.test.ts.

One question, also from reading the code. In readMemberWithBorrowedResources (line 997 of DebugCompanionAdmission.ts), one cleanup-failure branch returns ok(null). The caller then skips that member. If a failed read can reach that branch, the result could be uuid_mismatch instead of the read error. Is that intended? One idea: a test that sends a failed read through that branch.

On 57f2edc, the CI workflow run succeeded. Passing check runs include CI required and Portable tests. Of the check runs, 46 passed and 3 were skipped, Source tests among them. None failed. GitHub says the PR is mergeable, and its merge state is clean. The head is 6 commits behind main 88cf498.

Not run

  • My 7 Nov CLI checks with Ghidra (the ELF and Mach-O runs, the cut-off universal header, and a bundle folder not named .dSYM). This time I ran only the test files.
  • A Mach-O target with real DWARF in its dSYM.
Test setup
  • Box: Fedora 44 VM (4 vCPUs, 8 GB) on my Nobara 44 PC, Linux 7.2.11
  • Node: 22.23.4, 24.22.1, 26.12.1
  • Head: 57f2edc
  • Install: npm ci --offline and npm run test:prepare on Node 24.22.1, exit 0
Commands
npm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/domain/analysisSnapshot.test.ts src/domain/machoDebugCompanion.test.ts src/ghidra/GhidraProvider.behavior.test.ts tests/boundary/filesystem/ghidraDebugCompanion.test.ts tests/boundary/filesystem/targetDiagnostics.test.ts tests/boundary/mcp/ghidraFailureDiagnostics.test.ts tests/boundary/mcp/sessionMcp.test.ts tests/boundary/providers/ghidra/ghidraCheckpointLifecycle.test.ts tests/process-global/debugCompanionAdmissionFailures.test.ts tests/process-global/ghidraDebugCompanionStagingLifetime.test.ts

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

@jimpablo

jimpablo commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Good eye @CassieFox23 — that branch was definitely non-obvious from reading readMemberWithBorrowedResources alone!

In that if (cause.outcome.kind === "failed") block, a failed member read is meant to rethrow at the first line (if (normalized.outcome.kind === "failed") throw normalized.outcome.cause;), while the trailing return ok(null) is only for when openRegularFile rejects a non-regular entry before reading (NonRegularFileReadError) and its initial descriptor close() fails before retryRegularFileCleanup succeeds in closing the handle (matching how the normal path skips non-regular / unopenable entries).

Looking closely at your question, though, normalizeMemberCleanupFailure previously checked isExpectedAdmissionPathFailure(rawCause) without checking whether openRegularFile had already admitted the regular-file handle — so if a post-admission read or final stability stat ever failed with a path/permission errno like EACCES or ENOENT, it could have normalized to undefined and reached return ok(null) (uuid_mismatch).

In 9560a449f (along with the latest main merge):

  • readMemberWithBorrowedResources now marks memberAdmitted = true as soon as withRegularFileCompletion enters the read callback and routes all member failures through normalizeMemberFailure, so once a member handle is admitted, any read or stability failure keeps normalized.outcome.kind === "failed" and rethrows instead of reaching ok(null).
  • Expanded tests/process-global/debugCompanionAdmissionFailures.test.ts (normalizes RegularFileOperationCancelled and read faults across member close failures and succeeded close retries) to send EIO, EACCES, and RegularFileChangedError read faults through the failed-close + succeeded-retry branch (verifying they throw BinaryTargetError / AnalysisArtifactChangedError), alongside a NonRegularFileReadError entry that takes the ok(null) skip branch before admitting the valid matching member.

@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: I ran the PR's 12 changed test files on head 9560a44, on three Node versions. All 12 files passed each time, with 464 tests passed and 7 skipped. In CI, Portable tests and Test shard (2/6) each fail one test, in a file this PR does not change.

Check Node 22.23.4 Node 24.22.1 Node 26.12.1
Test Files pass, 12 passed (12) pass, 12 passed (12) pass, 12 passed (12)
Tests pass, 464 passed, 7 skipped (471) pass, 464 passed, 7 skipped (471) pass, 464 passed, 7 skipped (471)
  • jimpablo pushed one new commit, 9560a44. It merges main c78c8ae into the branch and also carries the fix.
  • Its title is fix(dsym): keep post-admission member read faults fatal across close retries.
  • Thanks, jimpablo, for replying about the branch I asked about in readMemberWithBorrowedResources.
  • The PR changes 51 files against the merge base. Twelve are test files and 39 are others.
  • The head is 0 commits behind main c78c8ae.
  • GitHub shows mergeable true and merge state blocked.

CI on head 9560a44, read live:

  • Workflow CI: queued.
  • Workflow CodeQL production: completed/skipped.
  • Workflow PR readiness: completed/success.
  • Workflow PR title: completed/success.
  • failure check runs (2): Portable tests and Test shard (2/6).
  • queued check run (1): CI required.
  • skipped check runs (3): Analyze production (${{ matrix.language }}), Python producer tests, Source tests.
  • success check runs (43), including the other five Test shard checks, Static checks and Build package.
  • Both failed jobs fail the same test: preserves the source when an inline result with unknown retention exceeds delivery. It is in tests/boundary/mcp/sourcePublicationComposed.test.ts. The log shows an AssertionError on a resource_constraint result.
  • That test file came to main in 88cf498 (fix!: preserve results when source publication fails #8444). It is not one of the PR's changed files. I don't know the cause.

Not run

  • I did not run a real ELF, Mach-O or universal-header file through the Ghidra CLI checks. They were on my earlier Not run list.
  • I ran only the 12 changed test files, not the full test suite.
Test setup
  • Box: Fedora 44 VM (4 vCPUs, 8 GB) on my Nobara 44 PC, Linux 7.2.11
  • Node: 22.23.4, 24.22.1, 26.12.1
  • Head / base: 9560a44 / c78c8ae (merge base with main)
  • Install: npm ci --offline and npm run test:prepare on Node 24.22.1
Commands
npm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/application/JsonAuthenticationHeadroom.test.ts src/domain/analysisSnapshot.test.ts src/domain/machoDebugCompanion.test.ts src/ghidra/GhidraProvider.behavior.test.ts tests/boundary/filesystem/ghidraDebugCompanion.test.ts tests/boundary/filesystem/targetDiagnostics.test.ts tests/boundary/mcp/ghidraFailureDiagnostics.test.ts tests/boundary/mcp/sessionEvidenceReuseMcp.test.ts tests/boundary/mcp/sessionMcp.test.ts tests/boundary/providers/ghidra/ghidraCheckpointLifecycle.test.ts tests/process-global/debugCompanionAdmissionFailures.test.ts tests/process-global/ghidraDebugCompanionStagingLifetime.test.ts

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

@jimpablo

jimpablo commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for re-testing 9560a449fa across all three Node versions @CassieFox23!

On the sourcePublicationComposed.test.ts failure you spotted in Test shard (2/6): 52fe342c7 (#9492) on main grew the contract example past the 10 KiB delivery budget that 88cf49803 (#8444) had hardcoded in that test, which #9566 (78a84d75c) just fixed on main.

I pushed 9f36e1ff3 to merge 78a84d75c from main and also tighten normalizeMemberFailure / readMemberWithBorrowedResources so the skip-vs-fail outcome is an explicit { kind: "skip" } | { kind: "failed"; cause } union (and opaque caller abort reasons shaped like RegularFileCleanupFailure or OwnedRegularFileOperationFailure stay AnalysisCancelledError).

…-admission

# Conflicts:
#	docs/specs/README.md
…-admission

# Conflicts:
#	src/native/AppleMachoSelection.ts
#	src/native/MachoArchitectureSelection.ts
…-admission

# Conflicts:
#	src/application/BinaryTargetResolver.ts
#	src/artifacts/apple/MachoLoadCommandReader.ts
#	src/ghidra/GhidraClient.ts
#	src/ghidra/GhidraClientTypes.ts
#	src/native/AppleMachoSelection.ts
#	src/server/registerSessionTools.ts
@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.

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

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

…-admission

Resolve conflicts with upstream/main (8fefe18):
- Remove docs/specs/README.md and docs/specs/native/macho-dsym-companion/* per morluto#12856
- Combine caller_input_path and debug_companion in liveBinaryTargetSummary.ts
- Combine ComLoader import and debug_companion in GhidraAnalysisProfile.ts
- Combine detectDatabaseEngine, boolean hasTrailingZipArchive, and retainTargetCancellation (morluto#12339) with dsym_path admission and cleanup in BinaryTargetResolver.ts
- Update advertised schema summary for open_binary.json
- Migrate new tests in ghidraCheckpointLifecycle.test.ts and GhidraProvider.behavior.test.ts to createTestTempDirectory (morluto#12722)
Comment thread src/domain/machoDebugCompanion.ts Resolved
Comment thread tests/boundary/mcp/sessionMcp.test.ts Resolved

@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: cbddb9ddba

ℹ️ 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/GhidraDebugCompanion.ts Resolved
…rship

- Report Mach-O LC_UUID and FAT format failures with ParseFailureError (kind, format, offset, field) in machoDebugCompanion and preserve them through DebugCompanionAdmission.
- Preserve established member refusals in readMemberWithBorrowedResources without running cancellation-sensitive post-read stability validation on rejected outcomes, and preserve physical EIO failures when the caller aborts with the same error object (morluto#12339).
- Preserve cancellation arriving during outer target handle close after an inner companion handle close failure.
- Defer partial staged-bundle removal in stageGhidraDebugCompanion to the private runtime owner so open destination descriptors are never unlinked before release (matching GhidraTargetSnapshot).
- Remove explicit 10s test timeout in sessionMcp.test.ts, use exactOptional() on liveBinaryTargetSummary debug_companion, and align explicit format-selection rejection/docs with TargetFormatHint.
@jimpablo

Copy link
Copy Markdown
Contributor Author

Hey @morluto — quick status update and an overlap flag per CONTRIBUTING.md:

What's your preference on merge order / coordination between #2025, #10768, and the #11364 design question? Happy to adjust or rebase onto whichever direction you want to land first.

@morluto morluto added the provider: ghidra Analysis provider / engine: ghidra label Nov 23, 2026

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: cli CLI adapter and one-shot commands area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior area: server Server layer and tool wiring ci:full enhancement New feature or request P2: medium Medium priority issue provider: ghidra Analysis provider / engine: ghidra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Analyze a caller-selected matching dSYM with the Ghidra provider

4 participants