Skip to content

Commit 1a7a9fb

Browse files
mpstatonclaude
andcommitted
issue(architecture): MEASURED — the API-speed premise was wrong (backend ~543ms)
Step 0 (boot instrumentation + shell redeploy) overturned the diagnosis: the shell + workspaces boot in ~543ms, no retry race. The perceived minute was (1) a stale 2026-07-28 shell deploy and (2) ~12 undeployed federation remotes falling back to localhost:3XXX, whose failed script loads can hang on a TCP timeout. Mesh-refactor design space retracted as the cause; remaining work is a federation-config cleanup (prune to deployed remotes / lazy-load), tracked separately. Kept the old hypothesis for the record — it's what Step 0 saved us from building. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018UYTYu4MAFZ7iyr2VTo2kq
1 parent 345ac50 commit 1a7a9fb

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

context-v/issues/Refactoring-for-API-Speed.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,37 @@ status: Open · Diagnosed · Refactor Backlog
2020

2121
# Refactoring for API Speed
2222

23-
## Why Care?
23+
## MEASURED — 2026-08-03 (the refactor premise was WRONG)
24+
25+
Step 0 ran (boot instrumentation shipped, shell redeployed, operator refreshed).
26+
The result overturns the diagnosis below:
27+
28+
- **The backend is fast.** `shell:mount → workspaces:ready = ~543ms` total:
29+
`ws:open` 430ms, `workspace.list:returned` +110ms (2 workspaces, humain-vc
30+
active). **There is no 60s retry race. The API/mesh is not the problem.**
31+
- **The perceived minute had two real causes, neither architectural:**
32+
1. **A stale shell deploy.** The live build was from 2026-07-28; a fresh
33+
rebuild + redeploy alone made it "way faster" per the operator.
34+
2. **A dozen undeployed federation remotes falling back to `localhost:3XXX`.**
35+
The shell eagerly loads `http://localhost:3002…3015/remoteEntry.js` for
36+
remotes that aren't deployed (record-collector, PTM, response-reviewer,
37+
pack-runner, the resolvers, …); those fetches fail — and on some networks
38+
**hang on a TCP connect timeout**, which is where a minute can come from.
39+
The *deployed* remotes (chat 3006, org-workbench 3014, search-and-add 3016,
40+
strategy-curator 3017) load fine and were never in the failure list.
41+
42+
**So the mesh-refactor design space below is RETRACTED as the cause.** The
43+
remaining, much smaller work is a **build/federation-config cleanup**: prune the
44+
prod federation manifest to deployed remotes only, and/or lazy-load remotes
45+
(fetch `remoteEntry.js` on demand when a Flow opens, not eagerly at boot) so no
46+
boot ever waits on a doomed `localhost` fetch. Tracked as its own follow-up.
47+
48+
The design space below is kept for the record — it is what we would have wasted
49+
days on without Step 0.
50+
51+
---
52+
53+
## Why Care? (original hypothesis — superseded by the measurement above)
2454

2555
On refresh, the workspaces the operator is logged into take **60s+** to appear.
2656
Interactions wait on microfrontends and microservices responding to — and

0 commit comments

Comments
 (0)