Repository navigation
fix(fleet-queue-backup): exclude __turso_internal_* bookkeeping from D1 schema reads - #16252
Conversation
…D1 schema reads The D1 backup copy gains two one-row __turso_internal_seq_* tables after an import (observed live on fleet-queue-backup 2026-11-27). build_dump re-read them, so every restore drill refused the faithful copy as smeared (34 tables vs the 32-table export record, all shared counts identical). Skip them in read_schema like sqlite_% and _cf_*: they are not queue user data. The smear guard keeps full strength for any other table-set drift. Hermetic oracles in test_d1_plane.py pin both sides: the export never copies the tables, and the drill verifies a backup that gained them post-export. Ref #14943
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Lane 1122-D (delta PRESS landings, 2026-11-27) — shepherding to merge under standing authority. Claim-scan: PR comments = only CodeRabbit skipped (7224361108); review comments = 0; linked issue #14943 comments (13) read — latest is author lane oc-code-01's fix-proposed note 7224365516 for this PR, no live sibling landings claim. Verification on exact head ac20ba7 (stable across two reads, OPEN/non-draft/CLEAN/MERGEABLE):
|
CF-3 slice of #14943 (queue task 23735, lane oc-code-01).
Problem. Drills #1 and #2 both SAFE-REFUSED with an identical signature: the backup re-read enumerates 34 tables against the 32-table export record, all 32 shared counts exactly equal. The delta is two extra one-row bookkeeping tables (
__turso_internal_seq___turso_internal_autoincrement_github_issue_history/..._github_label_history) that appear infleet-queue-backupafter the import. Systematic across two separate fresh exports — not a race, not a concurrent-writer smear.Fix.
read_schema(infra/fleet-queue-backup/bin/fq_common.py) now skips__turso_internal_*the same way it already skipssqlite_%\' andcf*`: platform/internal bookkeeping, not queue user data. Export record and drill re-read therefore agree by construction; the smear guard keeps full strength for any other table-set drift. No production touch: no timer, unit, database, or live-plane change.Hermetic evidence (this PR).
tests/test_d1_plane.py: 6/6 pass, fulltests/test_*.pysuite 13/13 files green. New oracles pin both sides — the export never copies the tables, and the drill verifies a backup that gained them post-export. Red-green verified: both new tests fail on the pre-fixread_schema.Live proof still pending (not this PR). A post-merge scheduled export plus
restore_drill_d1.py --create-scratch --drop-scratchmust pass on the laptop; the CF-2 gate is unchanged — no retarget/activation of the D1 backup leg before verified live D1 cutover (#14942 still OPEN).Ref #14943
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-27T17:23:49Z", "session_id": "ses_e5de20b13aeffefV2BvxWAa6ON", "lane": null, "host": "amd", "worktree": "/home/user/git/code-cf3-drill-fix", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/git/code-cf3-drill-fix", "repo": "developing-today/code", "branch": "oc-code-01/14943-cf3-drill-internal-exclusion", "sha": "ac20ba7e9e2583fddc2e1c1f5b86017a9fb92d44" }, "auth_subject": "oc-code-06", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.