fix: harden legacy skill retirement gate [Story PRO-14.5] - #723
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughNormalizes ChangesLegacy Skill Alias Migration & Validation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
📊 Coverage ReportCoverage report not available
Generated by PR Automation (Story 6.1) |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/integration/codex-skills-sync.test.js (1)
7-15: ⚡ Quick winUse absolute imports in the updated test import block.
The new/modified imports still use relative paths. Please switch these to absolute-style resolution to match repo conventions.
♻️ Proposed update
const { syncSkills, buildSkillContent, getSkillId, getLegacySkillId, -} = require('../../.aiox-core/infrastructure/scripts/codex-skills-sync/index'); +} = require(path.join( + process.cwd(), + '.aiox-core/infrastructure/scripts/codex-skills-sync/index', +)); const { validateCodexSkills, -} = require('../../.aiox-core/infrastructure/scripts/codex-skills-sync/validate'); +} = require(path.join( + process.cwd(), + '.aiox-core/infrastructure/scripts/codex-skills-sync/validate', +));As per coding guidelines,
**/*.{js,jsx,ts,tsx}: Use absolute imports instead of relative imports in all code.🤖 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 `@tests/integration/codex-skills-sync.test.js` around lines 7 - 15, The test imports are using relative paths; replace them with your project's absolute-style module resolution so the imports for syncSkills, buildSkillContent, getSkillId, getLegacySkillId, and validateCodexSkills come from the repository's absolute import roots (e.g., the package/module alias used across the repo) instead of '../../.aiox-core/…' paths; update the require(...) calls to the corresponding absolute module specifiers to match repo conventions and lint rules.
🤖 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.
Nitpick comments:
In `@tests/integration/codex-skills-sync.test.js`:
- Around line 7-15: The test imports are using relative paths; replace them with
your project's absolute-style module resolution so the imports for syncSkills,
buildSkillContent, getSkillId, getLegacySkillId, and validateCodexSkills come
from the repository's absolute import roots (e.g., the package/module alias used
across the repo) instead of '../../.aiox-core/…' paths; update the require(...)
calls to the corresponding absolute module specifiers to match repo conventions
and lint rules.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5e5bb181-e7e0-4713-a32f-ef5f7f7ecd6c
📒 Files selected for processing (7)
.aiox-core/infrastructure/scripts/codex-skills-sync/index.js.aiox-core/infrastructure/scripts/codex-skills-sync/validate.js.aiox-core/install-manifest.yaml.codex/skills/aiox-master/SKILL.mddocs/migration/PRO-14.5-legacy-slash-command-shim-retirement.mdtests/integration/codex-skills-sync.test.jstests/unit/codex-skills-validate.test.js
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@tests/integration/codex-skills-sync.test.js`:
- Around line 13-15: Replace the relative require for validateCodexSkills with
the project-root absolute path and do the same for the other relative import on
the preceding line; specifically change
require('../../.aiox-core/infrastructure/scripts/codex-skills-sync/validate') to
require('@aiox-core/infrastructure/scripts/codex-skills-sync/validate') so the
symbol validateCodexSkills is imported via the absolute module name (also update
the other require on the line above to use the equivalent '@aiox-core/...'
absolute path).
🪄 Autofix (Beta)
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: Pro
Run ID: 8d40135c-69aa-4fac-a9c6-99966343dd52
📒 Files selected for processing (4)
.aiox-core/infrastructure/scripts/codex-skills-sync/validate.js.aiox-core/install-manifest.yamldocs/migration/PRO-14.5-legacy-slash-command-shim-retirement.mdtests/integration/codex-skills-sync.test.js
✅ Files skipped from review due to trivial changes (1)
- .aiox-core/install-manifest.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- .aiox-core/infrastructure/scripts/codex-skills-sync/validate.js
| const { | ||
| validateCodexSkills, | ||
| } = require('../../.aiox-core/infrastructure/scripts/codex-skills-sync/validate'); |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify relative imports in this test file.
# Expected: matches indicate imports that should be migrated to absolute style.
rg -nP "require\\(['\"]\\.{1,2}/" tests/integration/codex-skills-sync.test.jsRepository: SynkraAI/aiox-core
Length of output: 231
Convert relative imports to absolute imports.
Lines 13–15 (and line 12) use relative require paths, which violates the project's absolute import requirement for JavaScript files. Update both imports to use absolute paths from the project root.
const {
validateCodexSkills,
} = require('@aiox-core/infrastructure/scripts/codex-skills-sync/validate');
🤖 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 `@tests/integration/codex-skills-sync.test.js` around lines 13 - 15, Replace
the relative require for validateCodexSkills with the project-root absolute path
and do the same for the other relative import on the preceding line;
specifically change
require('../../.aiox-core/infrastructure/scripts/codex-skills-sync/validate') to
require('@aiox-core/infrastructure/scripts/codex-skills-sync/validate') so the
symbol validateCodexSkills is imported via the absolute module name (also update
the other require on the line above to use the equivalent '@aiox-core/...'
absolute path).
Resolved in 4e7b7c4; imports now use process.cwd() path.join style and CI is green.
|
PRO-14.5 is ready for codeowner review. Current head: 4e7b7c4 Gates:
Remaining blocker is only repository rule/codeowner review from @oalanicolas and/or @Pedrovaleriolopez. |
|
🎉 This PR is included in version 5.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* fix: harden legacy skill retirement gate [Story PRO-14.5] * fix: enforce thin legacy skill aliases [Story PRO-14.5] * test: align codex skill imports [Story PRO-14.5]
Summary
Validation
npm cinpm run sync:skills:codexnpm run validate:codex-skills:self-testnpm run validate:codex-syncnpm run validate:codex-integrationPASS with existing generated extra warningnpm run sync:ide:checknpm run validate:gemini-syncnpm run validate:gemini-integrationPASS with existing.gemini/rules.mdwarningnpm run lintnpm run typechecknpm test -- --runInBand --forceExitnpm run buildunavailable: no build script in this reponpm run validate:publishgit diff --checkNotes
Summary by CodeRabbit
Documentation
*task,*workflow; removed*exit,*update-manifest.Chores
Tests