-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
startup migrations: gate refuses ready on a legacy plugin-state sidecar whose rows are all already in shared state; error names a non-sidecar key #109832
Copy link
Copy link
Closed
Labels
P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.A non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.A non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
Upgrading 2026.6.11 → 2026.7.1: 6.11 had long since imported our legacy plugin-state sidecar (
plugin-state/state.sqlite) into shared state, but never retired the file (no.migratedrename, unlike the telegram-dir sidecars). 7.1's migration gate sees "sidecar present AND target namespace non-empty", declares the migration unclean, and refuses to report ready. There is no clean upgrade path from that state, and every retry re-trips the gate.The sidecar was 100% redundant
The sidecar held 71 rows (67
telegram.message-cache, 3telegram.topic-name-cache, 1telegram.bot-info-cache; file last written weeks before the upgrade). Comparing against shared state (plugin_state_entries):Nothing held the file open. This is "import finished long ago, source never retired", not a real conflict.
The error message points at the wrong thing
The boot error cited a key of the form
…:<chat-id>:162as "already existed in shared state". That key is not in the sidecar at all; it was written to shared state moments earlier by the live 6.11 gateway (message-cache rows are written continuously per message). So the guard is tripping on "target namespace non-empty", and the message sent us diagnosing a data conflict that does not exist.Why the operator cannot get out cleanly
Expected
When every sidecar row is already present in shared state, identical or older, treat the migration as satisfied: retire the sidecar (rename
.migrated, matching the telegram-dir convention) and boot. If real conflicts exist, name the actual conflicting sidecar rows, not a key from the live namespace.