Skip to content

fix(test): join requester retry before advancing its clock - #160407

Merged
vincentkoc merged 1 commit into
mainfrom
fix/requester-wake-fixture-clock
Sep 28, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/requester-wake-fixture-clock

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

A requester-wake E2E test advances 151 seconds of fake time in one operation. Its scheduled retry starts real worker I/O inside that interval; the same clock can fire the worker timeout before the operation joins, producing intentional non-delivery instead of the expected recovered wake.

Observed in CI job 108907934613: 17 cases passed; the rejected-next-child CLI case failed with worker task timed out. The fixture, retry owner and worker pool are byte-identical on that graph PR and its main base.

Related: #160010
Unblocks: #160311

Result

The fixture advances to its recorded retry deadline, joins the existing owned-work observer, then advances the remainder of the original 151-second window. The production timer still admits the retry. The final sweep, delivered-cleanup checks, idempotency identities, one-visible-final check and no-replay assertions remain intact across all four serial-continuation variants.

Validation

Head: 387cea3bea22575c800393f591ebaec8964a61e6; base: f504ddd345aaeb5f0691f7229c94c4816e899b7e.

  • Source audit verified the existing retry timer, root-work join and worker timeout. Pinned Vitest 5.0.1 calls timers without joining native worker I/O during advanceTimersByTimeAsync.
  • Dedicated focused remote execution stopped in the required cold-build prerequisite before any test ran: the 12 GiB process-tree cap was reached after 91.12 s; a second attempt using the existing 6144 MiB build-heap setting also stopped before tests after 104.09 s. Neither attempt is a fixture result or a passing baseline. No third build retry is planned; the distinct build-budget follow-up is recorded in the linked issue. Exact-head hosted CI must execute the selected requester-wake suite and static checks before landing.
  • Independent owner-level source review is clean: the real retry timer still admits work, the existing root/scope observer joins it, and the absolute horizon preserves the full no-replay interval. Autoreview separately found no P0–P2 diff finding but could not inspect owner files; that limited result is not represented as the owner-level review. Exact-head hosted CI and ClawSweeper review are required before landing.
  • Before the formatting-only correction, checks-node-changed executes all 18 requester-wake cases successfully: Vitest 99.44 s, test bodies 38.807 s, wrapper 100.452 s. The previously failing rejected-next-child CLI row passes in 1.487 s. All four serial-continuation variants pass with the original assertions. This is behavior proof for prior head 752d806abe64eb2b448f8502f33d001bec449104; that run subsequently failed the formatter gate. Pinned oxfmt 0.68.0 changed only a line wrap, and the local file exactly matches the remote formatter output SHA-256 402458c97a86c4073258c98364b3a6c64509b937c57e330f90059fcf6214e24d. Fresh exact-head CI and ClawSweeper review are required for the current formatted commit.
  • Current formatted head passes all 18 cases in job 108916422502: Vitest 90.85 s, test bodies 36.010 s, 92.751 s from shard begin to exit. The previously failing rejected-next-child CLI case passes in 1.413 s; the other serial variants also pass. The selected job runs this whole file and five sibling files successfully. This is not a replay of the original 12-file job order.
  • Whitespace and public-data checks pass.

Production +0/-0; tests +11/-1 (net +10), one file. No timeout increase, new mock, production behavior or assertion removal.

Review disposition

Exact-head ClawSweeper review finds no code/security defect and agrees this is the correct fixture owner. Its only pre-merge request and optional rank-up move are additional repeatability sampling: 20 standalone runs and three original-shard runs.

That sampling request is explicitly declined under the governing bounded best-effort failure policy in AGENTS.md at maintainer-workflow revision 72b76842012f405400a2b6b694f46bd62b7bca1c (Quality and cost; GitHub and change boundaries). That policy requires documenting the failure, attempts, evidence and remaining uncertainty, then continuing through normal CI/review gates; it does not make an unresolved flake an extra landing-approval gate. The workflow also requires reusing valid proof and explaining rejected review requests. Here the timer/worker/join mechanism is inspected directly, the original CI failure is retained, both complete candidate file runs pass, and two independent cold-build attempts already reached their 12 GiB hard cap before tests. No further sampling or unbounded build retry is justified for this test-only prerequisite. No claim of 20-run stability or original-shard-order qualification is made. Required exact-head CI and protected native landing remain intact.

The same clock defect is independently tracked in #160406, alongside the broader #160297. This PR changes only the recorded retry deadline in the existing E2E fixture; it does not duplicate that PR's product work or introduce a general timer helper.

Exact current-head CI: run 36418727017 completed successfully. Selected tests, formatting, lint, types, guards and dependency checks passed. The review disposition above is unchanged; no extra repeatability claim is made.

@vincentkoc vincentkoc self-assigned this Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@vincentkoc
vincentkoc force-pushed the fix/requester-wake-fixture-clock branch from 752d806 to 387cea3 Compare September 28, 2026 11:56
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 387cea3bea22575c800393f591ebaec8964a61e6. The only change since 752d806abe64eb2b448f8502f33d001bec449104 is the line wrap produced by pinned oxfmt 0.68.0. The prior exact-head requester-wake job passed all 18 cases; that CI run later failed formatting. Fresh CI must cover the current formatted commit before landing. The PR body records the inherited failure attribution, existing owner/dependency contract, prior behavior proof and unrelated bounded build setup failures.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 8:04 AM ET / 12:04 UTC.

ClawSweeper review

What this changes

The branch changes the requester-wake end-to-end test to join worker work at its recorded retry deadline before completing the original fake-time observation window.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open. Current main retains the reported test-timing defect, and the focused repair has not merged. A prior-head full-file CI job succeeded, but the repository's flake-triage repeatability bar remains unmet.

Priority: P2
Reviewed head: 387cea3bea22575c800393f591ebaec8964a61e6

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch retains the original assertions and has one successful prior-head suite run, but the required repeatability evidence is incomplete.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The member-authored test-only PR is exempt from external-contributor real-setup proof. A linked prior-head CI job succeeded on the changed full-file test, the current patch differs only in line wrapping, and no stored-data contract changes; repeat-run stability is assessed separately.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The member-authored test-only PR is exempt from external-contributor real-setup proof. A linked prior-head CI job succeeded on the changed full-file test, the current patch differs only in line wrapping, and no stored-data contract changes; repeat-run stability is assessed separately.
Evidence reviewed 11 items Introduced patch: The pinned merge-base-to-head diff changes only the requester-wake test. It splits the 151-second advance at the stored retry deadline, joins existing owned work, and retains the later delivery and no-replay assertions.
Current main still needs the repair: The fetched main revision still advances all 151,000 milliseconds before joining work.
Retry owner: The registry schedules a timer from the stored next-attempt deadline and admits the wake when that timer fires.
Findings None None.
Security None None.

How this fits together

When a child agent finishes, the subagent registry schedules any needed retry to wake its parent through Gateway work. This test supplies child completions and a fake clock, then checks delivery and replay outcomes.

flowchart LR
  A[Child completion] --> B[Registry wake state]
  C[Fake clock] --> D[Retry timer]
  B --> D
  D --> E[Gateway worker]
  E --> F[Delivery and replay checks]
Loading

Before merge

  • Resolve merge risk (P1) - Repeatability in the original shard order remains unqualified: one successful prior-head file run is documented, while the repository's flake-triage guide calls for 20 clean standalone runs and three clean original-shard runs.
  • Complete next step (P2) - Show 20 clean standalone full-file runs and three clean runs in the original shard order, as required by the repository flake-triage guide.
Agent review details

Security

None.

PR surface

Tests +10. Total +10 across 1 file.

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

Review metrics

Metric Value Why it matters
Existing suite cost 18 cases; 38.807 s test bodies; 100.452 s wrapper The full-file test is costly enough that its required repeatability evidence merits explicit review.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #160406
Summary: The open issue reports the same requester-wake fake-clock failure; this PR is its focused candidate repair.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep an end-to-end requester-wake check that exercises the real retry and worker completion, preserves the delivery and no-replay assertions, and stays stable in the original shard order.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep an end-to-end requester-wake check that exercises the real retry and worker completion, preserves the delivery and no-replay assertions, and stays stable in the original shard order.

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

Yes. The full requester-wake file failed in CI and an isolated Testbox with main-equivalent fixture and worker code, and current main retains the clock jump. This read-only review did not execute the suite.

Is this the best way to solve the issue?

Yes. Correcting the fixture's clock ordering is narrower than changing production retries or worker timeouts, and the prior-head file run supports the approach; repeatability still needs qualification.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 733ceac1a7ea.

Labels

Label changes:

  • add P2: A bounded test-fixture timing defect is disrupting agent CI validation without evidence of a production regression.
  • 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. Not applicable: The member-authored test-only PR is exempt from external-contributor real-setup proof. A linked prior-head CI job succeeded on the changed full-file test, the current patch differs only in line wrapping, and no stored-data contract changes; repeat-run stability is assessed separately.

Label justifications:

  • P2: A bounded test-fixture timing defect is disrupting agent CI validation without evidence of a production regression.
  • 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. Not applicable: The member-authored test-only PR is exempt from external-contributor real-setup proof. A linked prior-head CI job succeeded on the changed full-file test, the current patch differs only in line wrapping, and no stored-data contract changes; repeat-run stability is assessed separately.

Evidence

What I checked:

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record clean full-file runs in the original shard order to establish that the timing failure stays resolved.

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.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…160407)

Join requester retry work at its recorded deadline before completing the original fake-time window. This prevents the fixture from firing the worker timeout while real I/O is still pending; production timers and all delivery/no-replay assertions are unchanged.

All 18 requester-wake cases and exact-head CI pass. The additional 20+3 repeatability sampling request is explicitly declined under the governing bounded best-effort policy, with the attempts and remaining uncertainty documented in the PR.

Related: openclaw#160010, openclaw#160406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling 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