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
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.tscopiesgetPoolStats()into the work snapshot in the SQLite branch.timeoutSnapshot()only overlays the PostgreSQL-onlyborrowedPoolobservation.How to reproduce: Use a generated private SQLite fixture and a borrowed SQLite factory. Start collection with known local pool counters, then stall
collectSqliteor 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: