LearnNewsExamplesServices
Frontmatter
titlefix(ai): coalesce LMS provider discovery (#13997)
authorneo-gpt
stateMerged
createdAtJun 25, 2026, 12:20 PM
updatedAtJun 25, 2026, 1:09 PM
closedAtJun 25, 2026, 1:09 PM
mergedAtJun 25, 2026, 1:09 PM
branchesdevcodex/13997-lms-probe-coalescing
urlhttps://github.com/neomjs/neo/pull/13998
contentTrust
projected
quarantined0
signals[]
Merged
neo-gpt
neo-gpt commented on Jun 25, 2026, 12:20 PM

Resolves #13997

Coalesces routine OpenAI-compatible/LMS model-discovery probes behind the existing provider-readiness helper while preserving force-fresh recovery and diagnostics. Normal orchestrator startup paths now opt into a short AiConfig-owned routine cache; recovery and deployment-state consumers remain force-fresh unless they explicitly request a routine contract.

Evidence: L2 unit/static evidence covers the coalescing, cache-hit, force-refresh, failed-probe, and post-load refresh contracts. L3 live LMS developer-console verification remains required post-merge because the sandbox cannot observe the operator's LM Studio console.

Deltas from ticket

  • Implemented this in providerReadinessHelper.mjs rather than adding a public MCP tool or new daemon surface.
  • Added orchestrator.providerReadiness.routineCacheTtlMs as the AiConfig SSOT leaf for routine model-discovery cache cadence.
  • Routed routine callers through freshness: 'routine': LMS task liveness, LMS startup preload's pre-mutation discovery, DreamService's legacy provider probe, DreamService readiness/capacity checks, and Memory Core inference liveness.
  • Preserved protected semantics by keeping helper defaults force-fresh. Recovery actuator warm-provider repair and deployment-state provider residency diagnostics do not opt into the routine cache.
  • Post-load LM Studio verification force-refreshes after lms load/lms unload, so the cache cannot hide mutation results.

Decision Record impact: aligned with ADR 0019. The new cadence is a config leaf read at use sites; there are no hidden env reads, no local fallback constants, and no config pass-through object replacing AiConfig.

Related: #13995 Related: #13996 Related: #13950

Test Evidence

  • npm run agent-preflight -- ai/config.template.mjs ai/daemons/orchestrator/services/ConfiguredTaskDefinitionsService.mjs ai/daemons/orchestrator/services/DreamService.mjs ai/services/graph/providerReadinessHelper.mjs ai/services/memory-core/lifecycle/InferenceLifecycleService.mjs test/playwright/fixtures/aiConfigDefaults.mjs test/playwright/unit/ai/config.template.spec.mjs test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs test/playwright/unit/ai/daemons/orchestrator/daemon.spec.mjs test/playwright/unit/ai/scripts/runners/runSandman.spec.mjs
  • npm run ai:lint-config-template-ssot
  • npm run test-unit -- test/playwright/unit/ai/scripts/runners/runSandman.spec.mjs test/playwright/unit/ai/config.template.spec.mjs test/playwright/unit/ai/daemons/orchestrator/daemon.spec.mjs test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs - 146 passed
  • git diff --check
  • Commit hook ran: whitespace, shorthand, AiConfig test-mutation lint, JSDoc type lint, ticket archaeology, and block alignment.

Post-Merge Validation

  • Run node ./ai/scripts/setup/initServerConfigs.mjs --migrate-config so local overlays inherit orchestrator.providerReadiness.routineCacheTtlMs.
  • Restart the orchestrator and confirm normal startup no longer floods LMS developer logs with repeated /v1/models plus duplicate LMSAuthenticator metadata bursts.
  • Exercise a cloud diagnostics/recovery path and confirm it still gets force-fresh provider evidence rather than stale routine-cache data.

Commits

  • accb2cd187 - fix(ai): coalesce LMS provider discovery (#13997)

Authored by Euclid (GPT-5, Codex Desktop). Session 1583113d-4deb-455a-bee4-16521e9d1479.

tobiu
tobiu APPROVED reviewed on Jun 25, 2026, 1:09 PM

No review body provided.