ci: sync skill-card.md versions in update-version flow - #1669
Conversation
…e in validate_skills.sh
CI Test Summary⏭️ All 5 test job(s) skipped. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe release synchronization script updates versions in ChangesSkill card versioning
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
ci/utils/sync_skills_version.sh (1)
52-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd automated coverage for the synchronization contract.
Cover these cases:
- Update the line after
## Skill Version(s):.- Preserve the source annotation.
- Leave unrelated version-looking lines unchanged.
- Handle a missing version line consistently with validation.
As per coding guidelines, contributors must add unit tests for code changes.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ci/utils/sync_skills_version.sh` around lines 52 - 60, Add automated tests for the skill-card synchronization logic around the loop processing skill-card.md files. Verify it updates only the version line immediately following “## Skill Version(s):”, preserves the source annotation, leaves unrelated version-looking lines unchanged, and handles a missing version line consistently with the existing validation behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci/utils/sync_skills_version.sh`:
- Around line 57-58: Update the synchronization logic around the sed command in
ci/utils/sync_skills_version.sh:57-58 to detect zero replacements, insert the
expected version line beneath “## Skill Version(s):” when missing, or fail with
a clear manual-repair error when malformed. In
ci/utils/validate_skills.sh:62-64, retain the sync command only because it can
create missing lines; otherwise change the remediation message to require manual
repair.
- Line 57: Update the sed substitution in the sync_skills_version script to
target only the version line immediately following the “## Skill Version(s):”
header, rather than every matching version-format line in skill-card.md.
Preserve the existing RELEASE_VERSION replacement and suffix handling while
preventing changes to examples or unrelated version lines.
---
Nitpick comments:
In `@ci/utils/sync_skills_version.sh`:
- Around line 52-60: Add automated tests for the skill-card synchronization
logic around the loop processing skill-card.md files. Verify it updates only the
version line immediately following “## Skill Version(s):”, preserves the source
annotation, leaves unrelated version-looking lines unchanged, and handles a
missing version line consistently with the existing validation behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2b441c41-872b-428f-9fd4-ea660b6161a3
📒 Files selected for processing (2)
ci/utils/sync_skills_version.shci/utils/validate_skills.sh
| sed -i "s|^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\( (source:.*) <br>\)$|${RELEASE_VERSION}\1|" "$skill_card" | ||
| echo " updated $skill_card" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Keep synchronization and validation remediation consistent.
A missing or malformed card version is reported with a command that cannot repair it. sed performs zero substitutions without failing, and the sync script still prints updated.
ci/utils/sync_skills_version.sh#L57-L58: detect zero replacements and either insert the expected version line under## Skill Version(s):or fail with a clear manual-repair error.ci/utils/validate_skills.sh#L62-L64: keep the sync command only if it can create the missing line; otherwise report the required manual repair.
📍 Affects 2 files
ci/utils/sync_skills_version.sh#L57-L58(this comment)ci/utils/validate_skills.sh#L62-L64
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ci/utils/sync_skills_version.sh` around lines 57 - 58, Update the
synchronization logic around the sed command in
ci/utils/sync_skills_version.sh:57-58 to detect zero replacements, insert the
expected version line beneath “## Skill Version(s):” when missing, or fail with
a clear manual-repair error when malformed. In
ci/utils/validate_skills.sh:62-64, retain the sync command only because it can
create missing lines; otherwise change the remediation message to require manual
repair.
|
/nskills-ci |
Summary
Fixes #1667.
ci/utils/sync_skills_version.sh: adds a loop overskills/*/skill-card.mdthat updates the version token on the line under## Skill Version(s):(e.g.26.08.00 (source: frontmatter) <br>→26.10.00 (source: frontmatter) <br>), preserving the source annotation.ci/utils/validate_skills.sh: adds a check that eachskill-card.mdversion matches the VERSION file, emitting the sameRun: ./ci/utils/sync_skills_version.shhint on mismatch.Testing
Verified by temporarily bumping VERSION to
26.10.00, runningsync_skills_version.sh(all 9 skill-card.md files updated), thenvalidate_skills.sh(passes). Restored to26.08.00and confirmed clean.Docs
No doc changes needed.