fix(sqlite): floor pins to v1.49.1, 5s busy policy, loud schema setup (T17 finding 2) #2620
Open
conductor
wants to merge 5 commits from
fix/sqlite-floor-audits into master
pull from: fix/sqlite-floor-audits
merge into: conductor:master
conductor:master
conductor:fix/shared-ci-unblock
conductor:fix/ci-concurrency-per-ref
conductor:fix/2552-handler-triage
conductor:feat/2618-context
conductor:fix/2604-scaffolding-surgical
conductor:feat/2618-provider-stack
conductor:feat/final-integration
conductor:feat/2618-safety-parity
conductor:feat/2609-integration-w6
conductor:feat/2618-audit-forge
conductor:feat/2618-background-memory
conductor:feat/2618-operator-residual
conductor:feat/2618-warm-recall
conductor:feat/2617-research-r3
conductor:feat/2606-spine-w4
conductor:feat/2617-research-r2
conductor:fix/2607-spine-dichotomy
conductor:feat/2609-go-interception-w3
conductor:feat/2618-memory-store
conductor:feat/2617-research-r1
conductor:feat/2609-go-interception-w2
conductor:fix/data-safety-audits
conductor:fix/integration-audits
conductor:feat/2617-research-r0
conductor:feat/2609-model-replay
conductor:fix/tool-boundary-audits
conductor:feat/2609-go-interception-w1
conductor:fix/2582-release-final
conductor:fix/2613-self-hosting-gate
conductor:removal-prep/dead-superseded-pile
conductor:removal-prep/auto-context
conductor:removal-prep/reconcile-tools
conductor:removal-prep/openai-compat-transport
conductor:removal-prep/message-queue
conductor:removal-prep/forge-client
conductor:removal-prep/cache
conductor:removal-prep/paths
conductor:fix/2532-text-selection
conductor:throwaway-force-merge-test
conductor:fix/2582-namespace-cli-flag
conductor:feat/2582-release-reporting
conductor:fix/2535-pane-scrollback
conductor:dichotomy-gap-f0
conductor:gap-transport
conductor:gap-construction-commands
conductor:wave-ca-ms
conductor:tmp-detach
conductor:gap-ltr
conductor:backup-rune-as
conductor:wave-ax
conductor:feat/wave6-rust-backend
conductor:feat/wave4-consolidation-kernel
conductor:ci/build-cognition-core-unit
conductor:ci/register-w34-canaries
conductor:feat/wire-programme-continuation
conductor:feat/wire-construction-commands-dispatch
conductor:feat/wire-stage-guards-transition
conductor:feat/tui-pane-swap-chat-left
conductor:fix/operator-probe-tools-2468
conductor:r2-wave2-memory-retrieval
conductor:r2-wave2-memory-storage
conductor:phase-g-strangler-evidence-provenance
conductor:phase-g-strangler-retrieval-index
conductor:tranche-r1-wave-0
conductor:m10-derive-refresh
conductor:t22-scaffolding-default-path
conductor:research-depth-gate
conductor:fix-407-autolabel
conductor:fix-tui-banner-surface
conductor:r13-m9-pr-proof
conductor:gitea-internal-endpoint
conductor:auto-label-epic-kinds
conductor:issue-templates-heading
conductor:issue-templates
conductor:event-driven-clean
conductor:deadline-return-fix
conductor:hardening-live-proof
conductor:hardening-authority-identity
conductor:event-driven-final-metrics
conductor:event-driven-gates-evidence
conductor:event-driven-continuation
conductor:async-intent-live-proof
conductor:async-intent-normalization
conductor:memory-t0-external-report
conductor:memory-t0-asis-map
conductor:t21.5-pending-class-fix
conductor:t21.5-gate-evidence
conductor:t21.5-root-cause-continuation
conductor:t21.4-gate-evidence
conductor:t21.4-qualify-defaults-fix
conductor:t21.4-final-v1-proof
conductor:prototype/openai-compat-transport
conductor:wr-experiment
conductor:adapt2-route-authority
conductor:pl0-experience-ledger
conductor:d5-authority-audit
conductor:task-d-stage-contracts
conductor:b3v2-fresh
conductor:d5-tightening
conductor:d4d5-artifact-contract
conductor:correction-1-d2d3
conductor:adapt9-artifact-authority
conductor:prov1-source-ledger
conductor:infra1-accept
conductor:infra1-probe5
conductor:infra1-probe4
conductor:infra1-probe3
conductor:infra1-probe2
conductor:infra1-probe
conductor:obs1-telemetry
conductor:rp13-metrics
conductor:rp12-rerun-163
conductor:rp11-retirement
conductor:issue161-harness-v2
conductor:issue161-harness
conductor:rp2-canonical-stage-model
conductor:sweep-live
conductor:umbrella-rewire
conductor:trigger-bump-2
conductor:release-token-fix
conductor:trigger-bump
conductor:version-reconcile
conductor:umbrella-pipeline
conductor:pinned-live
conductor:research-structuralization
conductor:merge-robot-checkout
conductor:p1-03-memory-selection
conductor:coverage-ratchet
conductor:failure-auto-filing
conductor:release-safety-net
conductor:ci-dependency-lock
conductor:bugfix-contract
conductor:merge-robot-fix
conductor:adversarial-gates
conductor:merge-robot
conductor:runner-desktop-gate
conductor:research-gate-evidence
conductor:backup/pinned-20260908-035000
conductor:release-tui-footer
No Reviewers
Labels
Clear labels
P0 — critical
P1 — high
P2 — medium
P3 — low
blocked
bug
custodian
epic
feature
governance
growth
identity
in-progress
incomplete
infrastructure
life
memory
memory-atlas
needs-testing
perception
ready
release-drift
research
rune
scaffolding
spine,correction
spine,deferred
spine,resolved
strangler,burn,endgame,deferred
strangler,burn,endgame,inventory,epic
tui
tui,epic
tui,openspec
v1-course-correction
Spine/core correctness or blocks other work — do first
Material user value or real defect (money, bugs, next-stage dep)
Quality/consolidation improvement
Measurement / benchmark / deferred policy
Dependencies open
Confirmed defect or regression
Rune v1 course-correction issue graph
New capability or improvement
Currently being worked on by Rune
Incomplete work — draft PR with ledger, awaiting resume
Memory Research Atlas child domain
Needs manual testing with dumbed-down steps before close
Order satisfied - Rune may start
Research jobs — spikes, watchlists, evidence work
rune
scaffolding
spine,correction
spine,deferred
spine,resolved
strangler,burn,endgame,deferred
strangler,burn,endgame,inventory,epic
tui
tui,epic
tui,openspec
Rune v1 course-correction issue graph
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: conductor/rune#2620
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Plain summary
Seven Go modules that write our shared databases (the memory store, caches,
the auto-task ledger, abstraction state) were compiling against a
five-generation-stale SQLite engine bundle (SQLite 3.41.2) while the owner's
boundary law requires the bundled engine to be at least 3.51.3. On top of
that, the Go stores had no wait policy for lock contention — the Python
store waits 5 seconds, the Go side failed instantly with "database is
locked", dropping agent writes on the shared memory store — and startup
schema upgrades were run with every error silently swallowed. This PR moves
all modules onto one current engine (v1.49.1 bundling SQLite 3.53.0), gives
every module the same 5-second wait policy, restores full durable commits,
makes schema setup loud and repeatable, and adds CI lints so none of it can
silently regress.
Example
With this change, when an agent writes a memory while another writer holds
the store, the writer waits up to 5 seconds and then succeeds — instead of
failing immediately with
database is locked (5)(reproduced pre-fix: bothwriters dropped at 0.00s; post-fix both land after ~2s). And when a module's
pin drifts below the owner floor again, the pin-lint test fails CI by name,
not by accident later.
Technical details
modernc.org/sqlite v1.28.0, bundledSQLite 3.41.2) → v1.49.1 (bundled SQLite 3.53.0 ≥ the 3.51.3 floor,
docs/architecture/boundary-law.mdline 116; bundled version verifiedfrom the module's documented CHANGELOG: "2026-04-17 v1.49.0: Upgrade to
SQLite 3.53.0"). go.sum regenerated offline via
go mod tidy(
GOPROXY=off), go directive 1.21→1.25.0 to match the driver'srequirement (repo toolchain per go-version.txt is 1.27.1). (b) 5s
PRAGMA busy_timeouton every Go sqlite open site (15 sites / 10 files)via the driver's documented
_pragmaDSN params — per pooled connection,so the policy survives database/sql pooling (post-open
db.Execpragmasdo not). (c)
synchronous=FULLreplaces thesynchronous=NORMALcontradiction (crash-anywhere durable-write law) in memory-ops,
memory-store-deep, cache. (d) memory-store-deep schema provisioning now
fails loudly and migrates batch-1 columns conditionally — port of
src/rune/memory_store.py:246-263(the blind ALTERs errored "duplicatecolumn" on every already-migrated store, silently). (e) CI-enforced
guards:
tests/test_sqlite_pin_floor.py(floor + one-engine-uniformitylint) and
tests/test_go_connect_pragmas.py(busy DSN contract + nosynchronous=NORMAL).
a52624b3(re-verified on currentmaster
79ff61b3— all pins and behaviors reproduced unchanged before anyedit).
memory-store-deep, memory-ops, connection-pool, cache, auto_tasks,
abstraction), 10 source files (incl. curator + memory-continuity busy
waits, class coverage), 2 Python lint tests, 2 Go regression tests,
plans doc, admission script.
6296ea58(tests failing for the bug's cause: seven modules named;writers dropped at 0.00s with SQLITE_BUSY; connect() swallowed
unprovisionable-store errors) precedes fix commit
db6b45c6. Regressiontests are frozen. Record: plans/2026-10-26-sqlite-floor-audit-t17-finding2.md.
memory-continuity module's exact set (libc v1.72.0 et al., already cached
on the runner).
Why it matters
It advances the machinery-first infrastructure: the indexed-state backbone
(the shared memory store agent writes land in) stops dropping concurrent
writes and stops carrying a six-generation-stale engine that the owner law
explicitly floors. Storage becomes boring again.
Related issue
T17 audit wave finding 2 (data-persistence/concurrency audit on master
a52624b3). No standalone gitea issue — repair executes the audit findingdispatch.
Changes
provisionSchema+ conditional migrationRune v1 authority admission
Not applicable — storage-engine maintenance of the existing indexed-state
backbone; no new cognitive/runtime mechanism, no new selection authority.
Required verification
config/v1_authority_map.json(unchanged — no new authority)Umbrella systems
Discharge record
Discharge: F1-PINFLOOR -> tests/test_sqlite_pin_floor.py
Discharge: F2-BUSY -> tests/test_go_connect_pragmas.py
(F3's red test is the Go file src/go/memory-store-deep/schema_errors_test.go
— the structural checker tracks Python tests only; the plans doc carries the
full finding → test → commit table for all three findings.)
Testing evidence
Local (all offline
GOPROXY=off, isolated GOCACHE):python3 -m pytest tests/test_sqlite_pin_floor.py tests/test_go_connect_pragmas.py— 4 passed (red pre-fix: 4 failed for the findings' causes)go testin the nine sqlite modules — all green including thetwo-writer concurrency regression (2.03s: writers wait on the held lock,
both land) and the full memory-store-deep truth batteries
python3 scripts/admit_wave_sqlite_floor.py— classifiedEXISTING_PROJECT_CHANGE, activated, admitted (ADMIT-wave-sqlite-floor)
Known environmental gaps in the authoring sandbox (identical on pristine
master, verified via stash roundtrip): modules linking Rust staticlibs
(cognition, adaptive-router, scaffold-membrane, builder-bridge-cli — libs
not prebuilt locally; CI builds them first) and live-oracle tests requiring
prebuilt engine binaries (33 pre-existing pytest collection errors of the
same class). The nine touched modules are fully green locally.
Plain-language review notes
The load-bearing question for review: does every sqlite open site in src/go
now carry the busy DSN? The pragma contract test answers that structurally
and will fail CI if a future module regresses. The one behavioral subtlety:
journal_mode(WAL)inside the DSN is a no-op on already-WAL stores (thepersistent property Python sets); it only guards fresh synthetic stores.
The pin-lint's "one engine version" rule is deliberate — divergent bundled
engines serving the same store files was half of finding 2's harm.
Research provenance
none
🤖 Headless spec gate (non-blocking, #204 first slice)
Spec-gate agent produced no text output — check runner logs.
Deterministic floors still govern the merge
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.
🤖 Headless spec gate (non-blocking, #204 first slice)
Spec-gate agent produced no text output — check runner logs.
Deterministic floors still govern the merge
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.
CI observation (runs 34744/34874) — every failing required check attributed from actual logs
Green: auto-label, Local-Model First-Pass Review (#131), spec-gate (headless), best-practices, documentation, gitea-offline.
Red — all master-level, none branch-local (evidence: plans doc §CI status, commit
01ef5cdb):uv pip compiledivergence (upstream pins: aiohttp 3.14.5, pillow 13.0.0, coverage 7.17, …). A time-bomb that had already failed every PR run that evening (34728, 34801, 34810, 34839)git archive 79ff61b3checkout scores 145/203ls -dt rune-ci-target-* go-bins-* | tail | xargs -rexits 2 underpipefailwhen tmpfs is empty (host cache wipe); job dies before the go looppipeline exit: 2locally with empty matchesgo-paths go engine binary missing: …/src/go/paths/paths-bin— in-tree engine binaries were workspace leftovers, never provisioned by the workflowBranch-side fix delivered: the dep-lock layer —
799e0ee9regeneratesrequirements-ci.txtvia the checker's canonical command (check_dep_lock.pygreen locally). That was the only failing surface this branch could repair within its scope without weakening gates (raising the silent-handler/pyright baselines is forbidden by the ratchets' shrink-only contract — they need classification sweep waves, like the #126 wave that built the current baseline).Per the discharge instructions: no merge while required checks fail, no force-merge, no protection changes, no bypass. The sqlite-floor repair itself is green everywhere it executed: nine-module
go vet/go test/go buildloop (incl. the 2-writer concurrency regression and loud-schema regressions), both pin/pragma lint guards, and the frozen red-first evidence trail (commit6296ea58red →db6b45c6fix).🤖 Headless spec gate (non-blocking, #204 first slice)
Spec-gate agent produced no text output — check runner logs.
Deterministic floors still govern the merge
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.