You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/services/burden-forecast.ts's loadOrComputeBurdenForecastResponse (lines 18-37) is named "load-or-compute" and its return type BurdenForecastResponse (lines 8-16) declares source: "snapshot" | "computed" — but the function body only ever returns a cached snapshot or null. There is no compute path.
Git history confirms the drift's origin: commit f850d7a5b ("fix(signals): avoid request-time burden forecast scans (#906)") intentionally deleted the inline buildBurdenForecast(...) fallback (moved to a background job in src/queue/processors.ts's buildBurdenForecasts) but left the function name, the "computed" type variant, and the doc/callers untouched. src/mcp/server.ts:3455-3469's getBurdenForecast tool handler summary text already says "no cached burden forecast" for the null case — confirming this is understood internally as cache-only now, just never renamed.
Requirements
Rename loadOrComputeBurdenForecastResponse to accurately describe its current cache-only behavior (e.g. loadCachedBurdenForecastResponse), updating all call sites.
Drop the "computed" variant from BurdenForecastResponse.source (it can never occur), updating any consumer that branches on it.
Update any doc comments referencing a "compute" path on this function to describe the real background-job path (buildBurdenForecasts in processors.ts) instead.
Deliverables
Function renamed to reflect cache-only behavior; all call sites (including src/mcp/server.ts) updated.
BurdenForecastResponse.source type no longer includes an unreachable "computed" variant.
Doc comments accurately describe the current snapshot-or-null behavior and point to buildBurdenForecasts for how the cache gets populated.
Test Coverage Requirements
src/** — 99%+ Codecov patch target. Existing tests for this function/type should continue to pass under the new name with no behavior change; add a type-level check (or test) confirming source can only be "snapshot".
Expected Outcome
The function's name, return type, and docs accurately describe its real cache-only behavior, with no dead "computed" branch left for a future reader (or caller) to trust.
Links & Resources
src/services/burden-forecast.ts (lines 8-16 for the type, 18-37 for the function)
src/mcp/server.ts:3455-3469 (getBurdenForecast, the caller whose own text already reflects the real cache-only behavior)
src/queue/processors.ts (buildBurdenForecasts, where the real compute path now lives)
Context
src/services/burden-forecast.ts'sloadOrComputeBurdenForecastResponse(lines 18-37) is named "load-or-compute" and its return typeBurdenForecastResponse(lines 8-16) declaressource: "snapshot" | "computed"— but the function body only ever returns a cached snapshot ornull. There is no compute path.Git history confirms the drift's origin: commit
f850d7a5b("fix(signals): avoid request-time burden forecast scans (#906)") intentionally deleted the inlinebuildBurdenForecast(...)fallback (moved to a background job insrc/queue/processors.ts'sbuildBurdenForecasts) but left the function name, the"computed"type variant, and the doc/callers untouched.src/mcp/server.ts:3455-3469'sgetBurdenForecasttool handler summary text already says "no cached burden forecast" for the null case — confirming this is understood internally as cache-only now, just never renamed.Requirements
loadOrComputeBurdenForecastResponseto accurately describe its current cache-only behavior (e.g.loadCachedBurdenForecastResponse), updating all call sites."computed"variant fromBurdenForecastResponse.source(it can never occur), updating any consumer that branches on it.buildBurdenForecastsinprocessors.ts) instead.Deliverables
src/mcp/server.ts) updated.BurdenForecastResponse.sourcetype no longer includes an unreachable"computed"variant.buildBurdenForecastsfor how the cache gets populated.Test Coverage Requirements
src/**— 99%+ Codecov patch target. Existing tests for this function/type should continue to pass under the new name with no behavior change; add a type-level check (or test) confirmingsourcecan only be"snapshot".Expected Outcome
The function's name, return type, and docs accurately describe its real cache-only behavior, with no dead
"computed"branch left for a future reader (or caller) to trust.Links & Resources
src/services/burden-forecast.ts(lines 8-16 for the type, 18-37 for the function)src/mcp/server.ts:3455-3469(getBurdenForecast, the caller whose own text already reflects the real cache-only behavior)src/queue/processors.ts(buildBurdenForecasts, where the real compute path now lives)f850d7a5b/ fix(signals): avoid request-time burden forecast scans #906 (the fix that removed the inline compute path)