Skip to content

fix(queue): skip generate-tests on closed PRs with pr_not_open - #9333

Closed
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/generate-tests-pr-not-open-9311
Closed

fix(queue): skip generate-tests on closed PRs with pr_not_open#9333
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/generate-tests-pr-not-open-9311

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Summary

Closes #9311

Scope

  • The PR title follows Conventional Commit format.
  • Focused change — queue generate-tests handlers only.
  • Linked open issue with Closes #9311.

Validation

  • New closed-PR skip tests in test/unit/queue-5.test.ts for both command and checkbox paths.
  • Full CI (local Node v24; relying on CI for typecheck/coverage).

Safety

  • No secrets or UI changes.

UI Evidence

N/A — no visible UI changes.

Notes

Mirror maybeProcessPrPanelRetrigger's JSONbored#9020 guard on both the @Loopover generate-tests command and the PR-panel checkbox so post-merge clicks never spend AI generation or commit work.

Closes JSONbored#9311
@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 27, 2026
@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-27 13:23:17 UTC

2 files · 1 AI reviewer · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
This adds an early `pr.state !== "open"` guard mirroring the existing pattern used elsewhere in the file (e.g. the `cached_pr_missing` check right above each new block), recording `pr_not_open` via `recordGenerateTestsSkip` before any authorization/AI work runs. The placement is correct — before `authorizePrActionActor` and before any model call — so closed-PR checkbox clicks or text commands genuinely short-circuit and never spend real work, and the two new tests directly exercise both call sites (command path and checkbox path) with `run` mocks asserting zero invocations. The change is narrow, closes #9311, and follows the precedent set by #9020's `maybeProcessPrPanelRetrigger` fix as claimed.

Nits — 4 non-blocking
  • The two new tests in test/unit/queue-5.test.ts (command-path and checkbox-path) are near-identical copy-paste with only fixture names/ports differing — consider a small shared helper or parameterized test to reduce duplication.
  • Both new guard blocks duplicate the same three-line shape (`if (pr.state !== "open") { ...; return true; }`) at two call sites — acceptable given the existing file's non-abstracted style, but worth a one-line comment noting they intentionally mirror orb(review): panel re-run checkbox on a closed/merged PR does real work, then silently no-ops #9020 if a future reader might otherwise try to consolidate them.
  • Consider factoring the `pr.state !== "open"` check plus `recordGenerateTestsSkip(...,"pr_not_open")` into a tiny shared helper if a third call site needing this guard shows up, to avoid a third copy of the same three lines.
  • The FAILED validate/validate-tests checks have no detail provided in this context — worth confirming they aren't flagging something in this diff specifically, independent of this review.

CI checks failing

  • validate
  • validate-tests

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 #9311
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 (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 133 registered-repo PR(s), 57 merged, 5 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 133 PR(s), 5 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff adds the pr.state !== "open" guard with a "pr_not_open" skip outcome to both maybeProcessGenerateTestsCommand and maybeProcessPrPanelGenerateTests, placed right after the cached-PR-missing check and before authorization, mirroring the retrigger precedent, and both new test cases assert the AI/model call and comment posting never happen while the skip is recorded with the correct detail.

Review context
  • Author: joaovictor91123
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, MDX, TypeScript, C++, CSS, Rust
  • Official Gittensor activity: 133 PR(s), 5 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
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 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

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

Development

Successfully merging this pull request may close these issues.

queue: generate-tests checkbox and text-command both missing the pr.state !== "open" guard #9020 added to their retrigger sibling

1 participant