Repository navigation
fix(goal): finish the plan before a claim ends the run, and seal a resume - #667
Merged
Merged
Conversation
…sume Without --require-proof a planned goal converged on the model's end of turn, even with ledger items it had never attempted. The model is briefed on one item at a time, so a run resumed after a hard kill redid its first item, said it was done, and stopped with the rest of the plan untouched (TestLiveResumeAfterAHardKill failed every time on Windows with gpt-5-mini). A completion claim in that mode is now held while an item is neither proven nor abandoned, and the executor reopens the conversation and briefs the next item. When the claim arrives and the open item's latest check could not be run at all, the item is abandoned instead: a refused check is never counted as a repeat, so holding the claim for it would spin until the no-progress guard stalled the run. --require-proof is unchanged and still stalls on an unproven item. flynn resume drove the run on the plain log and never sealed it, so flynn spine verify refused every resumed run. Resume now loads the instance signer and seals from the durable stream, recording a stopped outcome first. A resume interrupted with Ctrl-C is left open, since it can be resumed again. Signed-off-by: Ion Alpha <contact@ionalpha.io>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Without
--require-proof, a planned goal no longer ends on the model saying it is done while ledger items are still open: the claim is held and the next item is briefed. A run continued withflynn resumeis now sealed when it ends.Why
TestLiveResumeAfterAHardKillfailed every time on Windows withopenai:gpt-5-mini, on main and before #666. The model is briefed on one item at a time, so after a hard kill the resumed run redid its first item, said "Done", and converged with the other two items never attempted. The same thing can happen on a fresh run whenever an item's check passes quickly and the model then claims completion.Separately,
resumeRundrove the goal on the plain log with no recorder and never sealed, soflynn spine verifyrefused every resumed run with "has no signed record and no checkpoint".How to verify
go test ./goal/ -run 'TestAClaim|TestTheProducerRunsBeforeTheRefusalDoes': a claim waits for an item nobody tried, an item whose check could not run is moved past when the claim arrives, and--require-proofstill stalls.go test ./mission/ -run 'TestAHeldClaim|TestAReopened|TestAFinishedPlan': the executor reopens a finished conversation on the next item, never sends a request ending on the assistant, and leaves a settled plan alone.go test ./cmd/flynn/ -run 'TestAResumedRunIsSealed|TestAnInterruptedResumeIsLeftOpen'.FLYNN_E2E_REAL=1 FLYNN_E2E_REAL_MODEL=openai:gpt-5-mini go test ./e2e/ -run TestLiveResumeAfterAHardKill -count=3passes 3 of 3 against a binary from this branch (0 of 3 on main).Turning off either new rule in
goal/ledgerloop.gofails its test.Notes for reviewers
--require-proofnow makes more model turns when it claims completion early, bounded by the existing repeat limit (two identical check failures move past an item) and the step budget.TestTheProducerRunsBeforeTheRefusalDoesencoded the old behaviour (claim honoured with an item never tried) and was updated so its second item is settled.sealResumeddirectly; the live resume test is what showsresumeRuncalls it.osv-scannerreports GO-2026-5932 ingolang.org/x/crypto0.58.0, which is unchanged from main; its reachability pass could not run on this machine's toolchain, and govulncheck finds no reachable call. Main's CI passed on 2f7bd9b.