diff --git a/scripts/subagent_delivery_watchdog.mjs b/scripts/subagent_delivery_watchdog.mjs index 5818590..03f79ba 100755 --- a/scripts/subagent_delivery_watchdog.mjs +++ b/scripts/subagent_delivery_watchdog.mjs @@ -48,9 +48,7 @@ function printHelp() { '', 'Minimal CLI skeleton for the subagent delivery watchdog.', ]; - process.stdout.write(`${lines.join(' -')} -`); + process.stdout.write(`${lines.join('\n')}\n`); } function tryReadInput(inputPath) { @@ -116,8 +114,7 @@ function writeDispatchReceiptState(payload) { expectedBy, }; - fs.writeFileSync(statePath, `${JSON.stringify(dispatchRecord, null, 2)} -`, 'utf8'); + fs.writeFileSync(statePath, `${JSON.stringify(dispatchRecord, null, 2)}\n`, 'utf8'); return { statePath, @@ -160,8 +157,7 @@ function main() { }; const spacing = args.compact ? 0 : 2; - process.stdout.write(`${JSON.stringify(response, null, spacing)} -`); + process.stdout.write(`${JSON.stringify(response, null, spacing)}\n`); } main(); diff --git a/state/subagent-delivery-watchdog/fixture-run-active-before-sla.json b/state/subagent-delivery-watchdog/fixture-run-active-before-sla.json new file mode 100644 index 0000000..8dabb54 --- /dev/null +++ b/state/subagent-delivery-watchdog/fixture-run-active-before-sla.json @@ -0,0 +1,6 @@ +{ + "runId": "fixture-run-active-before-sla", + "childSessionKey": "session:active-before-sla", + "dispatchAt": "2026-04-24T10:00:00.000Z", + "expectedBy": "2026-04-24T10:10:00.000Z" +} diff --git a/state/subagent-delivery-watchdog/fixture-run-completed.json b/state/subagent-delivery-watchdog/fixture-run-completed.json new file mode 100644 index 0000000..3436859 --- /dev/null +++ b/state/subagent-delivery-watchdog/fixture-run-completed.json @@ -0,0 +1,6 @@ +{ + "runId": "fixture-run-completed", + "childSessionKey": "session:completed", + "dispatchAt": "2026-04-24T10:00:00.000Z", + "expectedBy": "2026-04-24T10:10:00.000Z" +} diff --git a/state/subagent-delivery-watchdog/fixture-run-suspect-delivery-failure.json b/state/subagent-delivery-watchdog/fixture-run-suspect-delivery-failure.json new file mode 100644 index 0000000..81fa4c7 --- /dev/null +++ b/state/subagent-delivery-watchdog/fixture-run-suspect-delivery-failure.json @@ -0,0 +1,6 @@ +{ + "runId": "fixture-run-suspect-delivery-failure", + "childSessionKey": "session:suspect-delivery-failure", + "dispatchAt": "2026-04-24T10:00:00.000Z", + "expectedBy": "2026-04-24T10:10:00.000Z" +}