feat(FN-4785): complete Step 6 — document and ship agents-load perf fix

Fusion-Task-Id: FN-4785
Fusion-Task-Lineage: be241ee7-9df0-433c-a00b-997bcd558862
This commit is contained in:
Fusion (runfusion.ai)
2026-05-16 12:57:18 -07:00
committed by gsxdsm
parent 416bd8b1f5
commit 5a101dc70b
2 changed files with 5 additions and 1 deletions

View File

@@ -211,6 +211,10 @@ The `taskId` field is suppressed in API responses when the linked task is in a t
- If task lookup fails (e.g., task deleted), `taskId` is preserved in the response to avoid false negatives
- The underlying `taskId` is NOT modified in storage — only the API response is sanitized
**Performance notes:**
- Task-link sanitization now uses `TaskStore.getTaskColumns(ids)` for one batched status lookup instead of per-task `getTask()` hydration.
- `GET /api/agents/stats` now uses `AgentStore.getRunStatusCounts()` to aggregate completed/failed run totals in one grouped query (no per-agent `getRecentRuns()` loop).
### Update-Only Fields
These fields can only be set during update (not on create):