Skip to content

fix(server): prevent stale snapshots during worktree lease acquisition - #87

Draft
Mjones13 wants to merge 1 commit into
mainfrom
work/performance-lease-current-20261004
Draft

Mjones13 wants to merge 1 commit into
mainfrom
work/performance-lease-current-20261004

Conversation

@Mjones13

@Mjones13 Mjones13 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Worktree ownership acquisition can fail with SQLITE(517) when another connection commits while asynchronous path preparation holds a read snapshot. Prepare paths before the transaction and make conditional lease acquisition its first database access, selecting the authoritative creation event in the same write. Add a narrow covering index as fork migration 007, preserving migrations 005/006 and newer main event-publication safeguards.

This is the current-main counterpart of #61, based on ca7c110. The historical #61 source remains frozen for migration/restore qualification. It does not adopt the orchestration-v2 stack in #77; that separate port is blocked by the parent's incomplete native-creation persistence interface.

Validation at 7c86493: the unchanged deterministic regression reproduces SQLITE(517) before the production correction and passes after it. Seven deduplicated affected groups: 974 passed across 42 modules, two existing compiled-artifact tests skipped without T4_QUAL_DESCRIPTOR_PATH. Server typecheck, scoped lint (12 warnings, no errors), formatting and diff checks passed. Compiled/runtime and live database qualification remain separate; no deployment or live migration performed.

Draft review checkpoint. Owner explicitly prohibits merging.

Implemented by GPT-6.1 Sol, coordinated by GPT-6 Astra through Codex in T3 Code.

Hosted CI at 7c86493 is successful: Lint, Typecheck, Build, Test, Test Web, Test Server 1–6, Rust, Mobile Native Changes, Release Smoke and Check. Mobile Native Static Analysis and [code]smith are skipped. GitHub reports the branch mergeable; it remains an unmerged draft under the owner's no-merge instruction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant