Repository navigation
Deduplicate reviewer and queue comment processing - #1855
Conversation
Architecture-Review: unchanged; reviewer instructions, provenance validation, and queue evidence selection retain the same inputs and rules. Co-Authored-By: Codex <codex@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 274447a6b095184a7705efc294705bc6101156d8, 32.0s: approve (0 critical, 0 important, 1 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.
| and user.get("login") == "mergify[bot]"), | ||
| key=lambda item: (str(item.get("updated_at") or ""), item["id"]), default={}, | ||
| ) | ||
| latest = max(_comments_by(comments, "mergify[bot]"), key=lambda item: (_updated_at(item), item["id"]), default={}) |
There was a problem hiding this comment.
suggestion: Departure selection line exceeds the configured 100-column limit
The new latest = max(_comments_by(...), key=lambda item: (_updated_at(item), item["id"]), default={}) line is about 117 characters, but [tool.ruff] line-length = 100. CI won't fail because E501 isn't in the selected rules, so this isn't blocking. It does break the file's wrapping convention, though, and ruff format would rewrap it, which would give back part of the line savings. To fix it, wrap the key onto a second line, or add a small _order(item) key helper next to _updated_at. I checked the behavior and it is the same: _comments_by keeps the same login filter, ties still break on comment ID, and _admission_report still returns the first-on-tie newest qualifying comment. It now takes the max over all bot comments and then checks updated_at >= requested_at. That gives the same element as filtering first, because every comment tied at the maximum timestamp is in the filtered set, in the same order.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Task
Remove duplicated source in the reviewer and Mergify helpers without changing behavior or growing tests. Accept at least 20 lines of savings when the scoped pass cannot reach 40.
Acceptance
Review focus
Check the unchanged native review provenance checks and Mergify evidence selection against untrusted inputs. The same provider fields and comment authors, reports, and ordering remain required.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review
Validation
Recorded for
274447a6b095uv 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 0