fix(core): fall back to packaged worker registry - #697
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)
WalkthroughServiceRegistry now supports multiple candidate registry locations with automatic fallback behavior. When no explicit registry path is provided, the loader attempts the current working directory registry first, then falls back to the packaged registry. The resolved path is tracked and exposed via metrics and state management methods. ChangesRegistry Path Resolution with Fallback
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 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.
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/unit/cli.test.js`:
- Around line 120-127: The test is flaky because registry-loader's console.warn
writes to stderr when load >500ms, so change the brittle assertion
expect(errors).toBe('') inside the child.on('close' ...) callback to allow
warnings but still fail on real errors—e.g., replace it with a negative match
like expect(errors).not.toMatch(/Error|ERROR/) (or simply remove the assertion
entirely and rely on expect(code).toBe(0)); locate the assertion by finding the
child.on('close' handler and the expect(errors).toBe('') call and update it
accordingly to ignore benign console.warn output from registry-loader.
🪄 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: 3c1faa68-2434-4dc8-a110-7e335c88d578
📒 Files selected for processing (4)
.aiox-core/core/registry/registry-loader.js.aiox-core/install-manifest.yamltests/core/registry-loader.test.jstests/unit/cli.test.js
* fix(core): fall back to packaged worker registry * test(cli): allow benign registry warnings
Summary
Issue
Part of #621: bootstrap resilience / safe lazy-loading of the registry.
Validation
node bin/aiox.js workers list --countfrom a temp cwd failed with ENOENT for.aiox-core/core/registry/service-registry.json.Total: 203 workers.node -c .aiox-core/core/registry/registry-loader.js: passnode -c bin/aiox.js: passjest tests/core/registry-loader.test.js tests/unit/cli.test.js --runInBand: 53 passednpm run generate:manifest: passnpm run validate:manifest: passgit diff --check: passnpm run lint: pass, 0 errors / 114 baseline warningsnpm run typecheck: passnode scripts/validate-package-completeness.js: 34/34 passednode bin/utils/validate-publish.js: pass, 4199 packed filesnpm test -- --runInBand --forceExit: 330 suites passed, 11 skipped; 8346 tests passed, 149 skippedNotes
The IDS hook repeatedly generated volatile
.aiox-core/data/entity-registry.yamlchanges during tests/push. Those were restored because they were generated noise and, in one incremental pass, mapped the wrong registry-loader path.Summary by CodeRabbit
New Features
Improvements
Tests