mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #161] [MERGED] [groom] gate-unresolved.py is documented as orphaned dead code in three places while build-ledger.py imports it #170
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#170
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/161
Author: @cloud-code-bot[bot]
Created: 8/13/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @mattmillerai
Base:
main← Head:groom/github-workflows-whole-repo-github-cursor-review-31687825490-0📝 Commits (1)
7bdff0fgroom:gate-unresolved.pyis documented as orphaned dead code in three places while build-ledger.py imports it📊 Changes
2 files changed (+9 additions, -4 deletions)
View changed files
📝
.github/cursor-review/README.md(+5 -2)📝
docs/callers/cursor-review.md(+4 -2)📄 Description
ELI-5
One Python file in this repo,
gate-unresolved.py, has two lives. It has a command-line entry point — an old "block the merge while review comments are unresolved" gate — that nothing runs any more, and it also holds a few shared pieces (a marker string, a GitHub GraphQL query, and two small helper functions) that a very much alive script,build-ledger.py, imports and uses on every review run. Three documents said flatly that the file was "orphaned" and that "nothing calls this today", which reads like an invitation to delete it. Acting on that would break the prior-review ledger the review panel consumes. This PR rewrites those three sentences so they say what is actually true: the CLI is unwired, the module is not dead code. No code, workflow, or behavior is touched.What changed
Documentation only — three sites, no code:
.github/cursor-review/README.md:87— the file-table row no longer says "Orphaned — nothing calls this today". It now says the CLI is unwired but the module is imported bybuild-ledger.pyforCONSOLIDATED_MARKER, the pagingreviewThreadsGraphQL query, and theiter_threads/is_cursor_threadhelpers, and that the file should not be deleted..github/cursor-review/README.md:166— the blocking-gate regression note no longer calls the implementation "orphaned and unwired"; it now distinguishes the unwired CLI/mainfrom the still-live module and names the importer.docs/callers/cursor-review.md:27— the same correction in the caller guide: the script is still in the tree with its CLI unwired, and the module itself is still imported bybuild-ledger.py.AGENTS.md:206is deliberately left alone: it cites this file as the worked example of a deleted input's leftovers, which is about theblocking:input and remains accurate.Why
The docs described the file as fully orphaned, but
build-ledger.pyimports it by path through animportlibshim (the filename is hyphenated) and then depends on it structurally viaCONSOLIDATED_MARKER,gate_unresolved.iter_threads(...), andgate_unresolved.is_cursor_thread(...);tests/test_build_ledger.pyasserts that reuse is real. A reader trusting the old wording could delete the file as dead code, which would break the prior-review ledger that the review panel consumes — no such deletion has occurred, so this removes a trap rather than repairing an observed failure. Behavior is preserved exactly because the change is prose-only: no script, workflow, or test is modified. The optional follow-up the finding mentions — extracting the shared pieces into a normally-importable module and dropping theimportlibshim — is intentionally left out to keep this diff minimal.Verifier rationale
Verified
.github/cursor-review/README.md:87describes the file as "Orphaned — nothing calls this today.";:166repeats "still here, orphaned and unwired";docs/callers/cursor-review.md:27says it "is still in the tree, orphaned". (AGENTS.md:206 cites it as the worked example of a deleted input's leftovers — that framing is about theblocking:input and is fine.)But
.github/cursor-review/build-ledger.py:87-101imports it by path through animportlibshim (needed because the filename is hyphenated) and then depends on it structurally:CONSOLIDATED_MARKER(:102),gate_unresolved.iter_threads(...)(:171) andgate_unresolved.is_cursor_thread(thread)(:291), withtests/test_build_ledger.py:518-544asserting the reuse is real (it checksbl.gate_unresolved.CONSOLIDATED_MARKER is bl.CONSOLIDATED_MARKERand that the sharedQUERYcontainsreviewThreads/databaseId).So the file is half dead (its blocking-gate CLI/
mainhas no caller) and half a shared library — and the docs tell a reader it is safe to delete. Deleting it would break the prior-review ledger that the review panel consumes.Fix (in priority order)
build-ledger.pyfor the marker, the GraphQL query and the thread helpers. This alone removes the trap and is a docs-only change.CONSOLIDATED_MARKER+QUERY+iter_threads/is_cursor_threadinto a normally-importable.github/cursor-review/review_threads.py, leavinggate-unresolved.pyas the thin unwired CLI over it, which also drops theimportlib-by-path shim. Keep the CLI — the blocking gate is an intentionally-preserved regression someone may re-wire.Steelman
The shim is five lines and works, and renaming things makes the #31 regression history harder to follow. That is why step 1 (docs) is the confirmed core and step 2 is optional.
Risk
Low. One import site plus its tests, all inside this repo; no external path references the module.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.