Repository navigation
fix(agents): preserve configured workspaces after setup migration - #125435
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 6:42 PM ET / 22:42 UTC. ClawSweeper reviewWhat this changesThe PR lets a SQLite-migrated workspace with a customized onboarding profile survive setup rather than being treated as vanished. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: current main still has the narrow survival predicate, while this patch aligns it with the established configured-profile check and adds focused coverage. No blocking correctness findings. Likely related people: @steipete (high confidence; authored the SQLite migration and recent adjacent Doctor work). Priority: P1 Review scores
Verification
How this fits togetherAgent workspace setup combines SQLite migration state with files in the workspace to decide whether bootstrap may proceed safely. This decision runs before agent initialization and either preserves the configured workspace or emits a workspace-vanished error. flowchart LR
A[Doctor migration] --> B[SQLite setup state]
C[Workspace profile files] --> D[Survival evidence check]
B --> D
D --> E{Configured workspace?}
E -->|yes| F[Bootstrap and agent run]
E -->|no| G[Workspace vanished error]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +15. Total +15 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the one configured-profile predicate for both attested and setup-only SQLite state, while retaining generated-only workspace rejection, then merge with exact-head upgrade evidence. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: on current main, migrated setup state plus a customized IDENTITY.md and no BOOTSTRAP.md reaches the narrow user-content check and is rejected; the proposed predicate recognizes that profile. Is this the best way to solve the issue? Yes. Reusing the established configured-profile predicate is the narrow owner-level fix and avoids adding a one-off IDENTITY.md exception. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 27cb5d021fd1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Completed both ClawSweeper rank-up moves on exact head
Fresh Codex autoreview is clean at 0.99 confidence; focused workspace SQLite safety is 8/8; production LOC remains +1/-1 (net 0), tests +15/-0. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users upgrading from the latest stable release could complete Doctor's JSON-to-SQLite setup-state migration, then have a customized workspace rejected as vanished before the first provider turn when only an onboarding profile file such as
IDENTITY.mdproved that the workspace was configured.Why This Change Was Made
The setup-only survival check now uses the existing configured-profile predicate. That predicate is a strict superset of the former user-content evidence: it keeps memory, skills, and other existing signals while also recognizing customized
IDENTITY.md,USER.md, and related onboarding profiles. Empty or generated-only workspaces remain protected by the existing disappearance checks.Root cause was introduced by #109147: setup state moved into SQLite, but its no-attestation survival path retained the narrower evidence helper. Doctor then removed the retired JSON state marker after migration, exposing the mismatch.
Production LOC: +1/-1 (net 0). Tests: +15/-0.
User Impact
Configured workspaces survive stable-to-current upgrades and can reach the provider normally after Doctor migrates setup state into SQLite. The fix does not weaken wiped-workspace detection or recreate bootstrap files.
Evidence
WorkspaceVanishedError; fixed head passes through bootstrap-enabledensureAgentWorkspace()while preserving customizedIDENTITY.md.git diff --checkpassed.[email protected]to packed[email protected]with 4,800 sessions, 23,890 transcript events, 2,200 cron jobs, installed plugins, nested Discord config, and repaired legacy Telegram runtime dependencies. Doctor completed in 22s, idempotence Doctor in 21s, gateway startup in 14s; all 32 phases passed.openai/gpt-5.5turn returned the exact expected marker after migration. Artifact scan found zero inherited-key bytes and zero channel-request markers; the onlysk-*lexical matches were static Emacs Lisp syntax strings in bundled highlighting code.3c8a807f55352b565a0112732128fa787cf6e36ade2f7200c5e5a92c7ffdb675.