HOMELAB-1731: LD4.11 · maintainability fitness routine (weekly, Sendrast first) #598

Merged
aaron merged 4 commits from plane/HOMELAB-1731-fitness into epic/LD4 2026-10-03 05:20:35 +00:00
Owner

What

R-27 maintainability-fitness lands weekly, ACTIVE, kind: script (the
2026-09-28 operator ruling, contract Amendment 3 + the 2026-10-03 HOMELAB-1731
adjudication), with its mechanism in a new package and its first calibration run
committed as evidence.

lab-director/dispatcher/fitness/            NEW package (R-27's mechanism)
lab-director/dispatcher/cmd/fitness/        NEW runnable (mirrors cmd/readiness)
lab-director/dispatcher/routines/           R-27 entry + fixture/test/policy edits ONLY

Verify lines (the ticket's four)

1 · a probe ticket's measurements land in the calibration digest.
PlanProbes authors the prediction MECHANICALLY at emission time, precedence
declared (the territory-map compiler section, stamped with its pinned
digest) → derived (co-change communities) → unpredicted (a VALUE with the
reason). CalibrationLine renders prediction kind + digest, predicted vs actual
files, the unexpected list, AC drift as a named delta and ≥1 evidence address per
number; a probe with no measurement renders unmeasured, never a zero.
Emission goes through the existing director.PlaneSink into Backlog with the
fitness-probe label, using intake/plane.go's marker grammar
(TestEmitProbesUsesTheExistingPlaneSink, TestProbeEncodeParseRoundTrip,
TestMeasurementRefusesProseOnlyEvidence). R-13 (the digest consumer) is
paused for the routine executor
, so the line is produced mechanically here and
rendered into the real artifact once — blocking the AC on another epic's seam
buys no evidence.

2 · a static-proxy number is never rendered as a gate (attempted, blocked).
fitness.AttemptGate is the ONLY promotion path and it always refuses
(ReasonFitnessIsCareDial). TestAStaticProxyIsNeverRenderedAsAGate covers all
9 (surface × metric) pairs; TestSelfTestLineIsThreeOfThree pins the ledgered
line never-a-gate self-test: 3/3 refused, which the artifact, the digest and
the Plane comment carry. TestFitnessDigestRendersNoGateVocabulary asserts the
renderer cannot emit gate vocabulary. TestRegistryRefusesR27WithGateAuthority

  • the fitness loader's neverAGate.authority: care-dial check make "a config
    edit cannot promote R-27" a code fact, not a policy note. New policy line
    P-ROUT-013 in policy.go and policy.md (parsed-back test holds the
    pair); fitness.TestPolicyLineReferenceMatchesTheBook cross-checks the id.

3 · two repos of known hygiene order the way the census says they should.
Live read-only run, recorded evidence committed under
fitness/testdata/calibration/ (see its README):

target rev commits spread med/p90/max changed lines excluded share coupling (derived) flakes/100 jobs
Sendrast/api-sendrast 9cc2ee366c4e 100 2 / 7 / 14 28811 0.4716 0.54 0.0 (200 rows)
Sendrast/sendrast-web bee874cee4cf 100 2 / 8 / 64 29883 0.0 0.55 1.0 (2 flip groups)

The declared primary key spread_p90 agrees with the independently
established order (R-24 readiness + repo archaeology, printed beside it in the
artifact). sendrast-web's clone was shallow at 341 commits (the measured
falsification) — unshallowed once to 509, recorded in evidence; a shallow clone
without that is refused by default and downgrades to truncated-window +
UN-RANKED under --allow-shallow. The naive top-level-directory proxy is
RETIRED from the ranking and kept in its own column, clearly labelled.

4 · first weekly run produces a change-friction slope with evidence links.
Artifact fitness/testdata/calibration/2026-W40.json + digest. Every number
resolves to git:<repo>@<rev>, api:<feed> or artifact:<recording>. The slope
is insufficient-series — window one has one point per target, so the series
is printed with its sample sizes instead of a number assembled from nothing (a
sign needs ≥2 points). Byte-identical determinism is
TestCensusEndToEndIsDeterministic.

Mechanism

  • churn — one bounded window, two git invocations (--numstat and
    --name-status; the last output-format flag wins, which the first recording
    proved by yielding zero changed lines) merged by (sha, path); spread
    median/p90/max, churn share, birth/revert rates, excluded share printed.
  • coupling — declared territory-map section (pinned digest) → co-change
    communities (union-find over minPairSupport) → unpredicted (reported, NEVER
    ranked). Never directory depth, never primary.
  • flakiness — (workflow, job, head_sha) groups over /actions/tasks; a
    same-sha failure+success pair is a flip; insufficient-history below the row
    floor. Per-test is NOT reachable at Forgejo 14.0.3 — documented in the digest
    legend, not faked.
  • data file fitness/fitness.yaml — window floors, per-repo exclusions,
    the probe catalogue, neverAGate, and the config-keyed worker-tier T2
    rehearsal budget
    (probes.dispatch: false, reportOnly: true, warrant
    measure-only, omniroute/deepseek-flash) per the ruling.
  • observer cost printed every run (gitWalks, apiRows,
    tokensUsed: null); wall-clock is in the digest, deliberately NOT in the
    canonical bytes.

Pin discipline

scriptRef.path is lab-director/dispatcher/fitness/census.go — a NEW file, so
no sha256-pinned sibling (rollup.go, readiness.go, phase.go) is touched.
TestInProcessPinsMatchTheCode re-derives it.

Deviations from the brief / adjudication (all deliberate, all stated)

  1. Probe emission is report-only. emitsWork: false on the landed entry:
    probe tickets are created into Backlog (non-dispatchable) and never worked,
    so nothing they emit can re-trigger another routine yet. The fixture keeps
    emitsWork: true + one edge as the schema accommodation, and
    TestR27CadenceAgreesBetweenFixtureAndRegistry asserts the divergence is
    deliberate.
  2. Artifact path. The repo has no .rpiv/ tree; the first-run artifact and
    its evidence live at fitness/testdata/calibration/ (committed, re-derivable)
    rather than .rpiv/artifacts/fitness/.
  3. cmd/fitness is new — mirrors the cmd/readiness precedent (R-24's
    runnable path). Territory note: cmd/ is outside the stated fitness/*
    allowance, added for symmetry with the sibling routine's sanctioned runnable.
  4. The worker brief expected api-sendrast to read WORSE on the friction
    lines.
    The measurement disagrees: api reads BETTER on the primary key
    (p90 7 vs 8) and on spread-max (14 vs 64), matching the design brief's
    independently established order. Both the naive directory-depth proxy and the
    territory measure are printed, and the calibration line escalates rather than
    re-tunes if the primary key ever disagrees.
  5. R-27 count assumption. The registry's total assertion is derived, not
    hardcoded (22 corpus + registered siblings), so this entry does not touch it.

Verification

  • go test -race ./... green in lab-director/dispatcher (all 31 packages).
  • go vet ./... clean.
  • go test opens no socket; the live run's only network use is the one bounded
    /actions/tasks read per target, recorded to disk and replayed offline.
  • The live run exited 0 with calibration agreed and never-a-gate self-test: 3/3 refused.

Not in this PR

  • T2 rehearsal dispatch (needs the routine executor) — LD4.11b; the switch and
    its budget are already config-keyed and OFF.
  • Ready-made territory-map sections for the Sendrast repos (so every
    prediction is derived today — itself the first care-dial finding).
  • No merge from this session.
## What R-27 `maintainability-fitness` lands **weekly, ACTIVE, `kind: script`** (the 2026-09-28 operator ruling, contract Amendment 3 + the 2026-10-03 HOMELAB-1731 adjudication), with its mechanism in a new package and its first calibration run committed as evidence. ``` lab-director/dispatcher/fitness/ NEW package (R-27's mechanism) lab-director/dispatcher/cmd/fitness/ NEW runnable (mirrors cmd/readiness) lab-director/dispatcher/routines/ R-27 entry + fixture/test/policy edits ONLY ``` ## Verify lines (the ticket's four) **1 · a probe ticket's measurements land in the calibration digest.** `PlanProbes` authors the prediction MECHANICALLY at emission time, precedence `declared` (the `territory-map` compiler section, stamped with its pinned digest) → `derived` (co-change communities) → `unpredicted` (a VALUE with the reason). `CalibrationLine` renders prediction kind + digest, predicted vs actual files, the unexpected list, AC drift as a named delta and ≥1 evidence address per number; a probe with no measurement renders **`unmeasured`, never a zero**. Emission goes through the existing `director.PlaneSink` into `Backlog` with the `fitness-probe` label, using `intake/plane.go`'s marker grammar (`TestEmitProbesUsesTheExistingPlaneSink`, `TestProbeEncodeParseRoundTrip`, `TestMeasurementRefusesProseOnlyEvidence`). **R-13 (the digest consumer) is paused for the routine executor**, so the line is produced mechanically here and rendered into the real artifact once — blocking the AC on another epic's seam buys no evidence. **2 · a static-proxy number is never rendered as a gate (attempted, blocked).** `fitness.AttemptGate` is the ONLY promotion path and it always refuses (`ReasonFitnessIsCareDial`). `TestAStaticProxyIsNeverRenderedAsAGate` covers all 9 (surface × metric) pairs; `TestSelfTestLineIsThreeOfThree` pins the ledgered line **`never-a-gate self-test: 3/3 refused`**, which the artifact, the digest and the Plane comment carry. `TestFitnessDigestRendersNoGateVocabulary` asserts the renderer cannot emit gate vocabulary. `TestRegistryRefusesR27WithGateAuthority` + the fitness loader's `neverAGate.authority: care-dial` check make "a config edit cannot promote R-27" a code fact, not a policy note. New policy line **P-ROUT-013** in `policy.go` **and** `policy.md` (parsed-back test holds the pair); `fitness.TestPolicyLineReferenceMatchesTheBook` cross-checks the id. **3 · two repos of known hygiene order the way the census says they should.** Live read-only run, recorded evidence committed under `fitness/testdata/calibration/` (see its README): | target | rev | commits | spread med/p90/max | changed lines | excluded share | coupling (derived) | flakes/100 jobs | |---|---|---|---|---|---|---|---| | `Sendrast/api-sendrast` | `9cc2ee366c4e` | 100 | 2 / **7** / 14 | 28811 | **0.4716** | 0.54 | 0.0 (200 rows) | | `Sendrast/sendrast-web` | `bee874cee4cf` | 100 | 2 / **8** / 64 | 29883 | 0.0 | 0.55 | 1.0 (2 flip groups) | The declared primary key `spread_p90` **agrees** with the independently established order (R-24 readiness + repo archaeology, printed beside it in the artifact). `sendrast-web`'s clone was shallow at 341 commits (the measured falsification) — unshallowed once to 509, recorded in evidence; a shallow clone without that is **refused by default** and downgrades to `truncated-window` + UN-RANKED under `--allow-shallow`. The naive top-level-directory proxy is RETIRED from the ranking and kept in its own column, clearly labelled. **4 · first weekly run produces a change-friction slope with evidence links.** Artifact `fitness/testdata/calibration/2026-W40.json` + digest. Every number resolves to `git:<repo>@<rev>`, `api:<feed>` or `artifact:<recording>`. The slope is **`insufficient-series`** — window one has one point per target, so the series is printed with its sample sizes instead of a number assembled from nothing (a sign needs ≥2 points). Byte-identical determinism is `TestCensusEndToEndIsDeterministic`. ## Mechanism * **churn** — one bounded window, **two** git invocations (`--numstat` and `--name-status`; the last output-format flag wins, which the first recording proved by yielding zero changed lines) merged by `(sha, path)`; spread median/p90/max, churn share, birth/revert rates, excluded share printed. * **coupling** — declared `territory-map` section (pinned digest) → co-change communities (union-find over `minPairSupport`) → `unpredicted` (reported, NEVER ranked). Never directory depth, never primary. * **flakiness** — `(workflow, job, head_sha)` groups over `/actions/tasks`; a same-sha failure+success pair is a flip; `insufficient-history` below the row floor. Per-test is NOT reachable at Forgejo 14.0.3 — documented in the digest legend, not faked. * **data file** `fitness/fitness.yaml` — window floors, per-repo exclusions, the probe catalogue, `neverAGate`, and the **config-keyed worker-tier T2 rehearsal budget** (`probes.dispatch: false`, `reportOnly: true`, warrant `measure-only`, `omniroute/deepseek-flash`) per the ruling. * **observer cost** printed every run (`gitWalks`, `apiRows`, `tokensUsed: null`); wall-clock is in the digest, deliberately NOT in the canonical bytes. ## Pin discipline `scriptRef.path` is `lab-director/dispatcher/fitness/census.go` — a NEW file, so no sha256-pinned sibling (`rollup.go`, `readiness.go`, `phase.go`) is touched. `TestInProcessPinsMatchTheCode` re-derives it. ## Deviations from the brief / adjudication (all deliberate, all stated) 1. **Probe emission is report-only.** `emitsWork: false` on the landed entry: probe tickets are created into `Backlog` (non-dispatchable) and never worked, so nothing they emit can re-trigger another routine yet. The fixture keeps `emitsWork: true` + one edge as the schema accommodation, and `TestR27CadenceAgreesBetweenFixtureAndRegistry` asserts the divergence is deliberate. 2. **Artifact path.** The repo has no `.rpiv/` tree; the first-run artifact and its evidence live at `fitness/testdata/calibration/` (committed, re-derivable) rather than `.rpiv/artifacts/fitness/`. 3. **`cmd/fitness` is new** — mirrors the `cmd/readiness` precedent (R-24's runnable path). Territory note: `cmd/` is outside the stated `fitness/*` allowance, added for symmetry with the sibling routine's sanctioned runnable. 4. **The worker brief expected api-sendrast to read WORSE on the friction lines.** The measurement disagrees: api reads BETTER on the primary key (p90 7 vs 8) and on spread-max (14 vs 64), matching the design brief's independently established order. Both the naive directory-depth proxy and the territory measure are printed, and the calibration line escalates rather than re-tunes if the primary key ever disagrees. 5. **`R-27` count assumption.** The registry's total assertion is derived, not hardcoded (22 corpus + registered siblings), so this entry does not touch it. ## Verification * `go test -race ./...` green in `lab-director/dispatcher` (all 31 packages). * `go vet ./...` clean. * `go test` opens no socket; the live run's only network use is the one bounded `/actions/tasks` read per target, recorded to disk and replayed offline. * The live run exited **0** with calibration agreed and `never-a-gate self-test: 3/3 refused`. ## Not in this PR * T2 rehearsal dispatch (needs the routine executor) — LD4.11b; the switch and its budget are already config-keyed and OFF. * Ready-made `territory-map` sections for the Sendrast repos (so every prediction is `derived` today — itself the first care-dial finding). * No merge from this session.
New lab-director/dispatcher/fitness/: the deterministic, zero-LLM R-27
maintainability-fitness census (LD4.11) plus its reviewed data file.

- types/loader: window rules (weekly, activity floor), config-keyed T2
  rehearsal budget (dispatch OFF, worker tier, report-only), neverAGate
  citation, generated-file exclusions, probe catalogue; a strict loader
  refusing unknown/contradictory fields with a line number
- churn: one --numstat/--name-status git walk, spread median/p90/max,
  churn share, birth/revert rates, excluded share printed
- gitstate: shallow clones refused by default (the measured
  sendrast-web falsification); --allow-shallow downgrades to
  truncated-window and un-ranks
- coupling: declared territory-map section (pinned digest) -> co-change
  communities -> unpredicted; never directory depth, never primary
- flakiness: job re-run flips from /actions/tasks (per-test is not
  reachable at Forgejo 14.0.3), bounded paged live adapter, recorded
  dumps for offline re-derivation
- probe: ld.fitness.probe/v1 wire shape on the existing marker grammar,
  prediction precedence declared->derived->unpredicted, measurement
  refused without an evidence address, emission through
  director.PlaneSink; unmeasured label honest until the executor lands
- gate: AttemptGate/ReasonFitnessIsCareDial — the only promotion path,
  and it always refuses; ledgered 3/3 self-test line
- census/digest: ranking by the declared primary key, calibration pair
  vs the independent hygiene order (escalation, never a re-tune),
  change-friction slope with insufficient-series honesty, observer cost

Co-authored-by: pi fleet <fleet@aaron.reynoza.org>
- churn arithmetic over a hand-computed recorded dump
- glob matcher + the loader's refusal of a match-everything exclusion
- loader refusals: unknown field, non-weekly period, gate authority,
  unbudgeted live rehearsal, catalogue duplicate, credential value
- shallow detection on a real --depth 1 clone; refusal + downgrade
- coupling: declared map, co-change communities, unpredicted, exclusions
- flake grouping (same-sha flips), insufficient-history floors, the live
  adapter's page discipline (HOMELAB-1736) and its loud budget stop
- probe wire shape, marker grammar, prose-only-evidence refusal, AC drift
  delta, emission through director.PlaneSink
- never-a-gate: 9/9 (surface x metric) refusals, 3/3 ledgered self-test,
  digest gate-vocabulary assertion
- census end-to-end determinism (byte identity), shallow refusal, activity
  floor, recorded-recording ordering test
- cmd/fitness: the runnable in-process path (mirrors cmd/readiness)

Co-authored-by: pi fleet <fleet@aaron.reynoza.org>
The first live recording exposed a real bug: `--numstat` and
`--name-status` are both output-format flags and the LAST wins, so the
walk carried statuses and ZERO changed lines. The walk is now two bounded
git invocations merged by (sha, path), with a regression test
(TestParseGitLogRecordingMergesTheTwoWalks) and a two-section recording
format.

Also: the naive top-level-directory coupling proxy is now REPORTED beside
the territory measurement (never ranked) so any inversion is visible; the
loader refuses a `test` flake level (per-test is unreachable at Forgejo
14.0.3); derived coupling ranks whenever one stable community exists.

First weekly run (window 2026-W40, exit 0) — committed evidence under
fitness/testdata/calibration/:
- api-sendrast  @ 9cc2ee366c4e: 100 commits, spread 2/7/14, changed lines
  28811, generated-file excluded share 0.4716, coupling 0.54 (derived)
- sendrast-web @ bee874cee4cf: 100 commits, spread 2/8/64, coupling 0.55,
  flakes 1.0/100 (2 same-sha flip groups)
- calibration AGREES on the declared primary key (api 7 < web 8)
- slope: insufficient-series (window one, sample printed, no fake slope)
- never-a-gate self-test: 3/3 refused

sendrast-web's clone was shallow (341 commits) and was unshallowed once
to 509 commits; the run records both the fix and the refusal default.

Co-authored-by: pi fleet <fleet@aaron.reynoza.org>
HOMELAB-1731: feat(routines): register R-27 weekly/ACTIVE/script + the never-a-gate policy line
All checks were successful
CI Review / receiver-test (pull_request) Successful in 5s
CI Review / helm-validate (pull_request) Successful in 7s
CI Review / alert-receiver-test (pull_request) Successful in 20s
CI Review / dispatcher-test (pull_request) Successful in 2m41s
0/0 projects policies checked successfully.
aa6d73f1f7
Registry (R-27 entry ONLY):
- weekly per the operator ruling of 2026-09-28 (contract Amendment 3),
  ACTIVE because the mechanism (fitness/*.go) ships in this build,
  kind: script (adjudicated 2026-10-03), pin on fitness/census.go (a NEW
  file, so no sha256-pinned sibling is touched)
- catchUpPolicy false (churn backfills, the CI-flake feed does not — a
  mixed series is worse than a gap); targets: the two ranked Sendrast
  repos; reviewBy 2026-12-31 (the calibration checkpoint)
- emitsWork false for window one, with the reason: probe tickets land in
  the `Backlog` state with the `fitness-probe` label and are never
  worked, so nothing they emit can re-trigger another routine yet
- reserved-ids header comment swept (R-23/R-26 remain), R-29's
  "why not R-27" note updated, active list now names R-27
- P-ROUT-013 added to policy.go AND policy.md (the parsed-back test holds
  the pair): a change-friction number is a care-dial input and is never
  rendered as a gate

Fixture + tests:
- testdata/registry-4x-shapes.yaml: R-27 quarterly/agent -> weekly/script
  with the ruling named in the comment
- TestSchemaAccommodatesHosted468Shapes now asserts the SHAPE property
  (coarse period + emitsWork + one edge), not the falsified quarterly
  value
- TestR27CadenceFollowsTheOperatorRuling (fixture AND registry: week, 7d
  period, 7d cron), TestR27CadenceAgreesBetweenFixtureAndRegistry,
  TestRegistryHoldsR27AsACareDialScript (pin, care-dial, reviewBy,
  targets), TestRegistryRefusesR27WithGateAuthority
- fitness: TestPolicyLineReferenceMatchesTheBook cross-checks the
  restated P-ROUT-013 id against the book

Co-authored-by: pi fleet <fleet@aaron.reynoza.org>
Author
Owner

Landing review — HOMELAB-1731 (LD4.11) · verdict: APPROVE, no blocker findings

Reviewed at head aa6d73f1f7000fb0f27d2e5ba945c6a9cc5e8659 against the ticket's four Verify lines, design design-LD4.11-fitness.md, and the 2026-10-03 adjudication. Primary sources only (diff, recordings, live re-derivation); I am a fresh context, not the implementer's session.

CI (verified, not taken on trust)

Run #1805 on aa6d73f1f7 — all four jobs success: dispatcher-test 2m41s, alert-receiver-test, receiver-test, helm-validate. Local re-run: go test -race -count=1 ./fitness/... ./routines/... green (4.9s / 3.2s), full go test -race ./... in lab-director/dispatcher EXIT=0, go vet ./fitness/... clean. No cached-pass masking on the two packages that matter. Registry pin re-derived by hand: sha256(fitness/census.go) = 252ef687…de1191, exactly the scriptRef.rev.

Calibration adjudication (the main call)

The pair orders the way the census says it should. The fitness metric's own definitions declare spread_p90 the primary key (higher = worse), and design §6.1's independently established order is api-sendrast < sendrast-web. Measured: 7 < 8, agreeing on both declared axes (spread_max 14 vs 64). I re-derived both from the committed recordings without using the artifact — parsed the \x1e-framed git log walks independently: api p90 7 / max 16, web p90 8 / max 64 over the last 100 non-merge commits. Same order, same discriminators. No primary-key disagreement → no escalation triggered (the escalation path itself is implemented and tested).

The readiness-based framing ("api worse") is the wrong yardstick for this Verify line, and the design anticipated exactly why. Readiness (R-24) scores static hygiene — workflows, gates, test inventory — which is a different lens from change-friction. The only readiness-flavoured axis that ranks api worse is the directory-depth / co-change-boundary proxy, which the design measured inverting hygiene on an earlier window (api 40/100 vs web 30/100) and therefore retired from the ranking: top-level directories are a poor territory boundary for a Go service whose change legitimately spans api/internal/db. This window's own top-level-dir column reads 0.29 vs 0.28 — the inversion is still visible, in its own clearly-labelled, never-ranked column. Metric-dependent ordering is therefore confirmed as predicted: coupling inverts hygiene, spread agrees with it, and readiness is a separate instrument, not a competing verdict. Verify line 3 passes on its own declared yardstick.

The other three lines

  • Line 1 (probe → digest) — PlanProbes authors the prediction mechanically, precedence declared (territory-map section + pinned digest, Validate enforces the digest) → derived (co-change communities) → unpredicted (a value with a reason, never an absence). CalibrationLine renders kind + source, predicted vs actual, unexpected, AC drift as a named delta, and an evidence address per row; a probe with no measurement renders unmeasured, never 0. Emission goes through the existing director.PlaneSink into Backlog + fitness-probe; marker round-trip and prose-only-evidence refusal are both tested. R-13 is paused, so the line is produced mechanically and rendered once into the real digest — present in testdata/calibration/digest-2026-W40.md, as the adjudication allowed.
  • Line 2 (never a gate) — mechanically demonstrated, all five legs: AttemptGate has no success path (value-in-return forces the caller to see the refusal); 9 (surface × metric) pairs refused; ledgered line never-a-gate self-test: 3/3 refused is carried by artifact + digest; TestFitnessDigestRendersNoGateVocabulary asserts against the real DigestMarkdown output; loader's neverAGate + registry FaultUnratifiedGate make "a config edit cannot promote R-27" a code fact; P-ROUT-013 present in policy.go and policy.md, cross-checked by fitness.TestPolicyLineReferenceMatchesTheBook.
  • Line 4 (first weekly run) — every number resolves to git:…@rev / api:… / artifact:…; slope is honestly insufficient-series with the series and sample sizes printed rather than a sign from one point; byte-identical determinism tested.

R-27 registration / shallow refusal / territory

Weekly, ACTIVE, kind: script, authority: care-dial, gated: false, reviewBy: 2026-12-31; fixture quarter→week rewrite pinned by TestR27CadenceFollowsTheOperatorRuling with the ruling named. emitsWork: false with the tested, deliberate fixture divergence (TestR27CadenceAgreesBetweenFixtureAndRegistry) is the stated window-one policy — probes land in non-dispatchable Backlog. Shallow clone is refused by default (FidelityRefused, un-rankable) with --allow-shallow downgrading to truncated-window; this is the measured falsification, not a hypothetical. Territory is clean: fitness/*, cmd/fitness, and routines/{registry.yaml,registry_test.go,testdata/registry-4x-shapes.yaml,policy.go,policy.md,README.md} only. Branch is an ancestor-complete descendant of epic/LD4 (7366125), mergeable.

Non-blocking concerns (for the architect, not fix-requests)

  1. The p90 margin is one file/commit. The agreement is robust on spread_max (14 vs 64); on spread_p90 it is a single commit at the 90th percentile of a 100-commit window. Both columns are printed, so the reader can see this, but p90 is a coarse instrument at this sample size — worth saying out loud at the calibration checkpoint rather than letting "7 vs 8" harden into a precise-looking verdict.
  2. derived predictions are broad by construction in window one: they carry the union of the window's observed files (168/192), so a measurement's unexpected list would be near-vacuous until a territory-map section exists. This is stated in the plan warnings and is the design's own first care-dial finding, but the derived row should be read as "no prediction in substance".
  3. Claim precision: "go test opens no socket" is loose — flakiness_test.go uses httptest loopback servers to cover the adapter's paging/budget behaviour. That matches the sibling precedent (routines/readiness_forgejo_test.go:24: "httptest is the one socket this package's tests may open"), and no test reaches an external service, so this is a wording nit, not a defect.

Merging. No ticket state change from this session.

## Landing review — HOMELAB-1731 (LD4.11) · verdict: APPROVE, no blocker findings Reviewed at head `aa6d73f1f7000fb0f27d2e5ba945c6a9cc5e8659` against the ticket's four Verify lines, design `design-LD4.11-fitness.md`, and the 2026-10-03 adjudication. Primary sources only (diff, recordings, live re-derivation); I am a fresh context, not the implementer's session. ### CI (verified, not taken on trust) Run #1805 on `aa6d73f1f7` — all four jobs success: `dispatcher-test` 2m41s, `alert-receiver-test`, `receiver-test`, `helm-validate`. Local re-run: `go test -race -count=1 ./fitness/... ./routines/...` green (4.9s / 3.2s), full `go test -race ./...` in `lab-director/dispatcher` EXIT=0, `go vet ./fitness/...` clean. No cached-pass masking on the two packages that matter. Registry pin re-derived by hand: `sha256(fitness/census.go)` = `252ef687…de1191`, exactly the `scriptRef.rev`. ### Calibration adjudication (the main call) **The pair orders the way the census says it should.** The fitness metric's own definitions declare `spread_p90` the primary key (higher = worse), and design §6.1's independently established order is `api-sendrast < sendrast-web`. Measured: **7 < 8**, agreeing on both declared axes (`spread_max` 14 vs 64). I re-derived both from the committed recordings without using the artifact — parsed the `\x1e`-framed `git log` walks independently: api p90 7 / max 16, web p90 8 / max 64 over the last 100 non-merge commits. Same order, same discriminators. No primary-key disagreement → no escalation triggered (the escalation path itself is implemented and tested). **The readiness-based framing ("api worse") is the wrong yardstick for this Verify line**, and the design anticipated exactly why. Readiness (R-24) scores static hygiene — workflows, gates, test inventory — which is a different lens from change-friction. The only readiness-flavoured axis that ranks api worse is the directory-depth / co-change-boundary proxy, which the design *measured* inverting hygiene on an earlier window (api 40/100 vs web 30/100) and therefore **retired from the ranking**: top-level directories are a poor territory boundary for a Go service whose change legitimately spans `api`/`internal`/`db`. This window's own top-level-dir column reads 0.29 vs 0.28 — the inversion is still visible, in its own clearly-labelled, never-ranked column. Metric-dependent ordering is therefore *confirmed as predicted*: coupling inverts hygiene, spread agrees with it, and readiness is a separate instrument, not a competing verdict. Verify line 3 passes on its own declared yardstick. ### The other three lines * **Line 1 (probe → digest)** — `PlanProbes` authors the prediction mechanically, precedence `declared` (territory-map section + pinned digest, `Validate` enforces the digest) → `derived` (co-change communities) → `unpredicted` (a value with a reason, never an absence). `CalibrationLine` renders kind + source, predicted vs actual, unexpected, AC drift as a named delta, and an evidence address per row; a probe with no measurement renders `unmeasured`, never `0`. Emission goes through the existing `director.PlaneSink` into `Backlog` + `fitness-probe`; marker round-trip and prose-only-evidence refusal are both tested. R-13 is paused, so the line is produced mechanically and rendered once into the real digest — present in `testdata/calibration/digest-2026-W40.md`, as the adjudication allowed. * **Line 2 (never a gate)** — mechanically demonstrated, all five legs: `AttemptGate` has no success path (value-in-return forces the caller to see the refusal); 9 (surface × metric) pairs refused; ledgered line `never-a-gate self-test: 3/3 refused` is carried by artifact + digest; `TestFitnessDigestRendersNoGateVocabulary` asserts against the *real* `DigestMarkdown` output; loader's `neverAGate` + registry `FaultUnratifiedGate` make "a config edit cannot promote R-27" a code fact; P-ROUT-013 present in `policy.go` **and** `policy.md`, cross-checked by `fitness.TestPolicyLineReferenceMatchesTheBook`. * **Line 4 (first weekly run)** — every number resolves to `git:…@rev` / `api:…` / `artifact:…`; slope is honestly `insufficient-series` with the series and sample sizes printed rather than a sign from one point; byte-identical determinism tested. ### R-27 registration / shallow refusal / territory Weekly, ACTIVE, `kind: script`, `authority: care-dial`, `gated: false`, `reviewBy: 2026-12-31`; fixture quarter→week rewrite pinned by `TestR27CadenceFollowsTheOperatorRuling` with the ruling named. `emitsWork: false` with the tested, deliberate fixture divergence (`TestR27CadenceAgreesBetweenFixtureAndRegistry`) is the stated window-one policy — probes land in non-dispatchable `Backlog`. Shallow clone is refused by default (`FidelityRefused`, un-rankable) with `--allow-shallow` downgrading to `truncated-window`; this is the measured falsification, not a hypothetical. Territory is clean: `fitness/*`, `cmd/fitness`, and `routines/{registry.yaml,registry_test.go,testdata/registry-4x-shapes.yaml,policy.go,policy.md,README.md}` only. Branch is an ancestor-complete descendant of `epic/LD4` (`7366125`), mergeable. ### Non-blocking concerns (for the architect, not fix-requests) 1. **The p90 margin is one file/commit.** The agreement is robust on `spread_max` (14 vs 64); on `spread_p90` it is a single commit at the 90th percentile of a 100-commit window. Both columns are printed, so the reader can see this, but p90 is a coarse instrument at this sample size — worth saying out loud at the calibration checkpoint rather than letting "7 vs 8" harden into a precise-looking verdict. 2. **`derived` predictions are broad by construction in window one**: they carry the union of the window's observed files (168/192), so a measurement's `unexpected` list would be near-vacuous until a `territory-map` section exists. This is stated in the plan warnings and is the design's own first care-dial finding, but the derived row should be read as "no prediction in substance". 3. **Claim precision**: "go test opens no socket" is loose — `flakiness_test.go` uses `httptest` loopback servers to cover the adapter's paging/budget behaviour. That matches the sibling precedent (`routines/readiness_forgejo_test.go:24`: "`httptest` is the one socket this package's tests may open"), and no test reaches an external service, so this is a wording nit, not a defect. Merging. No ticket state change from this session.
Author
Owner

atlantis plan

atlantis plan
Author
Owner

Merge blocked by an external fault — not by this PR.

forgejo_merge_pr refused: "CI is still running on the head commit (state: pending) — non-green contexts: (pending)". The refusing context is an Atlantis commit status with an empty context ("Plan in progress...", creator atlantis), open on aa6d73f1f7 since 2026-10-03T04:58:20Z and never completing. All four CI legs are green (run #1805).

Evidence (read-only diagnosis):

  • Atlantis log: 598 Running autoplan... → Updating Gitea check status for 'atlantis/plan' to 'pending' at 04:58:20, then no successfully parsed atlantis.yaml, no working-dir creation — it hangs in the clone step. PRs #599 and #600 are stalled at the same point (05:01:46 / 05:06:18).
  • An atlantis plan re-trigger re-posted a fresh pending status (05:17:00) and hung again — so the event worker is alive; the clone/fetch path is wedged.
  • Predecessor symptom: PR #596's clone failed at 04:19:57Z with could not open '.../.git/objects/pack/tmp_pack_FOlsfu' for reading: No such file or directory. Before 04:19 autoplans completed normally (PR #597 at 04:01).
  • Pod atlantis-0 is Running/1-of-1, 231Mi/512Mi, last restart OOMKilled 16h ago; atlantis-data PVC (2Gi longhorn) at 71% — not full. No 598/ working dir was created; no git process alive at check time.

Because this PR touches no .tf files, the plan is a no-op — the status only needs Atlantis to finish. No ticket or PR change is needed to proceed once Atlantis is healthy; the review verdict above stands for this head sha. Recommended remediation (operator/orchestrator, not a landing worker): roll atlantis-0 / ArgoCD-sync the staleStatefulSet and check the atlantis-data Longhorn volume + cluster egress. This also unblocks #599 and #600.

Nothing was merged from this session; ticket state untouched.

**Merge blocked by an external fault — not by this PR.** `forgejo_merge_pr` refused: *"CI is still running on the head commit (state: pending) — non-green contexts: (pending)"*. The refusing context is an **Atlantis commit status with an empty context** (`"Plan in progress..."`, creator `atlantis`), open on `aa6d73f1f7` since **2026-10-03T04:58:20Z** and never completing. All four CI legs are green (run #1805). Evidence (read-only diagnosis): - Atlantis log: `598 Running autoplan...` → `Updating Gitea check status for 'atlantis/plan' to 'pending'` at 04:58:20, then **no `successfully parsed atlantis.yaml`, no working-dir creation** — it hangs in the clone step. PRs **#599 and #600 are stalled at the same point** (05:01:46 / 05:06:18). - An `atlantis plan` re-trigger re-posted a fresh pending status (05:17:00) and hung again — so the event worker is alive; the clone/fetch path is wedged. - Predecessor symptom: PR **#596**'s clone failed at 04:19:57Z with `could not open '.../.git/objects/pack/tmp_pack_FOlsfu' for reading: No such file or directory`. Before 04:19 autoplans completed normally (PR #597 at 04:01). - Pod `atlantis-0` is Running/1-of-1, 231Mi/512Mi, last restart OOMKilled 16h ago; `atlantis-data` PVC (2Gi longhorn) at 71% — not full. No `598/` working dir was created; no `git` process alive at check time. Because this PR touches no `.tf` files, the plan is a no-op — the status only needs Atlantis to finish. **No ticket or PR change is needed to proceed once Atlantis is healthy**; the review verdict above stands for this head sha. Recommended remediation (operator/orchestrator, not a landing worker): roll `atlantis-0` / ArgoCD-sync the staleStatefulSet and check the `atlantis-data` Longhorn volume + cluster egress. This also unblocks #599 and #600. Nothing was merged from this session; ticket state untouched.
aaron merged commit 43ae78e5e7 into epic/LD4 2026-10-03 05:20:35 +00:00
Collaborator

Plan Error

cannot run "plan": the default workspace at path . is currently locked for this pull request by "plan".
Wait until the previous command is complete and try again
**Plan Error** ``` cannot run "plan": the default workspace at path . is currently locked for this pull request by "plan". Wait until the previous command is complete and try again ```
Collaborator

Ran Plan for 0 projects:

Ran Plan for 0 projects:
Sign in to join this conversation.
No reviewers
No labels
operator-review
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Homelab/infra-core!598
No description provided.