Repository navigation
Deduplicate candidate and workflow policy handling - #1845
Conversation
Architecture-Review: unchanged; keep the same attestation inputs, trusted workflow policy, and hosted publication boundaries. Co-Authored-By: Codex <noreply@openai.com>
|
Equivalence evidence for the removed paths
Candidate/config/hosted tests: 202 passed, 9 skipped. Size and complexity gates passed. At base |
There was a problem hiding this comment.
loopzero primary review by claude on 413b14c9ba0b16de72fc1c01867348c9caf70df2, 36.3s: approve (0 critical, 0 important, 2 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.
| expected_repo = (repository.get("id"), repository.get("full_name")) | ||
| _require(_identity(candidate.get("user")) == expected_identity, | ||
| "Candidate author is not the verified Mergify GitHub App") | ||
| head, base = candidate.get("head"), candidate.get("base") |
There was a problem hiding this comment.
suggestion: Head-ref prefix check now depends on an earlier check in the caller
_candidate_snapshot no longer checks that event_head is a dict or that head.ref starts with QUEUE_BRANCH_PREFIX. Today nothing changes, because the only caller, _attest_candidate_once, does both checks first: _object(...) at line 444 and the prefix check at line 446. The new check head.get("ref") == event_head.get("ref") still rejects any ref that isn't a queue branch, and the error message is unchanged. The risk is in the future: the function's safety now rests on a check that lives somewhere else. If anyone calls _candidate_snapshot from a different place, the prefix check is silently lost. A small fix is to add a one-line comment or docstring saying event_head must already be validated and prefix-checked.
| try: | ||
| data = tomllib.loads(shown.stdout.encode("utf-8", errors="surrogateescape").decode("utf-8")) | ||
| text = shown.stdout.encode("utf-8", errors="surrogateescape").decode("utf-8") | ||
| return _build(tomllib.loads(text)), revision |
There was a problem hiding this comment.
suggestion: _build now runs inside the TOML parse/decode try block
The result is the same today. _build raises only ConfigError, and ConfigError derives from LoopZeroError, not from UnicodeDecodeError or TOMLDecodeError, so every error still reaches the same handler as before. The new layout is still more fragile: if _build ever raises a ValueError subclass that matches an earlier except clause, it would get the wrong message. No change is needed. Just keep this in mind if _build starts calling decoding helpers.
Architecture-Review: unchanged; the shared Git runner still honors main’s remaining read budget. Co-Authored-By: Codex <noreply@openai.com>
|
The conflict refresh preserves #1829’s |
There was a problem hiding this comment.
loopzero delta review by claude on f88384bd474b66685e67242276b327962000119a, 8.9s: 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.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Deduplicate candidate and workflow policy handling
Context and goal
Acceptance
Base
Base: 839d8fa
Validation
Recorded for
f88384bd474buv 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