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 ccaaa42
Browse filesBrowse the repository at this point in the historyBrowse files
fix(infra): archive plugin-state sidecar when canonical rows are equal or newer (#109832) (#110083)
* [AI] fix(infra): archive plugin-state sidecar when canonical rows are strictly newer (#109832)
Conflict detection in migrateLegacyPluginStateSidecar compared rows for byte equality but treated every mismatch as a conflict. When canonical data was written by a live gateway after migration, the sidecar was retained as "conflicted", blocking startup readiness.
Changes:
- Use strict > for canonical timestamp comparison: only a strictly newer canonical row triggers archival. Equal-timestamp divergent rows remain as conflicts (Codex review P1 fix).
- Update error message: "have different values; sidecar data is newer" instead of misleading "already existed in shared state"
- 17 plugin-state migration tests covering all timestamp scenarios
Related to #109832
* fix(state): clarify plugin sidecar conflicts
---------
Co-authored-by: Josh Lehman <[email protected]>
"Left plugin-state sidecar in place because 1 row differs from shared state without a newer canonical timestamp. First key: discord/components/interaction:1",
"Left plugin-state sidecar in place because 1 row already existed in shared state: discord/components/interaction:1",
3405
+
"Left plugin-state sidecar in place because 1 row differs from shared state without a newer canonical timestamp. First key: discord/components/interaction:1",
@@ -142,7 +146,7 @@ export async function migrateLegacyPluginStateSidecar(params: {
142
146
return{
143
147
changes,
144
148
warnings: [
145
-
`Left plugin-state sidecar in place because ${conflictedKeys.length}${conflictedKeys.length===1 ? "row" : "rows"}already existed in shared state: ${conflictedKeys[0]}`,
149
+
`Left plugin-state sidecar in place because ${conflictedKeys.length}${conflictedKeys.length===1 ? "row differs" : "rows differ"}from shared state without a newer canonical timestamp. First key: ${conflictedKeys[0]}`,
0 commit comments