Repository navigation
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on f07389d9d0bf4088872dd5691961ff19dc5c8729, 64.8s: approve (0 critical, 0 important, 3 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| origin, f"refs/heads/{config.base_branch}") | ||
| base = git("rev-parse", "FETCH_HEAD^{commit}") | ||
| script = git("show", f"{base}:{_SIZE_BUDGET}") | ||
| tree = git("merge-tree", "--write-tree", base, pr.head_sha) |
There was a problem hiding this comment.
suggestion: Merge conflict with the fresh target gives an unclear error
If the PR head no longer merges cleanly with the freshly fetched target, git merge-tree --write-tree exits 1. It writes the conflict details to stdout, not stderr. _git builds its error from the stderr tail, so the user sees only git merge-tree --write-tree <base> <head> failed: with nothing after it. This can happen even when GitHub's mergeable is still UNKNOWN or stale and readiness passed. It fails closed, so nothing unsafe gets through, but the user isn't told why. Smallest fix: run merge-tree with _proc.run and, when it exits 1, raise CliError("PR head conflicts with current <base_branch>; update the branch").
| "GIT_ATTR_NOSYSTEM": "1", "GIT_NO_REPLACE_OBJECTS": "1", "PYTHON": sys.executable} | ||
| git = partial(_git, root, extra_env=env) | ||
| git("clone", "--shared", "--no-checkout", "--template=", str(wt), ".") | ||
| _git(root, "fetch", "--no-tags", "--no-recurse-submodules", "--", |
There was a problem hiding this comment.
suggestion: The fetch skips the hardened scratch environment without saying why
Every other git call in the scratch repo goes through the git partial with GIT_CONFIG_NOSYSTEM, GIT_CONFIG_GLOBAL=/dev/null and the related settings. The fetch calls _git(root, ...) directly. That is probably on purpose, so the user's credential helper can authenticate to origin, but the code doesn't say so. A later edit could 'fix' it to use git and break private-repo fetches. Add a one-line comment explaining that the fetch needs the user's global config for credentials.
| return 3 | ||
| pr, readiness, kicked = waited | ||
| assert readiness is not None | ||
| _prequeue_size_budget(wt, config, pr, readiness) |
There was a problem hiding this comment.
suggestion: ready re-runs the budget for PRs already in the queue
In cmd_ready, the check runs whenever readiness is ready and the strategy is mergify. It doesn't look at Mergify markers or queue membership. So if loopzero ready is run again on a PR that is already requested or queued, and the target has moved since, it now exits 1 with a budget failure. The PR stays in the queue, so the output contradicts the queue state. The acceptance asks for this only for ready and new merge requests, and merge already sends existing requests to the wait path. If ready should report on candidates before admission only, skip the check when mergify.markers shows a request. Otherwise, document that ready always re-checks against the current target.
Architecture-Review: unchanged; queue preview keeps the same baseline and checker. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on 67cea96c397609a4556c2eed82f4a184ccc44eb8, 10.0s: approve (0 critical, 0 important, 0 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
Check size budgets against current target before queue admission
Goal
Keep a green source PR out of Mergify when its clean integration with the current target exceeds the existing size budget.
Problem
In #1293, PR #1230 passed its fork-point check at 7,482 source lines and measured 7,508 against a cap of 7,500 after integration with the main SHA already live at queue admission.
Acceptance
Base
2ef0b72
Notes
Use Git plumbing to integrate as data and execute only the checker tracked by the target. Keep integration objects, index and checkout in a private scratch repository. Opt in through the existing exact checker command.
Closes #1293
Validation
Recorded for
d64bb949dd0duv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review