Skip to content

fix(export): preserve committed journal and function failure facts - #9965

Draft
morluto wants to merge 1 commit into
mainfrom
codex/decompile-export-failure-facts
Draft

morluto wants to merge 1 commit into
mainfrom
codex/decompile-export-failure-facts

Conversation

@morluto

@morluto morluto commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

Preserve decompile export facts across resume and cancellation. Resume now rejects invalid UTF-8 in committed journal records without changing the journal or index, while an incomplete trailing record remains repairable. A settled function failure is journaled before a later caller abort, including independent retries; cancellation retains the caller's exact reason, and no independent retry or new function publication is admitted after an observed caller abort.

The shared journal/parser and function-outcome owners enforce these rules. Existing input contracts, resource ownership, cleanup precedence and valid export formats are preserved. This is an ordinary correction within existing export boundaries; no new capability scope decision applies.

Related: #8260. These narrow fixes do not resolve that broader provenance-design issue.

Validation

  • Fresh main a6e02657 with only the new regression tests: 4 fail, 70 pass, reproducing both bugs while retaining main's stronger existing assertions.
  • Standalone npm run typecheck — passes.
  • npm run test:local -- src/application/decompileDirectory/decompileAll.test.ts src/application/decompileDirectory/exportResources.test.ts — 74 tests pass. Covers committed/torn UTF-8, literal U+FFFD, initial/independent settled failures, typed cancellation, cleanup ownership and resume.
  • Scoped formatting, lint and git diff --check — pass with existing lint warnings.

Tests exercise the public export workflow with inert provider observations and temporary files. No actual decompiler engine, target execution or compiled CLI/MCP workflow was exercised. This three-file patch has no dependency on other audit changes; earlier fixture/profile changes and the unrelated absent-directory assertion change are excluded.

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.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant