Resolves #13995
Bounds REM topology extraction so it reserves graph output tokens, passes maxCompletionTokens to the provider, fails loud on context overflow, length truncation, and parse failure, and records bounded per-chunk and zero-conflict outcomes. Adds a durable file-only diagnostic channel and routes routine HealthService cache churn into it so the LMS developer console is not spammed while diagnostic logs are still retained.
Evidence: L2 unit/static covers topology request bounds, parse-failure friction, zero-conflict outcome logging, and file-only diagnostic behavior. L3 post-merge live LMS observation remains required for console-noise verification. Residual: post-merge LMS developer-console smoke check.
Deltas from ticket
#13984 remains closed; this PR targets the new #13995 only.
#13994 remains separate for the suspected 400k provider-context/counter contamination; this PR makes topology calls bounded and observable but does not claim to close that investigation.
Local ignored config overlays were refreshed with node ./ai/scripts/setup/initServerConfigs.mjs --migrate-config after rebasing onto origin/dev; no tracked config overlay changes.
Test Evidence
node --check ai/services/graph/TopologyInferenceEngine.mjs
node --check ai/services/memory-core/HealthService.mjs
node --check ai/mcp/server/shared/logger.mjs
node --check test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs
node --check test/playwright/unit/ai/services/memory-core/HealthService.spec.mjs
node --check test/playwright/unit/ai/mcp/server/shared/logger.spec.mjs
git diff --check origin/dev...HEAD
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs test/playwright/unit/ai/services/memory-core/HealthService.spec.mjs test/playwright/unit/ai/mcp/server/shared/logger.spec.mjs -> 106 passed
Post-Merge Validation
Commits
81486c7124 — fix(ai): bound topology REM logs (#13995)
Authored by Euclid (GPT-5, Codex Desktop). Session 1583113d-4deb-455a-bee4-16521e9d1479.
Resolves #13995
Bounds REM topology extraction so it reserves graph output tokens, passes
maxCompletionTokensto the provider, fails loud on context overflow, length truncation, and parse failure, and records bounded per-chunk and zero-conflict outcomes. Adds a durable file-only diagnostic channel and routes routineHealthServicecache churn into it so the LMS developer console is not spammed while diagnostic logs are still retained.Evidence: L2 unit/static covers topology request bounds, parse-failure friction, zero-conflict outcome logging, and file-only diagnostic behavior. L3 post-merge live LMS observation remains required for console-noise verification. Residual: post-merge LMS developer-console smoke check.
Deltas from ticket
#13984 remains closed; this PR targets the new #13995 only.
#13994 remains separate for the suspected 400k provider-context/counter contamination; this PR makes topology calls bounded and observable but does not claim to close that investigation.
Local ignored config overlays were refreshed with
node ./ai/scripts/setup/initServerConfigs.mjs --migrate-configafter rebasing ontoorigin/dev; no tracked config overlay changes.Test Evidence
node --check ai/services/graph/TopologyInferenceEngine.mjsnode --check ai/services/memory-core/HealthService.mjsnode --check ai/mcp/server/shared/logger.mjsnode --check test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjsnode --check test/playwright/unit/ai/services/memory-core/HealthService.spec.mjsnode --check test/playwright/unit/ai/mcp/server/shared/logger.spec.mjsgit diff --check origin/dev...HEADnpm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs test/playwright/unit/ai/services/memory-core/HealthService.spec.mjs test/playwright/unit/ai/mcp/server/shared/logger.spec.mjs-> 106 passedPost-Merge Validation
Commits
81486c7124—fix(ai): bound topology REM logs (#13995)Authored by Euclid (GPT-5, Codex Desktop). Session 1583113d-4deb-455a-bee4-16521e9d1479.