fix: tolerate install-mutated validate artifacts - #664
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR treats specific install-manifest paths as project-mutable so post-install validation marks them valid without hash/size checks, preserves other validation rules, exposes a helper to classify those paths, adds tests, and bumps package/manifest versions. ChangesMutable Install Artifacts Support
Sequence Diagram(s)sequenceDiagram
participant Client
participant Installer
participant PostInstallValidator
participant InstallManifest
Client->>Installer: run aiox install
Installer->>InstallManifest: write install files (including mutable paths)
Client->>PostInstallValidator: run aiox validate
PostInstallValidator->>InstallManifest: read manifest entries
PostInstallValidator->>InstallManifest: isProjectMutableManifestPath? (classification)
alt project-mutable
PostInstallValidator->>PostInstallValidator: mark projectMutable, skip hash/size checks
else immutable
PostInstallValidator->>PostInstallValidator: perform hash/size comparison
end
PostInstallValidator->>Client: return validation report
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
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 `@docs/stories/epic-123/STORY-123.6-validate-mutable-install-artifacts.md`:
- Around line 46-50: Replace the machine-local absolute file links in
STORY-123.6-validate-mutable-install-artifacts.md with repository-relative
links: locate the list items referencing ".aiox-core/install-manifest.yaml",
"package.json", "package-lock.json",
"packages/installer/src/installer/post-install-validator.js", and
"tests/installer/post-install-validator.test.js" and change their hrefs from the
full local path (/Users/rafaelcosta/Projects/AIOX/aiox-core-pro-13-2/...) to
repo-relative paths appropriate for the docs file (e.g., relative paths from the
docs/stories folder like ../../.aiox-core/install-manifest.yaml or the correct
relative path to each file in the repo) so other contributors can access them
without exposing local machine paths.
🪄 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: 363633c6-021c-4f95-a504-d2305956d07d
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
.aiox-core/install-manifest.yamldocs/stories/epic-123/STORY-123.6-validate-mutable-install-artifacts.mdpackage.jsonpackages/installer/src/installer/post-install-validator.jstests/installer/post-install-validator.test.js
* fix: tolerate install-mutated validate artifacts (SynkraAI#663) * docs: use repo-relative story file links (SynkraAI#663)
Summary
Fixes #663.
This PR makes
aiox validatetolerate the two.aiox-corefiles that are intentionally mutated during a clean install:core-config.yaml, generated or merged by environment configurationdata/entity-registry.yaml, populated by entity registry bootstrapThe validator still checks existence, path containment, symlink rejection, and regular-file safety before treating these files as valid project-local install artifacts. Hash and size checks remain strict for non-mutable framework files. I also tightened report semantics so any real missing/corrupted file produces at least
warningstatus.Validation
npm test -- tests/installer/post-install-validator.test.js --runInBandnode -c packages/installer/src/installer/post-install-validator.jsnpm run generate:manifestnpm run validate:manifest@aiox-squads/core@5.1.4:npx --yes aiox --version->5.1.4npx --yes aiox validate --json->status: success,validFiles: 1103,corruptedFiles: 0,issueCount: 0npm run lint -- --quietnpm run typechecknpm run validate:publishgit diff --checknpm run test:ci-> 313 suites passed, 7,824 tests passed, 149 skippedNotes
The previous published smoke for
5.1.3reproduced the issue withcorruptedFiles: 2; this branch verifies the same install/validate sequence locally as5.1.4withcorruptedFiles: 0.Summary by CodeRabbit
Bug Fixes
Tests
Documentation