Skip to content

chore(quality): zero-warning lint sweep + synapse memory stability [Story 123.7] - #639

Merged
rafaelscosta merged 2 commits into
mainfrom
feat/story-123.7-lint-zero-and-synapse-stability
May 5, 2026
Merged

chore(quality): zero-warning lint sweep + synapse memory stability [Story 123.7]#639
rafaelscosta merged 2 commits into
mainfrom
feat/story-123.7-lint-zero-and-synapse-stability

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Story 123.7 — Zero-warning lint sweep + Synapse Memory Provider stability.

  • Lint sweep across helpers, doctor checks, graph-dashboard, ids, synapse layers, data scripts, installer, scripts, and tests: trailing commas, dead-var/import removal, formatting alignment.
  • tests/synapse/synapse-memory-provider.test.js: refactor mock to use injectable _getLoader on provider instance (fixes intermittent failure caused by jest.doMock + isolateModules ordering).
  • tests/synapse/e2e/pipeline-audit.e2e.js: trailing-comma cleanup.
  • .claude/hooks/precompact-session-digest.cjs: single-quote fix in inlineScript (resolves last 2 lint warnings).
  • New: .synapse/.gitignore — ignore runtime sessions/cache.
  • .gitignore: ignore .agents/ (duplicate of .claude/skills/).

Acceptance criteria verified

  • AC1 — npm run lint → 0 errors, 0 warnings
  • AC2 — npx jest tests/synapse/synapse-memory-provider.test.js → 22/22 pass
  • AC3 — npm run typecheck → clean
  • AC4 — full npm test → deferred to CI

Notes

This is a stacked PR. Base = release/5.0.8-installer-recovery (PR #635). Once #635 merges to main, retarget this PR to main.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Updated manifest with new helper modules and file hashes
    • Added .agents/ directory and synapse runtime paths to gitignore
    • Extensive formatting updates across codebase (trailing commas, quote styles)
  • Refactor

    • Improved dependency path handling and removed unused imports
    • Enhanced data structures to track additional metrics (unchangedFiles, detection methods, sources)
  • Tests

    • Expanded test coverage with new validation tests and edge cases
    • Updated assertions and test expectations; added comprehensive audit reporting sections

@vercel

vercel Bot commented Apr 28, 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 5, 2026 10:40pm

Request Review

@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7f6fc349-17a2-4543-91d1-0444b9805f6c

📥 Commits

Reviewing files that changed from the base of the PR and between 60dc269 and ed232ba.

📒 Files selected for processing (61)
  • .aiox-core/core/code-intel/helpers/dev-helper.js
  • .aiox-core/core/code-intel/helpers/devops-helper.js
  • .aiox-core/core/code-intel/helpers/planning-helper.js
  • .aiox-core/core/code-intel/helpers/qa-helper.js
  • .aiox-core/core/config/template-overrides.js
  • .aiox-core/core/doctor/checks/rules-files.js
  • .aiox-core/core/graph-dashboard/cli.js
  • .aiox-core/core/graph-dashboard/data-sources/code-intel-source.js
  • .aiox-core/core/ids/layer-classifier.js
  • .aiox-core/core/synapse/layers/layer-processor.js
  • .aiox-core/data/capability-detection.js
  • .aiox-core/data/tok3-token-comparison.js
  • .aiox-core/data/tool-search-validation.js
  • .aiox-core/install-manifest.yaml
  • .aiox-core/utils/filters/index.js
  • .claude/hooks/precompact-session-digest.cjs
  • .gitignore
  • .synapse/.gitignore
  • bin/aiox.js
  • bin/utils/framework-guard.js
  • packages/installer/src/installer/brownfield-upgrader.js
  • packages/installer/src/pro/pro-scaffolder.js
  • packages/installer/src/wizard/ide-config-generator.js
  • packages/installer/src/wizard/index.js
  • packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js
  • packages/installer/tests/unit/claude-md-template-v5/claude-md-template-v5.test.js
  • packages/installer/tests/unit/entity-registry-bootstrap.test.js
  • packages/installer/tests/unit/generate-settings-json/generate-settings-json.test.js
  • packages/installer/tests/unit/ide-sync-integration/ide-sync-integration.test.js
  • packages/installer/tests/unit/merger/yaml-merger.test.js
  • scripts/package-synapse.js
  • scripts/validate-package-completeness.js
  • squads/claude-code-mastery/scripts/validate-setup.js
  • tests/cli/validate-publish.test.js
  • tests/code-intel/creation-helper.test.js
  • tests/code-intel/dev-helper.test.js
  • tests/code-intel/registry-syncer.test.js
  • tests/config/schema-validation.test.js
  • tests/config/template-overrides.test.js
  • tests/core/health-check/base-check.test.js
  • tests/core/health-check/check-registry.test.js
  • tests/core/registry/build-registry.test.js
  • tests/graph-dashboard/code-intel-source.test.js
  • tests/graph-dashboard/html-formatter.test.js
  • tests/graph-dashboard/tree-renderer.test.js
  • tests/ids/layer-classifier.test.js
  • tests/ids/layer-integration.test.js
  • tests/installer/pro-scaffolder.test.js
  • tests/integration/code-intel/helpers-with-registry.test.js
  • tests/integration/codex-skills-sync.test.js
  • tests/integration/onboarding-smoke.test.js
  • tests/memory/memory-format.test.js
  • tests/pro-recover.test.js
  • tests/synapse/benchmarks/wave6-journey.js
  • tests/synapse/bridge/uap-session-bridge.test.js
  • tests/synapse/diagnostics/collectors.test.js
  • tests/synapse/e2e/pipeline-audit.e2e.js
  • tests/synapse/engine.test.js
  • tests/synapse/hook-runtime.test.js
  • tests/unit/codex-skills-validate.test.js
  • tests/unit/tok5-analytics.test.js

Walkthrough

This PR introduces code-intel helper modules, enhances capability detection with source tracking and detection methods, adds an IDE sync flow to the installer wizard, updates the brownfield upgrader to track unchanged files, expands test coverage across multiple test suites, and applies widespread formatting consistency improvements (trailing commas, quote normalization).

Changes

Code-Intel Helpers & Infrastructure Modernization

Layer / File(s) Summary
New Helper Modules
.aiox-core/core/code-intel/helpers/dev-helper.js, devops-helper.js, planning-helper.js, qa-helper.js
Four new code-intel helper modules registered with threshold and risk assessment configuration; formatting adjustments for consistency.
Core Component Updates
.aiox-core/core/config/template-overrides.js, .aiox-core/core/doctor/checks/rules-files.js, .aiox-core/core/ids/layer-classifier.js, .aiox-core/core/synapse/layers/layer-processor.js, .aiox-core/core/graph-dashboard/cli.js, .aiox-core/core/graph-dashboard/data-sources/code-intel-source.js
Updated core modules: unused variable removal (rules-files, devops-helper), parameter renaming to convention (_context, _transformError), handler signature simplification (handleSummary), object dependency handling correction (code-intel-source), quote normalization, trailing comma formatting.
Manifest & Install
.aiox-core/install-manifest.yaml, .aiox-core/utils/filters/index.js, .claude/hooks/precompact-session-digest.cjs
Install manifest entries added for four helper modules and updated for changed core modules; utilities refactored (switch block scoping); hook construction quote adjustments.

Capability Detection Enhancement

Layer / File(s) Summary
Detection Method & Source Tracking
.aiox-core/data/capability-detection.js
Enhanced detectToolSearch, detectDeferLoading, detectProjectMcps, detectGlobalMcps, and detectDockerGateway functions to include detectionMethod and source fields; loadToolRegistry augmented with nonEssential tracking; run output expanded with dockerGateway, mcpServers.countUnit, and nonEssentialServers.
Test Data
.aiox-core/data/tool-search-validation.js
Added new test query for database optimization (Supabase) to TEST_QUERIES validation suite.
Cleanup
.aiox-core/data/tok3-token-comparison.js
Removed unused fs, path, and yaml imports.

IDE Sync & Installer Features

Layer / File(s) Summary
IDE Sync Integration
packages/installer/src/wizard/index.js
Added new IDE Sync flow under Story INS-4.5 path executing after installation; performs commandSync with suppressed logs during validation, then runs commandValidate; error parameter renamed for consistency.
Pro Scaffolder Enhancements
packages/installer/src/pro/pro-scaffolder.js
Updated syntax with trailing commas; supports updated function signatures in test code.
Brownfield Upgrader Tracking
packages/installer/src/installer/brownfield-upgrader.js
Added unchangedFiles metric to UpgradeReport to track source-target file-hash matches; initialized and incremented alongside file-change metrics.
Config Generator Cleanup
packages/installer/src/wizard/ide-config-generator.js
Parameter renaming for unused catch variable (_transformError) to indicate non-use.

Test Suite Expansion & Updates

Layer / File(s) Summary
Core & Synapse Tests
tests/synapse/engine.test.js, tests/synapse/e2e/pipeline-audit.e2e.js, tests/synapse/hook-runtime.test.js, tests/core/registry/build-registry.test.js, tests/synapse/diagnostics/collectors.test.js
SynapseEngine resilience tests added for layer instantiation bounds; pipeline audit report expanded with AC1–AC7 sections (activation timings, bracket transitions, git detection diagnostics, rule impact, token estimation, classification summary); hook-runtime const/let adjustment; registry save encoding explicit; collector fixtures updated.
Code-Intel & Integration Tests
tests/code-intel/dev-helper.test.js, tests/code-intel/creation-helper.test.js, tests/code-intel/registry-syncer.test.js, tests/integration/code-intel/helpers-with-registry.test.js, tests/integration/codex-skills-sync.test.js
Trailing comma formatting; helper test scaffolding; new getLegacySkillId export and validation for aios-* legacy aliases (dev → aios-dev, aiox-master → aios-master).
Installer & Validation Tests
tests/installer/pro-scaffolder.test.js, packages/installer/tests/unit/.../*.test.js, tests/config/schema-validation.test.js, tests/config/template-overrides.test.js
Pro scaffolder refactored to use YAML for all source content (squad.yaml, pro-config.yaml, feature-registry.yaml); generateProVersionJson and generateInstalledManifest signatures updated to accept file lists; entity-registry-bootstrap, artifact-copy-pipeline, claude-md-template-v5 tests updated with trailing comma formatting; schema-validation removed ESLint suppressions around console.log.
CLI, Memory & Additional Coverage
tests/cli/validate-publish.test.js, tests/memory/memory-format.test.js, tests/integration/onboarding-smoke.test.js, tests/unit/codex-skills-validate.test.js
Assertion formatting and splitting for clarity; memory format test expanded to 10 agents (analyst, sm, data-engineer, ux added); onboarding smoke test broadened to accept alternate startup messages; strict-mode legacy alias detection test added.
Graph Dashboard & Miscellaneous
tests/graph-dashboard/*.test.js, tests/ids/layer-*.test.js, tests/synapse/bridge/uap-session-bridge.test.js, tests/pro-recover.test.js
Code-intel-source expectations adjusted for array trailing commas; tree-renderer string literal adjustments; layer-classifier require formatting; hook-runtime variable scoping; pro-recover encoding trailing commas; misc. formatting alignment.

Repository Maintenance & Linting

Layer / File(s) Summary
Gitignore & Runtime
.gitignore, .synapse/.gitignore, .bin/aiox.js, bin/utils/framework-guard.js
Added .agents/ root-level ignore rule; SYNAPSE runtime data ignore patterns (sessions/, cache/) with header comment; removed unused execSync import from bin/aiox.js; added ESLint no-control-regex directive for globToRegex regex usage.
Formatting Consistency
scripts/package-synapse.js, scripts/validate-package-completeness.js, squads/claude-code-mastery/scripts/validate-setup.js, tests/unit/tok5-analytics.test.js
Hook registration JSON patch-diff added to generated README; package completeness validation refactored to pass detail messages via second argument (inverts PASS/FAIL semantics for clarity); setup validation trailing commas and string literal adjustments; analytics test expanded with exa tool, RETENTION_DAYS import, and additional session/usage scenarios.

Sequence Diagram

sequenceDiagram
    participant Install as Installer<br/>(Wizard)
    participant IDE as IDE Config<br/>(Agent Setup)
    participant Sync as IDE Sync<br/>(Artifact Sync)
    participant Val as Validator<br/>(Drift Detection)
    participant Report as Upgrader<br/>(File Tracking)
    
    Install->>IDE: copyAgentFiles(sourcePath)
    IDE-->>Install: config prepared
    
    Install->>Sync: commandSync(config)
    Sync->>Sync: suppressLogs()
    Sync-->>Install: sync complete
    
    Install->>Val: commandValidate()
    Val->>Val: detectDrift()
    Val-->>Install: validation result
    
    Install->>Report: generateUpgradeReport()
    Report->>Report: trackUnchangedFiles(hash comparison)
    Report->>Report: incrementUnchangedCount()
    Report-->>Install: report with metrics
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • SynkraAI/aiox-core#625: Both PRs modify bin/aiox.js and installer pro-scaffolder paths; overlapping code-level changes.
  • SynkraAI/aiox-core#632: Directly overlapping addition and export of getLegacySkillId function in codex-skills-sync/index.

Suggested reviewers

  • oalanicolas
  • Pedrovaleriolopez
✨ 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 feat/story-123.7-lint-zero-and-synapse-stability

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 github-actions Bot added area: agents Agent system related area: workflows Workflow system related squad mcp type: test Test coverage and quality area: core Core framework (.aios-core/core/) area: installer Installer and setup (packages/installer/) area: synapse SYNAPSE context engine area: cli CLI tools (bin/, packages/aios-pro-cli/) area: pro Pro features (pro/) area: health-check Health check system area: docs Documentation (docs/) area: devops CI/CD, GitHub Actions (.github/) needs-po-review labels Apr 28, 2026
…tory 123.7]

- Lint sweep across helpers, doctor checks, graph-dashboard, ids,
  synapse layers, data scripts, installer, scripts, and tests:
  trailing commas, dead-var/import removal, formatting alignment.
- tests/synapse/synapse-memory-provider.test.js: refactor mock to use
  injectable _getLoader on provider instance (fixes intermittent failure
  caused by jest.doMock + isolateModules ordering).
- tests/synapse/e2e/pipeline-audit.e2e.js: trailing-comma cleanup.
- .claude/hooks/precompact-session-digest.cjs: single-quote fix in
  inlineScript (resolves last 2 lint warnings).
- New: .synapse/.gitignore — ignore runtime sessions/cache.
- .gitignore: ignore .agents/ (duplicate of .claude/skills/).

Verified:
- npm run lint → 0 errors, 0 warnings
- npx jest tests/synapse/synapse-memory-provider.test.js → 22/22 pass
- npm run typecheck → clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rafaelscosta
rafaelscosta force-pushed the feat/story-123.7-lint-zero-and-synapse-stability branch from 727e935 to 7699abd Compare May 5, 2026 11:27
@rafaelscosta
rafaelscosta changed the base branch from release/5.0.8-installer-recovery to main May 5, 2026 11:28
@rafaelscosta

Copy link
Copy Markdown
Collaborator Author

Rebase + Retarget para main

Branch rebaseada em cima de main e PR retargetada de volta para main.

Resumo da operação

  • Force-with-lease push aplicado em feat/story-123.7-lint-zero-and-synapse-stability (SHA atualizado para 7699abd5).
  • Conflitos resolvidos durante o rebase tomando main como base canonica nas areas tocadas.
  • 4 lint warnings novos introduzidos pelo merge com main foram corrigidos no mesmo passe (zero-lint mantido, alinhado com o objetivo da story 123.7).
  • Validacoes pos-rebase: lint zero, typecheck verde, suite SYNAPSE estavel.

Por que retarget para main

A branch atende criterios da Story 123.7 (lint zero + estabilidade SYNAPSE) e nao depende mais de branch intermediaria. Merge direto em main mantem a linearidade do historico e evita rebase duplo downstream.

Proximos passos

  • CI roda automaticamente apos o retarget — aguardando greens.
  • Apos checks verdes e review approval, @devops executa o merge.

Operado por @devops (Gage) sob autoridade exclusiva de push/PR (Constituicao Art. II + agent-authority.md).

@rafaelscosta rafaelscosta reopened this May 5, 2026
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Coverage report not available

📈 Full coverage report available in Codecov


Generated by PR Automation (Story 6.1)

@rafaelscosta

Copy link
Copy Markdown
Collaborator Author

CI dependency note (post-retarget)

Após o retarget para main, o CI do Jest Node 20 falhou em 2 testes:

  • tests/integration/codex-skills-sync.test.jsTypeError: getLegacySkillId is not a function
  • tests/unit/codex-skills-validate.test.js — "fails in strict mode when a legacy aios-* alias dir exists"

Causa

Esses testes referenciam getLegacySkillId e a detecção de alias legacy aios-*, que são introduzidas pelo PR #632 (fix(scripts): add agent reference repair runtime). #632 ainda não está em main.

Validação local

Em integration branch local (test/all-merged-2026-05-05) com #632 + #639 ambos mergeados:

npx jest tests/integration/codex-skills-sync.test.js tests/unit/codex-skills-validate.test.js
Tests: 12 passed, 12 total ✅

Resolução

Mergir #632 ANTES do #639. Após #632 entrar em main:

  • Re-run CI deste PR (basta close/reopen ou push de noop)
  • Esperado: full green nas 5 versões de Node

Sem ação adicional necessária neste PR — só ordering. Plano de merge atualizado já reflete isso (#632 é o passo 1, #639 é o passo 3).

— Pre-merge integration sweep validou que #632 + #639 + outros 5 PRs juntos passam em lint, typecheck, claude-sync, codex-skills, full Jest (em isolation), e E2E install end-to-end.

…y (regen install-manifest, take main rebrand for pro-scaffolder error msg)
@rafaelscosta rafaelscosta reopened this May 5, 2026
@rafaelscosta
rafaelscosta merged commit 9ae0314 into main May 5, 2026
13 of 38 checks passed
@rafaelscosta
rafaelscosta deleted the feat/story-123.7-lint-zero-and-synapse-stability branch May 5, 2026 22:41
rafaelscosta added a commit that referenced this pull request May 6, 2026
#641/#640) (#647)

Three drift items emerged from sequential squash merges that the
integration sweep had flagged in advance:

1. packages/installer/src/wizard/pro-setup.js:815 — `catch (checkError)`
   became unused after #635's fallback path was layered onto the post-#640
   catch handler. Renamed to `_checkError` per no-unused-vars rule.

2. packages/installer/src/pro/pro-scaffolder.js:83 — Missing trailing comma
   on the error message argument. The string was rebranded to
   'npx aiox-pro install' by #625 but the trailing comma from #639's lint
   sweep was lost in conflict resolution.

3. .claude/skills/AIOX/agents/devops/SKILL.md — Drifted by 1 hash from
   ide-sync generator output after #641's skills-first migration
   interacted with #637's Pro Access Grant agent edits. Regenerated via
   npm run sync:ide.

Plus install-manifest.yaml regenerated to reflect the post-merge
file tree state.

Validation (post-fix on main pulled fresh):
- npm run lint → 0 errors, 0 warnings
- npm run typecheck → clean
- npm run validate:manifest → VALID
- npm run validate:claude-sync (strict) → PASS
- npm run validate:codex-skills (strict) → PASS (12 skills)
- npm run test:e2e:installed-skills → PASS (3 agents activated end-to-end)

This was anticipated in the integration sweep doc — see session
`test/all-merged-2026-05-05` branch from 2026-05-05.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tuanmedeiros pushed a commit to tuanmedeiros/aios-core-synkraay that referenced this pull request Jun 2, 2026
…tory 123.7] (SynkraAI#639)

- Lint sweep across helpers, doctor checks, graph-dashboard, ids,
  synapse layers, data scripts, installer, scripts, and tests:
  trailing commas, dead-var/import removal, formatting alignment.
- tests/synapse/synapse-memory-provider.test.js: refactor mock to use
  injectable _getLoader on provider instance (fixes intermittent failure
  caused by jest.doMock + isolateModules ordering).
- tests/synapse/e2e/pipeline-audit.e2e.js: trailing-comma cleanup.
- .claude/hooks/precompact-session-digest.cjs: single-quote fix in
  inlineScript (resolves last 2 lint warnings).
- New: .synapse/.gitignore — ignore runtime sessions/cache.
- .gitignore: ignore .agents/ (duplicate of .claude/skills/).

Verified:
- npm run lint → 0 errors, 0 warnings
- npx jest tests/synapse/synapse-memory-provider.test.js → 22/22 pass
- npm run typecheck → clean

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tuanmedeiros pushed a commit to tuanmedeiros/aios-core-synkraay that referenced this pull request Jun 2, 2026
/SynkraAI#639/SynkraAI#637/SynkraAI#635/SynkraAI#641/SynkraAI#640) (SynkraAI#647)

Three drift items emerged from sequential squash merges that the
integration sweep had flagged in advance:

1. packages/installer/src/wizard/pro-setup.js:815 — `catch (checkError)`
   became unused after SynkraAI#635's fallback path was layered onto the post-SynkraAI#640
   catch handler. Renamed to `_checkError` per no-unused-vars rule.

2. packages/installer/src/pro/pro-scaffolder.js:83 — Missing trailing comma
   on the error message argument. The string was rebranded to
   'npx aiox-pro install' by SynkraAI#625 but the trailing comma from SynkraAI#639's lint
   sweep was lost in conflict resolution.

3. .claude/skills/AIOX/agents/devops/SKILL.md — Drifted by 1 hash from
   ide-sync generator output after SynkraAI#641's skills-first migration
   interacted with SynkraAI#637's Pro Access Grant agent edits. Regenerated via
   npm run sync:ide.

Plus install-manifest.yaml regenerated to reflect the post-merge
file tree state.

Validation (post-fix on main pulled fresh):
- npm run lint → 0 errors, 0 warnings
- npm run typecheck → clean
- npm run validate:manifest → VALID
- npm run validate:claude-sync (strict) → PASS
- npm run validate:codex-skills (strict) → PASS (12 skills)
- npm run test:e2e:installed-skills → PASS (3 agents activated end-to-end)

This was anticipated in the integration sweep doc — see session
`test/all-merged-2026-05-05` branch from 2026-05-05.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agents Agent system related area: cli CLI tools (bin/, packages/aios-pro-cli/) area: core Core framework (.aios-core/core/) area: devops CI/CD, GitHub Actions (.github/) area: docs Documentation (docs/) area: health-check Health check system area: installer Installer and setup (packages/installer/) area: pro Pro features (pro/) area: synapse SYNAPSE context engine area: workflows Workflow system related mcp needs-po-review squad type: test Test coverage and quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant