Skip to content

Avoid ambiguous HTTP 500 after durable ticket write when SQLite index is locked #316

Closed

Description

@tom-sapletta-com

Problem

PLF-20365: a ticket mutation can be durably saved and then return HTTP 500 when updating the disposable SQLite index fails with sqlite3.OperationalError: database is locked in _finish_index_mutation. The client cannot safely infer whether the write happened and retries risk duplicating side effects. This is distinct from #297 (contention before evidence append) and #313 (full-index repair liveness).

A local isolated diagnostic reproduced HTTP 500 with successful authoritative readback and exercised a candidate, but that candidate is not an approved change. Evidence on this host: semcod/planfile/.subactor/receipts/plf20365-diagnostic/result.json and paxlet-com/heyasa/.subactor/receipts/autonomy-focus-20261028/continuation/planfile-index-lock.log. Qualify against the current base and current deployed runtime rather than assuming the diagnostic copy is a release.

Acceptance

  • Investigate all call sites and handle real SQLite BUSY/LOCKED contention after a completed durable mutation without falsely reporting failure or replaying the write. Preserve authoritative mutation serialization, CAS and idempotent evidence semantics. Do not hide unrelated errors or failures before the durable commit.
  • Prove a stale projection cannot appear current to other workers; preserve correctness under concurrent writes, source changes and rebuilding, with eventual repair or a bounded typed recovery state. Do not delete or steal a lock, disable checks, or treat the cache as authoritative.
  • Add meaningful store/API regressions covering post-write contention and authoritative readback, non-contention errors, duplicate/retry behavior, and separate-worker behavior as applicable. Run scoped checks and qualify two-worker runtime behavior.
  • Use the declared controller, exact fenced lease and canonical v5 worktree. Work only in this issue's scope, preserve other agents' worktrees, and use current-base OneDev and independent Validator for publication. Runtime deployment requires its own admitted path and readback.

Session authorization: user asked to continue autonomous implementation, testing and protected publication through Heyasa; use one worker and one ticket. This is task consent, not a writer lease or independent approval.

Activity

  1. added
    subactor:autonomyExplicit issue intake for the governed Subactor coding-agent / Willman workflow
    on Oct 28, 2026
  2. tom-sapletta-com commented on Oct 29, 2026

    @tom-sapletta-com
    ContributorAuthor

    Resolved and delivered in PR #319 (ticket-258, commit 9a221c9).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    subactor:autonomyExplicit issue intake for the governed Subactor coding-agent / Willman workflow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions