Skip to content

improve: shorten reservation workflow test runtime - #2200

Merged
obviyus merged 2 commits into
mainfrom
test/reservation-retry-no-wait
Nov 11, 2026
Merged

obviyus merged 2 commits into
mainfrom
test/reservation-retry-no-wait

Conversation

@obviyus

@obviyus obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Replaces #2194 by @saariuslystoned, whose org-owned fork branch does not accept maintainer pushes. The original commit is kept and credited as co-author.

What Problem This Solves

The reservation workflow test spends most of its runtime waiting through real retry backoffs in its loopback fixtures.

User Impact

There is no user-visible change. test/review-lease-reservation.test.ts finishes in about 30 s instead of about 60 s.

Why This Change Was Made

The test runs the real "Reserve exact review lease" step, whose retry loop sleeps 2 * attempt + 0..3 seconds. With the new --fixture-no-wait option, a sleep shim placed first on the step's PATH records each requested delay instead of waiting. The e2e checks every recorded delay against the workflow's bounds, and requires service-unavailable to record all four of its retry waits, so a bypassed shim fails instead of passing vacuously. The standalone e2e and --quiet keep real waits; the workflow is unchanged.

Compared with the original PR, this replaces the BASH_ENV sleep function and the hand-maintained per-scenario attempt table with the shim and derived checks (+67 lines instead of +182). It also drops the unrelated watchdog and --quiet exclusivity changes.

Documentation Impact

None. docs/proof/reservation-retry-fixture-20261109/README.md records the proof.

Evidence

  • node --test test/review-lease-reservation.test.ts: 2 pass in 29.5 s (base 59.4 s, original PR 25.6 s).
  • node scripts/e2e/review-reservation.mjs <dir> --fixture-no-wait: 13/13 scenarios. Recorded waits: service-unavailable [3,6,9,9]; each recovery scenario one wait; all others none. These match the original PR's hand-written table.
  • --quiet standalone run passes. check:docs, lint:scripts and oxfmt --check are clean.

Real Behavior Proof

  • Claim: the focused test still exercises the real reservation retry path and its backoff schedule, without the real waits.
  • Surface: the real workflow step script with bash -c, the built CLI and curl over loopback HTTP; only sleep is shimmed.
  • Observed: all 13 scenarios pass with the recorded delays above, each within 2n..2n+3.
  • Environment: Node 24.22.1, macOS arm64.
  • Limits: the GitHub and queue responses are controlled fixtures, and real waits are covered only by the standalone e2e.

Ryan Saari and others added 2 commits November 11, 2026 11:40
Replace the BASH_ENV sleep function and the hand-maintained per-scenario
attempt table with a sleep shim on the step's PATH. Every recorded delay
is still checked against the workflow's 2n + 0..3 backoff, and the
service-unavailable scenario must record all four waits.

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 11, 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 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. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR skips fixture retry waits while recording and checking the requested backoff delays.

Example: Run test/review-lease-reservation.test.ts on Node 24.22.1 and macOS arm64.

  • Before: The reported baseline takes 59.4 seconds.
  • After: The reported candidate takes 29.5 seconds while retaining all 13 reservation scenarios.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, narrow test-only change with execution evidence directly covering its fixture behavior and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The supplied Node 24/macOS execution results exercise the changed fixture driver through its actual command, report all 13 reservation outcomes and recorded retry delays, and compare baseline and candidate runtime; the claim is limited to fixture execution with controlled HTTP responses.
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 belongs only to the fixture driver, and the maintainer-authored direction preserves production outputs and defaults.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a focused test-runtime improvement absent from current main, with relevant execution evidence and no actionable correctness or security findings.

Priority: P3
Reviewed head: b3857f53b940c05d514413f683705517a4d28c88

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Node test invokes a fixture driver that extracts the reservation workflow Bash, runs the existing CLI against loopback services, and checks reservation outcomes, comment operations, and requested retry delays.

flowchart TD
  A[Node reservation test] --> B[Reservation fixture driver]
  B --> C[Workflow Bash]
  C --> D[Reservation CLI]
  D --> E[Loopback services]
  C --> F[Sleep recorder]
  E --> G[Outcome assertions]
  F --> G
Loading

Technical review

Best possible solution:

Retain the fixture-local sleep recorder and delay checks while preserving production backoffs and standalone real-wait execution.

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

The baseline test invokes the real workflow retry sleeps, and supplied comparative runs establish their runtime cost; no target code was executed during this review.

Is this the best way to solve the issue?

The existing fixture driver is the appropriate owner, and the narrow PATH shim removes waiting while preserving scenario assertions and checking requested delays.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit c4ddf95 adds scripts/e2e/review-reservation.mjs:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c4ddf95d7aa0; files: scripts/e2e/review-reservation.mjs)
  • Ayaan Zaidi: Raw commit c4ea948 adds scripts/e2e/review-reservation.mjs:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: c4ea948b1abe; files: scripts/e2e/review-reservation.mjs)

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.

Review metrics

Metric Value Why it matters
Change scope Production +0/-0; fixture and test +37/-5; proof documentation +30/-0 The growth is confined to recording skipped waits, checking their bounds, and documenting the measured improvement.

Root-cause cluster

Relationship: canonical
Canonical: #2200
Summary: This PR explicitly replaces the closed predecessor with a simpler implementation of the same fixture-runtime improvement.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P3: This improves contributor test runtime without changing production behavior.
  • 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 improves contributor test runtime without changing production behavior.
  • 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 11, 2026, 1:27 AM ET / 06:27 UTC.

@obviyus
obviyus merged commit 8ba1ab4 into main Nov 11, 2026
30 checks passed
@obviyus
obviyus deleted the test/reservation-retry-no-wait branch November 11, 2026 06:28
obviyus added a commit that referenced this pull request Nov 14, 2026
* fix(review): qualify exact push relay rejection fixture

* fix: report the real checkout inspection failure reason

- Lead the read-only checkout inspection failure message with the runner error when present.
- Keep a redacted 2000-character stdout/stderr tail as context; keep stderr || stdout when no error.
- OpenClaw prints a plugin trust warning to stderr on every run, which hid every inspection reason.
- Add runner tests for OpenClaw and Codex inspection failures.

* fix: qualify the historical OCE harness origin fixture (#2197)

* test: clear dashboard token watchdog after completion (#2196)

Co-authored-by: Ryan Saari <[email protected]>

* fix: qualify exact OCE 5398 JDBC fixture revisions (#2198)

* fix(dashboard): normalize dashboard strict paths to POSIX slashes (#2177)

* fix: use server-issued census observation windows (#2174)

* fix: bound census observations with server-issued query windows

Replace cross-host completion-clock comparisons for negotiated census producers with stored metadata and per-assignment observation windows. Preserve strict legacy fallback, lease/checkpoint/identity fences, stable witnesses, and capacity bounds. Include signed native temporal red/green and rolling-compatibility proof.

Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* fix: use server-issued census observation windows

Worked on by:
- @brokemac79

Co-authored-by: brokemac79 <[email protected]>
OpenClaw-Publication: 9c3c62ec-951b-43b0-98f9-511dba1829cf

* fix: preserve negotiated census authority across legacy upgrades

Add real workerd cold-restart proof that persisted deployed legacy-v2 checkpoints, cursors, identities and receipts load unchanged and safely continue through negotiated windows. Require the atomic lease mode before accepting any page, including legacy-shaped in-flight data before next issues a witness. Resolves the accepted data-model compatibility proof blocker without state reset or weakened legacy guards.

Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* Publish openclaw/coverage-observation-window-fix

Worked on by:
- @brokemac79

Co-authored-by: brokemac79 <[email protected]>
OpenClaw-Publication: 281f1b7a-6346-42af-b919-9fd25dd6b736

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* fix(test): normalize test runner paths to POSIX slashes (#2176)

* fix: terminal acknowledgement test passes on a timeout instead of the real retry failure (#2199)

* test: exercise terminal acknowledgement retries without delay

* test: use the real retry helper with Retry-After: 0

The retry helper honors Retry-After, so the fixture no longer needs a
patched copy of the helper and request builder. The unchanged workflow
step and helper now run all six attempts without waiting.

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

* improve: shorten reservation workflow test runtime (#2200)

* test: avoid reservation fixture retry waits

* test: record reservation retry waits with a PATH sleep shim

Replace the BASH_ENV sleep function and the hand-maintained per-scenario
attempt table with a sleep shim on the step's PATH. Every recorded delay
is still checked against the workflow's 2n + 0..3 backoff, and the
service-unavailable scenario must record all four waits.

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

* fix(review): stop demanding proof for speculative races and in-flight revocation (#2202)

* fix(review): stop demanding proof for speculative races and in-flight revocation

Authority-chain review now triggers only on changed authorization
decisions; revocation applies to the next request; unproven authority is
no longer a merge gate. P3 findings are advisory, speculative race
machinery without recorded buy-in and preemptive single-use helpers become
findings, and AGENTS.md adopts the matching design rules.

Co-authored-by: obviyus <[email protected]>

* fix(review): keep advisory P3 findings out of the merge readiness gate

Co-authored-by: obviyus <[email protected]>

* fix(review): keep P3-only incorrect verdicts and queued repairs advisory

Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: obviyus <[email protected]>

* fix: reuse reviewed test credentials after surrounding edits (#2201)

Approve exact previously reviewed synthetic Raw/RawV2 value pairs while retaining detector, decoder, native metadata, verification, and completion checks. Remove hostname-based exemptions and keep normalized Postgres findings blocking.

Validation: full pnpm check, 32 focused tests, 28 native proof cases in an isolated UTM guest, and a clean final committed whole-branch Codex review. The maintainer explicitly waived the hosted ClawSweeper review and approved this merge in the task conversation.

* feat(review): read durable Gitcrawl cluster service context

* fix(review): validate service tokens without control regex

* fix: allow service-backed review-start reservations

* style: format service review-start reservation proof

* fix: allow service-backed review artifact publication

* feat: prepare service context before applying decisions

* fix: preserve parent identity during apply preparation

* fix: wire apply preparation to the shared relation policy

* test: cover service-backed apply and authority drift

* test: hold paired closes without prepared service context

* test: align service apply fixtures with live revision guards

* docs: explain apply preparation failure ownership

* fix: enforce apply retry guards without mutation receipts

* style: format service freshness assertion

* test: exercise service retries with a current review lease

* fix: refresh apply authority after ambiguous writes

* style: format service lease regression fixture

* test: reject exact-event retries after lease revocation

* style: format exact-event retry assertion

---------

Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Free Wortley <[email protected]>
Co-authored-by: Ryan S <[email protected]>
Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: Saiyam Jain <[email protected]>
Co-authored-by: RoboClaw <[email protected]>
Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: obviyus <[email protected]>
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.

1 participant