Skip to content

fix(workbook): persist terminal cell results before returning - #72

Open
rudycelekli wants to merge 1 commit into
debpalash:mainfrom
rudycelekli:campaign/opengtm-terminal-persistence-20261010-v2
Open

rudycelekli wants to merge 1 commit into
debpalash:mainfrom
rudycelekli:campaign/opengtm-terminal-persistence-20261010-v2

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

What & why

False conditions and missing AI/research prompts produce terminal cell results, but return before committing their ORM changes. The worker then closes its session, rolling the changes back. Old COMPLETE values can remain hydrated, or a newly attempted cell can have no persisted receipt.

Commit the existing terminal receipt and row state after the existing run fence, before these three returns. The skipped-cell broadcast follows the commit. Condition evaluation, terminal statuses and output run-once behavior are preserved.

Verification

  • Exact main, actual worker and migrated SQLite: six terminal cases fail and one formula success control passes. Candidate: all seven pass, covering fresh and previously COMPLETE=42 cells.
  • Six late lease-loss controls use a real separate database transaction after the actual worker ownership preflight ends. Reclaiming the queue lease or cancelling the job and pausing the workbook makes each terminal path reject the lost lease and preserve the old COMPLETE=42 row and receipt. No production callable is replaced. Independent native cold replay also passes all six controls.
  • Focused backend suite: 156 passed, no skips. Selected API run-once, dependency and failure regressions: 15 passed. AST parse and diff whitespace checks passed.
  • Unchanged four-job owned-fork CI passed on cryptographically verified commit 84735689b1af0e7911a293ae20a8c8d996920813: backend SQLite 2,105 passed/134 skipped/3 deselected; PostgreSQL integrity and tenancy 18 passed; frontend lint/build and 63 Bun tests passed; mounted browser regressions 3 passed.

Boundaries

Authentication, tenancy and provider authorization are unchanged. Local native evidence covers the SQLite worker and run fence, without HTTP authentication or provider/model/network calls. The existing hosted suite separately includes PostgreSQL integrity and tenancy checks.

Checklist

  • Focused correctness fix with regression tests
  • DCO sign-off and GitHub-verified cryptographic commit signature
  • Independent source and native fence review
  • Existing four-job owned-fork CI passed on the exact candidate head

Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
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