Repository navigation
fix(gateway): restore SQLite usage details - #118918
Conversation
98ee1a2 to
507a80c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 6:03 PM ET / 22:03 UTC. ClawSweeper reviewWhat this changesThe PR repairs Gateway session-usage summaries, time series, and logs so stored SQLite transcripts use canonical session-store identity while storeless historical JSONL artifacts continue to resolve. Merge readinessKeep open for maintainer review. Current Priority: P2 Review scores
Verification
How this fits togetherGateway usage methods accept an operator-selected session key and load transcript-backed cost details for the control surface. They translate session-store metadata into a usage source, then pass that source to summary, time-series, and log readers that support current SQLite transcripts and retained JSONL artifacts. flowchart LR
A[Gateway usage request] --> B[Session key and agent scope]
B --> C[Canonical session-store lookup]
C --> D[Usage target resolution]
D --> E[SQLite transcript marker]
D --> F[Historical JSONL artifact]
E --> G[Summary time series and logs]
F --> G
Decision needed
Why: The protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +37, Tests +44. Total +81 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one Gateway resolver that turns stored sessions into validated canonical SQLite targets and limits JSONL lookup to genuinely storeless historical artifacts, then merge after current-head validation completes. Do we have a high-confidence way to reproduce the issue? Yes, from source: a stored entry on current Is this the best way to solve the issue? Yes. Resolving the source once at the Gateway/session-store boundary is the narrowest maintainable repair because the shared usage reader already validates canonical SQLite targets and retains the supported JSONL artifact path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 65fa1f9a7bd1. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
507a80c to
bb1e0ce
Compare
|
Merged via squash.
|
* origin/main: (90 commits) fix(googlechat): recover durable lanes after oversized attachments (#118986) test(qa): cover runtime telemetry evidence (#118950) fix(gateway): resolve SQLite usage details (#118918) test(cron): cover durable scheduler state (#118981) test(gateway): cover node exec approval relay (#118825) test(qa): add Active Memory recall coverage (#118963) test(qa): promote package-backed Docker artifact proof (#118826) test(qa): cover diagnostic event boundary (#118844) test(gateway): cover WebSocket runtime contracts (#118797) fix(signal): drain accepted websocket messages before shutdown (#118975) fix(plugins): remove stale load paths during uninstall (#118930) test(qa): cover bundled runtime discovery (#118922) chore(clawhub): cover plugin release policy contracts (#118971) test(qa): cover support export and stability (#118956) fix(feishu): enforce exact signed webhook request boundaries (#118758) feat(sms): add Twilio MMS support (#118664) test(gateway): prove TLS certificate pinning (#118812) test(qa): cover tool policy and sandbox gates (#118925) fix(cli): keep update dry-run state immutable (#118856) fix(scripts): honor last repeated CLI flag value (#118710) ... # Conflicts: # pnpm-workspace.yaml
…r-admin-20260803 * origin/main: (89 commits) fix(googlechat): align doctor policy ownership with canonical account configuration (#118972) test(tui): prove editor input through PTY (#118982) fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987) test(qa): cover health monitor and cache boundaries (#118961) fix(macos): restore dashboard frame double-click zoom (#118976) fix(googlechat): recover durable lanes after oversized attachments (#118986) test(qa): cover runtime telemetry evidence (#118950) fix(gateway): resolve SQLite usage details (#118918) test(cron): cover durable scheduler state (#118981) test(gateway): cover node exec approval relay (#118825) test(qa): add Active Memory recall coverage (#118963) test(qa): promote package-backed Docker artifact proof (#118826) test(qa): cover diagnostic event boundary (#118844) test(gateway): cover WebSocket runtime contracts (#118797) fix(signal): drain accepted websocket messages before shutdown (#118975) fix(plugins): remove stale load paths during uninstall (#118930) test(qa): cover bundled runtime discovery (#118922) chore(clawhub): cover plugin release policy contracts (#118971) test(qa): cover support export and stability (#118956) fix(feishu): enforce exact signed webhook request boundaries (#118758) ...
…ansports-20260803 * origin/main: (120 commits) test(ui): add service-worker update primary QA proof (#118805) test(qa): cover CLI onboarding and plugin install sources (#118882) test(qa): cover remote logging boundaries (#118951) fix(sms): retry transient MMS failures before durable adoption (#118994) test(qa): cover video generation invocation (#118864) test(qa): cover media reference intake (#118858) test(qa): cover image generation task lifecycle (#118915) feat(sms): track Twilio delivery status (#118665) test(tasks): cover TaskFlow registry lifecycle (#118983) test(gateway): verify SSH tunnel fallback (#118818) fix(security): harden network tool output at canonical owner boundaries (#118984) fix(googlechat): align doctor policy ownership with canonical account configuration (#118972) test(tui): prove editor input through PTY (#118982) fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987) test(qa): cover health monitor and cache boundaries (#118961) fix(macos): restore dashboard frame double-click zoom (#118976) fix(googlechat): recover durable lanes after oversized attachments (#118986) test(qa): cover runtime telemetry evidence (#118950) fix(gateway): resolve SQLite usage details (#118918) test(cron): cover durable scheduler state (#118981) ...
What Problem This Solves
Fixes an issue where operators opening usage details for stored sessions could receive invalid or empty results after session transcripts moved to SQLite.
Repair Ledger
sessionFileandtranscriptPathlocators, but Gateway usage detail lookup still rebuilt a JSONL path from the session id.sessions.usagethen appliedfs.statSyncto that result, which is invalid when the canonical resolver returns a SQLite marker.agentId,sessionId,sessionKey, andstorePath. SQLite markers are accepted as canonical session sources, and requested/stored identity mismatches fail closed.User Impact
Usage summaries and detail views can read current SQLite-backed session transcripts consistently, while historical storeless JSONL artifacts continue to work.
Evidence
bb1e0ce817ac9b53ba03ab25f1dffe08bc169befmainhead76cc60a452dcdd49e54d2f81f811be07ddb1bc29tbx_01kz4sdr2a3s9ebwkd9tpegxpmpnpm check:changedfor both touched files: passedClawSweeper rank-up move applied: rebased onto the reviewed current-main freeze and reran both the focused Gateway usage test and changed-path checks on the resulting exact head.
Latest ClawSweeper rank-up move applied: all exact-head checks completed with no failures; the repository merge wrapper will verify the current merge result before landing.
AI-assisted: yes. The implementation and evidence above were reviewed before submission.