Skip to content

Commit 7fb1bb7

Browse files
committed
fix(service-storage): the reap guard's kept-files line no longer mis-diagnoses a deviation (#4797)
The guard is handed a boolean, so it cannot tell WHICH condition closed the gate — and naming only "migration is not verified" became wrong the moment a second condition existed. A deployment whose `verified_at` is plainly set would be told its migration was never verified and sent hunting for a row that says otherwise. Both causes are now named, with the pointer to the two columns that distinguish them. They share one remedy, so the instruction stays unambiguous either way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015KREcaEs85dphzUUqdYfX6
1 parent d4c7229 commit 7fb1bb7

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

packages/services/service-storage/src/attachment-lifecycle.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,18 @@ export function createSysFileReapGuard(
306306
// Not a state this guard reaps — veto (fail toward retention).
307307
}
308308
if (keptGateClosed > 0) {
309+
// The guard is handed a boolean, so it cannot name WHICH of the two
310+
// closed the gate — and naming only the first was wrong once #4797
311+
// added the second: a deployment whose `verified_at` is plainly set
312+
// would be told its migration "is not verified" and sent hunting. Both
313+
// causes are stated, and they share one remedy, so the instruction is
314+
// unambiguous either way. `sys_migration` has the answer.
309315
logger.info(
310316
`[storage] reap guard: kept ${keptGateClosed} released field file(s) — this deployment's ` +
311-
`file-as-reference migration is not verified (run \`os migrate files-to-references --apply\`)`,
317+
`file-as-reference migration is not verified, or a deviation has been observed since it ` +
318+
`was (a value an OS_ALLOW_LAX_* escape hatch admitted against the migration's own ` +
319+
`contract). Either way: fix the data, then run \`os migrate files-to-references --apply\`. ` +
320+
`See sys_migration.verified_at / deviation_observed_at (ADR-0104 / #4797)`,
312321
);
313322
}
314323
return confirmed;

0 commit comments

Comments
 (0)