Repository navigation
improve(sessions): reduce progress-card update payload reads - #149790
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 3:03 AM ET / 07:03 UTC (Revision 2). ClawSweeper reviewWhat this changesProgress-card replacement, clearing, and reset read only stored metadata, with regression coverage for payload transfer, persisted state, and existing error behavior. Merge readiness✅ Ready for maintainer review This remains a useful, bounded optimization absent from current main and the latest release. No actionable correctness or security defects were found; the maintainer-authored PR should proceed through normal landing. Priority: P2 Review scores
Verification
How this fits togetherProgress cards store an agent’s current task status in its session database. Gateway updates and conversation resets use this store, whose revisions and contents determine what clients display. flowchart TD
A[Gateway update or session reset] --> B[Progress-card store]
B --> C{Conditional dismissal?}
C -->|Yes| D[Read full card and validate revision]
C -->|No| E[Read metadata only]
D --> F[Existing SQLite transaction]
E --> F
F --> G[Updated card or revision tombstone]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +25, Tests +136. Total +161 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the existing storage owner and dismissal semantics while avoiding payload materialization for operations that only need metadata. Do we have a high-confidence way to reproduce the issue? Yes: current main visibly selects Markdown and step payloads during replacement, clear, and reset despite consuming only metadata; this review verified the source path without executing it. Is this the best way to solve the issue? Yes: narrowing the existing owner's projection preserves its write and dismissal contracts without introducing another store, configuration option, or migration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bebe37501ae9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…w#149790) Co-authored-by: Peter Steinberger <[email protected]>
Related: #146197
What Problem This Solves
Replacing, clearing, or resetting a progress card unnecessarily loads its previous Markdown and step payloads from SQLite.
User Impact
No user-visible behavior changes. These writes transfer less stored content into JavaScript; no migration or operator action is needed.
Why This Change Was Made
Read only the metadata these operations need, retaining all native integer conversions and revision/timestamp handling. Conditional dismissal still reads and parses the full card before checking its revision, preserving existing errors and live-authority behavior.
Evidence
db1d5d2; the patch, relevant source contexts, and private dependencies were preserved exactly when refreshing to08584b3. Full local typechecks and fullcheck:changedwere not run. Exact-head hosted CI35062479374, including the required gate, passed atda2d59e92c95. Native preparation and merge completed. Merged as05a5bd1c19b742e350ae4683535637fcf08d14b9; current-main ancestry, complete native outcome, native checkout/local PR branches/lock removal and remote head-branch deletion were independently verified.