Skip to content

fix(review): reflect a live manual-review label in the public PR comment#8068

Merged
loopover-orb[bot] merged 1 commit into
mainfrom
fix/manual-review-label-stale-merge-block
Jul 22, 2026
Merged

fix(review): reflect a live manual-review label in the public PR comment#8068
loopover-orb[bot] merged 1 commit into
mainfrom
fix/manual-review-label-stale-merge-block

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Closes #8067.

Summary

Test plan

  • npm run typecheck
  • New tests in test/unit/processors-public-comment-merge-facts.test.ts: label present → held; case-insensitive match; label absent → unaffected; custom configured label name; manualReviewLabel: null disables the check entirely
  • Full unsharded npm run test:coverage: 1085/1085 files, 20278 tests, 0 failures
  • 100% line/branch coverage on every new/changed line (verified via targeted coverage run + the full suite's processors.ts aggregate: 97.36% stmts / 96.76% branch, no new lines in the uncovered set)

Closes #8067.

heldForReview only checked for a hard-guardrail-path hit, so a PR whose
manual-review label came from elsewhere (a since-resolved gate blocker
on a protected author, a migration collision, ...) kept headlining
"approve/merge recommended" while the executor's live-label guard
silently denied every merge/approve attempt, indefinitely, with no
visible explanation on the PR. Confirmed live on PR #7994, stuck 3+
hours despite fully green CI, before being merged manually.

Broaden the check to also fire on the live, configured manual-review
label being present — this only changes what the comment says, not the
"only a maintainer removes the label" safety invariant itself.
@JSONbored JSONbored self-assigned this Jul 22, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 22, 2026
@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-22 18:37:08 UTC

2 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This fix closes the real gap in #8067: `heldForReview` previously only checked the diff for a hard-guardrail path, never the live PR's manual-review label, so once the original triggering blocker cleared the public comment could say "approve/merge recommended" while the sticky manual-review label (agent-action-executor.ts's live-label guard) kept the executor from acting — a genuinely misleading, silent state confirmed live on PR #7994. The fix threads `prLabels` through `derivePublicCommentMergeFacts`, does a case-insensitive match against the configured (or default `AGENT_LABEL_NEEDS_REVIEW`) label, and correctly treats `manualReviewLabel: null` as an explicit opt-out. Test coverage is thorough, hitting label present/absent, case-insensitivity, custom label override, and the null-disable arm — all real branches introduced by this diff.

Nits — 4 non-blocking
  • Verify `pr.labels` at the `maybePublishPrPublicSurface` call site (processors.ts:10892) is genuinely `string[]` at runtime and not raw GitHub label objects (`{name: string}[]`) — the internal `PullRequestFileRecord`/`LocalBranchAnalysisInput` convention suggests it's already normalized, but this diff itself doesn't show that type definition.
  • The doc comment above `derivePublicCommentMergeFacts` (processors.ts:2011-2023) is quite long for a one-field addition; consider trimming once the fix(review): stop bare hotkey/coldkey mentions from false-positiving as secret leaks #7994 incident context is captured in the issue/PR history instead of inline.
  • Double-check that every other caller of `derivePublicCommentMergeFacts` (if any exist beyond the one shown) was updated to pass `prLabels`, since the param is required and TypeScript would only catch this if strict — the diff shows just the one call site update.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8067, #7981
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 16 registered-repo PR(s), 14 merged, 290 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 16 PR(s), 290 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR directly implements the issue's proposed fix by broadening heldForReview in derivePublicCommentMergeFacts to check for the live manual-review label (with case-insensitive matching and custom label override support), and adds targeted unit tests covering the exact scenario described in the issue.

Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, Ruby, Go, JavaScript, MDX, Shell, Solidity
  • Official Gittensor activity: 16 PR(s), 290 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Treat this as maintainer-lane context rather than normal contributor-lane activity.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 37e253a into main Jul 22, 2026
12 checks passed
@loopover-orb
loopover-orb Bot deleted the fix/manual-review-label-stale-merge-block branch July 22, 2026 18:37
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.78%. Comparing base (25e2df1) to head (5cde64d).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8068      +/-   ##
==========================================
+ Coverage   91.82%   95.78%   +3.96%     
==========================================
  Files         734        1     -733     
  Lines       75019     3135   -71884     
  Branches    23037     1115   -21922     
==========================================
- Hits        68885     3003   -65882     
+ Misses       5034       45    -4989     
+ Partials     1100       87    -1013     
Flag Coverage Δ
rees ?
shard-1 80.44% <100.00%> (+26.17%) ⬆️
shard-2 30.23% <66.66%> (-22.34%) ⬇️
shard-3 39.29% <100.00%> (-15.81%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/queue/processors.ts 95.78% <100.00%> (+<0.01%) ⬆️

... and 733 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

1 participant