feat(run): ground a run's success in an independent verification command#171
Merged
Conversation
A `flynn goal` run can now take a `--verify "<command>"`: a check that confirms the goal actually succeeded. The command runs in a confined sandbox at the working directory after the agent has stopped, so its verdict is the command's real exit code, not anything the model produced or claimed. The result is recorded on the run's stream as a check event plus an outcome event that binds the run's success to it, both part of the sealed verifiable record. A run whose check passed is grounded. A run whose check failed records a success the verifier can show is not backed, so the run's own sealed record fails the ground-truth check rather than overstating the outcome. With no `--verify` given, a run records no success claim and the ground-truth check is vacuous, so the behavior is opt-in. Tested: `TestRunVerificationIndependent` confirms the verdict is the command's real exit code; `TestRunGroundTruthEndToEnd` drives a real run, seals it, and verifies that a passing check grounds the run while a failing check leaves it not grounded.
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
A
flynn goalrun can now take--verify "<command>": a check that confirms the goal actually succeeded. The command runs in a confined sandbox at the working directory after the agent has stopped, so its verdict is the command's real exit code, not anything the model produced. The result is recorded on the run's stream as a check event plus an outcome event that binds the run's success to it, both part of the sealed verifiable record.Why
A sealed run can prove what the agent did and that the record was not altered, but until now the run's claim of success rested on the model's own judgment of its stop condition. That is an assertion, not evidence. Binding the success to an independent check makes the difference: a run whose check passed is grounded, and a run whose check failed records a success the verifier can show is not backed, so the run's own record fails the ground-truth check rather than overstating the outcome. The check is operator-supplied and run after the agent stops, which is what makes it independent of the model. It is opt-in: with no
--verify, a run records no success claim and the ground-truth check is vacuous.How to verify
go build ./...,go test ./cmd/flynn/,go vet ./cmd/flynn/, andgolangci-lint run ./cmd/flynn/all pass.TestRunVerificationIndependentconfirms the verdict is the command's real exit code.TestRunGroundTruthEndToEnddrives a real run, seals it, and asserts a passing check grounds the run (VerifyGroundTruthaccepts) while a failing check leaves it not grounded (rejected).