Skip to content

fix(gateway): align history test fixture with projection state - #139794

Merged
steipete merged 1 commit into
mainfrom
codex/repair12-history-projection-fixture
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/repair12-history-projection-fixture

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Gateway history test-type validation fails after the assistant error projection state was renamed in #139753. The interleaved pagination regression fixture added in #139715 still uses the previous result fields.

Why This Change Was Made

Update the existing fixture to the current projection result contract: assistantErrorPending and assistantErrorRecoveryObserved, both false. Keep its messages, pagination options, and assertions unchanged.

User Impact

No runtime behavior changes. Maintainers can validate the Gateway history tests against the current projection contract while retaining the pagination regression coverage.

Evidence

The canonical changed-paths typecheck selected gateway-root and reproduced TS2353 on the original fixture; the same command passes with this repair. All 30 existing session-history state tests pass. Targeted formatting, lint, and git diff --check pass.

Commands: node scripts/run-tsgo-core-test-shards.mjs --changed-paths-json '["src/gateway/session-history-state.test.ts"]'; node scripts/run-vitest.mjs src/gateway/session-history-state.test.ts.

Independent source review and isolated Codex autoreview found no actionable issue. No production code or pagination assertions change.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 6, 2026 05:34
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 1:40 AM ET / 05:40 UTC.

ClawSweeper review

What this changes

Updates two Gateway history test fixture fields to match the current projection result type while preserving pagination assertions.

Merge readiness

✅ Ready for maintainer review

The repair remains necessary on fetched main and correctly restores the fixture’s type contract without weakening pagination coverage. No actionable findings; maintainer-owned work stays open.

Priority: P3
Reviewed head: 4cb964f5b86f7d8592d953f49134ffe9f529eef5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, correct fixture repair with relevant reported validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR changes only a typed pagination fixture; production history behavior is unchanged, and the supplied typecheck and focused test results address the repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR changes only a typed pagination fixture; production history behavior is unchanged, and the supplied typecheck and focused test results address the repair.
Evidence reviewed 6 items Verified introduced change: The merge-base-to-head diff only replaces two obsolete fixture properties; messages, page limit, and all three assertions remain unchanged.
Current projection contract: ChatDisplayProjectionResult requires assistantErrorPending and assistantErrorRecoveryObserved. buildSessionHistorySnapshot accepts this exact return type, so the replacements repair the typed fixture directly.
Still necessary on fetched main: Fetched main retains streamErrorFallbackPending and streamErrorFallbackRepaired in this fixture despite requiring the renamed properties. The requested fixture repair is therefore not already implemented there.
Findings None None.
Security None None.

How this fits together

Gateway history projection turns stored conversation messages into displayable pages and streaming updates. This fixture tests that interleaved message groups remain together when history is paginated.

flowchart LR
  A[Stored conversation messages] --> B[Display projection]
  B --> C[Messages and projection state]
  F[Regression fixture] --> C
  C --> D[History pagination]
  D --> E[History pages and streaming updates]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 2 2 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 2 2 0

Review metrics

None.

Technical review

Best possible solution:

Keep the existing pagination regression intact and align its fixture with the canonical projection result type.

Do we have a high-confidence way to reproduce the issue?

Yes, source inspection establishes the fixture’s incompatible property names against the declared return type. The PR reports a failing-before/passing-after Gateway test typecheck; this review did not execute it.

Is this the best way to solve the issue?

Yes. Replacing the obsolete fields directly preserves the meaningful pagination regression without adding aliases, casts, or weaker assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against cbd94188df13.

Labels

Label changes:

  • add P3: This is a focused test-fixture correction with no runtime behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR changes only a typed pagination fixture; production history behavior is unchanged, and the supplied typecheck and focused test results address the repair.

Label justifications:

  • P3: This is a focused test-fixture correction with no runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR changes only a typed pagination fixture; production history behavior is unchanged, and the supplied typecheck and focused test results address the repair.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 8a8bfa4 into main Sep 6, 2026
170 checks passed
@steipete
steipete deleted the codex/repair12-history-projection-fixture branch September 6, 2026 05:44
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

fuller-stack-dev added a commit that referenced this pull request Sep 6, 2026
Main now contains the fixture correction from #139794. Remove the carried
#139715/#139792 history changes so this branch returns to the previously
reviewed and tested session-first tree, plus the upstream proxy inventory pair.
steipete added a commit to NianJiuZst/openclaw that referenced this pull request Sep 6, 2026
Bring in the canonical Gateway test-fixture repair from openclaw#139794 so fresh CI can validate the filename change. Preserve the contributor history and verified file-fetch source and test bytes.
steipete added a commit to TurboTheTurtle/openclaw that referenced this pull request Sep 6, 2026
Import the canonical Gateway projection-fixture repair from openclaw#139794 after the
previous CI merge used its retired fields. Preserve the Devices repair and
contributor ancestry; the UI delta remains five files with net-negative
production lines.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant