fix: control plane and UI fixes #1171
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1171"
general
weight: 0.35
AbirAbbas
Summary
All fixes in one PR, for one review. It replaces #1169, #1170 and #1172, which are closed in favour of this one; their commits are merged here unchanged.
| Fix | What was broken | Originally |
| --- | --- | --- |
| Execution VC
created_atstored in UTC, plus a one-time SQLite rewrite of old rows | On SQLite, VCcreated_atwas written in the host's local zone while the VC filters bind a UTC bound and compare text, so on hosts west of UTC a fresh VC fell out ofcreated_afterand rows written under different offsets sorted out of order; the API returned local-zone timestamps | #1170 || API key on direct
fetchcalls (Integrations, Triggers, trigger sheet/dialog/event replay, step approvals, DAG sidebar, retry panel, DID bundle download) | WithAGENTFIELD_API_KEYset, pages that callfetchdirectly sent noX-API-Keyand got401| #1169 || Playground replay unwraps the stored
{"input": …}envelope | Replaying a run sent{"input":{"input":{…}}}, so the reasoner received none of its arguments and ran on defaults | #1169 || Playground "View run" opens the run | The button navigated to
/runs/<execution_id>, which is a 404 | #1169 || Runs list picks its page before aggregating; default page read from a new activity index |
/api/ui/v2/workflow-runsgrouped every execution in the table on each request: ~285 ms with no traffic and ~440 ms p50 under traffic on a 203k-execution database. Now ~25 ms and ~56 ms | #1172 || Live refreshes coalesced; a running run polls every 10 s while the stream is connected | Each execution event restarted the runs list, dashboard, DAG and step queries with
cancelRefetch, so under load the Runs page made ~30 overlapping list requests in 15 s | #1172 || Run page fetches
vc-chain?view=summary| The run page downloaded the whole VC chain (1.2 MB for a 1,500-step run) to show a verifiability warning and the issuer | #1172 || Execution
started_atstored in UTC | On SQLite, a start time not in UTC was compared as local-zone text, so it dropped out of a UTCsincefilter and sorted by the wrong instant | #1172 |No conflicts between the three.
Type of change
Evidence
End-to-end run: embedded server built from each branch (
go build -tags embedded), fresh home directory,AGENTFIELD_STORAGE_MODE=local,AGENTFIELD_API_KEYset, host zoneAmerica/Toronto(UTC-5), two agents fromexamples/python_agent_nodes(permission_agent_b,hello_world), calls executed through/api/v1/execute, UI driven in headless Chrome.VC timestamps
Before (
mainbinary, fresh database):After (this branch started on the same database
maincreated):Runs list and run page under traffic
Measured on a copy of a busy local SQLite database: 4.2 GB, about 24,000 runs and 203,000 executions. Live traffic came from a real agent through
/api/v1/execute/async: one 1,500-step run (six steps in parallel) plus a new 5-step run about every 0.66 s. The machine's load average was about 20 from unrelated work, so these are noisy-box numbers.GET /api/ui/v2/workflow-runs?page=1&page_size=25&sort_by=updated_at&sort_order=desc| | Before | After |
| --- | --- | --- |
| no traffic, p50 | 285 ms | 25 ms |
| under traffic, p50 / p90 / max (20 samples) | 441 / 509 / 549 ms | 56 / 67 / 73 ms |
|
QueryRunSummariesalone, default page | 320 ms | 20 ms (most of it theCOUNT(DISTINCT run_id)total) ||
QueryRunSummaries, other sort columns | ~320 ms | 35–135 ms |The per-run lookups in the handler (run metadata and trigger) were measured at about 1–3 ms for a page of 25, so they were left as they are.
Network trace, 15 s on each page under traffic (headless Chrome,
/apirequests only)Runs page:
Run page of the 1,500-step run while it runs:
For a 322-step run, the full chain was 766 KB.
Test plan (runs list, UTC start time, VC summary)
go build ./...go vet ./internal/storage ./internal/handlers/uigo test ./internal/storage/ ./internal/handlers/ui/ ./internal/server/ -count=1POSTGRES_TEST_URL=... go test ./internal/storage -run Postgres -count=1againstpgvector/pgvector:pg17, including the new PostgreSQL page comparisonTestQueryRunSummariesPagesMatchTheSingleGroupedQuerycompares every sort column, both directions, ten filters and five page windows against the previous single grouped query. It fails if either tie-breaker is reversed.TestRecentRunIDsByActivityWidensPastBusyRuns,TestRunActivityIndexServesTheRecentRunsScanTestExecutionStartedAtIsStoredInUTCfails onmain(a non-UTC start drops out of a UTCsincefilter) and passes hereTestUIWorkflowVCChainSummaryViewOmitsPerStepCredentialsweb/client:npx tsc --noEmit -p tsconfig.app.json,npx vitest run(141 files, 840 tests),npm run buildIntegrations page with an API key
| |
/api/v1/sources|/api/v1/triggers| Page || --- | --- | --- | --- |
| Before |
401|401|HTTP 401: {"error":"unauthorized",…}|| After |
200|200| loads, no error |Run detail → Replay → Execute → View run
| | Replay input box | Stored execution input | Result | View run |
| --- | --- | --- | --- | --- |
| Before |
{"input": {"limit": 3, "query": "SELECT 3"}}|{"input":{"input":{"limit":3,"query":"SELECT 3"}}}| ran on defaults:"query":"SELECT *","limit":100|/ui/runs/exec_…→HTTP error! status: 404|| After |
{"limit": 3, "query": "SELECT 3"}|{"input":{"limit":3,"query":"SELECT 3"}}|"query":"SELECT 3","limit":3|/ui/runs/run_…→ run page renders |Test plan
cd control-plane && go build ./...go vet ./...go test ./internal/storage/ ./internal/services/ ./internal/handlers/... -count=1(re-run after merging #1172)cd web/client && npx tsc --noEmit -p tsconfig.app.jsonnpx vitest run(141 files, 840 tests passed, after merging #1172)npm run buildgo build -tags embedded ./cmd/agentfield-server, run on a fresh home with an API key, two example agents registered, executions via/api/v1/executemain's binary; rows rewritten to UTC once; second restart is a no-opMerge Danger
Door: one-way — #1170 rewrites existing SQLite
execution_vcs.created_atvalues to UTC on first start (same instant, different spelling; not reverted by downgrading). The #1169 web changes are two-way.The #1172 changes are two-way: the new
executionsindex is additive, andview=summaryis opt-in.Blast Radius: low — one column of one table on SQLite only (Postgres untouched), recorded in
schema_migrationsso it runs once; the web changes add a header to direct fetches and fix two Playground code paths. #1172 changes the query behind the Runs list, and on a large PostgreSQLexecutionstable the first start builds one more index.