Skip to content

(index): pinned-read null loop and one SQLite test shim #868

Open

Description

@devsuitup

Follow-ups to #740 / #859 (round-c review approved).

  1. Null full read loops on the budget (session-cache.js ~553-554 with ~629-640). The shared continuation budget is zeroed before readSessionFile; if the read returns null (read error, or a same-mtime rewrite left with no summary/messages), nothing is upserted, the cached fileSize stays old, and every later walk rereads the file (up to 1 MiB) and spends the whole budget again while the row stays stale. Fix: when the pinned full read returns null, adopt the size (sizesToAdopt) or fall through to the header path. Test with readSessionFile returning null for a pinned, grown row.
  2. Duplicate SQLite test shims: test/fixtures/harness-store.cjs (from (harnesses): CLI harness port and Claude adapter, no behaviour change (#820) #865) repeats the node:sqlite shim of test/fixtures/conversation-store.cjs; test/session-meta-rekey-696.test.js inlines it too. Give conversation-store.cjs a loader accepting { readonly } and reuse it in both.

Activity

  1. devsuitup commented on Oct 29, 2026

    @devsuitup
    OwnerAuthor

    Item 2, harness part: done in #865 (test/fixtures/harness-store.cjs removed, harness-schema uses conversation-store.cjs { readonly }). session-meta-rekey-696 remains.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions