Repository navigation
Commit 09ee252
woclaw-cron
test(r512): the config file has no interpreter -- a misspelled key is silent
R512. The wire-version plane is already mined three times over (R425
"no protocol version on the envelope", R452 "the compat boundary is drawn by
position", R495 "the schema_version label is ACCEPTED but never INTERPRETED").
All three are about a version label on a MESSAGE. This round moves to the
version of the artifact an OPERATOR writes: the JSON config file, merged over
the env defaults at boot by a bare `{ ...base, ...fileConfig }` with no schema
check (R487.1 already noted this).
R487 covered the top-level TYPE error mode and found it LOUD -- authToken:
null crashes the boot banner. That is a good outcome. This suite covers the
other error mode, which R487's shape structurally cannot see:
wrong TYPE at top level -> LOUD (boot crash) [R487, shipped]
wrong KEY NAME anywhere -> SILENT (no-op) [this suite]
The asymmetry is the finding. A crash is a gift; a misspelled key produces a
boot that succeeds, a banner that looks normal, and a control that is off.
MEASURED (not grepped):
F1 encryption: { enable: true } (one `d` missing) loads cleanly. The
operator's intent is PRESENT in the config object and UNCONSUMED. A
controlled A/B on the production storage class (new ClawDB(config)),
three arms, each writing a canary and scanning both the db file and the
-wal sidecar:
enabled: true (correct) -> ENC:v1: on disk, canary NOT plaintext
enable: true (typo) -> canary IN PLAINTEXT on disk
no encryption block -> canary IN PLAINTEXT on disk
The typo arm is BYTE-IDENTICAL to "encryption was never configured".
The operator writes a passphrase, sees the hub boot, and gets plaintext
at rest. The typo is CAUSAL, proven by A/B.
F2 The encryption state is observable NOWHERE -- zero `encryption` tokens
in startup_banner.ts and zero in rest_server.ts. Even a CORRECT
encryption config is not echoed. The type carries the field; the fact is
knowable and simply not reported.
F3 The banner advertises the REQUESTED port, not the BOUND port. The
server knows the real one (boundPort / whenListening()) and the banner
never uses it: with port 0 the banner prints ws://127.0.0.1:0 while
the server bound 36783.
F4 A config naming a schema version the hub has never heard of
(schemaVersion: "9.9") is accepted silently -- there is no version to
compare against.
F5 The asymmetry, stated: a spread has no notion of a key it does not
recognise, so it cannot distinguish "absent" from "misspelled".
METHOD, and the three instrument failures this round paid for (R505's rule: a
detector must be MEASURED before its zero is evidence):
1. The first A/B never separated -- it never WROTE anything, so "no
ENC:v1:" was true in both arms for an unrelated reason. A zero from a
detector that never fired is not evidence of absence.
2. The second A/B wrote but read the wrong file -- SQLite runs in WAL mode,
so the fresh bytes live in woclaw.db-wal. The instrument was wrong, not
the product.
3. The matrix's M2 was INERT -- it allow-listed keys already present in
base, so its guard could never fire. Rebuilt as a real allow-list.
Plus two driver defects caught by the count==1 / assert-new!=old guards: M5's
needle never matched (reported NOT-INJECTED rather than corrupting the
file), and control-first caught a leaked mutation from a manual run -- the
matrix ABORTED instead of reporting a result from a dirty baseline.
MUTATION MATRIX (control first: 0 failed / 17 passed)
M1 loader rejects unknown keys (real-fix shape) KILLED (2)
M2 loader allow-lists top-level keys (rebuilt) KILLED (1)
M3 banner prints the bound port KILLED (1)
M4 banner reports encryption state KILLED (1)
M5 rest_server exposes encryption state KILLED (1)
M5b rest_server exposes a configVersion SURVIVED (scoped)
M6 Config type gains an unread configVersion SURVIVED (scoped)
M7 NEGATIVE CONTROL: unrelated banner line added SURVIVED (correct)
M5b/M6 are recorded as scoped survivors: the suite's subject is the encryption
state and the loader's key handling, and it says so in-source. M7 surviving is
the evidence that the KILLED verdicts mean something.
POLARITY: this is a defect-PRESENCE gate. It is green while the hub has the
defect and turns red when the defect is FIXED (loader rejects unknown keys ->
P1/P1b red; banner prints the bound port -> P4 red; encryption reported -> P5
red). Deliberate, and stated in the suite header so the next reader does not
have to rediscover it.
VERIFICATION
focused suite 17/17 PASS
tsc --noEmit rc = 0
full hub suite 188 files / 2057 tests -- 2052 passed, 5 failed; the 5
are the known UNTRACKED orphan suite
hub/test/r509_pagination_non_total_order.test.ts
(db.initialize is not a function), which is not in git
and therefore not in CI. It predates this round.
git diff --stat -- hub/src EMPTY (zero production change)
hub/src/*.ts md5 stable across the whole matrix (read back after every
restore)
watchdog heartbeat-watchdog.sh check woclaw -> PASS
FATHER-GATED -- three product decisions, not bug fixes: what a misspelled key
should do (fatal / warn / tolerate); whether a config should carry a version
and what an unknown version means; whether the encryption state should be
reported. The cheapest real fix is ONE line in the startup banner printing
config.encryption?.enabled -- it converts F2 from invisible to visible, and it
is the prerequisite for any typo being diagnosable at all.
Write-up: memory/2026-10-28-round512-config-file-has-no-interpreter.md1 parent aa5b059 commit 09ee252
1 file changed
Lines changed: 310 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 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 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 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 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
0 commit comments