Repository navigation
refactor(firmware): compose workspace and publication cleanup failures through the shared owner - #11094
Conversation
…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.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Low impact] This refactor appears safe to merge; the three replacements preserve existing behavior. SummaryFirmware now uses
Acknowledged scope:
Reviews (1) · Last reviewed commit: "refactor(firmware): compose workspace an..." · Reviewed by Greptile |
Summary
Firmware composed three cleanup failures by hand, as
analysisErrorWithCleanupFailure(...).bindCleanupDependencies(...). #10855 (now on main) added the shared owneranalysisErrorWithCleanupDependencies, 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 fromfirmwarePhaseInterruption, 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
cleanup-dependency-bindingbaseline (−3).FirmwareFailures.tsreadCleanup: a cancelled read's primary does not share the cleanup, so it binds only[cleanup]even when the primary has cleanup.FirmwareProvider.tsclose_firmware: it aggregates many failures.Contribution scope: not applicable.
Contract and boundary impact
analysisErrorWithCleanupDependencies(src/domain/analysisErrorCleanup.ts); firmware consumes it.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; 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.
Evidence and regression coverage
src/domain/analysisCleanupRelease.test.ts,analysisErrorCleanup.test.ts).For evidence-bearing changes:
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
Author readiness
Human owner:
Before merge
type(scope): outcome.