Repository navigation
test(kind): drive a seven-pod pipeline, and size the cap to the quotas we have - #477
Conversation
`runs.mode` carries an enumeration — `er_schema::model::RUN_MODES`, declared on the registry's `enum_map` and repeated in the entity's own description as "(full, incremental, correction_pass, ...)". The correction pass wrote `correct`, which was never a member of it. Nothing enforced the enumeration at write time, so the row was accepted and the value simply sat there, undeclared, in a constrained column. The one function that maps a run's mode to a rebuild reason (`er_versions::rebuild_reason_for`) compares against `MODE_CORRECTION_PASS` and so could never match it — it has no production caller today, which is the only reason this stayed latent rather than becoming a wrong answer. It also became visible: the DAG path's `init` publishes `MODE_CORRECTION_PASS` in its run plan, so the plan and the row it describes disagreed on one string. The job KIND is still `correct` — that is a different vocabulary and is untouched. Only the ledger's mode moves. The lake e2e asserted `mode == "correct"`, which is how an undeclared value in an enumerated column stayed invisible for as long as the writer produced it; it now asserts the declared constant. No golden pins the value, so nothing else moves. Co-Authored-By: Claude Fable 5 <[email protected]>
…s we have Two things the probe could not previously say, and one number that was wrong. ## The probe only ever ran single-task kinds All four phases drove `lake_maintain`, so none of them could show the failure mode that splitting a DAG across pods actually introduces: a stage reading what the PREVIOUS STAGE'S PROCESS produced. In the monolith every stage shared one address space and one DuckDB handle. Under the executor, `standardize` runs in a container that did not exist when `ingest` finished, and the only things that cross the boundary are the lake and the task's published output. That is not a hypothetical class. `seed_lexicon` writes a SESSION-LOCAL table, which was invisible for as long as one process ran every stage and failed immediately once `init` and `standardize` were separate pods. Phase 5 runs `run_all_full` on kind and requires: seven live rows for the seven stages, seven DISTINCT Job objects, one launch each, a verified `pod_uid` on every row, `init` publishing a `run_plan` at mode `full`, `standardize` pinning two references (the plan plus the corpus ingest's own pod landed), and the run ledgered `full @ v0001` — the last of which a pipeline whose pods all exited zero without writing anything would fail. It uses its OWN org. The other four phases depend on `lake_maintain` settling in seconds against an empty lake, and seeding base_10 into the org they share would quietly change the window phases 2 and 3 try to catch. The assertions were mutation-tested before the probe ever ran: eight planted defects (a relaunched stage, a missing pod uid, two stages sharing one Job, a lost ingest handoff, the wrong mode, a missing stage, a failed stage, a stage with no output) and all eight are caught with a legible message. The house rule is that a gate must be observed failing before it is trusted. ## The vCPU quota was recorded as 8 and is 64 Read back from the account rather than assumed — `L-1216C47A` (On-Demand Standard) and `L-34B43A08` (Spot) are both 64.0. The 8 was real when it was measured and had simply been granted since, which made `inFlightCap: 1` and §7.2's "default 1 until the quotas are raised" stale. `inFlightCap` is now 3: three L pods land on three 16-vCPU nodes, so 3x16 plus 4 for app and system is 52 of 64, while four would need 68 and the fourth node could not provision at all. The dev namespace quota is recomputed with it, and NOT uniformly: count/jobs.batch 8 + 3x6 per §7.2 = 26 -> 30 limits.cpu 3x12 (L) + app = 38 -> 40 requests.memory 3x14Gi (L) + app = 46Gi -> 80Gi already clear requests.ephemeral-storage 3x400Gi (L spill) = 1200Gi -> LEFT at 900Gi A ceiling on cpu or jobs costs nothing until used; ephemeral storage is EBS that gets billed monthly. So the namespace admits two concurrent L pods and refuses the third, which arrives as a capacity `FailedCreate` and costs a wait rather than a launch — §7.2's backstop behaving as designed. Raising it wants a decision, not a default, so the arithmetic is recorded beside the value. ## Also Risks 1 and 4 in §12 are resolved and say so. Risk 4 keeps the one part that is NOT proven: no JWKS rotation has happened under a running `er-api`, so `UNKNOWN_KID_FETCH_FLOOR` and `REFRESH_AFTER` are unit-tested and not exercised live. The workflow's budget goes 90 -> 120 minutes. A ~40 minute cold image build plus seven sequential pods against a 30 minute wait would have been cancelled just before the most interesting assertion. The generated required-checks reference tracks that timeout, hence its diff. Phase 3's acceptance now distinguishes the two probes explicitly: kind proves the handoff, and cannot prove the class boundary — one node, no Karpenter, every class identical in values-kind.yaml. "Three Jobs on two node classes" stays a dev-cluster claim. Co-Authored-By: Claude Fable 5 <[email protected]>
The operability section still said `jobs.trace_context` "is `None` at both enqueue sites". It is not: the authenticating layer puts `forwarded_traceparent(parts)` on the `Principal` and enqueue threads it through, so a job carries the traceparent of the request that asked for it. The one remaining `None` in the tree is a `Job` struct literal in a test fixture. Co-Authored-By: Claude Fable 5 <[email protected]>
`wait_state … succeeded` aborts the moment a job settles `failed`, which in a seven-stage pipeline throws away the only thing worth knowing: which stage failed, and with what `error_detail`. Phase 5 now waits for any terminal state, dumps the live ledger in sequence order, and then requires success. Co-Authored-By: Claude Fable 5 <[email protected]>
The pipeline's closing assertion reads a DATASET-scoped route that opens the lake in the API process, so `503 lake: …` is a real and distinguishable outcome. Going through `api` would have spent five retries on it and then died under `set -e" having printed nothing — the response body is the whole diagnosis. Fetch it directly, check the code, print the body. Co-Authored-By: Claude Fable 5 <[email protected]>
The probe is green on a real cluster — all five phasesRun locally against a freshly built image on kind. The pipeline's ledger, and it is not a vacuous pass — seven distinct Job objects and seven distinct pod UIDs:
And the run row proves the lake was really written rather than seven pods exiting zero: { "mode": "full", "model_version": "v0001", "status": "succeeded",
"auto_merged_pairs": 18, "started_at": "…11:36:09", "ended_at": "…11:36:24" }18 auto-merged pairs out of base_10 — entities were actually resolved across the pod boundary. Getting there found two real bugs in the harness itself (new commit)Neither is in the pipeline; both made the probe report on something other than the code under test, which is worse than failing. 1. The probe was running a two-day-old binary
The symptom was unrecognisable as staleness: Fixed by pinning the release to the pushed digest. A node cannot satisfy
2. Phases 1–4 were probing a route that no longer existsEvery job route is dataset-scoped — Again a bare 404 with an empty body, indistinguishable at a glance from a missing org. All six call sites now build their path through one So the existing four phases were already red against main before this PR added a fifth. They are green now. CI note unchanged: every workflow still fails at job startup on Actions billing, so this cannot go green here until that is restored. The run above is the local evidence. |
Two things the kind probe could not previously say, and one number that was wrong.
The probe only ever ran single-task kinds
All four existing phases drive
lake_maintain, so none of them can show the failure mode that splitting a DAG across pods actually introduces: a stage reading what the previous stage's process produced.In the monolith every stage shared one address space and one DuckDB handle. Under the executor,
standardizeruns in a container that did not exist wheningestfinished, and the only things that cross the boundary are the lake and the task's published output.That is not a hypothetical class — it is the bug we already hit.
seed_lexiconwrites a session-local table, which was invisible for as long as one process ran every stage and failed immediately onceinitandstandardizewere separate pods.Phase 5 runs
run_all_fulland requires:pod_uidon every row — which the integration tier's child-process double cannot produceinitpublishing arun_planat modefullstandardizepinning two references: the plan, plus the corpusingest's own pod landedfull @ v0001— which a pipeline whose pods all exited zero without writing anything would pass every other assertion and fail hereIt uses its own org. The other four phases depend on
lake_maintainsettling in seconds against an empty lake, and seeding base_10 into the org they share would quietly change the window phases 2 and 3 are trying to catch.The assertions were observed failing first
The house rule is that a gate must be seen failing before it is trusted. Eight planted defects, all eight caught with a legible message:
match: launches=2reconcile: no verified pod uideach stage needs its own Job object, got 6ingesthandoffstandardize pinned 1 refs, wanted the plan + the landed corpusinitdecided the wrong mode{'mode': 'incremental', …}('match', 'failed', 'nickname_variants does not exist')finish: no durable outputWhat has not happened yet: a green end-to-end local run. The kind image is a ~40-minute cold build and is still going on a memory-pressured laptop. The nightly
kindworkflow exercises this once Actions billing is restored; I will post the local result on this PR when the build lands. Every assertion above is verified against synthetic ledgers, and the script is syntax-checked.The vCPU quota was recorded as 8 and is actually 64
Read back from the account rather than assumed —
L-1216C47A(On-Demand Standard) andL-34B43A08(Spot) are both 64.0. The 8 was real when measured and had simply been granted since, which madeinFlightCap: 1and §7.2's "default 1 until the quotas are raised" stale.inFlightCapis now 3: three L pods land on three 16-vCPU nodes, so 3×16 + 4 for app and system is 52 of 64. Four would need 68 and the fourth node could not provision at all.The dev namespace quota is recomputed with it, and deliberately not uniformly:
count/jobs.batchlimits.cpurequests.memoryrequests.ephemeral-storageA ceiling on cpu or jobs costs nothing until it is used; ephemeral storage is EBS that gets billed monthly. So a namespace admits two concurrent L pods and refuses the third — which arrives as a capacity
FailedCreate, costing a wait rather than a launch (§7.2's own backstop). Raising it wants a decision, not a default, so the arithmetic sits beside the value.Also
er-api, soUNKNOWN_KID_FETCH_FLOORandREFRESH_AFTERare unit-tested and not exercised live.values-kind.yaml. "Three Jobs on two node classes" stays a dev-cluster claim, and nothing here should be read as covering it.trace_contextgap is closed; the doc's "None at both enqueue sites" was stale.required-checks.mdtracks that timeout, hence its diff.error_class/error_detail, and then requires success.wait_state … succeededwould have aborted onfailedhaving printed nothing.Note on CI: every workflow currently fails at job startup with "The job was not started because recent account payments have failed or your spending limit needs to be increased", so this cannot go green until Actions billing is restored.
🤖 Generated with Claude Code