Skip to content

improve: shorten reservation workflow test runtime - #2194

Closed
saariuslystoned wants to merge 1 commit into
openclaw:mainfrom
saari-co:codex/ci-reservation-retry-fixture-20261109
Closed

saariuslystoned wants to merge 1 commit into
openclaw:mainfrom
saari-co:codex/ci-reservation-retry-fixture-20261109

Conversation

@saariuslystoned

Copy link
Copy Markdown
Contributor

What Problem This Solves

The reservation workflow test spends time waiting through retry backoffs in its local fixture scenarios.

User Impact

There is no user-visible change. The reservation test finishes sooner while the workflow retry policy and standalone e2e behavior remain unchanged.

Why This Change Was Made

The Node test opts into fixture-only simulated sleeps while continuing to run the extracted workflow Bash against loopback fixtures. The fixture validates each requested delay and attempt order; standalone execution retains real waits, and the fixture-only mode cannot be combined with --quiet.

Documentation Impact

The existing standalone e2e and --quiet contracts remain accurate. The historical proof record documents the tested candidate, commands, observations and limits.

Evidence

The full local pnpm run check did not pass: 7,133 passed, three failed and 22 skipped; static, build, formatting and lint stages and the changed reservation test passed. In the isolated offline environment, the packed local reviewer install and the compiled live-admission Corepack fetch failed with registry DNS EAI_AGAIN. The signed-webhook loopback test expected 202 but received 503; its cause is unknown. Hosted candidate CI has not yet been established.

A prepublication whole-branch Codex P3 review reported no actionable findings for head ab442b271635a4d1672480c4efed93666e2ca841 against base eae7a713e211392f2a57ab91880a761efa1ae359; it reviewed evidence without running the project.

Real Behavior Proof

  • Claim and surface: The Node reservation test can avoid fixture backoff waits while exercising the real extracted workflow shell, CLI and loopback requests. Its 13 cases retained the ordered outcomes and recorded method/path/status/comment-ID traces against the base; existing assertions separately verified durable-comment contents. Complete request payload-byte parity was not measured.
  • Command and environment: corepack pnpm run build:node followed by node --test --test-concurrency=1 '--test-name-pattern=^reservation workflow avoids comment churn for stale and retrying owners$' test/review-lease-reservation.test.ts on Linux arm64, Node 24.22.1 and pnpm 12.15.0, with pinned dependencies, read-only source and loopback-only networking. The standalone default and --quiet e2e commands were also run with real waits.
  • Result: The selected test passed all 13 cases; standalone default passed 13 and --quiet passed four. Negative controls exercised missing, extra, malformed, out-of-range and reordered records, a newline-bearing sleep argument, a signaled child and the incompatible option pair. No namespace processes remained.
  • Timing and limits: In an interleaved local A/B/B/A comparison, base runs were 53.22 and 54.49 seconds; candidate runs were 16.61 and 16.57 seconds. Two-sample medians were 53.85 and 16.59 seconds. Jitter varied, and this small local comparison is not a hosted CI or billing estimate. The proof and observations are in the linked record above.

@clawsweeper

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

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. 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. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR skips reservation-fixture retry waits while checking requested delays and preserving standalone execution with real waits.

Example: Run the reservation test covering all 13 fixture scenarios.

  • Before: The reported local baseline median was 53.85 seconds with real retry waits.
  • After: The reported candidate median was 16.59 seconds with simulated waits and validated retry records.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test-only improvement with relevant comparative execution evidence, successful exact-head checks, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The linked record exercises the changed fixture driver through its Node invocation on Linux arm64 with Node 24, reports matched runtime measurements and preserved request traces, and checks standalone real-wait modes and negative controls; its claim is limited to fixture execution, not hosted latency or live GitHub behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Contributors wait through real retry backoffs during controlled reservation-fixture tests.
Reason: The reported runtime reduction is useful, the new flag is confined to the test driver, and existing production outputs and defaults remain unchanged.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a useful, focused test-runtime improvement that is absent from main, with no actionable correctness or security findings.

Priority: P3
Reviewed head: ab442b271635a4d1672480c4efed93666e2ca841

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Node test invokes an e2e driver that extracts the reservation workflow Bash, runs the existing CLI against loopback HTTP fixtures, and records reservation outcomes and comment operations.

flowchart TD
  A[Node reservation test] --> B[Reservation e2e driver]
  B --> C[Extracted workflow Bash]
  B --> D[Fixture sleep recorder]
  C --> E[Existing reservation CLI]
  E --> F[Loopback HTTP fixtures]
  F --> G[Outcome and trace assertions]
  D --> G
Loading

Technical review

Best possible solution:

Retain the fixture-local sleep override, explicit retry validation, and unchanged standalone real-wait modes.

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

The supplied matched runs establish the fixture-wait cost; source inspection confirms the baseline invokes real sleeps, and no target code was executed during this review.

Is this the best way to solve the issue?

The change uses the existing fixture owner, preserves production retry policy, and validates the timing requests that simulated waits would otherwise stop exercising.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is a test-runtime improvement with no production behavior change.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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:

  • P3: This is a test-runtime improvement with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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 9, 2026, 8:51 AM ET / 13:51 UTC.

@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Thanks! Continued in #2200, with your commit kept and you credited as co-author. I couldn't push here because GitHub doesn't allow maintainer edits on forks owned by an organization.

The one change: a sleep shim on the step's PATH replaces the BASH_ENV function and the hand-maintained per-scenario attempt table. Every recorded delay is still checked against the 2n + 0..3 backoff, and service-unavailable must record all four waits. The recorded delays match your table exactly.

@obviyus obviyus closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants