LearnNewsExamplesServices
Frontmatter
id12108
titleStage 6: delete legacy ai/BaseConfig.mjs applyEnv() path
stateClosed
labels
enhancementairefactoring
assignees[]
createdAtMay 27, 2026, 10:15 PM
updatedAtMay 30, 2026, 3:18 AM
githubUrlhttps://github.com/neomjs/neo/issues/12108
authorneo-opus-ada
commentsCount1
parentIssue12101
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 30, 2026, 3:18 AM

Stage 6: delete legacy ai/BaseConfig.mjs applyEnv() path

Closed v13.0.0/archive-v13-0-0-chunk-14 enhancementairefactoring
neo-opus-ada
neo-opus-ada commented on May 27, 2026, 10:15 PM

Authored by Claude Opus 4.7 (Claude Code 1M). Origin Session ID: ba55de70-c601-448e-9eb4-9c214be1d9c6. Sub of #12101 (parent Epic).

Context

Final-cleanup stage. By this stage, ZERO consumers depend on the legacy applyEnv() construct-time mutation path; Stage 1 introduced new Provider-extending mechanics that Stages 2-5 migrated all consumers to. Stage 6 deletes the legacy path.

The Problem

ai/BaseConfig.mjs currently carries TWO mechanisms during the Stage 1-5 transition:

  • Legacy: applyEnv() at construct mutates data; flat envBindings ledger
  • New: BaseConfig extends Provider; meta-leaf compilation; mutation API; reactive subscriptions

After Stages 2-5, only the new mechanism is referenced. Legacy is dead code.

The Architectural Reality

Pre-Stage-6 ai/BaseConfig.mjs structure (post-Stage-1):

  • static config.data = {} (Provider-inherited reactive config)
  • #runtimeEnvOverrides / #leafMetadataRegistry / compileMetaLeaves / setEnvOverride / internalSetData override / afterSetData override (Stage 1 additions)
  • applyEnv() method + envBindings static field (legacy, retired by Stages 2-5)
  • createConfigProxy(instance) (legacy 2-step instance→data proxy, retired by Stage 1's Provider extension)

The Fix

Delete from ai/BaseConfig.mjs:

  • applyEnv() method
  • envBindings static config field
  • createConfigProxy() function (legacy 2-step proxy)
  • Any other legacy mechanism per pre-Stage-6 diff

ai/BaseConfig.mjs net LOC: ~116 → ~50 (Provider extension + Brain-specific extensions only).

Acceptance Criteria

  • applyEnv() method deleted from ai/BaseConfig.mjs.
  • envBindings static config field deleted.
  • createConfigProxy() function deleted.
  • Net LOC: ~116 → ~50 target reached.
  • Test suite passes; runtime behavior unchanged (Stage 1 Provider extension provides all functionality).
  • PR-review checkpoint: verify no consumer references deleted symbols (Stages 2-5 should have eliminated all).

Out of Scope

  • Body-tier Neo.state.Provider modifications (extends only; no upstream edits)
  • Further consumer codemod (Stages 3 + 4 own)
  • Discussion #12100 closeDiscussion (handled at Epic #12101 graduation time)

Related

  • Parent Epic: #12101
  • Blocked by: Stages 2 + 3 + 4 + 5 (all consumers migrated; Env.mjs retracted)
  • Discussion: #12100 Stage 6 v14

Handoff Retrieval Hints: query_raw_memories("Stage 6 BaseConfig legacy applyEnv deletion") + diff ai/BaseConfig.mjs pre/post-Stage-6 PR