ReviewOS

also looking at this

stacks/drone

test: control purge history preparation clock

#55
Merged chris wants to merge codex/purge-history-setup-clock into main
37 files +1804 -168
app/Commands/UpdatesAbandon.tsadded+17-0
Changes to app/Commands/UpdatesAbandon.ts
@@ -0,0 +1,17 @@
1import { defineCommand } from '@stacksjs/cli'
2import { printAsync } from '../../resources/functions/cli/output'
3import { storeCommandFailure, storeCommandReference, storeReferenceFlags } from '../../resources/functions/drone/updates/command'
4import { abandonRuntimeFirmwareTrial } from '../../resources/functions/drone/updates/store'
5
6export default defineCommand({
7 name: 'updates:abandon <directory>',
8 description: 'Abandon an exact interrupted host trial after metadata recovery while retaining artifacts and known-good state',
9 options: { ...storeReferenceFlags, '--trial <id>': 'Exact interrupted host trial identity' },
10 async handle(options, directory) {
11 try {
12 if (typeof options.trial !== 'string') throw new Error('Explicit interrupted trial required')
13 await printAsync(JSON.stringify(await abandonRuntimeFirmwareTrial({ ...storeCommandReference(options, directory), trialId: options.trial })))
14 }
15 catch { await storeCommandFailure() }
16 },
17})