diff --git a/DECISIONS-LOG.md b/DECISIONS-LOG.md index 195c1dd..19f0c74 100644 --- a/DECISIONS-LOG.md +++ b/DECISIONS-LOG.md @@ -4964,3 +4964,78 @@ account rubber-stamping the human. That is ceremony, not review. Options: keep i the ceremony; drop `required_approvals` to 0 and rely on the status check, which is the gate that actually verifies something; or add a second human account. **This is a decision for the operator, not a default to be chosen silently.** + +## 2026-09-29 (end of session) — **PM HANDOFF.** Six PRs open; read this before touching anything. + +The session that began "set a SOPS secret" ended having rebuilt the delivery pipeline. Plex is +claimed and scanning. `main` is genuinely protected and the gate genuinely enforces. What is +open is listed below with the reason each is not merged. + +### MERGE THESE — all gated green, none merged + +| PR | What | Risk | +|---|---|---| +| #11 | `ci/gitea-settings.sh` — detects Gitea branch-protection/runner drift | low; skips until its token exists | +| #12 | `CLUSTER_AVAILABLE=true` would have FAKED A GREEN over 54 skipped tests — now blocks | low; makes a wrong state loud | +| #13 | Admission boundary constraining the conformance CI trigger (R-SEC-02) + a fail-open fix in `ci/l0.sh` | medium; touches Kyverno + adds a Flux Kustomization | + +Order does not matter for correctness; if a later one conflicts, rebase and the gate re-runs +(~1m35s in CI, 76s local). **Each was gated in the pinned toolbox, not on a host.** + +### AFTER MERGING #11 — one command, then one edit + +`ci/gitea-settings.sh` SKIPS until its token exists, and **a skipped detector detects nothing**: + + ./infra/gitea/set-ci-token.sh # mints + stores GITEA_SETTINGS_TOKEN, never prints it + +Then open any PR and confirm the gate prints `gitea-settings: green`. ONLY THEN uncomment +`REQUIRE_GITEA_SETTINGS: "true"` in `.gitea/workflows/gate.yml`, so a future missing token blocks +instead of skipping. Doing that before seeing it green locks the repo. + +### A DIFFERENT COMPUTER NEEDS THREE THINGS THAT ARE NOT IN GIT + +This is the part that will silently waste an hour otherwise. None of these are in the repo, by +design, and without them the toolbox and the cluster are unreachable: + +1. **`~/.config/sops/age/keys.txt`** — the age PRIVATE key. Without it NO `*.sops.yaml` can be + read or edited, and `sops` will fail in a way that looks like a broken file. Copy it from this + workstation; the public recipient in `.sops.yaml` is only half the pair. +2. **`infra/ansible/.cache/prod.kubeconfig`** — untracked, so it exists only in the main checkout + on this machine. Without it `dev.sh` refuses to start. In a git WORKTREE it is absent even + here: use `DEV_KUBECONFIG=/dev/null` for anything that needs no cluster (see `CLAUDE.md` §3). +3. **A Gitea credential** for `gitea.home.keithjackson.dev` (this session used the stored + `~/.git-credentials`). `git push` and every `infra/gitea/*.sh` script needs it. + +### STATE, MEASURED — do not re-derive it from this log, re-measure it + +`CLAUDE.md` §2b exists because this log was confidently wrong for a month. Verify before relying: + + protected:true user_can_push:false enable_status_check:true + status_check_contexts:["gate / gate (pull_request)"] required_approvals:1 + block_admin_merge_override:true runner incluster-dind: online gate ~1m35s + +### NEXT WORK, in priority order + +1. **Finish the L2/L3 wiring** now that the credential model is decided and #13 lands the + boundary. Still missing (`docs/plans/l2-l3-conformance-ci-wiring.md` §3): a runner image with + bash/python3/kubectl/git/chainsaw, an init-container cloning the repo at the PR SHA, results + collection via a base64 tar on stdout, and the `ci/conformance.sh` rewrite to drive the Job. + **Tighten the admission policy's image pattern to the literal digest when that image exists.** +2. **Do NOT set `vars.CLUSTER_AVAILABLE=true`** until step 1 is done. It does not enable L2/L3; it + only changes which way the stage fails (see #12). +3. The `gitea-settings` detector covers branch protection + runners. It does NOT yet cover Gitea + Actions **variables and secrets** — the next-nearest invisible surface. +4. `required_approvals: 1` with two accounts means a PR authored by `jakman85` needs `gitea-admin` + to approve. The operator holds ultimate authority and does not require that review; revisit if + it becomes friction. + +### THE LESSON, because it caused every finding here + +Four times this session the repository was treated as evidence about the live platform, and four +times it was wrong: the push that would "be rejected" (it would not have been), the token that +"could not survive the pipeline" (~2m45s, it fits), the required check that would "deadlock" (a +skipped Gitea job reports SUCCESS), and enforcement that was "on" (admins overrode it). Two +fail-opens in the gate itself were found the same way — `kyverno test` certifying policies that do +not load, and `CLUSTER_AVAILABLE` certifying 54 skipped tests as passed. + +**Measure, then assert. `CLAUDE.md` §2b is the rule; this entry is the evidence for it.**