Skip to content

SQLite diagnostic timeout drops observed pool counts #1123

Description

@bcdonadio

Observed behavior: In a SQLite daemon, the common collector observes local pool counts before a project/sidecar read, but an owned deadline returns a fresh timeout snapshot that drops those counts. The new PostgreSQL borrowed-pool retention path does not cover SQLite, so pool diagnostics become unverified even though the local count observation succeeded.

Expected behavior: Preserve independently observed SQLite pool facts on timeout after the same publication-witness reauthentication required for PostgreSQL pool facts. Keep the overall timeout classification, omit unverified backend metrics, and never close caller-owned pool state.

Root cause: src/storage/diagnostics.ts copies getPoolStats() into the work snapshot in the SQLite branch. timeoutSnapshot() only overlays the PostgreSQL-only borrowedPool observation.

How to reproduce: Use a generated private SQLite fixture and a borrowed SQLite factory. Start collection with known local pool counters, then stall collectSqlite or a sidecar query until the owned deadline. The returned classification is timeout and its pool lacks the previously observed counters. Add deterministic tests for preserved counters, changed/refused publication discarding them, and no borrowed-pool close.

Review provenance and scope: Accepted P2 from PR #1103 comment 3945659558, candidate 801f79f27e449bffa1db60c8ec3de18016ebd47b, originating Feature #619. Filed after all three initial candidate review rounds were spent under the approved deferral policy. Separate native Bug outside the fixed Epic #224 delivery inventory. The PostgreSQL-specific fix in that PR is distinct from this remaining SQLite outcome.

Environment:

  • Agent: Codex, Astra delivery owner; Codex PR review finding
  • Connector: CLI/repository source review
  • OS: Fedora Linux

Activity

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

    Type

    Fields

    Priority

    Medium

    Effort

    None yet

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions