Skip to content

test(agents): settle requester retry before advancing time - #160411

Closed
steipete wants to merge 2 commits into
mainfrom
deslop/l136-requester-clock
Closed

steipete wants to merge 2 commits into
mainfrom
deslop/l136-requester-clock

Conversation

@steipete

@steipete steipete commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The requester-wake regression suite can time out real worker I/O while its fake clock jumps across a retry window, failing CI under runner load.

User Impact

No production behavior changes. The fixture lets the admitted retry finish before advancing past its worker deadline, while retaining the original 151-second window and exact no-duplicate-continuation assertions.

Why This Change Was Made

A single 151-second timer advance starts the 30-second requester retry and can also expire its newly created 60-second state-worker task before real I/O completes. The no-next-child case now advances to the persisted retry time, joins the retry's owned work, then advances the remainder of the original window. Native retry timers still execute; no timeout, retry count, assertion, or skip is weakened.

This was found while validating #160038 and is kept separate from the provider refactor.

Evidence

  • CI 36410960587, job 108891389343 failed preserves serial continuation without replaying an accepted wave (cli, next child accepted=false, requester final=false) with completed cleanup but delivery error worker task timed out.
  • Managed Codex review: scoped-clean through P2.
  • Blacksmith Testbox tbx_01m3kw5zqt1eqbp5w6tcsp20mj verified commit 19759973fb6bb3e98badc36595d69459c7b66863, tree e7a45c9b7416fff1d417b29ace656cc659afea96. 20 complete file runs passed (360 cases); three original eight-target job runs passed (24 target invocations); full selected changed checks passed. The command exited 0, and the lease was stopped.
  • The unmodified eight-target baseline passed this replay. The recorded CI failure remains the observed intermittent reproduction; the passing replay is not claimed as a fix.
  • Cost: pnpm test src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts --maxWorkers=1 took 46.94s median wall across 20 runs (range 35.99–69.79s). This existing 18-case E2E suite owns durable settlement and no-replay behavior through real worker I/O plus CLI/native composition; no tests or process boots were added.
  • Prior-head 19759973fb6bb3e98badc36595d69459c7b66863 CI 36419185500 passed. Its file invocation took 74.27s, with Vitest reporting 72.44s total and approximately 27.5s in tests; transforms dominate the remaining time.
Remote commands and original job selection

All commands ran serially through node scripts/crabbox-wrapper.mjs run --provider blacksmith-testbox --id tbx_01m3kw5zqt1eqbp5w6tcsp20mj --timing-json -- OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 ..., after frozen install and source verification.

pnpm install --frozen-lockfile
pnpm test src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts --maxWorkers=1
node --import tsx scripts/ci-run-node-test-shard.mts
node scripts/check-changed.mjs --base origin/main --head HEAD --timed -- src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts

The file command ran 20 times without retrying failures. The shard runner used the captured original OPENCLAW_NODE_TEST_TARGETS_JSON, two inner workers, and one admitted plan to preserve the original job order:

extensions/diagnostics-prometheus/src/install-runtime.e2e.test.ts
extensions/ollama/src/node-inference.paired-node.e2e.test.ts
src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts
src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts
src/channels/plugins/contracts/mattermost-read-authority.contract.test.ts
src/channels/plugins/contracts/session-binding.registry-backed.contract.test.ts
src/commands/onboard-guided.inference.e2e.test.ts
src/plugin-sdk/facade-runtime.test.ts

Final disposition

Closed as superseded by #160407, merged as 88e3331026a1daf43b093fbfa6a27c7494b72b86. A fresh main fetch confirmed the same retry-before-clock-advance repair at the fixture owner. This PR was not merged.

The final local follow-up also bounds the recorded retry by the original 151-second horizon. Blacksmith Testbox tbx_01m3m0yhnp5ydfaaavdqvar80d passed all 18 cases and selected changed checks for final fixture blob bedd093b4cee162ce17ca28e662d12b0be4490a7 (head f2d8a8ede1accf04afdfd4e24b03aa9b8719d0c9). An adverse control changing the native retry delay from 30 seconds to 180 seconds failed specifically at the bound assertion; production bytes were restored before checks. This proves the added assertion, not exact-head CI for the follow-up or a claim that main contains that extra assertion. The original 20-file-run and three-job-run evidence above remains the repeatability evidence for the shared scheduling mechanism.

@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 complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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, 9:18 AM ET / 13:18 UTC (Revision 4).

ClawSweeper review

What this changes

The branch advances the requester-wake end-to-end test clock to a stored retry deadline, waits for worker activity to settle, then completes a bounded 151-second window.

Merge readiness

⛔ Blocked before merge - 3 items remain

Current main already contains the requester retry clock repair through merged #160407. This branch adds a small window-bound guard, still conflicts with main, and is identified as member-authored in Repository State, so its disposition needs maintainer review.

Priority: P3
Reviewed head: f2d8a8ede1accf04afdfd4e24b03aa9b8719d0c9
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The small fixture repair has useful repeated parent-head validation and no identified code defect; the remaining question is whether its unique guard warrants integration.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: Repository State identifies a member-authored test-only PR, so the external-contributor proof gate does not apply. The PR body reports parent-head Testbox runs through real worker I/O; the later bound-guard commit has no recorded current-head run. No stored data model changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository State identifies a member-authored test-only PR, so the external-contributor proof gate does not apply. The PR body reports parent-head Testbox runs through real worker I/O; the later bound-guard commit has no recorded current-head run. No stored data model changes.
Evidence reviewed 10 items PR introduction: The pinned merge-base-to-head patch replaces one 151-second timer advance with a split at the stored retry deadline and adds a window-bound assertion.
Current main behavior: Main already advances to the recorded retry time, joins owned worker activity, and then completes the original 151-second window before asserting one visible continuation.
Merged fix provenance: The merged change at this commit replaces the single timer advance with the same retry-and-join sequence; its recorded parent still has the single advance.
Findings None None.
Security None None.

How this fits together

The subagent registry records child completion and schedules a retry when a requester needs to be resumed. This test advances simulated time while exercising registry persistence and real worker I/O, then checks that the requester continues once.

flowchart LR
A[Child completion] --> B[Requester wake registry]
B --> C[Stored retry deadline]
C --> D{Next child accepted?}
D -- No --> E[Advance clock and join worker]
D -- Yes --> F[Complete retry window]
E --> F
F --> G[Assert one continuation]
Loading

Decision needed

Question Recommendation
Should this PR close in favor of the merged requester-clock repair, or should its remaining window-bound assertion be retained? Close as superseded: Use the merged repair and retarget the dependent provider PR to main; the extra guard does not establish a separate needed fix.

Why: The central repair is merged, but this branch has a small unique assertion and conflicting author-association signals; its current head also conflicts with main.

Before merge

  • Resolve merge risk (P1) - GitHub reports the current head as conflicting with main in the same fixture block; retaining its extra bound guard requires an explicit conflict resolution.
  • Complete next step (P2) - Decide whether to close this PR as superseded or retain its bound guard; resolve the fixture conflict before any merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
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 46.94s median across 20 parent-head runs; 74.27s in cited CI The PR measures the cost of the modified end-to-end suite without adding a test case or process boot.

Root-cause cluster

Relationship: superseded
Canonical: #160407
Summary: The merged PR owns the same fake-clock retry repair; the provider refactor depends on this branch but addresses separate work.

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 the merged fixture repair as the single implementation, retarget the dependent provider refactor to main, and retain the extra window-bound assertion only if its distinct value warrants a focused follow-up.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the merged fixture repair as the single implementation, retarget the dependent provider refactor to main, and retain the extra window-bound assertion only if its distinct value warrants a focused follow-up.

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

No current-main failing reproduction was run in this read-only review. The pre-fix timeout was observed in CI and an isolated Testbox, and current main contains the merged clock repair.

Is this the best way to solve the issue?

No—the merged fixture repair is already the narrow solution to the timeout. The branch's additional bound check should be considered only if it protects a distinct test invariant.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a test-fixture reliability change with no production behavior change, and its central repair is already on main.
  • 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. Not applicable: Repository State identifies a member-authored test-only PR, so the external-contributor proof gate does not apply. The PR body reports parent-head Testbox runs through real worker I/O; the later bound-guard commit has no recorded current-head run. No stored data model changes.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • Peter Steinberger: 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.

  • If retaining the guard, resolve the same-block conflict and run the focused requester-wake suite on the resolved head.

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-28T11:54:07.317Z sha 1975997 :: blocked before merge. :: none
  • reviewed 2026-09-28T12:14:28.474Z sha 1975997 :: blocked before merge. :: none
  • reviewed 2026-09-28T12:45:06.247Z sha 1975997 :: blocked before merge. :: none

@steipete
steipete marked this pull request as ready for review September 28, 2026 12:01
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 28, 2026
@steipete steipete closed this Sep 28, 2026
@RomneyDa
RomneyDa deleted the deslop/l136-requester-clock branch October 22, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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