Skip to content

fix: resolve registry intel cold start and ids dependency - #724

Merged
rafaelscosta merged 1 commit into
mainfrom
fix/issues-721-722-registry-intel
May 10, 2026
Merged

fix: resolve registry intel cold start and ids dependency#724
rafaelscosta merged 1 commit into
mainfrom
fix/issues-721-722-registry-intel

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • bootstraps the lazy code-intel client before RegistrySyncer.sync() checks provider availability
  • declares proper-lockfile in the nested .aiox-core/package.json used by IDS runtime consumers
  • updates IDS registry metadata and install manifest for the changed framework files

Closes #721
Closes #722

Validation

  • npm test -- --runInBand tests/code-intel/registry-syncer.test.js tests/unit/validate-aiox-core-deps.test.js
  • node scripts/validate-aiox-core-deps.js
  • direct cold-call repro against a temporary registry: {"processed":757,"skipped":0,"errors":0,"total":757}
  • ./node_modules/.bin/eslint .aiox-core/core/code-intel/registry-syncer.js tests/code-intel/registry-syncer.test.js tests/unit/validate-aiox-core-deps.test.js
  • npm run validate:manifest
  • npm run validate:publish
  • npm run test:ci -- --silent (342 passed suites, 8457 passed tests, 11 skipped suites / 151 skipped tests)

Summary by CodeRabbit

  • Chores

    • Added proper-lockfile package dependency.
    • Updated registry metadata and manifest files.
  • Tests

    • Added test coverage for registry synchronization behavior.

Review Change Stack

@vercel

vercel Bot commented May 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aiox-core Ready Ready Preview, Comment May 10, 2026 4:30pm

Request Review

@github-actions github-actions Bot added type: test Test coverage and quality area: core Core framework (.aios-core/core/) area: docs Documentation (docs/) labels May 10, 2026
@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown

Walkthrough

This PR fixes two related bugs: it reorders initialization in RegistrySyncer.sync() to bootstrap the code-intel client before checking provider availability (fixing cold-call abort), adds the missing proper-lockfile dependency to the nested package.json, and includes test coverage verifying the fix prevents aborts on fresh process invocations.

Changes

Registry Syncer Bootstrap & Dependency Fixes

Layer / File(s) Summary
Core Sync Bootstrap Logic
‌.aiox-core/core/code-intel/registry-syncer.js
Reorders RegistrySyncer.sync() to call _getClient() before _isProviderAvailable(), ensuring the client singleton is bootstrapped before the provider availability gate is evaluated.
Lockfile Dependency
‌.aiox-core/package.json
Adds proper-lockfile@^4.1.2 to dependencies, making it available to registry-updater.js and downstream registry operations.
Test Setup & New Test Case
tests/code-intel/registry-syncer.test.js, tests/unit/validate-aiox-core-deps.test.js
Updates test imports to reference code-intel mocks; extends beforeEach to reset mock state; adds new test asserting that sync() bootstraps the client before availability check; verifies proper-lockfile is declared as a dependency.
Registry & Manifest Metadata
‌.aiox-core/data/entity-registry.yaml, ‌.aiox-core/install-manifest.yaml
Updates entity-registry metadata timestamp and registry-syncer module entry to reflect code-intel-index dependency; refreshes install-manifest hashes and timestamps for all modified source files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

area: core, type: bugfix, area: devops

Suggested reviewers

  • Pedrovaleriolopez
  • oalanicolas
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: fixing the registry intel cold start issue (#721) and adding the missing proper-lockfile dependency (#722).
Linked Issues check ✅ Passed All coding objectives from linked issues #721 and #722 are met: registry-syncer.js bootstraps the client before availability check, proper-lockfile dependency is added to nested package.json, and registry metadata/manifest are updated.
Out of Scope Changes check ✅ Passed All changes are directly aligned with resolving the two linked issues; no unrelated modifications or scope creep detected in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issues-721-722-registry-intel

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 and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Coverage report not available

📈 Full coverage report available in Codecov


Generated by PR Automation (Story 6.1)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
tests/unit/validate-aiox-core-deps.test.js (1)

25-59: ⚡ Quick win

Consider refactoring repeated package.json reads.

The test suite reads and parses .aiox-core/package.json six times—once per test. Consider extracting this into a shared helper or beforeAll() hook to improve efficiency and reduce duplication.

♻️ Optional refactoring approach
+let aioxCorePackage;
+
+beforeAll(() => {
+  const pkgPath = path.join(PROJECT_ROOT, '.aiox-core', 'package.json');
+  aioxCorePackage = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
+});
+
 test('.aiox-core/package.json includes fast-glob', () => {
-  const pkgPath = path.join(PROJECT_ROOT, '.aiox-core', 'package.json');
-  const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
-  expect(pkg.dependencies).toHaveProperty('fast-glob');
+  expect(aioxCorePackage.dependencies).toHaveProperty('fast-glob');
 });

 test('.aiox-core/package.json includes fs-extra', () => {
-  const pkgPath = path.join(PROJECT_ROOT, '.aiox-core', 'package.json');
-  const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
-  expect(pkg.dependencies).toHaveProperty('fs-extra');
+  expect(aioxCorePackage.dependencies).toHaveProperty('fs-extra');
 });
 
 // ... apply same pattern to remaining tests
🤖 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/unit/validate-aiox-core-deps.test.js` around lines 25 - 59, The tests
repeatedly read and parse the same .aiox-core package.json in each test; extract
the shared setup by adding a beforeAll() that computes pkgPath and loads JSON
into a shared variable (e.g., const pkg) and then update each test
('.aiox-core/package.json includes fast-glob', 'fs-extra', 'semver', 'ajv',
'tar', and 'proper-lockfile') to assert against that shared pkg instead of
re-reading the file; use the existing PROJECT_ROOT and pkgPath identifiers in
the setup so tests simply call expect(pkg.dependencies).toHaveProperty(...)
without duplicated fs.readFileSync/JSON.parse logic.
tests/code-intel/registry-syncer.test.js (1)

6-6: ⚡ Quick win

Use an absolute import for the new codeIntel test dependency.

This newly added relative import conflicts with the repo import rule; please switch it to the project’s absolute import form used by your Jest resolver setup.

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/code-intel/registry-syncer.test.js` at line 6, The test currently
requires the module via a relative path ("../../.aiox-core/core/code-intel")
which violates the repo rule; update the require for const codeIntel to use the
project's absolute import form used by the Jest resolver (e.g.,
require('aiox-core/core/code-intel') or the exact absolute name used elsewhere
in the repo) so the import follows the absolute-import convention.
🤖 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/code-intel/registry-syncer.test.js`:
- Line 6: The test currently requires the module via a relative path
("../../.aiox-core/core/code-intel") which violates the repo rule; update the
require for const codeIntel to use the project's absolute import form used by
the Jest resolver (e.g., require('aiox-core/core/code-intel') or the exact
absolute name used elsewhere in the repo) so the import follows the
absolute-import convention.

In `@tests/unit/validate-aiox-core-deps.test.js`:
- Around line 25-59: The tests repeatedly read and parse the same .aiox-core
package.json in each test; extract the shared setup by adding a beforeAll() that
computes pkgPath and loads JSON into a shared variable (e.g., const pkg) and
then update each test ('.aiox-core/package.json includes fast-glob', 'fs-extra',
'semver', 'ajv', 'tar', and 'proper-lockfile') to assert against that shared pkg
instead of re-reading the file; use the existing PROJECT_ROOT and pkgPath
identifiers in the setup so tests simply call
expect(pkg.dependencies).toHaveProperty(...) without duplicated
fs.readFileSync/JSON.parse logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2e3cd285-8356-4cf0-a77b-b405c25ba2b1

📥 Commits

Reviewing files that changed from the base of the PR and between c25b66e and b3ce01e.

📒 Files selected for processing (6)
  • .aiox-core/core/code-intel/registry-syncer.js
  • .aiox-core/data/entity-registry.yaml
  • .aiox-core/install-manifest.yaml
  • .aiox-core/package.json
  • tests/code-intel/registry-syncer.test.js
  • tests/unit/validate-aiox-core-deps.test.js

@rafaelscosta
rafaelscosta merged commit 4ff4c32 into main May 10, 2026
41 checks passed
@rafaelscosta
rafaelscosta deleted the fix/issues-721-722-registry-intel branch May 10, 2026 16:34
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

tuanmedeiros pushed a commit to tuanmedeiros/aios-core-synkraay that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Core framework (.aios-core/core/) area: docs Documentation (docs/) released type: test Test coverage and quality

Projects

None yet

1 participant