fix(state): PostgreSQL state created before Template bootstrap deferral is refused as schema drift (#197425) * fix(state): admit PostgreSQL schema-39 stores sealed before bootstrap_deferred openclaw/openclaw#196392 added workspace_setup_state.bootstrap_deferred to the eager schema-39 PostgreSQL DDL without a version step, so every store sealed before it is refused as drift, including update preflight (openclaw/openclaw#196966). Declare the column as a same-version PostgreSQL additive column. A writable admission verifies the exact predecessor DDL, adds the generated bigint column and reseals in one transaction. Inspection accepts either exact shape without writing. Any other difference is still refused. The workspace worker no longer adds an INTEGER column on PostgreSQL. Credit to etzelm, who diagnosed the same failure in openclaw/openclaw#197010 (https://github.com/openclaw/openclaw/pull/197010). That PR fixes it with a schema-40 step accepting both schema-39 shapes. This change keeps schema 39 instead. Stores it completes have the column-present shape that the schema-40 step accepts. Signed-off-by: Chris Eckert <christopher.k.eckert@gmail.com> * fix(state): complete retained PostgreSQL predecessor facts for writers An inspection admission retains a schema-39 predecessor's catalog as found. A writable admission that reused those shared facts skipped the bootstrap_deferred completion, so its first setup write failed with column "bootstrap_deferred" does not exist. A writer now completes the predecessor before using retained facts that lack a declared additive column. Read the additive column name through a type guard instead of an unchecked cast. Signed-off-by: Chris Eckert <christopher.k.eckert@gmail.com> * docs(state): separate PostgreSQL downgrade refusal from SQLite compatibility Older builds ignore bootstrap_deferred only on SQLite. On PostgreSQL a build that predates the column refuses a completed store as drift and needs the matching schema and anchor from before the upgrade. Signed-off-by: Chris Eckert <christopher.k.eckert@gmail.com> * test(state): rebuild workspace setup table for pre-v39 PostgreSQL fixtures --------- Signed-off-by: Chris Eckert <christopher.k.eckert@gmail.com> Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
fix(state): PostgreSQL state created before Template bootstrap deferr…
Find Your Interest
- When your AI agent publishes internal data
- Apple’s rumored glasses need a Siri AI I can actually rely on
- Apple's HomeView has an app problem
- WWDC26 Bingo
- Intelligence analysis platform for AI Agents (~OpenClaw)
- Android Dev Summit 2026
- Apple’s new health AI app is a study, not your doctor
- 4 Steps to Changing People's Perceptions
- This AI helps thieves steal your iPhone
- OpenAI connects the Dots





