Repository navigation
test(auto-reply): drop persistence call count - #121742
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 5:51 PM ET / 21:51 UTC. ClawSweeper reviewWhat this changesThe PR removes one exact persistence-helper call-count assertion from the auto-reply pre-delivery timeout test. Merge readinessPatch is correct: it removes an implementation-coupled mock call count while preserving the timeout’s observable delivery and durable-state assertions. This active maintainer-labeled PR should remain open for normal merge handling. Priority: P3 Review scores
Verification
How this fits togetherAuto-reply dispatch queues an agent’s final response, applies pre-delivery hooks, and records pending-final state for recovery. A pre-delivery failure must not send the response and must preserve the recovery record for a later attempt. flowchart LR
A[Agent final response] --> B[Auto-reply dispatcher]
B --> C[Pre-delivery hook]
C --> D[Failed before delivery]
D --> E[Pending-final recovery record]
C --> F[Channel delivery]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -1. Total -1 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the focused test cleanup once the exact-head required checks complete, retaining the durable-state owner test as the contract guard. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a test-only cleanup; current source directly establishes the pre-delivery failure and pending-final persistence contract under review. Is this the best way to solve the issue? Yes. The retained assertions protect the observable failed-delivery and recovery-state invariant, while the removed count would fail after a behavior-preserving persistence optimization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 105038e6581c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
92ff962 to
0ac751d
Compare
|
Land-ready verification is complete for
Known proof gaps: none. |
|
Merged via squash.
|
What Problem This Solves
The
beforeDelivertimeout test asserted thatupdateSessionEntrywas called exactly once even though the reconciliation intentionally preserves the pending final and returns no patch. That assertion pins a no-op persistence pass rather than observable delivery or storage behavior.A future optimization that skips the SQLite writer lane when no patch is needed would therefore break the test without changing the contract.
Why This Change Was Made
This change removes only the exact call-count assertion. The same test still proves:
A real SQLite owner test independently verifies that pre-delivery failure preserves pending-final state and restart provenance. Exact write-count assertions on success, late abort, intentional cancellation, and non-admission remain because those protect deliberate storage/idempotency contracts.
AI-assisted: yes. The change was manually inspected and passed the repository autoreview gate.
User Impact
No user-visible behavior change. The timeout regression remains protected without coupling it to one persistence-helper invocation.
Evidence
Scope and LOC
+0/-0.+0/-1.No runtime behavior, config, protocol, schema, dependency, lockfile, generated baseline, release, or changelog change.