Skip to content

fix: compare skill versions with the owning package in stale - #310

Merged
LadyBluenotes merged 2 commits into
mainfrom
fix/stale-per-package-version
Oct 4, 2026
Merged

LadyBluenotes merged 2 commits into
mainfrom
fix/stale-per-package-version

Conversation

@LadyBluenotes

@LadyBluenotes LadyBluenotes commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

intent stale compared each skill's library_version with the single library.version in the planning artifacts. In a monorepo that versions packages independently, a skill that matched its own package still raised artifact-library-version-drift. In TanStack Table, @tanstack/match-sorter-utils is at 9.1.2 while the artifacts record 9.2.5, so fuzzy-ranking was flagged although it was correct.

  • Skip artifact-library-version-drift when the skill's library_version equals the current version of its owning package. A skill that is behind its package is still reported through the existing version drift.
  • Print a review signal once in the text output when domain_map.yaml and skill_tree.yaml both raise it. --json output is unchanged and keeps each signal with its artifactPath.

Before:

@tanstack/match-sorter-utils (9.1.2 → 9.1.2)
  ⚠ fuzzy-ranking: artifact library.version (9.2.5) differs from SKILL.md library_version (9.1.2)
  ⚠ fuzzy-ranking: artifact library.version (9.2.5) differs from SKILL.md library_version (9.1.2)

After:

@tanstack/match-sorter-utils (9.1.2 → 9.1.2)
  All skills up-to-date

Summary by CodeRabbit

  • Bug Fixes
    • The stale check no longer flags artifact-library version drift when a skill’s library version matches its package version.
    • Text output displays identical review signals only once. JSON output continues to include each signal and its artifact path.

@changeset-bot

changeset-bot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6aa6a3f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tanstack/intent Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c53c8fc2-165d-4318-a28b-7d289f5820df
📥 Commits

Reviewing files that changed from the base of the PR and between be4a6bd and 6aa6a3f.

📒 Files selected for processing (1)
  • packages/intent/src/staleness/check.ts
💤 Files with no reviewable changes (1)
  • packages/intent/src/staleness/check.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The stale check now considers the resolved package version when reporting artifact-version drift. Text output prints identical review-signal lines once. JSON output retains each signal and its artifactPath.

Changes

Stale reporting

Layer / File(s) Summary
Artifact version comparison
packages/intent/src/staleness/check.ts, packages/intent/tests/staleness.test.ts
The artifact check receives the resolved package version. It does not report drift when the skill version matches that package version. Tests cover matching versions and a differing skill version.
Text warning deduplication
packages/intent/src/commands/stale.ts, packages/intent/tests/stale-command.test.ts, docs/cli/intent-stale.md, .changeset/stale-per-package-version.md
Text output prints identical warning lines once. The test verifies repeated signals, and the documentation describes text and JSON output behavior.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 6aa6a

The version-reporting change appears ready to merge after normal checks; no actionable issue remains from this review.

Architecture Summary

Architecture risk: 🟡 Medium · up to be4a6

The change affects 2 systems.

Changed systems: packages/intent, docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/intent (library) was modified; 4 changed files map to changed impact.
  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/cli/intent-stale.md: Text output deduplicates identical review-signal lines, including signals raised by both domain_map.yaml and skill_tree.yaml; JSON output still keeps each signal and its artifactPath.
  • observed — Modified behavior in packages/intent/src/commands/stale.ts: The command tracks warning lines already printed for the report and skips repeats; previously, it printed every signal warning.
  • observed — Modified behavior in packages/intent/src/staleness/check.ts: buildArtifactSignals adds currentVersion: string | null to its input.
  • observed — Modified behavior in packages/intent/src/staleness/check.ts: Artifact-versus-skill version drift is now reported only when the versions differ and the skill’s libraryVersion also differs from currentVersion.

Reliability and maintainability

  • inferred — Risk-relevant change factors for packages/intent: blast_radius_1; direct_dependents_1
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: comparing skill versions with the owning package in intent stale.
Description check ✅ Passed The Changes section clearly explains the version-drift fix and text-output deduplication, with an example. The template’s Checklist and Release Impact sections are missing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit be4a6bd

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 1m View ↗
nx run-many --targets=build ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-10-04 17:05:17 UTC

@pkg-pr-new

pkg-pr-new Bot commented Oct 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@tanstack/intent@310

commit: 6aa6a3f

@codspeed

codspeed Bot commented Oct 4, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 12 untouched benchmarks


Comparing fix/stale-per-package-version (6aa6a3f) with main (9e6e5ed)

Open in CodSpeed

@LadyBluenotes
LadyBluenotes merged commit c16a6a8 into main Oct 4, 2026
10 checks passed
@LadyBluenotes
LadyBluenotes deleted the fix/stale-per-package-version branch October 4, 2026 17:10
@github-actions github-actions Bot mentioned this pull request Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant