fix: data-safety audit repairs — serialize the command RMW span; loud atomic durable-state saves #2624
Open
conductor
wants to merge 4 commits from
fix/data-safety-audits into master
pull from: fix/data-safety-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/integration-audits
conductor:fix/sqlite-floor-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#2624
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.
Data-safety audit repairs: F1 lost concurrent updates, F2 D40 masked durable-state failures
Owner-dispatched repair of the two reproduced data-safety defects (audited on frozen base
a52624b3, T17 report; re-verified against current master79ff61b3before touching anything; construction contractADMIT-repair-data-safety-audits, planplans/2026-10-26-data-safety-audit-repairs.md).F1 — concurrent task-state updates were being lost. The task-command door read the hot checkpoint once, mutated it in memory, and blind-wrote the whole file back with no synchronization within or across processes — two commands erased each other's effects (reproduced 5/5 through the real serve door, including a core-created task vanishing while the command reported success). Atomic rename prevents torn files, not lost updates. Repair: the whole read-modify-write span now holds one per-path serialization — an in-process mutex plus a cross-process flock on the sidecar
<tasks>.lock(the same protocol the factory reconciler and the Rust/Python task_persist ledger already use); the task-state ledger no longer mints a fresh instance per request (the per-instance mutex it documented protected nothing) and holds<dir>/.lockacross its mutations; the durable rename now also fsyncs its directory.F2 — failed durable-state saves reported success (D40). Five state saves ran open+truncate+write with errors thrown away: a failed save printed ✅ and exited 0 with nothing written; a torn batch store read as zero work and the next verb rewrote the queue empty; model_routing renamed without any fsync. Repair: every save now carries the AtomicStore law (temp + fsync(file) + rename + fsync(dir)) and returns its failure loudly — nonzero exits, stderr naming the effect that did NOT persist, honest error envelopes; a torn store fails loud and keeps its bytes instead of being silently zeroed.
Red first, mutation-checked (docs/bugfix-contract.md). Every finding has a failing-before-fixing test that reproduced the exact harm (evidence lines recorded in the plan), and the fix was mutation spot-checked both ways. The regression tests are permanent.
Conscious parity updates (not silently weakened). The Python oracle's suppressed-error shape is retired on the FAILURE paths only, with the justification documented in
cli_parity_test.goand the frozen battery; happy-path byte parity is unchanged and re-proved by the live oracle battery.Verification: full suites +
-racegreen in all seven touched Go modules (task-state, rune-entry, work-manager, model_routing, model-profiles, subsystem-health, sleep-time), including the frozen truth battery and the live Python-oracle parity battery.Discharge: F1-rune-entry-checkpoint-rmw -> src/go/rune-entry/internal/entry/command_race_test.go
Discharge: F1-ledger-fresh-instance-flock -> src/go/task-state/ledger/ledger_lock_test.go
Discharge: F2-work-manager-masked-saves -> src/go/work-manager/internal/workmanager/persistence_safety_test.go
Discharge: F2-subsystem-health-masked-save -> src/go/subsystem-health/main_test.go
Discharge: F2-sleep-time-masked-save -> src/go/sleep-time/main_test.go
Discharge: F2-model-profiles-masked-save -> src/go/model-profiles/main_test.go
Discharge: F2-model-routing-unsynced-rename -> src/go/model_routing/model_routing.go
🤖 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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.