Skip to content

Commit 6acfe29

Browse files
committed
fix(cli): call the audit seal lock's warn line through the logger, so check:logger-receiver-detach stays green
The three os migrate audit rewrites handed logger.warn on bare in the options bag of underAuditSealLock, which check:logger-receiver-detach reds (a receiver-sensitive logger would throw on that channel). Each now passes a callback that calls logger.warn(line); the contract test's pin on the hold's options bag follows. Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
1 parent 748f0d9 commit 6acfe29

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎packages/cli/src/commands/migrate/audit-key-material.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export default class MigrateAuditKeyMaterial extends Command {
234234
// lock, a run on a sealed object needs --sealer-stopped (seat ruling 6885005594, E + B).
235235
const { result: { report, archive }, lostLock } = await underAuditSealLock(
236236
engine,
237-
{ apply, sealerStopped: flags['sealer-stopped'], objects: KEY_MATERIAL_COPY_TABLES, warn: logger.warn },
237+
{ apply, sealerStopped: flags['sealer-stopped'], objects: KEY_MATERIAL_COPY_TABLES, warn: (line) => logger.warn(line) },
238238
async () => {
239239
const report = await migrateKeyMaterialCopies(readView, logger, { apply, seal });
240240
// Each copy table's declared archive target, then the same rewrite

‎packages/cli/src/commands/migrate/audit-mail-bodies.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export default class MigrateAuditMailBodies extends Command {
242242
// lock, a run on a sealed object needs --sealer-stopped (seat ruling 6885005594, E + B).
243243
const { result: { report, archive }, lostLock } = await underAuditSealLock(
244244
engine,
245-
{ apply, sealerStopped: flags['sealer-stopped'], objects: MAIL_LOG_BODY_COPY_OBJECTS, warn: logger.warn },
245+
{ apply, sealerStopped: flags['sealer-stopped'], objects: MAIL_LOG_BODY_COPY_OBJECTS, warn: (line) => logger.warn(line) },
246246
async () => {
247247
const report = await migrateMailLogBodyCopies(readView, logger, { apply, seal });
248248
// [#24899] Each copy table's declared archive target, then the same

‎packages/cli/src/commands/migrate/audit-metadata-bodies.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export default class MigrateAuditMetadataBodies extends Command {
215215
// lock, a run on a sealed object needs --sealer-stopped (seat ruling 6885005594, E + B).
216216
const { result: report, lostLock } = await underAuditSealLock(
217217
engine,
218-
{ apply, sealerStopped: flags['sealer-stopped'], objects: STORED_METADATA_BODY_REWRITTEN_OBJECTS, warn: logger.warn },
218+
{ apply, sealerStopped: flags['sealer-stopped'], objects: STORED_METADATA_BODY_REWRITTEN_OBJECTS, warn: (line) => logger.warn(line) },
219219
() => migrateStoredMetadataBodyCopies(readView, logger, { apply, seal }),
220220
);
221221

‎packages/cli/src/commands/migrate/audit-redaction-seal.contract.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ describe('os migrate audit-* amend a sealed row first (ADR-0154 D7)', () => {
8484
const holds = calls(source, 'underAuditSealLock');
8585
expect(holds).toHaveLength(1);
8686
const [hold] = holds;
87-
expect(hold).toMatch(/\{ apply, sealerStopped: flags\['sealer-stopped'\], objects: (\w+), warn: logger\.warn \}/);
87+
// The warn channel is called through its receiver (`check:logger-receiver-detach`), never handed on bare.
88+
expect(hold).toMatch(/\{ apply, sealerStopped: flags\['sealer-stopped'\], objects: (\w+), warn: \(line\) => logger\.warn\(line\) \}/);
8889
expect(/objects: (\w+)/.exec(hold)?.[1]).toBe(REWRITTEN[file]);
8990
for (const run of runs) expect(calls(hold, run), run).toHaveLength(1);
9091
});

0 commit comments

Comments
 (0)