Skip to content

fix(test): stabilize bounded context read counts after rewrites - #188947

Merged
roboclaw-bot merged 1 commit into
mainfrom
main-ci/l132-context-reads
Oct 31, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
main-ci/l132-context-reads

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #187989

What Problem This Solves

Fixes a model-context CI test failing intermittently when transcript projection writes overlap its second read.

User Impact

The fixture reliably checks the intended two-read contract. There is no user-visible runtime change.

Why This Change Was Made

#187989 moved slow history reads outside writer admission and updated this test to expect refreshed messages after one retry. The native rewrite also schedules background projection reconciliation; those later writes can legitimately trigger the serialized fallback added by #188073. The fixture now joins that reconciliation before returning its first stale read. The exact two-call assertion and both refreshed-message checks remain unchanged.

Evidence

  • Directed scheduling reproduces the original expected-2/received-3 failure; the same qualifier passes with exactly two reads after the fix.
  • 66 real-worker tests pass across the changed file and its two sibling suites on Node 24.22.1 and repository-pinned Bun.
  • Scoped typecheck, lint, format, four ratchets and whitespace checks pass. Test count and test-line ceiling are unchanged.
  • Fresh independent canonical P0–P2 autoreview: scoped-clean, no findings.
  • Test-only change; production retries, timeouts and assertions are preserved. The historical CI scheduler interleave is unobserved; the controlled projection-write cause is proven.

Requested by @steipete

Work sessions

Discussion, implementation and verification

Join the scheduled transcript-index reconcile inside the mutation hook so
its derived writes do not trigger a second conflict. Preserve refreshed
messages and the exact two-read contract without changing runtime retries.

Co-authored-by: steipete <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Oct 31, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 31, 2026 01:53
@roboclaw-bot roboclaw-bot changed the title test(sessions): settle rewrite reconciliation before counting reads fix(test): stabilize bounded context read counts after rewrites Oct 31, 2026
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) October 31, 2026 01:59
@roboclaw-bot
roboclaw-bot merged commit a896b62 into main Oct 31, 2026
194 checks passed
@roboclaw-bot
roboclaw-bot deleted the main-ci/l132-context-reads branch October 31, 2026 02:04
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
…penclaw#188947)

Related: openclaw#187989

## What Problem This Solves

Fixes a model-context CI test failing intermittently when transcript projection writes overlap its second read.

## User Impact

The fixture reliably checks the intended two-read contract. There is no user-visible runtime change.

## Why This Change Was Made

openclaw#187989 moved slow history reads outside writer admission and updated this test to expect refreshed messages after one retry. The native rewrite also schedules background projection reconciliation; those later writes can legitimately trigger the serialized fallback added by openclaw#188073. The fixture now joins that reconciliation before returning its first stale read. The exact two-call assertion and both refreshed-message checks remain unchanged.

## Evidence

- Directed scheduling reproduces the original expected-2/received-3 failure; the same qualifier passes with exactly two reads after the fix.
- 66 real-worker tests pass across the changed file and its two sibling suites on Node 24.22.1 and repository-pinned Bun.
- Scoped typecheck, lint, format, four ratchets and whitespace checks pass. Test count and test-line ceiling are unchanged.
- Fresh independent canonical P0–P2 autoreview: scoped-clean, no findings.
- Test-only change; production retries, timeouts and assertions are preserved. The historical CI scheduler interleave is unobserved; the controlled projection-write cause is proven.

Requested by @steipete

## Work sessions

[Discussion, implementation and verification](https://team.openclaw.ai/chat/roboclaw/~key/dashboard/b5679712-7777-4ff7-a05a-81c1efab2069)

Co-authored-by: steipete <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant