Skip to content

fix(queue): keep gate enforcement while autoreview is paused#4138

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-pause-marker-gate-enforcement-issue
Jul 8, 2026
Merged

fix(queue): keep gate enforcement while autoreview is paused#4138
JSONbored merged 1 commit into
mainfrom
codex/fix-pause-marker-gate-enforcement-issue

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • A recent change short-circuited reReviewStoredPullRequest when a github_app.autoreview_paused audit row existed, which skipped live resync, gate computation, and maybeRunAgentMaintenance, widening the pause beyond its intended AUTO-REVIEW scope.
  • The goal is to preserve the documented pause semantics: suppress AI/public surface generation only, while still recomputing the gate and running maintenance/enforcement paths.

Description

  • Replace the early-return pause check in reReviewStoredPullRequest with a boolean flag: const autoreviewPaused = await hasAutoreviewPausedMarker(...) so the stored re-review continues through resync/readiness and maintenance.
  • Thread the autoreviewPaused flag into the maybePublishPrPublicSurface call by setting skipAiReview when options.skipAiReview || autoreviewPaused so only AI/public-surface work is suppressed.
  • Update the regression unit test in test/unit/queue.test.ts to assert that AI/comment output remains suppressed while the gate check-run is still written.
  • Modified files: src/queue/processors.ts and test/unit/queue.test.ts.

Testing

  • Ran git diff --check which succeeded.
  • Ran the targeted unit test with npm test -- test/unit/queue.test.ts -t "skips AI review but still enforces the gate once a PR has an autoreview pause marker" --reporter=verbose and it passed (Tests 1 passed | 702 skipped).
  • Ran npm run typecheck which completed without errors.
  • Ran the full gate npm run test:ci which aborted at cf-typegen:check due to a stale generated worker-configuration.d.ts unrelated to this change, so full CI remains blocked by that generated-artifact drift.

Codex Task

@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.68%. Comparing base (470d5fe) to head (f90f4a1).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4138   +/-   ##
=======================================
  Coverage   93.68%   93.68%           
=======================================
  Files         384      384           
  Lines       36007    36007           
  Branches    13213    13212    -1     
=======================================
  Hits        33733    33733           
  Misses       1618     1618           
  Partials      656      656           
Files with missing lines Coverage Δ
src/queue/processors.ts 95.16% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-08 07:36:01 UTC

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

⏸️ Suggested Action - Manual Review

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

Review summary
This restores intended pause semantics: reReviewStoredPullRequest previously returned entirely when an autoreview_paused marker existed, which also skipped resync, gate computation, and maintenance — not just AI/public-surface generation. The fix replaces the early return with a boolean flag that is threaded into the skipAiReview option on the maybePublishPrPublicSurface call, so gate/check-run enforcement now runs even while AI review is paused. The change is narrow, the control flow correctly falls through to resync/readiness/maintenance instead of bailing, and the updated unit test asserts the corrected behavior (checkRunWritten now true, aiCalls still 0, commentPosted still false).

Nits — 5 non-blocking
  • The PR description doesn't cite a 'Closes #NNNN' issue link, only referencing 'feat(commands): @gittensory pause command — parse + classify + record auto-review-paused state (dispatch scaffold) #2164 regression' in a test name — worth confirming this ties to an eligible open issue per repo convention.
  • The description notes `cf-typegen:check` blocked full `test:ci` due to stale generated `worker-configuration.d.ts` drift unrelated to this change — worth flagging separately since generated-artifact drift can mask other regressions in future PRs even though it's not this PR's fault.
  • Consider adding a brief comment at the `autoreviewPaused` declaration (processors.ts) noting that pause is scoped to AI/public-surface only, not gate/maintenance, to prevent a future regression like the one this PR fixes.
  • If there are other call sites downstream of the removed early return that assumed AI review/pause implied 'do nothing else', double check they don't need similar `autoreviewPaused` gating (only visible in the diff is the one `maybePublishPrPublicSurface` call).
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
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 (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 52 registered-repo PR(s), 43 merged, 496 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 52 PR(s), 496 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
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, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 52 PR(s), 496 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • 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.

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 8, 2026
@JSONbored
JSONbored merged commit 8b302c2 into main Jul 8, 2026
10 checks passed
@JSONbored
JSONbored deleted the codex/fix-pause-marker-gate-enforcement-issue branch July 8, 2026 07:39
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. manual-review Gittensor contributor context

Development

Successfully merging this pull request may close these issues.

1 participant