Repository navigation
Persist observed check failures before final validation #1426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7174038
e03566d
6712072
6f4151a
584124e
c886a60
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -429,15 +429,17 @@ def _save_report( | |
| payload = {"head": report.head, "dirty": report.dirty, "results": results} | ||
| if report.settings_sha256 is not None: | ||
| payload["settings_sha256"] = report.settings_sha256 | ||
| def preserve_pass() -> bool: | ||
| def preserve_checkpoint() -> bool: | ||
| if report.results[-1] is not sandbox.INCOMPLETE_CHECK: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Checkpoint kind is detected by object identity with the INCOMPLETE_CHECK sentinel
|
||
| return not worktree.local_state_files(wt, CHECKS_FILE.name)[0] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: A failure checkpoint is skipped when no receipt exists; this rule is implicit For a failed stage, |
||
| saved = _load_report(wt) | ||
| return (saved is not None and saved.ok and not saved.dirty and saved.head == report.head | ||
| and saved.settings_sha256 == report.settings_sha256 | ||
| and tuple(result.command for result in saved.results) == checkpoint_checks) | ||
|
|
||
| return worktree.write_local_state( | ||
| wt, CHECKS_FILE.name, json.dumps(payload, indent=2) + "\n", expected_head=report.head, locked_fd=locked_fd, | ||
| preserve=preserve_pass if checkpoint_checks is not None else None, | ||
| preserve=preserve_checkpoint if checkpoint_checks is not None else None, | ||
| ) | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Docs no longer say a checkpoint cannot satisfy readiness
The resolved paragraph drops main's sentence that a checkpoint cannot "satisfy readiness before final worktree validation". It keeps "Final worktree validation is required before publishing a pass." The behaviour has not changed:
_checkpoint_stage(sandbox.py:183) still appendsINCOMPLETE_CHECK, and_check_report_problem(cli.py:384) rejects that marker. But a reader now has to infer that an intermediate checkpoint never satisfies readiness. Optional fix: add a short clause such as "An intermediate checkpoint is never a pass."