Skip to content

refactor(binary): move production composition outside application workflows - #965

Merged
N0zoM1z0 merged 1 commit into
mainfrom
refactor/binary-production-composition
Oct 7, 2026
Merged

N0zoM1z0 merged 1 commit into
mainfrom
refactor/binary-production-composition

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Finish the binary production-composition boundary for #740. The former application runtime directly constructed concrete providers and required a special inward-dependency exception. Shared application workflows now receive the same two session factories; CLI and MCP use bound production entrypoints.

Problem and expected behavior

Moving runtime alone would make DirectAnalysis and status depend outward on composition. Preserve one-shot CLI isolation, managed-only execution, MCP connection state, selected configuration, snapshots, Evidence and finally-close while removing concrete provider creation from reusable workflows.

Change and scope

  • Move the unchanged binary and managed session factories to composition/binary. Bind their existing caller signatures in composition/directAnalysis; binding acquires no session or engine and retains no analysis state.
  • Supply the two factories explicitly through DirectAnalysisDependencies, using the existing BinarySession type and replay policy. Migrate all CLI/MCP, source and compiled fixture consumers.
  • Remove the exact application/runtime guard exception and reject six concrete production providers in application/server. Update ownership guidance, the component map and ADR link.

Contract and boundary impact

  • Semantic owner and earliest changed stage: production construction and application dependency injection.
  • CLI and MCP/tool-catalog contract: unchanged names, schemas, results and caller signatures.
  • Provider, bridge, target-format, or platform compatibility: unchanged constructor bodies, deep selection, lazy auxiliary and managed-only composition; no expanded platform claim.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged subjects, profiles, replay policy, recording and errors.
  • Process execution, authorization, cleanup, or containment impact: original cancellation and finally-close retained; no new permission/configuration fields.
  • Generated metadata, package, or installation impact: committed generated outputs unchanged; compiled fixture imports follow the new owner.

Evidence and regression coverage

  • Six real-BinarySession fixture cases cover independent calls, success/failure cleanup, cancellation before acquisition, managed/native isolation and selected/malformed configuration.
  • Seven guard cases reject the former exception and concrete application/server construction while admitting production composition.
  • Exact body/import/file-URL review confirms all 24 mechanical modules, including the moved production constructor, preserve implementations. The explicit dependency injection and binding diff was reviewed separately.
  • Remaining proof gaps: no fresh proprietary Hopper/IDA execution; one macOS-only focused case is deferred to native CI.

For evidence-bearing changes:

  • 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

  • Five static gates, fresh docs/build checks passed.
  • 199 focused cases passed across 31 suites, one macOS case skipped; actual CLI/MCP SDK, canonical/reordered presentation, selection, snapshot and optional failure isolation included.
  • All 540 test files discovered exactly once. Generated catalog/managed commitments unchanged.
  • Existing Ghidra 12.1.4 and JDK: actual CLI plus six MCP operations, decompiler, file-byte oracle, caller-working-directory preservation and runtime cleanup passed. Source-owned fixture was analyzed without execution. Two-CPU supervised family peak RSS: 1090641920 bytes; no owned processes left.
  • npm run verify:package: isolated installation, CLI/MCP analysis and Evidence, setup/backups/recovery/update and lifecycle passed; 131 tools and six prompts. No owned descendants remained and the temporary tarball was cleaned. Sampled MCP RSS 367149056 bytes; observed tools/list startup 1863.01 ms, without a comparative performance claim.
  • All 22 final-head CI checks passed at cdcec11, including both macOS native package/Inspector baselines, Linux x64/arm64, Windows, real Apple, source tests and coverage. Compiled production/workflow entrypoints are present and former runtime outputs are absent.

Compatibility, safety, and release

  • Breaking changes or migration steps: internal application callers supply factories; public adapters retain their prior signatures. No compatibility barrel at the former runtime path.
  • Real Hopper/Ghidra, browser, or OS coverage: real bounded Linux Ghidra as above; recording seams establish their narrower composition claims. Native package/platform CI remains required.
  • Package or release metadata impact: no dependency/version changes.
  • Security, privacy, process, or containment review: serial heavy lanes, two CPUs, one worker, bounded heaps and owned cleanup; no Windows disk writes, installations or GUI changes. Public examples and source references contain no private paths.

Review checklist

  • Focused outcome and Conventional Commit title.
  • Tracking issue linked.
  • Meaningful failure and cleanup boundaries tested.
  • Owning docs and compiled fixture paths updated.
  • Public CLI/MCP meaning and generated metadata verified.
  • Final diff checked for unrelated changes and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-07T13:35:58.602870Z cdcec11 PR opened
ℹ️ 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.

@N0zoM1z0
N0zoM1z0 merged commit 33d4761 into main Oct 7, 2026
22 checks passed
@N0zoM1z0
N0zoM1z0 deleted the refactor/binary-production-composition branch October 7, 2026 13:57
kaoru0822-kitauji added a commit that referenced this pull request Oct 7, 2026
observe-native-calls now runs through composition/directAnalysis, where #965
moved runProviderAnalysis.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
observe-native-calls now runs through composition/directAnalysis, where morluto#965
moved runProviderAnalysis.
@morluto morluto added enhancement New feature or request area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added the area: build Build, CI, packaging, and publishing label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants