Skip to content

Engine: remove recursive storage reads in diagnostics and proofs #166

Closed

Description

@jsam

Problem

Program execution holds a storage read guard and diagnostics acquire another read guard before releasing it. With a writer queued between those reads, the recursive acquisition can deadlock. Fix the lock boundary separately from richer diagnostics and proof indexing.

Evidence

Source: 5c1f313379a5cb2995a43a66ddba0b5cc9798b7f (inspected 2026-10-03). These are source findings; the acceptance scenarios below still need implementation and execution.

Acceptance criteria

  • Pass the existing guard or an immutable snapshot through diagnostic preparation; release storage before expensive proof evaluation.
  • Audit .why, .why full, .why not and index/debug helper paths for the same pattern without making the lock recursively permissive.
  • Use deterministic barriers to queue a writer between the outer read and diagnostic entry; all operations complete and concurrent writes make progress.
  • Keep structured explain output in inputlayer/inputlayer-symbolic#169 and indexed proof responsiveness in .why: no KG deep copy, indexed subgoal proofs, release storage guard #134; this fix alone closes neither broader issue. Concurrent query/write/delta latency passes Performance: baseline and mandatory pre-PR regression pipeline #163.

Delivery

Plan item: S06. R1 - Safety + perf/e2e gates.

Dependencies / related work: #163.

Activity

  1. added
    bugSomething isn't working
    backendBackend/server related
    P1Required next for reliable reactive delivery and operations
    on Oct 3, 2026
  2. jsam commented on Oct 3, 2026

    @jsam
    ContributorAuthor

    Landed on main in #215 (squash 4578fe6), CI green: the implementation, tests and docs for this item are on main. Follow-up review hardening for checkpoint 1 continues in its own PR; tracker #199.

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

    P1Required next for reliable reactive delivery and operationsbackendBackend/server relatedbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions