Repository navigation
Show reusable local checks in status #1316
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
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 |
|---|---|---|
|
|
@@ -1671,10 +1671,14 @@ def cmd_status(args: argparse.Namespace) -> int: | |
| print(f"branch: {branch}") | ||
| print(f"head: {head}") | ||
| print(f"base: {config.base_branch}") | ||
| print(f"dirty: {'yes' if worktree.is_dirty(wt) else 'no'}") | ||
| dirty = worktree.is_dirty(wt) | ||
| print(f"dirty: {'yes' if dirty else 'no'}") | ||
| checked = not dirty and _current_check_report(wt, config, head) is not None | ||
| print(f"local checks: {'passed' if checked else 'no reusable pass'}", flush=True) | ||
|
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: New status label breaks the column alignment Every other status field uses a 10-character label column, such as |
||
| pr = github.pr_for_branch(config.repo, branch) | ||
| if pr is None: | ||
| print("pr: none (commit changes and pass `loopzero check` before `loopzero pr`)") | ||
| hint = "run `loopzero pr`" if checked else "commit changes and pass `loopzero check` before `loopzero pr`" | ||
| print(f"pr: none ({hint})") | ||
| return 0 | ||
| print(f"pr: #{pr.number} {pr.url} ({'draft' if pr.is_draft else 'ready'}, {pr.state})") | ||
| reviews = _pr_reviews(config.repo, pr.number) | ||
|
|
||
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: Receipt is verified twice when a PR exists
cmd_statuscalls_current_check_reporthere. When a PR exists,_readinesscalls it again at cli.py:286. Each call reloadschecks.jsonand recomputessandbox.settings_fingerprint, which can resolve the base revision and hash the runner executable. The result is correct, but the cost doubles. Readiness then reports the local half of its decision as a separaterun loopzero check at this headreason, so the two outputs can disagree if the file changes between the calls. This is not blocking. A small follow-up is to let_readinessaccept an already-verified report, or to accept the duplicate work explicitly.