Skip to content

IssueQueue test "hands SQLite connections to waiting queue calls" fails on main #306

Closed

Description

@tannerpolley

On main (d55a518, 2026-11-03), apps/server/src/issues/IssueQueue.test.ts > hands SQLite connections to waiting queue calls before new borrows fails every run, including alone with the machine idle:

AssertionError: expected { reader: 'queue', writer: 'producer' } to deeply equal { reader: 'queue', writer: 'queue' }

The test came with the fork's starvation fix fd37e8d (2026-10-23, "fix(shared): hand SQLite connections to waiting callers"). Likely cause, not verified: the upstream sync brought facaa08 (2026-10-29, upstream pingdotgg#27097, "SQLite reads stop queueing behind each other"), which changed how connections are borrowed. Decide whether the fork's handoff guarantee still holds under the new pool (then fix the code) or the test asserts the old pool's mechanics (then fix the test).

Run with PATH="$HOME/.vite-plus/fallback-bin:$PATH" GIT_CONFIG_GLOBAL=/dev/null vp test run src/issues/IssueQueue.test.ts -t "hands SQLite connections" from apps/server.

The two tests reported failing on 2026-10-29 (IssueCleanup.test.ts ancestry case, IssueQueue.test.ts "queue and Inbox work register one root") pass now.


Was Forgejo issue #327.

Activity

  1. tannerpolley commented on Nov 13, 2026

    @tannerpolley
    OwnerAuthor

    T3 Code status: Unavailable

    Issue: #306 IssueQueue test "hands SQLite connections to waiting queue calls" fails on main

    Thread: thread:delegated-task:command%3Amcp%3Af7dbe326-b11b-455a-a927-ca05430dc653%3Adelegate-task%3Aissue-306-build-1

    Model: claude-sonnet-5-5

    Branch: issue-306-issuequeue-test-hands-sqlite-connections

    Updated: 2026-11-23T20:35:20.157Z

  2. tannerpolley commented on Nov 13, 2026

    @tannerpolley
    OwnerAuthor

    T3 Code closeout: done

    Issue: #306 IssueQueue test "hands SQLite connections to waiting queue calls" fails on main
    Thread: thread:delegated-task:command%3Amcp%3Af7dbe326-b11b-455a-a927-ca05430dc653%3Adelegate-task%3Aissue-306-build-1
    Model: claude-sonnet-5-5
    Branch: issue-306-issuequeue-test-hands-sqlite-connections
    Completed: 2026-11-13T20:22:28.631Z

    Still passes, nothing to do. I pushed no branch and opened no PR for #306.

    Evidence

    • Commit tested: ccc2f744fe. The worktree HEAD, local main and origin/main are all that commit, and git fetch origin main showed nothing newer. It already includes the SQLite pool change facaa08b36.
    • Command: GIT_CONFIG_GLOBAL=/dev/null vp test run src/issues/IssueQueue.test.ts -t "hands SQLite connections" from apps/server, through agent-heavy, with PATH prefixed by /home/tnnrpolley21/.local/share/vite-plus/fallback-bin.
    • Result:
      Test Files  1 passed (1)
           Tests  1 passed | 31 skipped (32)
      
    • First attempt: it failed with Cannot find package 'effect/Context'. That was not the issue's assertion error. The worktree had no .t3 markers and no node_modules, so setup had never run. I ran vp i and reran the test, and it passed.
    • Fix in between: between IssueQueue test "hands SQLite connections to waiting queue calls" fails on main #306 (filed 2026-11-03 at d55a5188f8) and now, git log shows several changes to packages/shared/src/nodeSqliteClient.ts. Two of them look relevant to a handoff: a2a3388c5e ("keep writes moving while readers pin the WAL", fix(server): keep writes moving while readers pin the WAL pingdotgg/t3code#23496) and f02f5c32e7 ("bound issue queue and admission queries"). I did not bisect to find which one fixed it.
    • Handoff guarantee: the test passes for both the reader and writer connection, so the fork's guarantee (waiting queue calls get connections before new borrows) holds under the newer pool. No code or test change is needed.
    • Not run: vp run check:changed, since there is nothing to push.

    The issue is still open on GitHub. Closing it with this note is the remaining step for you or the orchestrator.

  3. tannerpolley commented on Nov 13, 2026

    @tannerpolley
    OwnerAuthor

    This test now passes on main at ccc2f744fe (1 passed | 31 skipped, run through agent-heavy). That commit already includes the pool change facaa08b36.

    The waiting-caller handoff holds for both the reader and the writer connection, so no code or test change is needed.

    The fix probably landed in a later change to nodeSqliteClient.ts, most likely a2a3388c5e (pingdotgg#23496) or f02f5c32e7. I didn't bisect to confirm which. Closing.

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