Commit c598fbf
fix(governance): package policy — cite the canonical ruling, detect sealed containers (#534)
Fixes `check-package-policy.sh`, which encoded the **superseded**
packaging rule.
## Three defects
1. **Cited the wrong source.** It read *"POLICY (CLAUDE.md, Package
Management)"*. That section of CLAUDE.md is **stale** — it still calls
Nix a fallback, in **472 copies estate-wide** — and CLAUDE.md itself
defers to `spec/LANGUAGE-POLICY.adoc` as canonical. Now quotes the
actual ruling:
> RULED 2026-05-18 (estate-wide): **Guix primary + sealed-container
escape; NO Nix mirror.** … **Supersedes the prior "Nix fallback
everywhere" rule.**
2. **No sealed-container detection at all.** The policy names a sealed
container (Podman/Containerfile, Svalinn-sealed) as the escape hatch for
the not-in-Guix / non-free tail — but the script only looked for Guix
and Nix, so a repo doing exactly the right thing was told it had no
packaging. `Containerfile*` and `Dockerfile*` now satisfy it.
3. **Printed `✅ Nix package management detected (fallback)`.** Nix is
not a tier. Blessing a flake as compliant is precisely what let the
2026-07-21 sweep ship `flake.nix` to 59 repos that should have received
Guix or a container. Nix-only now warns, then fails — it never prints a
pass.
## ⚠ Draft — one thing to confirm: the retirement date
Set to **2026-06-01** per your decision. **That date is in the past**
(today is 2026-07-27), so Nix-only fails **immediately, with no grace
window** — unlike every other gate in this suite.
Measured over the local estate checkout:
| state | repos |
|---|---|
| **Nix-only → RED on merge** | **22** |
| guix only | 160 |
| both | 18 |
| neither (already covered by the 2026-08-21 cutoff) | 33 |
If `2027-06-01` was intended, it is one constant to change. Left as a
draft rather than guessing.
*(This also corrects my own earlier estimate — I had warned this would
"red hundreds of repos". Measured, it is 22.)*
## Sequencing warning is built into the failure message
Campaign #102 closed **COMPLETED** having hand-diffed 277 candidates and
removed exactly **one** flake; ~270 repos carry a `guix.scm` that is a
non-functional **scaffold stub**. For those, deleting the flake means
having *no* working packaging. The error output says so explicitly and
points at `spec/scaffold-stub-debt.adoc` step 3: make the Guix side real
**first**, then retire the mirror.
## Red-teamed — all nine branches measured
| case | exit | |
|---|---|---|
| `guix.scm` | 0 | ✅ primary |
| `Containerfile` | 0 | ✅ escape hatch |
| `Dockerfile` | 0 | ✅ escape hatch |
| nix-only, pre-retirement | 0 | warning + `NOT YET ENFORCED` |
| nix-only, post-retirement | **1** | `::error::` |
| no packaging, pre-cutoff | 0 | warning + `NOT YET ENFORCED` |
| no packaging, post-cutoff | **1** | `::error::` |
| guix + nix both | 0 | guix wins, no nix warning |
| malformed date | **1** | refuses to run |
`bash -n` clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 74f65c7 commit c598fbf
1 file changed
Lines changed: 80 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
14 | 37 | | |
15 | 38 | | |
16 | 39 | | |
| |||
37 | 60 | | |
38 | 61 | | |
39 | 62 | | |
| 63 | + | |
| 64 | + | |
40 | 65 | | |
41 | 66 | | |
42 | 67 | | |
| |||
91 | 116 | | |
92 | 117 | | |
93 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
94 | 124 | | |
95 | 125 | | |
96 | 126 | | |
97 | 127 | | |
98 | 128 | | |
99 | 129 | | |
100 | | - | |
101 | | - | |
102 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
103 | 134 | | |
104 | 135 | | |
105 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
106 | 175 | | |
107 | 176 | | |
108 | | - | |
109 | | - | |
| 177 | + | |
| 178 | + | |
110 | 179 | | |
111 | 180 | | |
112 | 181 | | |
113 | 182 | | |
114 | 183 | | |
115 | | - | |
| 184 | + | |
116 | 185 | | |
117 | | - | |
| 186 | + | |
| 187 | + | |
118 | 188 | | |
119 | | - | |
| 189 | + | |
120 | 190 | | |
121 | 191 | | |
122 | 192 | | |
0 commit comments