v0.36.2 dev witness: #964 restart timing and 503-not-404 (ad371857, fb83b78e), 2026-11-15
Verdict: the 503 fix holds. In a drain and in a detach, both under load, a moved record never answered 404. The gap answered 503 with Retry-After, and every sequence continued with no gap. The #964 fix does what its commit says (no startup HA ingress scan on a fleet box and no "context deadline exceeded"), but the restart timing did not improve: the first reconcile still came about 17 s after start, not about 2 s. The HA ingress pass was not what held it back. shop and railsdemo answered 200 on all 126 probes (20:24:10Z to 20:45:47Z).
Operator: platform-a9 witness agent. Dev lock on #421 from 20:23Z to about 20:50Z. Console, box-1 and both box-2 machines ran v0.36.2 (box binary b7482ffb, S362; console 3a07918d). CLI v0.36.2 linux-amd64, sha256 19ab00ee918ab16bf1f3efd5bf2306d052a688d589f67e69cf7f70ecac8520d9, from ~/.cache/release-v0.36.2/dist and checked against SHA256SUMS.txt and verify/.
Results
| Witness | Result | Key numbers | |---|---|---| | 1 #964 restart timing (box-2) | FAIL against "about 2 s". The fix's own claim holds. | Restart 1: armed +9.5 s, first reconcile +16.9 s. Restart 2: armed +9.4 s, first reconcile +17.3 s. No "context deadline exceeded" from the startup HA ingress pass. Last witness: +9.9 s and +17.2 s. | | 2a 503 not 404, drain | PASS | fdw2-a1: 254 requests: 240 x 200, 12 x 503 fleet-unrouted (Retry-After 2), 2 x 503 wake-failed (Retry-After 5), 0 x 404. fdw2-a2: 234 requests: 222 x 200, 11 x 503 fleet-unrouted, 1 x 503 wake-failed, 0 x 404. Sequences contiguous. | | 2b 503 not 404, detach --terminated | PASS | fdw2-a3: 104 requests: 56 x 200, 38 x 503 fleet-unreachable (Retry-After 2), 8 x 503 fleet-unrouted (Retry-After 2), 2 x 503 wake-failed (Retry-After 5), 0 x 404. Last value on box-2 was 10; first 200 on box-1 read 10, then POST 11 to 38. | | 2c unknown host | PASS, with a note | A never-existing host under bab.dev.oncarlos.com gets the hub's long-standing 503 "pending-host" page (Retry-After 5), not a 404. It was the same before and after the moves, and the code is unchanged since v0.36.1. The plain 404 "unknown host" still answers for a host outside the route-table form (uppercase Host header). | | 3 Teardown | PASS | Both machines terminated, box-2 detached, instances deleted, app trashed, window files and scan objects removed. See "Deleted". |
Witness 1: restart timing
Method, as in the last witness: stop box-2's agent, create one instance (D1 labels it box-2 at create), start the agent, and time from systemd's "Started" to the first "minted instance route" for that instance.
| | Restart 1 (fdw2-a1) | Restart 2 (fdw2-a2) | Last witness (v0.36.1) | |---|---|---|---| | Agent started | 20:29:46.100Z | 20:30:51.693Z | 10:42:32.135Z | | Tunnel connected | +0.2 s | +0.2 s | +0.2 s | | Fast converge loop armed | +9.5 s (20:29:55.645Z) | +9.4 s (20:31:01.126Z) | +9.9 s | | Startup HA ingress "context deadline exceeded" | none | none | +12.1 s | | First reconcile (mint) | +16.9 s (20:30:02.998Z) | +17.3 s (20:31:08.998Z) | +17.2 s | | First pass summary | 14.4 s (reconcile 9.5 s, moves 4.1 s) | 13.9 s (reconcile 9.2 s, moves 3.9 s) | 15.5 s (reconcile 9.9 s, moves 4.9 s) |
- The startup HA ingress pass now only logs "incomplete startup alias pass" (the alias pass still runs, as the commit says), at about +0.6, +3, +9 and +19 s. It no longer holds reconcileMu.
- Fresh boots show the same shape: M1 armed at +8.9 s and M2 at +9.3 s.
- Where the time goes: about 9.4 s from start to arming, then about 2.3 s to the first fast tick, then about 5 s inside the first pass's reconcile stage before the mint. Nothing is logged between "tunnel connected" and "armed". Before it logs "armed", fastConvergeLoop runs restartSeed, sidecarWakeSeed, refreshMovesHolds, refreshOfflineView and systemLeg.observe (internal/host/agent.go, before line 3854). These are my guesses at the 9 s; I did not measure them separately. The first pass's 9 s reconcile and 4 s moves stage are reads over the fleet store door.
Witness 2a: drain under load (fdw2-a1 and fdw2-a2)
Load: one GET /seq and one POST /seq every 0.5 s on each instance, 20:33:02Z to 20:34:47Z.
fleets drain r10r box-2 sent 20:33:29.631Z, rc 0. The door took 808 ms (performance-budget WARN, budget 500 ms).- Both records were relabelled box-2 to box-1 at 20:33:30.293Z (moved true).
- The hub rewrote both forward rows at 20:33:31.94Z, 1.6 s after the relabel.
- box-1 logged "a hub-forwarded host this box does not route yet answered 503" at 20:33:32.68Z and minted both routes at 20:33:36.15Z, 5.9 s after the relabel.
- box-1 refused two wakes with "no build is installed for this instance yet" (20:33:37.6Z to 37.97Z, while the root pass staged d1). Those are the 503 wake-failed answers.
- box-2 removed both routes at 20:33:36.63Z and hibernated them at 20:33:38.38Z and .46Z, with no C44 or C45.
- box-1 took the leases at 20:33:38.48Z (a2) and 38.78Z (a1), restored from the fleet bucket, and woke in 1.262 s and 1.056 s.
- lock.json for a1 (1 s poll): box-2 gen 1, gone at 20:33:38.64Z, box-1 gen 1 at 20:33:40.83Z.
| | fdw2-a1 | fdw2-a2 | |---|---|---| | Last 200 from box-2 (send time) | 20:33:31.910Z, POST seq=40 | 20:33:31.969Z, POST seq=37 | | 503 fleet-unrouted, Retry-After 2 | 12, 20:33:32.57Z to 20:33:36.90Z | 11, 20:33:32.67Z to 20:33:37.12Z | | 503 wake-failed, Retry-After 5 | 2, 20:33:37.57Z to 37.78Z | 1, 20:33:37.34Z | | 404 | 0 | 0 | | First 200 from box-1 (send time) | 20:33:38.479Z, GET seq=40 | 20:33:38.125Z, GET seq=37 | | Outage by send time | 6.6 s | 6.2 s | | POST sequence | 4 to 123, contiguous | 4 to 114, contiguous |
Last witness, same drain: 8 x "404 unknown host" and 2 x 503 wake-failed, outage 5.1 s.
Witness 2b: detach --terminated under load (fdw2-a3)
- fdw2-a3 was created on the second box-2 machine (M2, labelled box-2 at create by D1), served seq 1 to 10, then slept after 1m10s idle (M2 ran CARLOSHIBERNATEIDLE=60s) at 20:41:24Z, and released its lease.
- M2 was terminated at 20:42:00Z to 20:42:33Z. Load on a3 ran from 20:42:39Z.
fleets detach-box --terminated r10r box-2 sent 20:42:48.835Z, rc 0 at 20:42:49.666Z (door 692 ms, budget WARN). The record named box-1 at 20:42:48.977Z (0.14 s, at the door), moved true. Console: "fdw2-a3 from box-2 to box-1 (detached)", "moved 1 records off the detached box".- The hub rewrote the forward row at 20:42:52.86Z. box-1 minted at 20:42:55.48Z (6.5 s after the relabel), refused two wakes for the root pass, took the lease at 20:42:58.91Z, restored from the bucket and woke in 993 ms.
- Responses: - before the detach (box-2 gone): 25 x 503 fleet-unreachable, "no connected box", Retry-After 2; - after the detach, until the hub rewrite: 13 more of the same; - then 8 x 503 fleet-unrouted, Retry-After 2 (20:42:54.50Z to 20:42:57.11Z); - then 2 x 503 wake-failed, Retry-After 5; - then 200 from 20:42:58.683Z: GET seq=10, POST 11 to 38. 0 x 404.
Last witness, same detach: the first request got "404 unknown host".
Witness 2c: unknown host
https://fdw2-never-38ff0fa4.bab.dev.oncarlos.com/ and /seq, at 20:32:21Z (before) and 20:35:39Z (after the drain): 503, x-carlos-answer: pending-host, Retry-After 5, the "Almost ready" page. This is the hub's answer for any route-form host under a platform domain (internal/edge/pending.go, the same in v0.36.1). It is not a 404, so the brief's expectation does not match what dev has answered all along.- The same host with an uppercase Host header (outside the route-table form): 404 text/plain "unknown host", no X-Carlos-Answer.
- Can outsiders tell hosts apart? fb83b78e changes only requests the hub delivers on a fleet channel. The hub only forwards hosts it has a row for, so a stranger's answer for a host that does not exist is unchanged. A host in a move gap answers 503 fleet-unrouted (Retry-After 2), which is different from the unknown-host 503 pending-host (Retry-After 5). That only shows a host that answers 200 before and after the move, so nothing new is revealed.
Timings
| What | Time | |---|---| | Restart to first reconcile (box-2) | +16.9 s and +17.3 s (armed +9.5 s and +9.4 s) | | Drain request to records relabelled | 0.66 s | | Relabel to hub forward rewritten | 1.6 s (drain), 3.9 s (detach) | | Relabel to box-1 minting the route | 5.9 s (drain), 6.5 s (detach) | | Drain outage under load | 6.6 s (a1), 6.2 s (a2) | | Detach request to record relabelled | 0.14 s | | Wakes on box-1 | 1.056 s, 1.262 s (drain), 993 ms (detach) | | B2 window console downtime | window 1: 0.28 s + 48.4 s. Window 2: 0.27 s + 48.3 s |
Deviations from the brief
- box-2 was added twice, on two machines, never at once, as in the last witness. A drain leaves nothing labelled to box-2 and a draining box takes no new labels, so the detach witness needed a second box-2. M1 carried witness 1 and the drain. M2 carried the detach. Each add needed its own B2 window. The lock post said so.
- Restarts were stop, create, start (stopped 9.2 s and 8.6 s), so the first reconcile had a known record to mint and could be timed.
- M2 ran with CARLOSHIBERNATEIDLE=60s, so fdw2-a3 could sleep and release its lease before its machine was terminated.
- My first instances-delete attempt (20:44:02Z) used the wrong syntax and deleted nothing (rc 1, usage printed). The second attempt, with --host, worked.
Product findings
- P3: a fleet box's first reconcile still comes about 17 s after a restart. ad371857 removed the startup HA ingress hold. There is no "context deadline exceeded" now, but that pass was not the main delay: it saved about 0.3 s. - About 9.4 s pass between "tunnel connected" and "fast converge loop armed", with nothing logged. - The first pass's reconcile stage takes about 9 s and mints about 5 s in. The moves stage takes about 4 s. - These are suspects, not measurements: the seeds before arming (restartSeed, sidecarWakeSeed, refreshMovesHolds, refreshOfflineView, systemLeg.observe), and slow reads over the fleet store door. Timing each step of the arming sequence would show where the time goes.
- Note: the unknown-host answer under the apps domain is a 503 pending page, not a 404. Expected behaviour, but the brief assumed a 404.
- Note: after a detach, the hub keeps answering "fleet unreachable: no connected box" for about 4 s (13 requests here) until its forward row is rewritten. It is a 503 with Retry-After 2, not a 404, so it is not this fix's case. It is listed so the gap is fully accounted for.
- Note: the drain and detach doors are still over their 500 ms budget (808 ms and 692 ms), as in the last witness.
Deleted
- EC2 i-0f61dd420e2aba586 (box-2 machine M1, t4g.small): launched 20:24:12Z, terminated 20:36:42Z, 0 volumes left.
- EC2 i-0315209c7abfa0fcd (box-2 machine M2, t4g.small): launched 20:36:56Z, terminated 20:42:33Z, 0 volumes left.
- r10r box-2 detached with
--terminated twice (20:36:44Z, which moved nothing, and 20:42:48.8Z, which moved fdw2-a3). Its console row stays, because there is no delete verb. - App fdw2-a: instances fdw2-a1, -a2 and -a3 deleted at 20:44:10Z. No record left under apps/bab/fdw2-a/instances/ (checked 20:44:14Z). The app was trashed at 20:44:15Z and purges 2026-12-15 20:44Z.
- Bucket objects I wrote, in carlos-r10r-fleet-640012953448: -
scratch/fdw2/scan.jsonl version xfRLRGC85c1J3UhT95mnYcVO7sFaqWXl (window 1); - the same key, version XxC38O8XPTcISvb1vyQIhnpq5Y511aGu (window 2). - scratch/fdw2/ now has 0 versions and 0 delete markers. - On sophie: /root/hu-fdw2/registry.db.window, /run/hu-fdw2/roster.json, /run/hu-fdw2/scan.jsonl and both directories. c3 removed /root/hu-fdw2/console.env at the end of each window.
- Local scratch (/home/paulca/.cache/tmp/claude-1001/fdwit2.ipE6, with the box config copy and fixture build), removed by exact path. No IAM user, security group or bucket was created.
Left in place (written by the product, or by design)
- Box-written binding objects for fdw2-a1, -a2 and -a3 in carlos-dev-640012953448, and replica objects under
instances/fdw2-a* in the r10r fleet bucket. - On box-1: the parked data of fdw2-a1, -a2 and -a3 and their empty systemd slices. No process runs in them (hibernated 20:44:17Z to 18Z).
- The fdw2-a release d1, in the trash with its app.
- The hostnames fdw2-a1, -a2 and -a3, now in the history (606 recorded).
- The history floor is now v0.36.2 (6ef00911), because activate records the running console build.
- box-2's last heartbeat, until it ages out.
Final state of dev (20:45Z)
- healthz: ok v0.36.2. fdw2 hosts answer 503 pending-host (their records are gone).
- Console: pid 3517968, NRestarts 0. It restarted only for the B2 stops.
- sophie's hub carlos-edge: pid 3513669, NRestarts 0 since 20:17:28Z, untouched. It has 0 fdw2 forward rows.
- box-1 carlos-edge: pid 622122, NRestarts 0, exe b7482ffb, untouched since 19:57:11Z. It has 0 fdw2 rows, and its gen units run only shop and railsdemo.
fleets show r10r: box-1 active, box-2 detached.- Not touched: the flagship, the IE HA group, leo, dennis, the demo box and hapair. The B2 scans read them read-only.
Evidence: /home/paulca/.cache/fdwit2/progress.log and /home/paulca/.cache/fdwit2/evidence/ (load logs, lease watches, journals, window outputs, scripts).