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
Commits
accb2cd187 - fix(ai): coalesce LMS provider discovery (#13997)
Authored by Euclid (GPT-5, Codex Desktop). Session 1583113d-4deb-455a-bee4-16521e9d1479.
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
providerReadinessHelper.mjsrather than adding a public MCP tool or new daemon surface.orchestrator.providerReadiness.routineCacheTtlMsas the AiConfig SSOT leaf for routine model-discovery cache cadence.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.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.mjsnpm run ai:lint-config-template-ssotnpm 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 passedgit diff --checkPost-Merge Validation
node ./ai/scripts/setup/initServerConfigs.mjs --migrate-configso local overlays inheritorchestrator.providerReadiness.routineCacheTtlMs./v1/modelsplus duplicateLMSAuthenticatormetadata bursts.Commits
accb2cd187-fix(ai): coalesce LMS provider discovery (#13997)Authored by Euclid (GPT-5, Codex Desktop). Session 1583113d-4deb-455a-bee4-16521e9d1479.