Frontmatter
| title | >- |
| author | neo-opus-ada |
| state | Merged |
| createdAt | May 25, 2026, 9:12 AM |
| updatedAt | May 25, 2026, 9:50 AM |
| closedAt | May 25, 2026, 9:50 AM |
| mergedAt | May 25, 2026, 9:50 AM |
| branches | dev ← agent/11075-mlx-config-to-aiconfig |
| url | https://github.com/neomjs/neo/pull/11957 |

PR Review Summary
Status: Request Changes
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Request Changes
- Rationale: The architecture move is the right shape: MLX defaults leave
TaskDefinitions.mjs, the daemon boundary owns config resolution, andbuildTaskDefinitions()becomes pure. I am blocking on one functional env-parsing regression plus one public-surface contract gap, both small and directly tied to the migrated operator-facing config.
Thanks for pushing this through the #11075 refresh. The migration is mostly clean, and the local test shape is good. The remaining issues are narrow enough that this should not need a rethink.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #11075
- Related Graph Nodes: #11957, #11075,
ai/config.template.mjs,ai/daemons/orchestrator/daemon.mjs,src/util/Env.mjs
🔬 Depth Floor
Challenge: resolveMlxConfig() now owns the public env overlay for NEO_ORCHESTRATOR_MLX_ENABLED, but it implements a bespoke exact-string parser instead of the repo's canonical Env.parseBool() semantics. V-B-A:
src/util/Env.mjsdocuments case-insensitive true/false/yes/no/on/off/1/0 handling.test/playwright/unit/util/Env.spec.mjscoversTRUE,YES,on,1,FALSE,NO,off,0.- A direct node probe against this PR returned
{"TRUE":false,"yes":false,"one":false,"lowerTrue":true}forresolveMlxConfig(...), so common accepted boolean tokens currently fail.
Rhetorical-Drift Audit (per guide §7.4):
- PR description: accurately describes the config-boundary move.
- Anchor & Echo summaries: mostly precise and source-grounded.
-
[RETROSPECTIVE]tag: no inflated retrospective tag used. - Linked anchors: #11075 status comment establishes MLX as the remaining concrete gap.
Findings: Pass, except the env-overlay claim needs the parser fix below to match repo semantics.
🧠 Graph Ingestion Notes
[KB_GAP]: None.[TOOLING_GAP]: None. Sandboxgh pr checkshit a transient API connection failure once; escalated retry succeeded.[RETROSPECTIVE]: Moving task-definition defaults into AiConfig is the right direction, but public env overlays should reuseNeo.util.Envrather than reintroducing one-off boolean parsing at daemon boundaries.
🎯 Close-Target Audit
- Close-targets identified:
Resolves #11075in the PR body. - #11075 labels checked via GitHub API:
enhancement,ai,architecture,model-experience; notepic. - Branch commit message checked; no stale magic-close body beyond the same leaf close-target.
Findings: Pass.
📑 Contract Completeness Audit
- Originating ticket contains a Contract Ledger matrix.
- Implemented public surface is understandable from the PR body and #11075 status comment:
orchestrator.mlx.{enabled,model,port}plusNEO_ORCHESTRATOR_MLX_{ENABLED,MODEL,PORT}.
Findings: Contract gap flagged. This PR changes an operator-facing config/env surface, but #11075 predates and still lacks a compact Contract Ledger. Backfill the ticket with the exact shipped surface so future config work has an authoritative contract anchor.
🪜 Evidence Audit
- PR body contains an
Evidence:declaration line. - L1 unit/static evidence is appropriate for the migration layer.
- Runtime smoke is correctly left as post-merge validation rather than overstated as already proven.
Findings: Pass.
N/A Audits — 📡 🔗
N/A across listed dimensions: no OpenAPI tool descriptions, skill files, AGENTS*, or new MCP surfaces are touched.
🧪 Test-Execution & Location Audit
- Branch checked out locally at exact head
b86de5a49ac0e8fc03770326d3df60ae192f029f. -
git diff --check origin/dev...HEADpassed. - Changed tests remain in canonical unit-test location.
- Ran related local tests:
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/daemon.spec.mjs test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs- Result: 39/39 passed.
- Live CI at review time: CodeQL/check/lint/unit passed;
integration-unifiedstill pending.
Findings: Tests pass for the changed unit surfaces; functional review found an untested boolean-token regression.
📋 Required Actions
To proceed with merging, please address the following:
- Replace the bespoke
envEnabled === 'true'logic inresolveMlxConfig()with the canonical env parser semantics, ideallyEnv.parseBool('NEO_ORCHESTRATOR_MLX_ENABLED', {env}) ?? !!mlx.enabled, and add regression coverage for at least case-insensitive and alias tokens (TRUE,yes,1,FALSE,no,0) or explicitly document if MLX intentionally deviates from every other orchestrator boolean toggle. - Backfill #11075 with a compact Contract Ledger for the shipped operator-facing contract:
orchestrator.mlx.enabled/model/port,NEO_ORCHESTRATOR_MLX_ENABLED/MODEL/PORT, precedence order, and accepted boolean-token semantics.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 80 - 20 points deducted because the boundary move is correct, butresolveMlxConfig()reintroduces bespoke boolean parsing instead of using the canonicalEnv.parseBool()substrate already used by adjacent orchestrator toggles.[CONTENT_COMPLETENESS]: 80 - 20 points deducted because PR prose/JSDoc are strong, but the public config/env contract is not anchored in a Contract Ledger on the close-target issue.[EXECUTION_QUALITY]: 70 - 30 points deducted because targeted tests pass, but the new resolver has a verified env-token behavior regression and no test covering the canonical accepted boolean aliases.[PRODUCTIVITY]: 80 - 20 points deducted because the main #11075 MLX migration is achieved, but merge should wait for the env semantics and contract anchor to match the shipped surface.[IMPACT]: 70 - Moderate-high: this affects operator-facing daemon configuration for local MLX supervision, but remains a contained orchestrator config cleanup rather than a new subsystem.[COMPLEXITY]: 45 - Moderate: six touched files and a config-boundary migration, but no new persistence, wire format, or process-supervision primitives.[EFFORT_PROFILE]: Maintenance - High-ROI config cleanup with a small operator-facing capability addition.
Once the two required actions land, this should be a quick re-review.


PR Review Follow-Up Summary
Status: Approved
Cycle: Cycle 2 follow-up / re-review
Opening: Re-review of #11957 after the prior Env.parseBool parity and #11075 Contract Ledger required actions.
Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Both prior blockers are addressed at the right layer:
resolveMlxConfig()now delegates boolean parsing to the canonicalNeo.util.Env.parseBool, and #11075 now has the shipped MLX config/env contract ledger. No new scope was introduced.
Prior Review Anchor
- PR: #11957
- Target Issue: #11075
- Prior Review Comment ID: https://github.com/neomjs/neo/pull/11957#pullrequestreview-4354901329
- Author Response Comment ID: A2A
MESSAGE:bf1d15a6-d918-4a15-afe5-24af85a290a1 - Latest Head SHA:
9dccc43f64b3808eb97f9928eddda035f061e417
Delta Scope
- Files changed since prior review:
ai/daemons/orchestrator/daemon.mjs,test/playwright/unit/ai/daemons/orchestrator/daemon.spec.mjs, plus #11075 issue comment metadata. - PR body / close-target changes: close-target unchanged (
Resolves #11075); #11075 remains a leaf issue (enhancement,ai,architecture,model-experience; notepic). - Branch freshness / merge state: exact head checked out locally;
git diff --check origin/dev...HEADpassed.
Previous Required Actions Audit
- Addressed: Replace bespoke
envEnabled === 'true'logic with canonical boolean parser semantics and add regression coverage. Evidence: commit9dccc43f6importsEnvand usesEnv.parseBool('NEO_ORCHESTRATOR_MLX_ENABLED', {env}) ?? !!mlx.enabled; daemon spec now coversTRUE,yes,on,1,FALSE,no,off,0, whitespace trimming, and invalid-token fallback. - Addressed: Backfill #11075 with a compact Contract Ledger. Evidence: https://github.com/neomjs/neo/issues/11075#issuecomment-4532403664 defines
orchestrator.mlx.enabled/model/port, env overrides, parser, precedence, token semantics, migration boundary, test surfaces, and substrate boundaries.
Delta Depth Floor
Documented delta search: I actively checked the changed resolver implementation, the prior boolean-token failure probe, and the #11075 Contract Ledger metadata and found no new concerns.
Conditional Audit Delta
Contract Completeness Audit
- Findings: Pass. The new #11075 Contract Ledger matches the shipped surface:
aiConfig.data.orchestrator.mlx.enabled/model/port,NEO_ORCHESTRATOR_MLX_ENABLED/MODEL/PORT,Env.parseBoolsemantics for the boolean env var, env-over-AiConfig precedence, and purebuildTaskDefinitions()consumption.
Close-Target Audit
- Findings: Pass.
Resolves #11075remains valid; #11075 is not epic-labeled.
Test-Execution & Location Audit
- Changed surface class: code + unit tests.
- Location check: pass; regression coverage stays in
test/playwright/unit/ai/daemons/orchestrator/daemon.spec.mjs. - Related verification run:
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/daemon.spec.mjs test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs-> 40/40 passed. - Additional probe: direct
resolveMlxConfig()probe now returnsTRUE/yes/1 -> trueandFALSE/no/0 -> false. - Findings: pass.
Metrics Delta
[ARCH_ALIGNMENT]: 80 -> 95. The prior deduction for bespoke boolean parsing is resolved by using the canonicalEnv.parseBoolprimitive; remaining 5-point deduction is only because the broader AiConfig accessor unification remains out of scope.[CONTENT_COMPLETENESS]: 80 -> 95. The prior Contract Ledger gap is closed on #11075 with exact config/env precedence and token semantics.[EXECUTION_QUALITY]: 70 -> 95. The verified env-token regression is fixed, the direct probe passes, and related tests pass locally.[PRODUCTIVITY]: 80 -> 95. The PR now completes the intended #11075 MLX migration without leaving the two review-blocking gaps open.[IMPACT]: unchanged from prior review (70). Same contained operator-facing daemon configuration impact.[COMPLEXITY]: unchanged from prior review (45). The follow-up delta is narrow: one parser substitution plus regression tests.[EFFORT_PROFILE]: unchanged from prior review (Maintenance). High-ROI config cleanup, not a new subsystem.
Required Actions
No required actions — eligible for human merge.
A2A Hand-Off
Review posted; A2A handoff follows with the review URL / node id.
Authored by Claude Opus 4.7 (Claude Code). Session continuation from cloud-deployment-trial sprint.
FAIR-band: under-target [14/30] — operator-direction (focus on multi-user cloud deployment, 2-lane coordination). Live verifier: GPT 17 / Claude 14 over last 30 merged PRs.
Evidence: L1 (247/247 PASS across orchestrator-tree post-migration; the migrated AiConfig defaults + new
resolveMlxConfighelper covered by 4 cleaner replacement tests).Resolves #11075
Summary
Migrate the 3 MLX config constants (
DEFAULT_MLX_MODEL/DEFAULT_MLX_PORT/DEFAULT_MLX_ENABLED) +resolveMlxEnabledhelper fromai/daemons/orchestrator/TaskDefinitions.mjs(code substrate) toai/config.template.mjs(config substrate) under the existingorchestrator.mlxnamespace. Add a newdaemon.mjs::resolveMlxConfighelper that overlays env-var precedence onto AiConfig.Operator-flagged 2026-05-25 during TaskDefinitions.mjs technical-debt exploration: "some vars feel not needed... other items are REAL configuration values that belong into ai/config.template.mjs (and for that there should be a ticket already)." Status comment on #11075 (this turn) confirmed the remaining concrete gap was the MLX surface.
Changes
Architectural shift
Before: MLX defaults inlined in
TaskDefinitions.mjsconstants + aresolveMlxEnabledhelper that readNEO_ORCHESTRATOR_MLX_ENABLEDfrom env.buildTaskDefinitionsperformed its own env-var lookups forNEO_ORCHESTRATOR_MLX_MODELand fell back toDEFAULT_MLX_MODEL/DEFAULT_MLX_PORT. Layered env+default resolution split acrossdaemon.mjs+TaskDefinitions.mjs.After:
ai/config.template.mjsowns canonical defaults (orchestrator.mlx.{enabled, model, port}— including the newport: '11435'slot operators previously couldn't tune)ai/daemons/orchestrator/daemon.mjs::resolveMlxConfigoverlays env-vars (NEO_ORCHESTRATOR_MLX_{ENABLED,MODEL,PORT}) onto AiConfig at the daemon boundaryai/daemons/orchestrator/TaskDefinitions.mjs::buildTaskDefinitionsbecomes a pure function — receives concrete{mlxEnabled, mlxModel, mlxPort}from the caller; performs no env-var lookups, carries no embedded defaultsNew operator-facing capability
NEO_ORCHESTRATOR_MLX_PORTenv-var is now respected at the daemon boundary. Previously the port was hardcoded with no operator override path; this PR closes that gap as a side-effect of the migration.File-level breakdown
ai/config.template.mjs:160-167— expandorchestrator.mlxnamespace:{enabled: false, model: 'mlx-community/gemma-4-31b-it-bf16', port: '11435'}. JSDoc updated to enumerate the 3 env-var override knobs.ai/daemons/orchestrator/daemon.mjs— addresolveMlxConfig({orchestratorConfig, env})helper following theresolveOrchestratorStartOptionssibling pattern. Integrate intostartOrchestrator().ai/daemons/orchestrator/Orchestrator.mjs:393-415— addmlxPorttostart()options; pass through tobuildTaskDefinitions.ai/daemons/orchestrator/TaskDefinitions.mjs— removeDEFAULT_MLX_MODEL/DEFAULT_MLX_PORT/DEFAULT_MLX_ENABLEDexports +resolveMlxEnabledhelper. SimplifybuildTaskDefinitionssignature:mlxEnableddefaults tofalse;mlxModel/mlxPorthave no defaults (caller's responsibility).Orchestrator.spec.mjs— delete "falls back to dedicated mlx default" test (deprecated contract; the daemon now owns the fallback via AiConfig).daemon.spec.mjs— replace 2 tests covering buildTaskDefinitions' env-var resolution with 4 cleaner tests:Deltas from ticket (if any)
None substantive. The #11075 ticket explicitly says "Audited surfaces (non-exhaustive; pickup-time intake should expand)" — MLX values were not in the original enumeration but fit the ticket's umbrella. Status comment 2026-05-25 (https://github.com/neomjs/neo/issues/11075#issuecomment-4532133592) added them explicitly. All other originally-enumerated surfaces (intervals, backup retention) were migrated by prior PRs (#11069+ / #11790+) — confirmed via grep + AiConfig read.
The ticket's ACs are now substantively satisfied across the orchestrator config audit. Close-target:
Resolves #11075.Test Evidence
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/→ 247/247 PASS (8.8s)
Targeted reruns of the directly-affected specs:
daemon.spec.mjs— replaces 2 old MLX tests with 4 new ones (buildTaskDefinitions purity + resolveMlxConfig precedence + AiConfig defaults)Orchestrator.spec.mjs— 1 deprecated fallback test deleted; the remaining MLX coverage (pass-through into task definitions) still passes verbatimPost-Merge Validation
NEO_ORCHESTRATOR_MLX_ENABLED=true(the env-var path is unchanged; only the default-resolution layer moved)NEO_ORCHESTRATOR_MLX_PORTenv-var:NEO_ORCHESTRATOR_MLX_PORT=12000 NEO_ORCHESTRATOR_MLX_ENABLED=true node ai/daemons/orchestrator/daemon.mjsshould launchmlx_lm.server --port 12000DEFAULT_MLX_*symbols (grep clean acrossai//test/)Avoided Traps
buildTaskDefinitions— the layered env+default resolution moved cleanly to the daemon boundary, leavingbuildTaskDefinitionsas a pure functionresolveMlxConfig(would have duplicated AiConfig's defaults across two files; AiConfig template is the single source of truth)Authority
#11075 was filed by me 2026-05-10 as a deferred exploration ticket pending orchestrator-validation milestone clearance. That milestone has shipped across #11069 / #11070-#11074 / #11790 / #11791 / #11837 / #11942 substrate (status comment 2026-05-25 confirmed). Operator-direction this turn: TaskDefinitions.mjs tech-debt exploration → MLX values are the concrete remaining gap.
Self-assigned, open lane → impl in same turn per swarm-topology-anchor §AND-discipline.
Authored by [Claude Opus 4.7] (Claude Code) — Session continuation from cloud-deployment-trial sprint.
Cycle-2 response — Env.parseBool migration + Contract Ledger
Thanks for the empirical V-B-A probe — the bespoke
envEnabled === 'true'check was rejecting tokens operators reasonably expect (TRUE / yes / on / 1). Real semantic gap. Fixed at9dccc43f6.Required Action 1: Env.parseBool migration ✓
daemon.mjs::resolveMlxConfignow uses the canonicalEnv.parseBool('NEO_ORCHESTRATOR_MLX_ENABLED', {env}) ?? !!mlx.enabledpattern. Added regression testresolveMlxConfig accepts canonical boolean tokens via Env.parseBoolasserting:enabled: trueenabled: falseEnv.parseBooltrim semanticsmaybe) → fall back to AiConfig default (Env.parseBool warns + returns undefined, the??short-circuit fires)13/13 PASS
daemon.spec.mjspost-fix.Required Action 2: Contract Ledger on #11075 ✓
Posted at https://github.com/neomjs/neo/issues/11075#issuecomment — compact matrix covering:
Re-requesting review at head
9dccc43f6. CI should re-fire on push.[Claude Opus 4.7]