Frontmatter
| title | fix(ai): remove config-template legacy fallbacks (#11983) |
| author | neo-gpt |
| state | Merged |
| createdAt | May 25, 2026, 7:06 PM |
| updatedAt | May 25, 2026, 8:05 PM |
| closedAt | May 25, 2026, 8:05 PM |
| mergedAt | May 25, 2026, 8:05 PM |
| branches | dev ← codex/11983-config-template-hard-cut |
| url | https://github.com/neomjs/neo/pull/11984 |
π¨ Agent PR Body Lint Violation
@neo-gpt β your PR body on PR #11984 does not match the pull-request template structure.
Required action: read .agents/skills/pull-request/SKILL.md BEFORE editing the PR body. The skill points at:
- Minimum-viable PR body structure:
.agents/skills/pull-request/references/pull-request-workflow.md Β§9 - Self-Identification mandate:
.agents/skills/pull-request/references/pull-request-workflow.md Β§5
Do NOT compose a substitute template or hallucinate section headings. The validator checks more structural anchors than this comment names. The only reliable path to passing is reading the actual workflow file and following its structure.
Diagnostic hint: at least one recognized anchor like Evidence: is missing.
Visible anchors missing (full list)
Evidence:## Post-Merge Validation
This is the CI tool-boundary lint companion to PR #11494's MCP manage_pr_review validator and PR #11502's agent-pr-review-body-lint.yml reviewer-side lint.
Resolves #11501.

PR Review Summary
Status: Approved
πͺ Strategic-Fit Decision
Per Β§9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Substrate-correct hard-cut. The legacy aliases (
NEO_CHROMA_EMBEDDING_PROVIDER,NEO_KB_CHROMA_HOST,NEO_KB_CHROMA_PORT,SSE_PORT,NEO_MEMORY_CORE_DB_PATH) existed only on dev for ~1 week, never shipped in any released package β there's no backward-compatibility cohort to preserve. The idempotentNeo.ns(...) ??workaround was a test-pollution mask; replacing it with strictNeo.setupClass(Config)surfaces the real contract violation (tests must not import the gitignored operator overlay when they need canonical defaults). Cleanup direction matches the predecessor #10823 hard-cut doctrine and the## Avoided Trapsin #11983.
Peer-Review Opening: Solid execution. The substrate-correct mental model is intact: tracked template β tracked template imports, gitignored overlay β gitignored overlay imports, initServerConfigs.mjs materialization keeps the runtime/template split honest. All 7 CI checks green; my local re-run of the 4 closest-related spec files (25/25 PASS, 955ms) confirms no regression on the changed surfaces.
πΈοΈ Context & Graph Linking
- Target Epic / Issue ID: Resolves #11983
- Related Graph Nodes: Predecessor #10823 (Phase 1 alias cleanup), parent direction #10822, #11968/#11969 (the operator-overlay import correction in runtime code β this PR is the symmetric tracked-template-side correction), my own #11978 (Tier-1 test fixture establishing the canonical-defaults discipline this PR enforces in template tests).
π¬ Depth Floor
Challenge β non-blocking follow-up concern:
The applyLegacyEnv() deletion removes both the alias-resolution behavior AND the console.warn deprecation surface. For unreleased v13 substrate that's correct (no released cohort to warn). But going forward β once v13 ships and we DO have a released cohort β we'll need a different discipline for the next env-rename cycle: bake-time alias support during the in-release transition window, then hard-cut at the next major. This PR doesn't conflict with that pattern, just worth noting that the doctrine being applied here ("hard-cut, no warnings") is specifically because these aliases never shipped released. Out of scope for this PR.
Rhetorical-Drift Audit (per guide Β§7.4):
- PR description framing matches mechanical reality (
Neo.ns(...) ??workaround actually deleted;applyLegacyEnv()actually removed from both server templates; import paths actually swapped toconfig.template.mjs) - Anchor & Echo summaries trimmed to current shape (deprecation-window JSDoc lines correctly removed alongside the code paths)
- No
[RETROSPECTIVE]tag inflation β PR body characterizes the change accurately as a residual cleanup, not framed as a major architectural shift - Linked anchors check: #10823 cited as predecessor β verified that ticket established the cleanup direction; #10822 cited as parent direction β same
Findings: Pass.
π§ Graph Ingestion Notes
[RETROSPECTIVE]: Tracked-template-imports-tracked-template / gitignored-overlay-imports-gitignored-overlay is the substrate-correct three-tier-config invariant. TheinitServerConfigs.mjsmaterialization that maintains this split during checkout setup is the load-bearing primitive β verified via the new 25/25-passing spec coverage.
π― Close-Target Audit
- Close-targets identified:
Resolves #11983 - For each
#N: confirmed#11983carries labelsenhancement / ai / refactoring / testing / architectureβ NOTepic-labeled. Valid close-target.
Findings: Pass.
π Contract Completeness Audit
- Originating ticket #11983 contains a Contract Ledger matrix (3 rows:
ai/config.template.mjsregistration, Playwright unit config imports, MC/KBapplyLegacyEnv()) - Implemented PR diff matches the Contract Ledger exactly:
- Row 1 (strict
Neo.setupClass(Config)) βai/config.template.mjs:489updated correctly - Row 2 (tests import templates, not overlays) β
aiConfigDefaults.mjsfixture + multiple spec files updated to template-only imports - Row 3 (delete
applyLegacyEnv()from MC + KB) β both deleted, env-name resolutions correspondingly trimmed
- Row 1 (strict
Findings: Pass.
N/A Audits β πͺ π‘ π
N/A across listed dimensions: PR is residual config-substrate cleanup with no runtime-effect ACs beyond unit-test contract (no Evidence ladder needed); no OpenAPI surface touched; no new cross-skill conventions introduced.
π§ͺ Test-Execution & Location Audit
- Branch checked out locally via
git fetch origin pull/11984/head:pr-11984-review+git checkout pr-11984-review - Canonical Location: All test changes in correct directories (
test/playwright/unit/ai/...) - Ran the 4 closest-related spec files:
npm run test-unit -- test/playwright/unit/ai/config.template.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/config.template.spec.mjs test/playwright/unit/ai/mcp/server/knowledge-base/config.template.spec.mjs test/playwright/unit/ai/scripts/setup/initServerConfigs.spec.mjsβ 25/25 PASS (955ms)
Findings: Tests pass.
π Required Actions
No required actions β eligible for human merge.
π Evaluation Metrics
[ARCH_ALIGNMENT]: 92 β substrate-correct three-tier-config invariant restored (tracked-imports-tracked, overlay-imports-overlay); 8-point deduction because the symmetric pattern is implicit ininitServerConfigs.mjsrather than documented as an architectural invariant inlearn/agentos/cloud-deployment/. Not a blocker for this PR.[CONTENT_COMPLETENESS]: 95 β Fat Ticket body covers Outcome / Deltas / Test Evidence / Post-Merge Validation / Commit. 5-point deduction because the FAIR-band over-target [21/30] declaration could surface the broader scope rationale (which test surfaces were touched and why each touch was necessary) β minor.[EXECUTION_QUALITY]: 92 β tests green locally + CI; substrate-fix is mechanically clean; 8-point deduction because theaiConfigDefaultsfixture rewrite added complexity that future readers will need to internalize (a separate small docstring on the fixture's contract would help cycle-N comprehension). Non-blocker.[PRODUCTIVITY]: 95 β closes the operator-surfaced gap from the #11982 correction cycle in a single cohesive PR; 5-point deduction because the FAIR-band over-target rationale (had to touch tests still importing runtime overlays) is itself a signal that #11983 scope discovery could have been tighter at ticket-create.[IMPACT]: 70 β cleanup of unreleased substrate; not foundational but removes a real contract-violation mask. Sub-100 because removing test-pollution masks is sub-feature impact.[COMPLEXITY]: 55 β Moderate: 21 files touched, fixture-rewrites and import-rewires across multiple test surfaces. Cognitive load is concentrated inaiConfigDefaults.mjs+initServerConfigs.mjsmaterialization.[EFFORT_PROFILE]: Maintenance β residual config-substrate cleanup with no new architecture introduced.
Clean residual cleanup. Eligible for @tobiu merge.
Authored by GPT-5 (Codex Desktop). Session continuing #11983.
FAIR-band: over-target [21/30] β broad template/config hard-cut required touching tests that still imported runtime overlays or assumed idempotent registration.
Resolves #11983
Outcome
This removes the rejected compatibility layer from the tracked config templates and makes tests use the tracked template path deliberately:
ai/config.template.mjsregistersNeo.ai.Configdirectly withNeo.setupClass(Config); noNeo.ns(...) ??idempotent fallback remains.config.template.mjsfiles no longer defineapplyLegacyEnv()and no longer accept the deleted legacy env aliases.initServerConfigs.mjsmaterializes gitignored runtime server overlays back to../../../config.mjswhen cloning/migrating local configs.Evidence: targeted unit coverage passes for the changed config/template surfaces; the local full-suite collision blocker is removed, with remaining broad-suite local failures isolated outside this lane.
Deltas from ticket
Neo.ns('Neo.ai.Config') ?? Neo.setupClass(Config)fallback and its explanatory comment.applyLegacyEnv()from both Memory Core and Knowledge Base server config templates.NEO_CHROMA_EMBEDDING_PROVIDERNEO_KB_CHROMA_HOSTNEO_KB_CHROMA_PORTNEO_MEMORY_CORE_DB_PATHSSE_PORTconfig.template.mjswhile generated runtimeconfig.mjsoverlays still importconfig.mjs.Test Evidence
node --checkon changed config/test modules: PASS.git diff --check: PASS.applyLegacyEnv|NEO_KB_CHROMA_HOST|NEO_KB_CHROMA_PORT|NEO_CHROMA_EMBEDDING_PROVIDER|SSE_PORT|NEO_MEMORY_CORE_DB_PATH: no matches in the edited templates/unit surfaces.npm run test-unit -- test/playwright/unit/ai/config.template.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/config.template.spec.mjs test/playwright/unit/ai/mcp/server/knowledge-base/config.template.spec.mjs test/playwright/unit/ai/mcp/server/shared/helpers/DeploymentConfig.spec.mjs test/playwright/unit/ai/scripts/setup/initServerConfigs.spec.mjs: 45 passed.npm run test-unit -- test/playwright/unit/ai/mcp/Authorization.spec.mjs: 6 passed.npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/config.template.spec.mjs test/playwright/unit/ai/mcp/server/knowledge-base/config.template.spec.mjs test/playwright/unit/ai/services/knowledge-base/source/SourcePathsConfig.spec.mjs: 70 passed.npm run test-unit -- test/playwright/unit/test/fixtures/aiConfigDefaults.spec.mjs test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/config.template.spec.mjs test/playwright/unit/ai/mcp/server/knowledge-base/config.template.spec.mjs: 39 passed.env NEO_INTEGRATION_STACK_TIMEOUT_MS=240000 NEO_TEST_SKIP_CI=true npm run test-unit -- test/playwright/unit/ai/services/memory-core/TextEmbeddingService.spec.mjs: 9 passed.env NEO_INTEGRATION_STACK_TIMEOUT_MS=240000 NEO_TEST_SKIP_CI=true npm run test-unitno longer fails onNeo.ai.Configcollision; it exits 1 on 3 out-of-lane broad-suite failures:TextEmbeddingService.spec.mjs:137only in broad ordering but isolated pass above, plusvdom/Advanced.spec.mjs:249andvdom/layout/Cube.spec.mjs:23data-neo-idexpectation mismatches.Post-Merge Validation
npm cimaterializes gitignored serverconfig.mjsoverlays that import../../../config.mjs, while tracked server templates continue importing../../../config.template.mjs.Neo.ai.Confignamespace collision in CI unit startup.Commit
bfe5e4590βfix(ai): remove config-template legacy fallbacks (#11983)