Repository navigation
fix(sessions): restore dependency checks for pending-input reads - #197839
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Please review exact head |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesMakes the internal pending-input reader private and migrates its test consumers to maintained APIs or a shared snapshot helper. Example: Run the production dependency scan on parent 7499988.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR is a focused dependency-check repair with no actionable findings at the requested head; exact-head CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherSession retry comparison accepts a session scope and idempotency key, reads through the durable worker or memory actor, and returns the original submitted message; test-only inspection also exposes retained pending rows. flowchart TD
A[Retry comparison] --> B[Submitted input API]
B --> C[Private source reader]
C --> D[Durable worker]
C --> E[Memory actor]
F[Snapshot test helper] --> G[Existing pending input store]
G --> D
G --> E
Technical reviewBest possible solution: Keep the raw reader private and preserve existing behavioral assertions through the maintained submitted-input API and shared test helper. Do we have a high-confidence way to reproduce the issue? Source inspection confirms the production caller is local and external imports are test consumers; the author records the exact-parent unused-export failure, but no scanner or tests were run during this read-only review. Is this the best way to solve the issue? This is the smallest complete repair: remove the unused export, retain the production implementation, and migrate tests without weakening their distinct custody, retry, and memory-window checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a3d5baaabd2c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +20. Total +20 across 7 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 12, 2026, 1:30 PM ET / 18:30 UTC (Revision 2). |
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
Main's dependency gate still rejects
readPendingInputSource, which became an unused export in #184512 (baca36ea403cf681b9ec531c5f27837d0586dcad). Exact parent74999886c2f98ecaa9c205b220f79bcd5e862371fails the production scan on that one export. Its production caller is already in the same module; only tests import the raw reader.User Impact
Restore dependency checks without changing submitted-input reads, replay decisions, or invitation authority. The reader implementation and maintained
readSessionSubmittedInputAPI remain unchanged.Why This Change Was Made
Make the raw reader private and migrate every test consumer. Four Gateway consumers retain their exact stored-row comparisons through a shared test helper that uses existing store reads and releases the store in
finally. Memory tests use the maintained submitted-input API and retain explicit current-window checks.#184513 merged a real invitation-binder consumer while the earlier revision's CI ran. The final premerge source check caught that change, and the earlier revision was held as a draft. This revision integrates that named owner change and preserves all invitation machinery and retention tests exactly as they appear on the pinned parent. No invitation deletion or new invitation test remains in this PR.
Open #184515 still imports the raw reader in a test; that branch should migrate its test to the maintained reader or the shared test snapshot helper when integrated. Its production invitation feature remains outside this repair.
The final seven-file change has production LOC delta 0 and test/support delta +20. The 23-line test helper serves four existing consumers. No schema, configuration, protocol, or permission change is intended.
Evidence
74999886c2f98ecaa9c205b220f79bcd5e862371: production Knip fails with exactly one unused export,readPendingInputSource(59.18 seconds wall; 54.52 seconds user; 32.29 seconds system; 2.95 GB peak RSS). Scanner cost is not a runtime performance benchmark.pnpm check:changed --base 74999886c2f98ecaa9c205b220f79bcd5e862371passes on the reviewed merge head, including all core/test type graphs and production/full-tree/script export scans with zero entries. The earlier staged-merge attempt resolved the old parent and was stopped; this completed run records the correct parent and seven-file scope.fc3ff91aCI/review results are historical and do not qualify this head.