Skip to content

fix(prism): release cancelled job-build traceback state - #253

Merged
kiwidream merged 1 commit into
2.x.xfrom
release-superseded-build-state
Sep 8, 2026
Merged

kiwidream merged 1 commit into
2.x.xfrom
release-superseded-build-state

Conversation

@kiwidream

@kiwidream kiwidream commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Superseded and timed-out job builds kept their requests, promises, ledger snapshots, and converted payout rows alive through stored exception tracebacks. Waiters re-raising the shared exception added their own frames and recreated the reference cycle.

Release completed producer-frame locals before publishing cancellation outcomes, including Python 3.14 executor frames and nested cause/context chains. Each waiter raises a private cancellation exception that preserves the original type, message, attributes, notes, diagnostic chain, and traceback locations. Successful results and unexpected failures retain their existing behavior.

Fixes #249. Builds on the merged fixes in #250 and #252.

Validation:

  • Ten regression tests cover concurrent waiters, supersession, timeout, in-frame retry, orphan recovery, and preserved diagnostics. Eight fail on the original production code with the new wait helper shimmed to the original Future.result() behavior; all pass on Python 3.12 and 3.14.7.
  • Fable validation: 405 existing focused tests pass on Python 3.14.7 in Docker.
  • Coordinator validation on the latest 2.x.x: 397 focused tests, 26 mainnet Compose contract tests, Docker ShellCheck/shell syntax, and Docker Python compilation all pass.
  • A bounded churn run with 65,536-row snapshots found the snapshot still alive immediately after all 12 waiter returns on the original code, and after zero of 12 with the fix; the fixed builds required no cyclic-GC reclamation.

The orphan-recovery path releases frame locals while holding the scheduler RLock; the ordinary completion callback does so before taking that lock. Unexpected failures retain their traceback locals for post-mortem inspection.

Implemented by Fable through Superset and reviewed before integration.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 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-09-08T18:08:26.481071Z 47a7066 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.

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