Skip to content

fix: verify terminal acknowledgement retry exhaustion - #2193

Closed
saariuslystoned wants to merge 1 commit into
openclaw:mainfrom
saari-co:codex/ci-terminal-ack-diagnostic-20261109
Closed

saariuslystoned wants to merge 1 commit into
openclaw:mainfrom
saari-co:codex/ci-terminal-ack-diagnostic-20261109

Conversation

@saariuslystoned

Copy link
Copy Markdown
Contributor

What Problem This Solves

The terminal acknowledgement workflow test accepts a timeout as the expected failure when the control plane keeps returning HTTP 503.

User Impact

There is no user-visible behavior change. Developers get a faster test that checks the actual exhausted-retry failure path.

Why This Change Was Made

The workflow fixture uses a private copy of the retry helper with only its wait removed. It checks six real requests and a normal failure; the production helper and its retry schedule remain unchanged. Separate helper tests retain coverage of the planned waits.

Documentation Impact

The workflow and retry contracts in the existing documentation remain accurate. The new proof document records the test fixture, validation and limitations.

Evidence

  • Focused workflow file: 8/8 passed; retry-helper and queue-request tests: 36/36 passed, no skips.
  • The same seven original cases took a local median of 30.823s before and 1.243s after in interleaved A/B/B/A runs. This is a local Linux measurement, not a hosted CI or billing estimate.
  • pnpm run check failed locally in an isolated, loopback-only environment: 7,126 passed, 10 failed, 22 skipped. Seven failures passed focused controls with task-owned writable scratch directories. The remaining webhook, package-install and admission cases need further validation in a compatible environment; the admission timeout's cause is unresolved. Successful upstream CI on the exact base included those cases, but does not establish candidate CI results.
  • The final committed branch received a clean Codex review through P3 against base eae7a713e211392f2a57ab91880a761efa1ae359. Hosted candidate CI and the current-head ClawSweeper review remain pending.

Real Behavior Proof

The actual YAML terminal-acknowledgement step ran against a synthetic loopback HTTP server on Node 24.22.1, Linux aarch64, in isolated user/PID/network namespaces. Its private helper copy replaced only the verified backoff sleep with a zero wait; the request builder was copied byte-for-byte. Six 503 responses led to ordinary exit code 1 without a timeout or signal. Recognized 409 responses and a 200 response retained their authorization checks; an unexpected 409 and 418 each failed normally after one request. The original 503 test instead passed after its 30-second timeout and four requests. Production retry timing was not exercised by the accelerated fixture; the separate retry-helper tests check its planned delay sequence using a stubbed sleep. The existing timeout's process-tree cleanup on an unexpected hang remains outside this change.

Commands: node --test --test-concurrency=1 test/terminal-finalization-cancellation-workflow.test.ts and node --test --test-concurrency=1 test/control-plane-curl.test.ts test/repair/exact-review-queue-request.test.ts in the isolated environment. Full comparison, failure details, controls and limitations are in the committed proof.

@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:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro 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: 🦐 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-repro 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

The PR accelerates the terminal acknowledgement fixture and checks retry exhaustion instead of accepting a subprocess timeout.

Example: The terminal acknowledgement endpoint repeatedly returns HTTP 503.

  • Before: The fixture passes after four requests when its 30-second timeout terminates Bash.
  • After: The accelerated fixture requires six requests and exit code 1 without a signal or timeout.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct fixture repair with sufficient controlled runtime evidence; proof remains scoped to the extracted workflow shell rather than a complete hosted acknowledgement job.
Proof confidence 🦐 gold shrimp (3/6) Sufficient (terminal): The supplied proof exercises the unchanged acknowledgement YAML shell, typed request builder, and real Bash/curl transport against injected loopback responses on Linux and macOS; six 503 requests produce ordinary exit 1, with 200 and terminal-conflict controls preserved. Production waiting and unexpected-hang process cleanup are explicitly outside the claim; linked raw asset downloads were blocked by the review environment.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Developers receive a passing acknowledgement test even when a timeout prevents the final retry attempts from running.
Reason: The change closes a demonstrated coverage gap and removes unnecessary waiting using an established fixture pattern.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR fixes a concrete test blind spot still present on current main, preserves production behavior, and has no actionable findings.

Priority: P3
Reviewed head: aa020d158661dfdf7574be36b206528c1c595d02

Before merge

None.

Findings

None.

Agent review details

How this fits together

The fixture executes the workflow's acknowledgement shell with the typed request builder and real curl against loopback HTTP, then checks requests, exit status, and authorization outputs.

flowchart LR
  A[Workflow fixture] --> B[Acknowledgement shell]
  B --> C[Typed request builder]
  C --> D[Private retry helper]
  D --> E[Loopback HTTP server]
  E --> F[Request and exit assertions]
Loading

Technical review

Best possible solution:

Retain the focused fixture repair while keeping production retry timing covered by the existing helper tests.

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

Current-main source shows that the timeout precedes retry exhaustion and satisfies the generic rejection assertion; supplied before/after evidence reports that exact behavior, without a reviewer-run reproduction.

Is this the best way to solve the issue?

The guarded private helper copy follows an existing repository pattern, preserves the real shell and transport path, and leaves production delays unchanged.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • RoboClaw: Raw commit d43d2a4 adds test/terminal-finalization-cancellation-workflow.test.ts:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d43d2a40e9d3; files: test/terminal-finalization-cancellation-workflow.test.ts)

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:

No label changes.

Label justifications:

  • P3: This improves test reliability and developer feedback without changing production behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-09T11:02:31.682Z sha aa020d1 :: needs maintainer review before merge. :: none

Reviewed November 10, 2026, 11:21 AM ET / 16:21 UTC (Revision 2).

@saariuslystoned

Copy link
Copy Markdown
Contributor Author

Real-behavior proof for head aa020d158661: HTTP 503 now ends as exit 1 after six requests

  • Environment: macOS, Node 24.22.1, bash 5.3, curl 8.7.1. Loopback stub only. The head run sourced the fixture's private helper copy (sleep 0 for the one backoff sleep). The production helper file was left unchanged.
  • Before: merge base eae7a713e211 — four POSTs, then SIGTERM at 30.0s (killed=true, no exit code). Attempts 5 and 6 did not run.
  • After: this head — six POSTs, exit code 1, signal=null, killed=false, 381ms. HTTP 200 still writes allowed=true. HTTP 418 and an unrecognized 409 each exit 1 after one POST.

The command is the unchanged terminal-acknowledgement step in .github/workflows/sweep.yml, with the built request builder and control_plane_curl. The base fixture accepts any rejection plus four requests, so this timeout satisfies it. before.txt after.txt

Hashes: SHA256SUMS

@saariuslystoned

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 10, 2026
@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Thanks, this found a real false pass: the 503 case only passed because the 30-second timeout killed the script after 4 of the helper's 6 attempts.

I've continued it in #2199. Your commit is kept and you're credited as co-author. I couldn't push to this branch because GitHub doesn't allow maintainer edits on forks owned by an organization. The one change: the retry helper already honors Retry-After, so the fixture now sends Retry-After: 0 and the test runs the real scripts/control-plane-curl.sh. It no longer needs a patched copy of the helper or the copied request builder. Same result: 6 requests and a normal exit 1, in about 2 s.

@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: 🦐 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants