Skip to content

fix(saver): propagate save failures to callers - #3033

Open
Sion612 wants to merge 1 commit into
codex-team:nextfrom
Sion612:fix/saver-reject-3030
Open

Sion612 wants to merge 1 commit into
codex-team:nextfrom
Sion612:fix/saver-reject-3030

Conversation

@Sion612

@Sion612 Sion612 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Saver.save() currently logs caught errors without rethrowing them,
allowing a failed save to resolve with undefined.

Rethrow the original error after logging so callers can handle the rejection.
Normal invalid-block filtering and the existing Tune error-handling behavior
remain unchanged.

Add regression coverage for synchronous Tool.save() throws, asynchronous
rejections, invalid-block filtering, and the existing rejection when saving
in read-only mode.

Fixes #3030.

Verification

Local validation of the reviewed candidate:

  • Base implementation with the same regression tests:
    4 passing / 2 expected failures because save resolved with undefined.
  • Fixed Saver spec: 6/6 passing in Chrome.
  • Five related specs: 30/30 passing in Chrome.
  • Separate production-build review: 5/5 Chrome checks covering retry,
    multi-block data preservation, validation rejection, existing Tune behavior,
    and awaited read-only transitions.
  • Test and production builds, lint, and whitespace checks passed.
    Existing warnings were retained.

Full Cypress, Firefox, Edge, and a standalone TypeScript check were not run.
The separate review probes are validation evidence and are not included
in this PR.

This change does not implement automatic rollback of the read-only state
after a failed transition.

Implementation and local verification were AI-assisted.

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.

Silent Data Loss & Broken Error Contract in Saver.save()

1 participant