Skip to content

fix(signals): remove unreachable OpenPrWorkClassification stale - #7471

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:fix/remove-unreachable-open-pr-stale-7448-v2
Jul 20, 2026
Merged

fix(signals): remove unreachable OpenPrWorkClassification stale#7471
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:fix/remove-unreachable-open-pr-stale-7448-v2

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Remove the dead "stale" value from OpenPrWorkClassification and its three consumers (cleanupFirst, nextStepsForClassification, priorityRank).
  • Update the agent-orchestrator urgent classification set and fixtures that hand-cast the removed literal.

Why

mapPendingClassToWorkClassification never produced "stale" — upstream stale_likely_close already maps to should_close_or_withdraw.

Closes #7448

Test plan

  • npm run typecheck
  • unit tests for contributor-open-pr-monitor + agent-orchestrator
  • git diff --check
  • CI green

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 20, 2026 11:25
@superagent-security

Copy link
Copy Markdown
Contributor

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

1 similar comment
@superagent-security

Copy link
Copy Markdown
Contributor

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

Closes JSONbored#7448

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.35%. Comparing base (fbd1cba) to head (da218cc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7471      +/-   ##
==========================================
- Coverage   91.36%   91.35%   -0.02%     
==========================================
  Files         717      717              
  Lines       73016    73016              
  Branches    21628    21631       +3     
==========================================
- Hits        66713    66702      -11     
- Misses       5265     5272       +7     
- Partials     1038     1042       +4     
Flag Coverage Δ
shard-1 34.07% <0.00%> (-0.09%) ⬇️
shard-2 39.27% <0.00%> (-0.05%) ⬇️
shard-3 32.61% <0.00%> (+0.01%) ⬆️
shard-4 39.53% <100.00%> (ø)
shard-5 36.57% <0.00%> (-0.02%) ⬇️
shard-6 34.32% <100.00%> (ø)

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

Files with missing lines Coverage Δ
src/services/agent-orchestrator.ts 95.54% <ø> (ø)
src/signals/contributor-open-pr-monitor.ts 96.22% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

loopover-orb Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-20 11:40:53 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR removes the dead "stale" literal from OpenPrWorkClassification and its three consumers (cleanupFirst array, nextStepsForClassification switch, priorityRank array), plus the agent-orchestrator urgent set, and updates fixtures/tests that hand-cast the removed literal. The claim that mapPendingClassToWorkClassification never produces "stale" is plausible given the description (upstream stale_likely_close maps to should_close_or_withdraw), and the diff consistently removes all four consumer sites together, which is the correct scope for a type-narrowing cleanup. The change is small, mechanical, and internally consistent — the removed switch case falls through correctly to the shared should_close_or_withdraw handler, so no behavior changes for existing live classifications.

Nits — 3 non-blocking
  • Cannot verify from the diff alone that mapPendingClassToWorkClassification truly never emits "stale" — this claim rests on code not shown in the diff, so worth double-checking the mapping function directly rather than trusting the PR description alone.
  • The added comment in test/unit/contributor-open-pr-monitor.test.ts:349-350 is a bit verbose for a one-line removal; a shorter inline note would suffice.
  • Consider adding a compile-time exhaustiveness check (e.g., a `never` assertion in the switch's default branch) in nextStepsForClassification so that future additions/removals to OpenPrWorkClassification are caught at compile time rather than relying on manual grep across four files.

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 #7448
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: 373 registered-repo PR(s), 173 merged, 34 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 373 PR(s), 34 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, Ruby, Svelte, TypeScript, Markdown, MDX
  • Official Gittensor activity: 373 PR(s), 34 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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 &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; 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 4314944 into JSONbored:main Jul 20, 2026
15 checks passed
This was referenced Jul 20, 2026
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.

fix(signals): remove the unreachable "stale" OpenPrWorkClassification value

1 participant