You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 59588cd
Browse filesBrowse the repository at this point in the historyBrowse files
fix(plugin-state): preserve legacy created_at through a migration-only write path
Imported legacy rows previously went through the normal register path,
which stamps created_at with the import time. Because cap eviction
removes the smallest created_at first, older migrated rows became the
newest rows in the namespace, so the next live write could evict fresher
pre-existing entries before the legacy ones. Route imports (and mid-import
restores) through a migration-only write that keeps the legacy timestamp,
and add a regression test proving the next live write evicts the migrated
row instead of the fresher existing row.
Co-Authored-By: Claude Fable 5 <[email protected]>
@@ -361,15 +365,56 @@ export async function runLegacyMigrationPlans(
361
365
: `Deferring ${plan.label} migration because ${constraint} of ${missingEntryCount} missing entries; left legacy source in place to retry when capacity frees`,
362
366
);
363
367
}
368
+
// Eviction removes the smallest created_at first, so imported rows must
369
+
// keep their legacy creation time; writing them through the normal
370
+
// register path would stamp them "now" and let later live writes evict
371
+
// fresher pre-existing rows before the migrated ones.
0 commit comments