Repository navigation
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 6, 2026, 1:38 AM ET / 05:38 UTC. ClawSweeper reviewWhat this changesThe PR repairs a session-history test fixture by deriving neutral display state from the existing projection function while preserving its pagination assertions. Merge readiness✅ Ready for maintainer review The repair remains necessary on fetched main and preserves the pagination regression without weakening assertions. No actionable patch defects were found; the maintainer-authored, protected PR should remain in the normal landing workflow. Priority: P3 Review scores
Verification
How this fits togetherThe Gateway converts stored conversation messages into display history and pages that history using transcript sequence numbers. This test protects pagination when related display rows are interleaved. flowchart LR
A[Conversation messages] --> B[Display projection]
B --> C[Projected rows and state]
C --> D[History pagination]
E[Page limit and cursor] --> D
D --> F[Messages and next cursor]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -1. Total -1 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep neutral fixture state tied to its production producer while retaining independent assertions for page contents and cursor behavior. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes that fetched main's fixture supplies retired fields to the current projection result type; the PR also reports the corresponding TS2353 failure. Tests were not rerun during this read-only review. Is this the best way to solve the issue? Yes. Reusing the existing neutral-state producer fixes the type mismatch without casts, new helpers, production changes, or weaker pagination assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4681f8d5fede. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Carry the existing #139792 repair and its merged #139715 test prerequisite. The neutral projection state comes from the owning helper, so this fixture works before and after the main-branch field rename in #139753. No session-first implementation changes. Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
The core test typecheck fails because one history-pagination fixture still constructs retired projection-state fields. #139715 added the fixture; #139753 later renamed those fields and migrated production callers but missed this test.
Why This Change Was Made
Build the fixture's neutral state through the existing public
projectChatDisplayMessagesWithState([])producer, then override only its deliberately interleaved messages. This removes copied state fields without adding a test helper or changing production code.User Impact
Restores the test typecheck while retaining the same pagination regression. Runtime behavior does not change. The sequence
[1,2,2,3,undefined,4,3,4], one-message limit, full page assertion, cursor andhasMorechecks are unchanged. Net test delta is −1 line.Evidence
The original before-fix gate reports TS2353 at
session-history-state.test.ts:398forstreamErrorFallbackPending; that failure is retained. After the fixture repair:git diff --checkpassed.This is a necessary main CI repair, not a measured runtime performance claim.