Skip to content

Commit fe988c2

Browse files
committed
test(service-storage): date the earned flag in the past so a narrowed rewrite cannot read as unchanged
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016GiHYRmLSNWTfbX9gVQkpz
1 parent 80e5eda commit fe988c2

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎packages/services/service-storage/src/files-to-references-migration.test.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@ describe('runFilesToReferencesMigration (#3617)', () => {
187187
sys_file: [{ id: 'f1', ref_object: 'product', ref_id: 'p1', ref_field: 'image', status: 'committed' }],
188188
});
189189
await run(engine, { apply: true });
190+
// Dated in the past, so a rewrite by the narrowed run cannot land on the
191+
// same millisecond and read as "unchanged".
192+
const EARNED_AT = '2026-01-01T00:00:00.000Z';
193+
Object.assign(engine.tables.sys_migration[0], {
194+
last_run_at: EARNED_AT,
195+
verified_at: EARNED_AT,
196+
updated_at: EARNED_AT,
197+
});
190198
const earned = { ...engine.tables.sys_migration[0] };
191199
expect(await isDataMigrationVerified(engine, MIGRATION)).toBe(true);
192200

0 commit comments

Comments
 (0)