Skip to content

fix(serving): the knee bounds the served total (leased-in included), a launch settles after it is READY, and the footprint probe storm is gated — the M5 hour at 3 lanes over a knee of 2 - #4241

Merged
joelteply merged 1 commit into
canaryfrom
fix/the-knee-bounds-the-served-total-and-a-launch-settles-after-ready
Sep 19, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/the-knee-bounds-the-served-total-and-a-launch-settles-after-ready

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The hour (M5 on 4e0df69, 22:22–23:22Z)

[health] resident 16 · lanes 3 @ 67k · acts 5 · writes 0 · pulls 2177 (2174 lane-deferred) · settles 12 — AT THE KNEE: 16 minds on 3 lanes, the measured decode knee is 2

time what the probes say
23:13:15 re-home 2 → 1 (the plan had read 1 lane at a 20–23 GB budget for 50 min)
23:14:36 plan 3 lanes: usable 32 GB for one minute — the dying 2-lane server's pages freed before the new lane's were counted; demand_lanes 2 (roster clamped to the knee) + leased_in 1 = 3
23:14:45 the 1-lane launch settled (cooling 1, ready) — the spawn cooldown had been spent during the cold load while the old lane kept serving
23:15:00 re-homing 1 → 3, 15 s after the first came ready
23:16:50 3 × 67,584 settled; plan back to 1 lane at 20 GB; board now available 1 GB, swap 5 GB, pressure high since 22:33Z; the reconcile says nothing (a 1 × 2k–28k plan is a loss in both lanes and width — "over-served vs a dipped plan" is by design the broker's problem; that is the open decision below, not this PR)

Three fixes, each with its test

  1. The knee bounds the served total. ServingDemand.knee + with_knee; plan_serving re-applies knee_lanes over lanes + leased_in. A leased-in stream decodes on the same box; the knee was measured on all of them. Test the_knee_bounds_the_served_total_leased_in_included: 1 resident + 3 leased-in on a roomy host → 4 slots without a knee, 2 with a knee of 2, 4 with a knee of 8.
  2. A launch settles after it is READY, not after it was spawned. ready_edge(settled, now): the reconcile re-arms the full cooldown (and resets the streak) the first tick it sees a ready_verified_at_ms it has not settled on — serving.reconcile.window decision=ready-settling. The spawn arm stays; the ready edge is the one that matters, so post-launch evidence is read from the memory picture that lane made. settles_this_tick now means "outlived its settle window after ready". Test a_launch_settles_after_it_is_ready_not_after_it_was_spawned.
  3. Probe storm gated. serving.footprint.excess_is_fixed fired on every footprint read — 840 identical rows in 12 min (70/min). One row when the value changes (the knee clamp's LAST-static shape).

Not here — the decision for Joel

With 16 minds home and ~22 GB external, the Eco band leaves the 27B a 20 GB budget: 1 lane at a 2–28k window. Whether the band scales to the box or home is capacity-bounded (card 3ea66b5d) is the structural question; this PR stops the plan from making it worse.

Receipt after deploy

No serving.plan row with lanes above the knee while leased_in > 0; after any relaunch a ready-settling row and no re-home within 18 ticks of it; the excess_is_fixed class at a few rows an hour.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…a launch settles after it is READY not after it was spawned, and the footprint probe storm is gated on change — the M5 hour at 3 lanes over a knee of 2 with acts 5

The M5 on 4e0df69, the 22:22–23:22Z hour: "[health] resident 16 · lanes 3 @ 67k · acts 5 ·
writes 0 · pulls 2177 (2174 lane-deferred) · settles 12 — AT THE KNEE: 16 minds on 3 lanes,
the measured decode knee is 2". The probe record, tick by tick:

- 23:13:15 re-home 2 → 1 (the plan had read 1 lane at a 20–23 GB budget for 50 min).
- 23:14:36 plan 3 lanes: usable 32 GB for one minute — the dying 2-lane server's pages
  freed before the new lane's were counted. demand_lanes 2 (roster clamped to the knee)
  + leased_in 1 = 3: `serving_demand()` clamps the ROSTER to the knee, then
  `plan_serving` adds the leased-in streams on top, so the total escaped the knee.
- 23:14:40 declined, cooling 2. 23:14:45 the 1-lane launch SETTLED (cooling 1, ready).
- 23:15:00 re-homing 1 → 3, 15 s after the first came ready. The spawn cooldown (18
  ticks, armed at spawn) had been spent during the 27B's ~90 s cold load, because the
  OLD lane kept serving and every tick counted. Ready with zero settle left.
- 23:16:50 3 × 67,584 settled; plan back to 1 lane at 20 GB. Board now: available 1 GB,
  swap 5 GB, memory pressure high since 22:33Z. The reconcile says nothing: a 1 × 2k–28k
  plan is a loss in both lanes and width, and "over-served vs a dipped plan" is by design
  the pressure broker's problem, not a re-home (that is the open decision, not this PR).

Three fixes, each with its test:
1. `ServingDemand.knee` (+`with_knee`): `plan_serving` re-applies the knee over
   `lanes + leased_in`. A leased-in stream decodes on the same box as a resident's; the
   knee was measured on all of them. Test: 1 resident + 3 leased-in on a roomy host is 4
   slots without a knee, 2 with a knee of 2, 4 with a knee of 8.
2. `ready_edge(settled, now)`: the reconcile re-arms the full cooldown (and resets the
   streak) the first tick it sees a `ready_verified_at_ms` it has not settled on, with a
   `serving.reconcile.window decision=ready-settling` row. The spawn arm stays; the ready
   edge is the one that matters, so the evidence after a launch is read from the memory
   picture THAT lane made, not the one it inherited. `settles_this_tick` then means
   "outlived its settle window after ready". Test: first stamp settles, same stamp does
   not, new stamp settles again, not-ready never.
3. `serving.footprint.excess_is_fixed` fired on every footprint read — 840 identical rows
   in 12 minutes (70/min, the ledger-rotation class). One row when the value changes, the
   same LAST-static shape the knee clamp's row uses.

Receipt after deploy: no `serving.plan` row with lanes above the knee while leased_in > 0;
after any relaunch a `ready-settling` row and no re-home within 18 ticks of it; the
excess_is_fixed class at ≤ a few rows an hour.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE — reviewed at exact head 7bebf47. Three real fixes, each with the probe chain that named it: (1) the knee bounds the SERVED total — knee_lanes(lanes + leased_in, knee) instead of a clamp with the leases added after it, pinned 4 → 2 with a leased-in roster and unchanged when the knee is above demand; (2) the settle starts at READY — ready_edge on a new ready_verified_at_ms stamp re-arms the full cooldown and zeroes the streak, so a cold load that ate the spawn cooldown while the old lane kept serving can no longer be re-homed fifteen seconds after it comes up (the pure rule is tested at all four edges); (3) excess_is_fixed speaks on change only. One nit, not a condition: LAST_FIXED is one process-wide cell, so two footprints with different fixed terms planned in alternation would each read as a change — a few extra lines, never a silence. Merge on green; the structural question you leave for Joel (the Eco band leaving the 27B one lane with 16 minds home, or home capacity-bounded — 3ea66b5d) is the right one to leave.

@joelteply
joelteply merged commit 6d34274 into canary Sep 19, 2026
6 checks passed
@joelteply
joelteply deleted the fix/the-knee-bounds-the-served-total-and-a-launch-settles-after-ready branch September 19, 2026 23:50
joelteply added a commit that referenced this pull request Sep 20, 2026
…he weekly Dependency Check turned the canary tip red and stopped every deploy (#4243)

* fix(deploy): a scheduled audit's failure is not the tip's verdict — the weekly Node-era Dependency Check landed a red check-run on the canary tip and the tracker refused every deploy fleet-wide

2026-09-20 00:06Z, Sunday 00:00 UTC: `.github/workflows/dependencies.yml` (cron weekly)
ran on the default branch (canary) at 6d34274, failed at setup-node — "Some specified
paths were not resolved" — because it caches `src/package-lock.json` and `src/` has been
gone since the Node shell was retired (the web client's lockfile is at the repo root).
Its `audit` check-run attached to the tip. `track-canary.sh::tip_checks` reads every
check-run on the sha and calls any failure red: "refuse: tip 6d34274 is RED — a red tip
is never deployed", on every node, until a new tip appears. #4241's own checks (Rust tests,
windows check, install smoke, both drift guards) were all green. The 9/18 class again
([[a-red-canary-tip-is-a-fleet-wide-deploy-outage]]): a verdict computed over things
that are not the tip's own checks.

Two fixes:
1. The tracker judges the tip's OWN checks. It reads the workflow runs for the sha (they
   carry the triggering event) and counts only check-runs from suites started by a push,
   pull_request or workflow_dispatch. Runs API answered but no such suite yet = unknown
   (never green by absence); runs API unreachable = every check counts, as before, a
   degraded read rather than a silent pass. Dry run on the live tip: the schedule suite
   excluded, six push checks green → green.
2. The workflow points at files that exist (root package.json / package-lock.json, no
   `working-directory: src`) and runs on canary pushes to those files too, so the audit
   itself passes and any future failure lands on a change to those files.

Receipt: the next tip after this merge deploys on its own checks; next Sunday 00:00Z the
audit passes, and even if it did not, the tracker's verdict line reads green.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(deploy): the audit never runs as a canary push — a push-triggered audit is a tip check the tracker counts (Cormac's condition on #4243)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant