fix(demo): make the live walkthrough actually drive goals, and record its output#174
Merged
Conversation
… its output The live script never worked: its flags were placed after the `goal` subcommand, but the flags are global and must precede the subcommand, so they were swallowed into the objective. Fix the ordering, and three more things the first real run surfaced: - use an absolute path to the built binary, because the goals run inside a temporary working directory; - pick the verification check to match the platform shell (`sh` on Unix, `cmd` on Windows), since the check runs in the sandbox's shell; - capture each run id from its own output rather than parsing the run list. Record the actual run in the README: one goal whose success is backed by a passing check verifies as grounded, and one that reports a success its independent check disagrees with verifies as not grounded. Also use the absolute binary path in `proof.sh` for the same reason.
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
Fixes the live walkthrough (
demo/proof-live.sh) so it actually drives goals, and records its real output in the README. The flags were placed after thegoalsubcommand, but Flynn's flags are global and must come before it, so--verify/--model/--data-dirwere being absorbed into the objective string. Three further fixes the first real run surfaced: use an absolute path to the built binary (the goals run in a temporary working directory), choose the verification check to match the platform shell (shon Unix,cmdon Windows, since the check runs in the sandbox shell), and capture each run id from its own output.proof.shgets the same absolute-path fix.Why
A demo that does not run is worse than no demo. The corrected script now shows the point end to end: a goal whose success is backed by a passing check verifies as grounded, and a goal that reports a success its independent check disagrees with verifies as not grounded, even though both records are signed and governed. The README now carries the actual captured run rather than a placeholder.
How to verify
bash -n demo/proof.sh demo/proof-live.shparses clean../demo/proof.shruns the verifier against the published vectors with no model (the five verdicts in the README)../demo/proof-live.shdrives two real goals and verifies them; it needs a model (a stored key or a local model). The README records a real run of it.