ReviewOS

also looking at this

stacks/drone

test: retain execution lifetime failure observations

#62
Draft chris wants to merge codex/execution-lifetime-observations into main
10 files +174 -64

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

docs/adr/0031-full-host-filesystem-fixture.mdmodified+4-0
Changes to docs/adr/0031-full-host-filesystem-fixture.md
@@ -21,6 +21,10 @@ before the copy. Require exactly the selected number of retained image bytes,
2121including an existing empty image file and its SHA-256 in the zero-byte case. Leave
2222the filesystem full until the trial process has exited, including its attempts
2323to record failure. Never replace filesystem or SQLite methods with faults.
24The existing public inspector reports an empty image as `unavailable` because
25valid protected images must be nonempty. A nonempty partial image is `mismatch`.
26Neither status grants health or installation authority; the campaign separately
27reads the actual retained file to distinguish empty, partial and missing bytes.
2428
2529Inspect retained bytes and public status after removing only the owned filler.
2630Require the previous known-good image and accepted metadata/security floors to
tests/fixtures/updates/host-volume-full.tsmodified+2-1
Changes to tests/fixtures/updates/host-volume-full.ts
@@ -182,7 +182,8 @@ export async function qualifyHostFullVolume(directory: string, imageWriteBudgetB
182182 await writeFile(join(directory, 'failed-slots.json'), JSON.stringify(failed, null, 2))
183183 assert.deepEqual(failed.knownGood, good.knownGood); assert.deepEqual(failed.installed, good.installed)
184184 assert.equal(failed.trial!.phase, 'selected'); assert.equal(failed.trial!.health, null)
185 assert.equal(failed.trial!.integrity, 'mismatch'); assert.equal(failed.store.attempt!.phase, 'pending')
185 assert.equal(failed.trial!.integrity, imageWriteBudgetBytes === 0 ? 'unavailable' : 'mismatch')
186 assert.equal(failed.store.attempt!.phase, 'pending')
186187 assert.equal(failed.store.releaseFloor, 9)
187188 const version = (role: string) => failed.store.metadata.find(row => row.role === role)!.version
188189 assert.equal(version('root'), 2); assert.equal(version('targets'), 3)