Skip to content

Deduplicate reviewer and queue comment processing - #1855

Merged
mergify[bot] merged 2 commits into
mainfrom
lean178/575-review-worktree-dedupe
Nov 26, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
lean178/575-review-worktree-dedupe

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Reduce source by 21 lines and leave tests unchanged. Keep the functions modified by Check local receipts before remote readiness gates #1842, Compare readiness using GitHub timestamps #1841, and Order readiness check runs by timestamp instants #1508 untouched.
  • Preserve exact primary and delta reviewer instructions, finding marker format, Claude provenance requirements, and JSON event ordering. Existing runner and GitHub tests pass, and direct comparisons verify all four prompt variants and the finding marker.
  • Preserve Mergify comment authorship, timestamp normalization, ordering, and report markers. Admission still chooses the newest qualifying comment, preserving first-on-tie behavior. Departure still breaks ties by comment ID. Existing Mergify tests pass.
  • Pass primary review and the full slotted check before queueing.

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-bot with what you need.

Review

  • primary, claude, 274447a, approve

Validation

Recorded for 274447a6b095

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

eowca and others added 2 commits November 26, 2026 12:48
Architecture-Review: unchanged; reviewer instructions, provenance validation, and queue evidence selection retain the same inputs and rules.

Co-Authored-By: Codex <codex@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/loopzero/mergify.py
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={})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@eowca
eowca marked this pull request as ready for review November 26, 2026 11:57
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as 6da5424 at 12:02 UTC

5 min in the queue, 4 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 11:58 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1862
  • ✅ Merged 12:02 · 6da5424 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit 6da5424 into main Nov 26, 2026
18 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/575-review-worktree-dedupe branch November 26, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant