Skip to content

refactor(firmware): compose workspace and publication cleanup failures through the shared owner - #11094

Merged
morluto merged 1 commit into
mainfrom
refactor/firmware-cleanup-dependencies
Nov 15, 2026
Merged

morluto merged 1 commit into
mainfrom
refactor/firmware-cleanup-dependencies

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Firmware composed three cleanup failures by hand, as analysisErrorWithCleanupFailure(...).bindCleanupDependencies(...). #10855 (now on main) added the shared owner analysisErrorWithCleanupDependencies, which completes a composite only once both the primary's and the cleanup's records report release. This PR moves those three sites onto it. No behavior change. No linked issue; this is a step of the internal cleanup-ownership work, and it was gated on #10855 landing.

Problem and expected behavior

  • FirmwareProvider.ts, a workspace cleanup failure after a failed outcome: binds [outcome.error, cleanup]. Moves to the shared owner.
  • FirmwareProvider.ts, a workspace cleanup failure after a phase interruption: binds [cleanup]. The primary comes from firmwarePhaseInterruption, a fresh cancellation or timeout with no cleanup of its own. Binding it as a dependency is therefore a no-op (dependencies already complete are skipped), and the shared owner gives the same result.
  • FirmwarePublication.ts, a publication cleanup failure: binds [primary, cleanup]. Moves to the shared owner.

Change and scope

  • The three sites above, plus the cleanup-dependency-binding baseline (−3).
  • Left as they are, because their binding is deliberately different:
    • FirmwareFailures.ts readCleanup: a cancelled read's primary does not share the cleanup, so it binds only [cleanup] even when the primary has cleanup.
    • FirmwareProvider.ts close_firmware: it aggregates many failures.

Contribution scope: not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: analysisErrorWithCleanupDependencies (src/domain/analysisErrorCleanup.ts); firmware consumes it.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): cleanup completion semantics unchanged.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: none. This is a behavior-preserving move onto an owner that has its own tests (src/domain/analysisCleanupRelease.test.ts, analysisErrorCleanup.test.ts).
  • Base reproduction or other evidence: source-derived equivalence, as described above.
  • User-visible CLI/MCP output (if applicable): none.
  • Remaining proof gaps: the firmware integration and workspace-recovery boundary tests skip on this host because the firmware tools are absent. They run in 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

  • npm run test:focused -- tests/boundary/firmware/firmwareWorkspaceRecovery.test.ts tests/boundary/firmware/firmwarePublicationPaths.test.ts tests/boundary/firmware/devicetreeFinalization.test.ts src/firmware/FirmwareDeadline.test.ts: 21 passed, 2 skipped (tools absent).
  • npm run test:focused -- tests/boundary/firmware/firmwareReportFiles.test.ts tests/boundary/firmware/firmwareIntegration.test.ts: 22 passed, 40 skipped (tools absent).
  • node scripts/verify/architecture-guards.mjs --shrink-baselines: passed.
  • npm run check:fast: passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner:

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

Before merge

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

…s through the shared owner

Three firmware sites built analysisErrorWithCleanupFailure(...).bindCleanupDependencies(...) by hand. They now use analysisErrorWithCleanupDependencies, which completes once the primary's and the cleanup's records both release. The phase-interruption site binds only the cleanup today; its primary is a fresh cancellation or timeout without cleanup, so the shared owner's binding is equivalent. The cleanup-dependency-binding baseline shrinks by 3.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T12:13:19.242819Z
We couldn’t complete this review. Comment @codex review to try again.
56f8df7 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This refactor appears safe to merge; the three replacements preserve existing behavior.

Summary

Firmware now uses analysisErrorWithCleanupDependencies at three cleanup-failure sites instead of repeating the composition and binding steps.

  • Firmware cleanup failures use the shared composition helper.

Acknowledged scope:

Reviews (1) · Last reviewed commit: "refactor(firmware): compose workspace an..." · Reviewed by Greptile

@morluto
morluto merged commit c043e4e into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the refactor/firmware-cleanup-dependencies branch November 15, 2026 12:18
@morluto morluto added the area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant