fix: repair watchdog dispatch receipt writer output
This commit is contained in:
@@ -48,9 +48,7 @@ function printHelp() {
|
|||||||
'',
|
'',
|
||||||
'Minimal CLI skeleton for the subagent delivery watchdog.',
|
'Minimal CLI skeleton for the subagent delivery watchdog.',
|
||||||
];
|
];
|
||||||
process.stdout.write(`${lines.join('
|
process.stdout.write(`${lines.join('\n')}\n`);
|
||||||
')}
|
|
||||||
`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function tryReadInput(inputPath) {
|
function tryReadInput(inputPath) {
|
||||||
@@ -116,8 +114,7 @@ function writeDispatchReceiptState(payload) {
|
|||||||
expectedBy,
|
expectedBy,
|
||||||
};
|
};
|
||||||
|
|
||||||
fs.writeFileSync(statePath, `${JSON.stringify(dispatchRecord, null, 2)}
|
fs.writeFileSync(statePath, `${JSON.stringify(dispatchRecord, null, 2)}\n`, 'utf8');
|
||||||
`, 'utf8');
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statePath,
|
statePath,
|
||||||
@@ -160,8 +157,7 @@ function main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const spacing = args.compact ? 0 : 2;
|
const spacing = args.compact ? 0 : 2;
|
||||||
process.stdout.write(`${JSON.stringify(response, null, spacing)}
|
process.stdout.write(`${JSON.stringify(response, null, spacing)}\n`);
|
||||||
`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
|||||||
@@ -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"
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user