README Source History Refs Reviews Compare Notes Search Review guide CI runs test: pin storage thresholds so int tests are disk-independent b1bca93abf3c11453e63411037c247f78a051382
will <will@bugabinga.net > · 14 Sep 2026
SSH signature · not checked
Browse files Compare with HEAD
The ops/main/runtime integration tests assumed >=20% free space on the
test filesystem (default warn threshold), asserting storageState 'ok'
and an ok->warn transition. On hosts with less free space they fail.
Pin thresholds to 0/0 for a deterministic 'ok' baseline, force warn via
meta patch, and cover the full ok/warn/stop state machine in the ops
test. Coverage ratchet raised to 90.8%.
Changed files (4) Diff layout Auto Unified Split
coverage-ratchet.json Modified +3 / −3 text lines
3 - "updatedAt" : "2026-09-12T05:03:56.343Z" ,4 - "note" : "ratchet only rises; update committed with the change that raised it" 3 + "updatedAt" : "2026-09-13T01:09:27.958Z" ,4 + "note" : "ratchet only rises; commit the raise with the change that caused it" src/agent/runtime.int.test.ts Modified +5 / −4 text lines
271 271 docsDist : webDist, docsDist : webDist,272 272 mediaMaxBytes : 1000 , mediaMaxBytes : 1000 ,275 277 workerUrl : join (import .meta .dirname, '../service/worker.ts' ), workerUrl : join (import .meta .dirname, '../service/worker.ts' ),287 289 await state.update ((d) => { await state.update ((d) => {288 290 d.storageNoticeState = 'ok' d.storageNoticeState = 'ok' 292 293 const dbFile = join (dir, 'will.db' ) const dbFile = join (dir, 'will.db' )293 294 const { DatabaseSync } = await import ('node:sqlite' ) const { DatabaseSync } = await import ('node:sqlite' )294 295 const db = new DatabaseSync (dbFile) const db = new DatabaseSync (dbFile)src/service/main.int.test.ts Modified +4 / −2 text lines
32 32 mediaMaxBytes : 1000 << 10 , mediaMaxBytes : 1000 << 10 ,35 37 workerUrl : join (here, 'worker.ts' ), workerUrl : join (here, 'worker.ts' ),37 39 const pubAddr = service.publicServer.address () const pubAddr = service.publicServer.address ()src/service/ops.int.test.ts Modified +8 / −0 text lines
233 233 test ('quick check reports ok and jobs are recorded' , async () => {test ('quick check reports ok and jobs are recorded' , async () => {234 234 const { ops } = await freshOps () const { ops } = await freshOps ()235 235 assert.equal (await ops.quickCheck (), 'ok' ) assert.equal (await ops.quickCheck (), 'ok' )
238 + ops.setStorageThresholds (0 , 0 )236 239 const status = await ops.status () const status = await ops.status ()237 240 assert.equal (status.schemaVersion, 1 ) assert.equal (status.schemaVersion, 1 )238 241 assert.ok (status.storage.freePct >= 0 ) assert.ok (status.storage.freePct >= 0 )239 242 assert.equal (status.storageState, 'ok' ) assert.equal (status.storageState, 'ok' )240 243 assert.ok (status.lastQuickCheck) assert.ok (status.lastQuickCheck)
245 + ops.setStorageThresholds (1000 , 0 )246 + assert.equal ((await ops.status ()).storageState, 'warn' )247 + ops.setStorageThresholds (1000 , 1000 )248 + assert.equal ((await ops.status ()).storageState, 'stop' )243 251 test ('vacuum runs without error' , async () => {test ('vacuum runs without error' , async () => {