Summary
Follow-up to #7578 (closed by #7594). Bugs 2 and 3 from that issue are fixed on the deployed build, but bug 1 still reproduces: GET /api/registry/agents/{url}/compliance takes 22–30 s for https://sales-agent.elementaltv.io/mcp (84 storyboards), the dashboard's FETCH_TIMEOUT_MS = 15_000 fires first, and the card for a verified agent stays in its skeleton state (not yet checked, the OAuth connect form, No badges yet, "Test your agent"). Reported as a comment on #7578 first (#7578 (comment)); filing separately since that issue is closed.
Reproduction (2026-09-21 ~10:30Z, all HTTP 200)
| endpoint |
time |
/compliance (org API key) |
30.1 s, 22.4 s, 28.9 s |
/compliance (anonymous) |
22.1 s |
/storyboard-status |
29.4 s |
/compliance/history?limit=10 |
0.6 s |
The deployed build is post-#7594: the /compliance response carries refresh_availability with code: refresh_authorization_provenance_required.
Why the #7594 change did not move the number
#7594 added includeDiagnostics: false to the card-level getStoryboardStatuses call (registry-api.ts /compliance handler) and gates the agent_compliance_step_diagnostics LATERAL join on it (compliance-db.ts getStoryboardStatuses). But:
/compliance (join removed) and /storyboard-status (join still present, default includeDiagnostics) take the same 22–30 s, so the diagnostics join was not the dominant cost.
/compliance/history on the same agent is sub-second.
What the two slow routes still share is the latest_run CTE (agent_compliance_runs … ORDER BY tested_at DESC LIMIT 1) plus the correlated EXISTS (SELECT 1 FROM agent_storyboard_status latest WHERE latest.agent_url = $1 AND latest.run_id = …) predicates, evaluated per storyboard row, and getComplianceStatusWithStoryboardCounts runs the same shape once more. I have no access to EXPLAIN on the hosted DB, so this is a pointer, not a diagnosis; an index on agent_storyboard_status (agent_url, run_id) and agent_compliance_runs (agent_url, tested_at DESC) WHERE dry_run = false AND is_authoritative = true would be the first things to check.
Impact
For agents with large storyboard sets the card never hydrates, so the hydrated-only action row never renders. That includes "Requeue comply", which the new fence notice names as the alternative action, so the notice points at a control the affected owners cannot reach. The only thing that renders is the disabled "Recheck paused" button plus the notice, after one click.
Ask
Bring /compliance under the 15 s client budget for agents with ~80+ storyboards (or let the card render its action row from the fast /compliance/history + /auth-status data while /compliance is still in flight).
Summary
Follow-up to #7578 (closed by #7594). Bugs 2 and 3 from that issue are fixed on the deployed build, but bug 1 still reproduces:
GET /api/registry/agents/{url}/compliancetakes 22–30 s forhttps://sales-agent.elementaltv.io/mcp(84 storyboards), the dashboard'sFETCH_TIMEOUT_MS = 15_000fires first, and the card for a verified agent stays in its skeleton state (not yet checked, the OAuth connect form,No badges yet, "Test your agent"). Reported as a comment on #7578 first (#7578 (comment)); filing separately since that issue is closed.Reproduction (2026-09-21 ~10:30Z, all HTTP 200)
/compliance(org API key)/compliance(anonymous)/storyboard-status/compliance/history?limit=10The deployed build is post-#7594: the
/complianceresponse carriesrefresh_availabilitywithcode: refresh_authorization_provenance_required.Why the #7594 change did not move the number
#7594 added
includeDiagnostics: falseto the card-levelgetStoryboardStatusescall (registry-api.ts/compliancehandler) and gates theagent_compliance_step_diagnosticsLATERAL join on it (compliance-db.tsgetStoryboardStatuses). But:/compliance(join removed) and/storyboard-status(join still present, defaultincludeDiagnostics) take the same 22–30 s, so the diagnostics join was not the dominant cost./compliance/historyon the same agent is sub-second.What the two slow routes still share is the
latest_runCTE (agent_compliance_runs … ORDER BY tested_at DESC LIMIT 1) plus the correlatedEXISTS (SELECT 1 FROM agent_storyboard_status latest WHERE latest.agent_url = $1 AND latest.run_id = …)predicates, evaluated per storyboard row, andgetComplianceStatusWithStoryboardCountsruns the same shape once more. I have no access toEXPLAINon the hosted DB, so this is a pointer, not a diagnosis; an index onagent_storyboard_status (agent_url, run_id)andagent_compliance_runs (agent_url, tested_at DESC) WHERE dry_run = false AND is_authoritative = truewould be the first things to check.Impact
For agents with large storyboard sets the card never hydrates, so the hydrated-only action row never renders. That includes "Requeue comply", which the new fence notice names as the alternative action, so the notice points at a control the affected owners cannot reach. The only thing that renders is the disabled "Recheck paused" button plus the notice, after one click.
Ask
Bring
/complianceunder the 15 s client budget for agents with ~80+ storyboards (or let the card render its action row from the fast/compliance/history+/auth-statusdata while/complianceis still in flight).