Skip to content

refactor(scripts): use the canonical latestStableOrbTag in check-orb-stable-release-due - #8419

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kai392:fix/critical-issue-orb-stable-tag-consolidation
Jul 24, 2026
Merged

refactor(scripts): use the canonical latestStableOrbTag in check-orb-stable-release-due#8419
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kai392:fix/critical-issue-orb-stable-tag-consolidation

Conversation

@kai392

@kai392 kai392 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

scripts/check-orb-stable-release-due.ts hand-rolled latestStableTagName/compareTagsDesc to answer the same "find the latest stable orb-v tag" question that scripts/orb-release-core.ts already answers canonically — and the comment excusing the duplication was stale: check-orb-release-due.ts no longer has a local latestStableTagName, it imports latestStableOrbTag from the core module.

  • Import latestStableOrbTag from ./orb-release-core.js (the same import the sibling script already uses) and call it exactly as the sibling does: latestStableOrbTag(tags)?.tag ?? null.
  • Delete both now-dead local functions (compareTagsDesc had no other caller) and the inaccurate cross-reference comment.
  • Nothing else changes: orb-release-core.ts, check-orb-release-due.ts, and this script's behaviour are untouched.

This also removes a real latent divergence, not just duplication: the deleted local version filtered by regex and sorted with String.localeCompare(..., { numeric: true }), whereas latestStableOrbTag parses through parseSemver and sorts with compareSemver on the numeric tuple, filtering prerelease === null. The two agree on every tag currently in this repo, so this is a pure consolidation — but only the canonical one picks up future semver-handling changes.

Closes #8394

Test plan

  • npm run typecheck clean (confirms the two deleted functions had no remaining references)
  • test/unit/orb-release.test.ts green (40/40) — the suite covering orb-release-core.ts's latestStableOrbTag/compareSemver, i.e. the implementation this now routes through
  • Smoke-ran the real script against this repo's actual git tags (npx tsx scripts/check-orb-stable-release-due.ts --json): resolves stableVersion: 3.3.0nextVersion: 3.4.0, identical to the pre-change behaviour
  • No new test owed: scripts/** is excluded from Codecov's coverage.include per codecov.yml, and this adds no logic — it deletes a duplicate and calls an already-tested helper
  • CI validate

@kai392
kai392 requested a review from JSONbored as a code owner July 24, 2026 12:25
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.42%. Comparing base (eff6fa4) to head (50e3bc8).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8419   +/-   ##
=======================================
  Coverage   92.42%   92.42%           
=======================================
  Files         791      791           
  Lines       79265    79265           
  Branches    23948    23947    -1     
=======================================
  Hits        73258    73258           
  Misses       4868     4868           
  Partials     1139     1139           
Flag Coverage Δ
shard-1 53.33% <ø> (ø)
shard-2 52.44% <ø> (ø)
shard-3 56.14% <ø> (-0.01%) ⬇️

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

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

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-24 12:59:56 UTC

1 file · 1 AI reviewer · no blockers · readiness 93/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This diff replaces a hand-rolled `latestStableTagName`/`compareTagsDesc` pair with the canonical `latestStableOrbTag` import from `orb-release-core.js`, matching the exact pattern already used in the sibling script `check-orb-release-due.ts`. The change is a clean, mechanical consolidation with no behavior change on current tags, and it correctly deletes both now-dead local functions along with the stale cross-reference comment. Typecheck passing confirms no remaining references to the deleted functions, and the full file content shows the import and call site are correctly wired.

Nits — 3 non-blocking
  • scripts/** is excluded from Codecov's coverage.include per the PR description, so no new test is owed, but a quick assertion in test/unit/orb-release.test.ts (or a smoke script) exercising this call site specifically would future-proof against re-introducing divergence.
  • None beyond what's already covered — the change is minimal and self-contained.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.

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 #8394
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: 117 registered-repo PR(s), 62 merged, 4 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kai392; Gittensor profile; 117 PR(s), 4 issue(s).
Improvement ℹ️ None detected risk: low · value: none · LLM: minor
Linked issue satisfaction

Addressed
The diff imports latestStableOrbTag from orb-release-core.js, replaces the stableTagName call site exactly as specified, and deletes both dead local functions along with the stale cross-reference comment, matching every requirement in the issue.

Review context
  • Author: kai392
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 117 PR(s), 4 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 &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 add1f78 into JSONbored:main Jul 24, 2026
12 checks passed
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.

check-orb-stable-release-due.ts hand-duplicates tag-selection logic its sibling already replaced with orb-release-core.ts's latestStableOrbTag

2 participants