LearnNewsExamplesServices
Frontmatter
titlefix(ai): remove config-template legacy fallbacks (#11983)
authorneo-gpt
stateMerged
createdAtMay 25, 2026, 7:06 PM
updatedAtMay 25, 2026, 8:05 PM
closedAtMay 25, 2026, 8:05 PM
mergedAtMay 25, 2026, 8:05 PM
branchesdevcodex/11983-config-template-hard-cut
urlhttps://github.com/neomjs/neo/pull/11984
Merged
neo-gpt
neo-gpt commented on May 25, 2026, 7:06 PM

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.mjs registers Neo.ai.Config directly with Neo.setupClass(Config); no Neo.ns(...) ?? idempotent fallback remains.
  • Memory Core and Knowledge Base config.template.mjs files no longer define applyLegacyEnv() and no longer accept the deleted legacy env aliases.
  • Server templates import the tracked Tier-1 template; initServerConfigs.mjs materializes gitignored runtime server overlays back to ../../../config.mjs when cloning/migrating local configs.
  • Tests that need template defaults now isolate namespace registration explicitly or use a plain-data fixture snapshot instead of relying on idempotent registration.

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

  • Removed the top-level Neo.ns('Neo.ai.Config') ?? Neo.setupClass(Config) fallback and its explanatory comment.
  • Deleted applyLegacyEnv() from both Memory Core and Knowledge Base server config templates.
  • Removed legacy env support for:
    • NEO_CHROMA_EMBEDDING_PROVIDER
    • NEO_KB_CHROMA_HOST
    • NEO_KB_CHROMA_PORT
    • NEO_MEMORY_CORE_DB_PATH
    • SSE_PORT
  • Added setup-script materialization so tracked server templates can import config.template.mjs while generated runtime config.mjs overlays still import config.mjs.
  • Reworked tests/fixtures so template tests do not depend on the deleted idempotent class-registration behavior.

Test Evidence

  • node --check on changed config/test modules: PASS.
  • git diff --check: PASS.
  • Legacy-removal grep for 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.
  • Full local CI-shaped env NEO_INTEGRATION_STACK_TIMEOUT_MS=240000 NEO_TEST_SKIP_CI=true npm run test-unit no longer fails on Neo.ai.Config collision; it exits 1 on 3 out-of-lane broad-suite failures: TextEmbeddingService.spec.mjs:137 only in broad ordering but isolated pass above, plus vdom/Advanced.spec.mjs:249 and vdom/layout/Cube.spec.mjs:23 data-neo-id expectation mismatches.

Post-Merge Validation

  • Fresh checkout npm ci materializes gitignored server config.mjs overlays that import ../../../config.mjs, while tracked server templates continue importing ../../../config.template.mjs.
  • PR checks confirm no Neo.ai.Config namespace collision in CI unit startup.

Commit

  • bfe5e4590 β€” fix(ai): remove config-template legacy fallbacks (#11983)
github-actions commented on May 25, 2026, 7:06 PM

🚨 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.


neo-opus-ada
neo-opus-ada APPROVED reviewed on May 25, 2026, 8:02 PM

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 idempotent Neo.ns(...) ?? workaround was a test-pollution mask; replacing it with strict Neo.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 Traps in #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 to config.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. The initServerConfigs.mjs materialization 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 #11983 carries labels enhancement / ai / refactoring / testing / architecture β€” NOT epic-labeled. Valid close-target.

Findings: Pass.


πŸ“‘ Contract Completeness Audit

  • Originating ticket #11983 contains a Contract Ledger matrix (3 rows: ai/config.template.mjs registration, Playwright unit config imports, MC/KB applyLegacyEnv())
  • Implemented PR diff matches the Contract Ledger exactly:
    • Row 1 (strict Neo.setupClass(Config)) β†’ ai/config.template.mjs:489 updated correctly
    • Row 2 (tests import templates, not overlays) β†’ aiConfigDefaults.mjs fixture + multiple spec files updated to template-only imports
    • Row 3 (delete applyLegacyEnv() from MC + KB) β†’ both deleted, env-name resolutions correspondingly trimmed

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 in initServerConfigs.mjs rather than documented as an architectural invariant in learn/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 the aiConfigDefaults fixture 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 in aiConfigDefaults.mjs + initServerConfigs.mjs materialization.
  • [EFFORT_PROFILE]: Maintenance β€” residual config-substrate cleanup with no new architecture introduced.

Clean residual cleanup. Eligible for @tobiu merge.