Skip to content

test: advance startup fixtures to their scheduled retry - #190193

Merged
roboclaw-bot merged 1 commit into
mainfrom
main-ci/l201-startup
Nov 1, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
main-ci/l201-startup

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes two jobs in run 41288828221:

  • checks-node-compact-large-14: gateway-chat.startup.test.ts:246, both “send waits through startup and writes once” and “new waits through startup and writes once” time out at 120000ms.
  • checks-node-compact-large-19: server-methods.startup-deadline.test.ts:195, startup agent: ready and startup sessions.create: ready time out at 120000ms.

User Impact

Test-only CI repair; production startup backoff remains unchanged.

Why This Change Was Made

Introduced by ebc9d7e (#190159): repeated startup refusals back off to eight seconds. Advancing only one second after readiness leaves the awaited retry frozen. Advance to the already scheduled next timer in both fixtures. Existing deadline, cancellation, serialized-request-byte, and exactly-one-write assertions remain unchanged. Production delta 0; tests +2/-2, with no new machinery.

Evidence

  • Ownership rechecked against fresh main and recent/targeted open PR file inventories; no competing fix found.
  • Lane l201 reproduced all four ready-case failures through the Gateway/TUI boundaries. Complete Gateway startup, TUI startup, and pending-request/backoff owner suites passed 33/33 on pinned Bun and 33/33 on Node. Scoped typecheck, type-aware lint, format, and whitespace passed.
  • Independent Codex autoreview with both complete fixtures and the request/backoff owner on base 42d5039f0aa8: P0–P2 scoped-clean, no findings. The rebased patch is identical; affected fixtures and backoff owner are unchanged on main.
  • After rebasing onto 2423623c3461610130360fa978cd364653fee1b2, reran both complete touched test files through OPENCLAW_VITEST_RUNTIME=bun node scripts/run-vitest.mjs ... --maxWorkers=1: 22/22 passed (10 Gateway and 12 TUI cases, no skipped cases).
  • No retries, skipped tests, timeout increases, weakened assertions, baseline growth, or workflow reruns.

Co-authored-by: steipete [email protected]

The client now backs off repeated startup refusals up to eight seconds.
Advance the frozen clock to its next timer after readiness so the existing
Gateway and TUI write assertions observe the scheduled retry.

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

clawsweeper Bot commented Nov 1, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Nov 1, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 1, 2026 09:19
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) November 1, 2026 09:32
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The Gateway and TUI startup fixtures advance fake time to the next scheduled timer after readiness.

Example: The TUI send fixture becomes ready after 240,000 ms of simulated startup.

  • Before: Advancing another 1,000 ms leaves the backed-off retry frozen, so the test times out.
  • After: Advancing to the scheduled retry completes the operation and preserves the exactly-one-write assertion.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct test repair supported by production-owner inspection, original failure annotations, and passing exact-head test checks; proof remains an in-process harness.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only repair changes fake-clock advancement in existing production-path fixtures; exact-head changed-test checks pass, and no shipped behavior changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Startup CI cases time out because fake time stops before the next retry.
Reason: Restores useful boundary tests without changing the intentional production backoff or weakening their contracts; maintainer-authored direction is already established.

Regression provenance

Regression provenance — verified: source commit ebc9d7e7c273 by Peter Steinberger; canonical PR #190159 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep open: this PR repairs confirmed startup-test timeouts without weakening assertions or changing production behavior; no actionable defects found.

Priority: P2
Reviewed head: 7fcdb4776192e1eebc70311445252a4ac7f8b51f

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway and TUI startup tests send requests through the shared protocol client, simulate startup refusals, and verify eventual delivery, cancellation, deadlines, and unchanged request bytes.

flowchart LR
  A[Startup fixtures] --> B[Gateway or TUI entry]
  B --> C[Protocol client]
  C --> D[Pending request owner]
  D --> E[Scheduled retry]
  E --> F[Fixture transport]
  F --> G[Delivery assertions]
Loading

Technical review

Best possible solution:

Keep the existing retry owner and advance these two fixtures to its scheduled retry while preserving every behavioral assertion.

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

Yes: current-main backoff and both fixtures explain the frozen retry, and GitHub annotations confirm all four timeouts; this read-only review did not execute tests.

Is this the best way to solve the issue?

Yes: these are the smallest complete fixture repairs, with backoff timing independently tested by its existing owner suite.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Gateway startup ready-case clock advance keeps the original intent (cdc99c9: Consolidated startup scenarios while retaining boundary and lifecycle assertions.)
  • TUI startup ready-case clock advance keeps the original intent (b6bf52d: Consolidated fixtures while retaining distinct delivery, cancellation, and ordering checks.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ebc9d7e adds packages/gateway-client/src/pending-request.ts:299 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ebc9d7e7c273; files: packages/gateway-client/src/pending-request.ts)
  • SunnyShu: Raw commit a267651 adds src/tui/gateway-chat.startup.test.ts:266 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: a26765171f7c; files: src/tui/gateway-chat.startup.test.ts)

PR surface

Tests 0. Total 0 across 2 files. Added test files: 0.

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

Labels

Label changes:

  • add P2: Repairs confirmed CI test timeouts with a narrow fixture correction and no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Repairs confirmed CI test timeouts with a narrow fixture correction and no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 1, 2026, 4:35 AM ET / 09:35 UTC.

@roboclaw-bot
roboclaw-bot merged commit 72ba78c into main Nov 1, 2026
197 checks passed
@roboclaw-bot
roboclaw-bot deleted the main-ci/l201-startup branch November 1, 2026 09:44
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 2, 2026
)

## What Problem This Solves

Fixes two jobs in [run 41288828221](https://github.com/openclaw/openclaw/actions/runs/41288828221):

- [checks-node-compact-large-14](https://github.com/openclaw/openclaw/actions/runs/41288828221/job/124795798742): `gateway-chat.startup.test.ts:246`, both “send waits through startup and writes once” and “new waits through startup and writes once” time out at 120000ms.
- [checks-node-compact-large-19](https://github.com/openclaw/openclaw/actions/runs/41288828221/job/124795798949): `server-methods.startup-deadline.test.ts:195`, `startup agent: ready` and `startup sessions.create: ready` time out at 120000ms.

## User Impact

Test-only CI repair; production startup backoff remains unchanged.

## Why This Change Was Made

Introduced by fbb3769 (openclaw#190159): repeated startup refusals back off to eight seconds. Advancing only one second after readiness leaves the awaited retry frozen. Advance to the already scheduled next timer in both fixtures. Existing deadline, cancellation, serialized-request-byte, and exactly-one-write assertions remain unchanged. Production delta 0; tests +2/-2, with no new machinery.

## Evidence

- Ownership rechecked against fresh main and recent/targeted open PR file inventories; no competing fix found.
- Lane l201 reproduced all four ready-case failures through the Gateway/TUI boundaries. Complete Gateway startup, TUI startup, and pending-request/backoff owner suites passed 33/33 on pinned Bun and 33/33 on Node. Scoped typecheck, type-aware lint, format, and whitespace passed.
- Independent Codex autoreview with both complete fixtures and the request/backoff owner on base `0082e6368c96`: P0–P2 scoped-clean, no findings. The rebased patch is identical; affected fixtures and backoff owner are unchanged on main.
- After rebasing onto `1f4d22031c73bcd1c42b48d5c84c9a9192b37099`, reran both complete touched test files through `OPENCLAW_VITEST_RUNTIME=bun node scripts/run-vitest.mjs ... --maxWorkers=1`: 22/22 passed (10 Gateway and 12 TUI cases, no skipped cases).
- No retries, skipped tests, timeout increases, weakened assertions, baseline growth, or workflow reruns.

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

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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