WIP: HOMELAB-2342: docs(contracts): infra.rerun is written today — two caused kinds #25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "plane/HOMELAB-2342-infrarerun-contract"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Draft for independent review. HOMELAB-2342 (docs-only, 3 lines).
What changed
design/ld5/contracts-b11-b12.md§4's Written by (today) cell saidnot yetfor bothinfra.rerun.causeandinfra.rerun.evidence_kind. The row is written on the reachable path, so both cells now state what is actually written, and §6'sinfra.rerun"Missing" row is corrected the same way so the document does not contradict its own §4.Nothing else moved: no frozen value, no
report.sql/M0 semantics, no gate text, noRevisedheader row (see merge order), no data.Text → code → report evidence (infra-core
origin/live@8f1f96c)run/run.go:608execWithInfraRerun→recordJournal.RecordInfra(run/run.go:399seam,cmd/ld-runtime/main.go:875) →record.KindInfraRerun = "infra.rerun"(record/record.go:103)run/run.go:582state, reason, err := p.execWithInfraRerun(ctx, t, step)cmd/ld-runtime/main.go:433Infra: kuberun/kube_classify.go:204ClassifyInfrareturnsfalsefor anystep != StepBuildoom_kill/evictionrun/kube_classify.go:218InfraCauseOOMKill, InfraEvidenceKernelRecord;:224and:227InfraCauseEviction, InfraEvidenceEvictionEvent— nothing else is returnedrun/admission.go:83-94declares all six causes and five evidence kinds; the onlyInfraCause*reads outside tests are the three lines aboveevictionrow's two evidence sourcesk.evicted(ctx)(evictor event) andk.poolPodReplaced(ctx, t)(pod replaced/gone) atkube_classify.go:222-228evidence_kindis an unevidenced draw, not a vocabulary rowreport.sql:966-972infra_event:evidenced = COALESCE(m.evidence_kind IS NOT NULL AND lower(payload->>'evidence_kind') = m.evidence_kind, FALSE);report.sql:1984-1987the vocabulary arm skipsevidence_kind IS NULLcauseandevidence_kindare read from the payloadreport.sql:1976-1987; row columnnode_keyread atreport.sql:966Tests that pin the writer shape:
run/infra_rerun_test.go(TestInfraRerunRedrawsEvictedBuilderasserts one row withnode_key=LDF-3.build,cause=eviction,evidence_kind=eviction_event,attempt=1) andcmd/ld-runtime/main_test.go:402(RecordInfrawrites under the ticket's named sample).Negative check
grep -n 'infra.rerun' design/ld5/contracts-b11-b12.md | grep 'not yet'exits 1 after the change: noinfra.rerunline carriesnot yetany more.git diffis 3 lines (-3 +3), all in §4/§6;grep -c 'Edited\|Revised'unchanged (no header row added).Merge order vs HOMELAB-2339 (PR #24)
The two changes do not depend on each other, but they touch adjacent lines of the §4 table, so the second merge of the pair needs one line-level resolution: keep this PR's two
infra.rerunrows and 2339'sgate.decision.decisionrow. Verified mechanically:git merge-tree --write-treereports one content conflict, both sides being exactly those three table rows; resolving it to both sides' lines leaves the document coherent (probe performed and discarded, nothing pushed from it).Preferred order: 2339 first, then 2342 (2339 carries the
Revisedheader row that states the code of record; this PR deliberately adds none, to keep the delta at 3 lines). Reverse order needs the same one-line resolution. No file of 2339's is edited here.CI reality
This repository has no workflows: no
.forgejo/, no.github/, no workflow file anywhere in the tree at this head (the only.yamlpresent is the test goldeninternal/harness/claudecode/testdata/golden/slice.yaml). There will be no CI status on this PR, and none is claimed.Deliberately out of scope (for the reviewer/orchestrator, not fixed here)
infra.rerun.node_keymust name the killed run's node key … — HOMELAB-2252's writer, not W2's path." The rule is satisfied by the live writer, but the possessive tag now reads as if W2's path does not write the row. It is a naming rule, not anot yetstatus, so it was left alone. Needs a separate word-level ticket if the orchestrator wants it changed.report.sql'sinfra_eventalso readspayload->>'accept_test_sha'(report.sql:969); no writer sets it (the writer's fields arestep,attempt,cause,evidence_kind,node_key,head_sha—run/run.go:626-631). No contract text claims otherwise, so nothing here is stale; it is an unrecorded writer/reader gap worth its own ticket.Gates
Docs-only, reversible, no operator-gate item, no live work, no merge from this session.
HOMELAB-2342: docs(contracts): infra.rerun is written today — two caused kinds, not "not yet"to WIP: HOMELAB-2342: docs(contracts): infra.rerun is written today — two caused kindsReview —
ld-reviewer— aaron/lab-director#25 @5f47419(HOMELAB-2342) — APPROVEThree lines, one file (
design/ld5/contracts-b11-b12.md): the twoinfra.rerun.*rows in §4 and theinfra.rerun"missing" row in §6. Verified against the writer and the reader, not the PR's own table.Exactly two evidenced causes are emittable — confirmed.
run/kube_classify.go:201-231ClassifyInfrareturns("", "", false)for anystep != StepBuild, and its only three producingreturns are
:218oom_kill/kernel_record,:224and:227eviction/eviction_event. Grep forInfraCause*outside tests and outside theadmission.godeclarations: those three lines and nothingelse. The other four causes (
gateway_5xx_429,lost_exec_stream,job_scheduling_failure,other)are constants in
run/admission.go:83-94with no producer — the §4 wording says exactly that.Absent
evidence_kindis handled the way the text now claims.report.sql:963-975infra_event:evidenced = COALESCE(m.evidence_kind IS NOT NULL AND lower(payload->>'evidence_kind') = m.evidence_kind, FALSE)— absent evidence is an unevidenced draw, split out at
:1000asunevidenced, not a vocabularyoffence. And
report.sql:1983-1989(theinfra.rerun.evidence_kindarm) filterspayload->>'evidence_kind' IS NOT NULL, so an absent value never becomes aNOT_CERTIFIABLErow.The two readings agree with the sentence added.
§4/§6 consistency, no M0/report/gate change. The diff touches three table rows and nothing else: no
Revisedheader (that is #24's), no frozen value, no gate text, noreport.sql/M0 claim. After thechange
grep 'infra.rerun' … | grep 'not yet'returns nothing (verified, exit 1), and §6 now names thefour causes that are missing rather than implying the whole row is, which is the correct statement —
§4 and §6 no longer contradict each other.
No CI, recorded:
aaron/lab-directorhas no.forgejoor.githubpath anywhere in the tree Ienumerated (637 paths, both pages), and the combined status on this head is
total_count: 0. Nothingis green because nothing ran; my verdict rests on the diff and on reading the code.
Merge order, as briefed: #24 then #25. I composed the keep-both resolution myself rather than
trusting the PR's claim that it is one conflict: taking #24's head and substituting #25's three changed
rows yields a coherent 195-line document with both the new
gate.decision.decisionrow and bothnew
infra.rerunrows present, and noinfra.rerun"not yet" left. The rows are distinct table rows,so the resolution is genuinely line-level; nothing of #24's is overwritten.
Non-blocking, already declared by the author and worth keeping visible: §5 still tags the
infra.rerun.node_keyrule as HOMELAB-2252's writer, which now reads as if this path does not write therow; and
report.sqlreads aaccept_test_shapayload field that no writer sets. Both are outside a3-line delta and neither is contradicted by the text here — they want their own tickets rather than a
widened diff.
APPROVE at
5f474196ee21f2e29f907957779da3ad046ff80d, no blocker. Approval may land pending ratherthan official (this identity has produced both in this lane); this comment is the verdict of record.
Docs only, not dangerous-class, no second reviewer needed. Nothing edited, nothing merged.
Verdict of record —
ld-reviewer— head5f474196ee21f2e29f907957779da3ad046ff80d: APPROVED (HOMELAB-2342, 3 lines, one file).Exactly two evidenced causes emittable, confirmed at source:
run/kube_classify.go:201-231—ClassifyInfrareturns not-ok for anystep != StepBuild, and the only producing returns are:218oom_kill/kernel_recordand:224/:227eviction/eviction_event. Grep forInfraCause*outside tests and outside theadmission.godeclarations: those three lines, nothing else. The other four causes are constants with no producer — which is what the §4 cell now says.Absent
evidence_kind:report.sql:963-975computesevidencedasevidence_kind IS NOT NULL AND = m.evidence_kind, and the vocabulary arm at:1983-1989skipsevidence_kind IS NULL, so absent evidence reads as an unevidenced draw and never as a vocabulary row — as the text now claims.§4/§6 consistency: after the change no
infra.rerunline says "not yet" (grep exit 1), and §6 names the four unprovable causes instead of the whole row. Diff is three table rows: no frozen value, noreport.sql/M0/gate text, noRevisedheader (that is #24's).No CI, recorded: no
.forgejo/.githubpath in the enumerated tree; combined status on this headtotal_count: 0.Merge order checked, not taken on trust: I composed the keep-both myself — #24's head with this PR's three rows substituted is a coherent 195-line document with both new
gate.decision.decisionand both newinfra.rerunrows, noinfra.rerun"not yet" remaining. Distinct table rows, so line-level resolution is correct and nothing of #24's is lost.Recorded, out of scope and not widened here: §5's HOMELAB-2252 possessive tag now reads as though this path does not write the row, and
report.sqlreadsaccept_test_shawhich no writer sets. Both want their own tickets.Approval may land pending rather than official (this identity has produced both); this comment is the verdict of record. Nothing edited, nothing merged.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.