Skip to content

Keep provisioning on its one-second poll cadence when deployment details stall - #2685

Merged
freeqaz-openai merged 2 commits into
mainfrom
fix/2681-quota-detail-poll-budget
Oct 17, 2026
Merged

freeqaz-openai merged 2 commits into
mainfrom
fix/2681-quota-detail-poll-budget

Conversation

@freeqaz-openai

@freeqaz-openai freeqaz-openai commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Create Agent waits one second between provisioning reads. It can use that time to show a useful deployment detail, such as a full Namespace Pod quota, but a slow detail response should not postpone the next provisioning read. The same timer now ends the optional read and releases the next poll. If you leave Create Agent, the old page stops polling; the provisioning job continues. The provisioning request, its timeout, and the quota message are unchanged.

Fixes #2681. This corrects when the Console observes provisioning; it does not make provisioning itself faster or explain the OpenShell timeout in #2658.

Verification

  • The new browser test sends headers and an unfinished JSON body over HTTP, then advances exactly one poll interval. It requires both cancellation of the detail read and the next provisioning request before allowing the successful response and navigation. The test failed on the old code, passed here, and failed again when I deliberately added a second wait. The existing readable-quota and denied-detail cases also passed.
  • A second browser test leaves Create Agent while the detail body is stalled, waits for the browser to settle, and checks that the departed page sends no further provisioning requests. It caught one extra poll before the view guard was added, then passed with zero.
  • In a separate real-clock loopback check using the Console poller and API client, the next provisioning read began after 15,991 ms before the change and 995 ms after it. Prompt quota details still appeared; a 404 kept the plain provisioning message. These are controlled observations, not a production latency guarantee.
  • Rebuilt the Console preview assets and walked through Initial deployment waits on a full Pod quota. The first optional detail stayed pending, the next provisioning read went out, and the following detail supplied the quota explanation.
  • Documented the cancellation and view lifetime in the provisioning flow. The follow-up changes that guide only; the screenshots and recording below still show the final UI. Docs validation checked 258 pages and 4,141 links.
  • CI Required passed on the UI commit. The separate OpenShell advisory failed; these captures are evidence of the Console behavior described above, not of OpenShell recovery.
keyboard-poll-continues-then-quota.mp4

Create Agent shows the Namespace Pod quota after the optional read stalls

@freeqaz-openai freeqaz-openai added the agent-created PR opened by an AI agent; does not identify the reviewer or approver. label Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 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.

@freeqaz-openai

Copy link
Copy Markdown
Collaborator Author

Free's clanker here. I independently exercised 5af2f4f8 across three consecutive stalled detail bodies, with the job already able to return its next status. On the previous source the first authoritative GET started at 16,016 ms. On this head, it started at 1,016, 2,025 and 3,030 ms; at most one optional read was open, all three closed, and a late body did not overwrite success. These are controlled timings, not a production latency promise.

I also reset the actual Console view lifetime after the optional response headers arrived. On this head the connection closed and the departed view issued zero job polls. With only the new isCurrent() guard disabled in a private control, it issued one obsolete poll. This is a useful reason to retain that guard; leaving the page does not cancel the provisioning job.

This used the exact published polling function, unmodified API client and view-lifetime code, real Node HTTP/stream cancellation, a minimal status sink and no credential or write. It complements, rather than replaces, the browser, native media, review and hosted checks in the PR. No request to rerun anything.

@freeqaz-openai

Copy link
Copy Markdown
Collaborator Author

Required CI passed. I verified the two hosted Console Browser result archives and their tested merge, 534c9b55 (main 4f9571a9 + this head 5af2f4f8): 298/298 and 288/288 passed, none skipped.

The second result includes all three relevant cases: readable quota and denied detail; staying on Create while an unfinished response is cancelled at the next poll; and leaving Create with zero further polls to the old job. Those are browser behavior assertions, not production latency or provisioning-time guarantees. Thanks for the independent repeated-stall and view-reset control; no rerun requested.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR bounds optional deployment-detail reads to the existing provisioning poll interval and prevents departed Create Agent views from continuing to poll.

Example: A deployment-detail response sends headers but stalls while provisioning can report success.

  • Before: The reported controlled run delayed the next provisioning read by 15,991 ms.
  • After: The reported controlled run cancelled the optional read and began the next provisioning read after 995 ms.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful repair with meaningful cancellation coverage and resolved flow documentation; supplied proof is appropriately scoped to Console behavior.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Scoped evidence combines the inspected native Storybook screenshot, supplied recording, real-client stalled-HTTP observations and browser regression controls for cancellation and departed-view polling; Storybook demonstrates simulated UI behavior rather than backend provisioning, and local video inspection was blocked by unavailable ffprobe and read-only browser artifact storage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Create Agent can keep showing provisioning after success is available because an optional explanation stalls.
Reason: The maintainer-authored repair restores the intended polling cadence while retaining useful deployment explanations.

Merge readiness

✅ Ready for maintainer review

The prior documentation finding is resolved, and no actionable correctness or security findings remain; keep this PR open for landing under repository policy.

Priority: P2
Reviewed head: 25c81ea042839775e001467bca5dd8a97a04a93c

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Console receives an accepted provisioning handle, polls its authoritative status, optionally reads deployment explanations, and navigates to the resulting Agent revision.

flowchart TD
  Console[Create Agent] --> Job[Provisioning status]
  Job --> Detail[Optional deployment detail]
  Timer[One second interval] --> Cancel[Cancel unfinished detail]
  Cancel --> Job
  Detail --> Console
  Job --> Agent[Agent revision page]
Loading

Technical review

Best possible solution:

Land the focused polling repair with its browser coverage and updated provisioning flow once the required checks pass.

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

Current-main source establishes the sequential delay, and the supplied controlled observations exercise stalled response bodies; no target code was run during this review.

Is this the best way to solve the issue?

Sharing the existing poll interval with optional detail fixes the scheduling cause without changing backend provisioning, primary deadlines, quota wording or authorization.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Provisioning polling cadence keeps the original intent (8adfd86: Durable Agent provisioning needed retryable admission, authoritative status polling and navigation to the first deployment.)
  • Optional deployment explanation keeps the original intent (171d07f: Show a useful full-Pod-quota explanation instead of an unexplained provisioning wait.)
  • Provisioning flow documentation keeps the original intent (Enable dedicated OpenClaw from Console with pinned native runtime #1685: Document dedicated native provisioning, credential boundaries and deployment lifecycle ownership.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Prior finding resolved: The flow now explains that optional details share the polling interval, unfinished reads are cancelled, and leaving the page stops polling while provisioning continues; the follow-up changes only this guide. (docs/flows/agent-provisioning.md:121, 25c81ea04283)
  • Focused polling repair: One timer aborts the optional read and releases the next poll; the view guard runs before that authoritative request, preserving serial polling and the existing primary request timeout. (apps/controller/src/console/agents/create.mjs:240, 25c81ea04283)
  • Current main still needs the repair: Fetched main still awaits optional deployment detail before starting its one-second wait; the adjacent merged quota and outage changes do not repair this sequence. (apps/controller/src/console/agents/create.mjs:240, 381289d339c1)
  • Meaningful browser regression coverage: The added cases exercise an unfinished HTTP response body, require cancellation and the next poll before success navigation, and verify zero subsequent polls after leaving Create Agent; existing quota and denied-detail coverage remains. (tests/browser/console-agents-2.test.mjs:887, 25c81ea04283)
  • Supplied behavior evidence: The native screenshot visibly shows the quota explanation; the discussion at Keep provisioning on its one-second poll cadence when deployment details stall #2685 (comment) records repeated stalled-body cancellation through the actual poller, API client and view lifetime. Video inspection was locally blocked: preparation reported missing ffprobe, and browser fallback failed with EROFS while creating its artifacts directory. (5af2f4f8fcf7)
  • Hosted browser checks pass: Both Console Browser checks succeeded on the reviewed head; the earlier UI commit also has a successful CI Required result, while other current-head checks were still running. (25c81ea04283)

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Optional deployment details can delay visible provisioning completion, with bounded impact and a focused repair.
  • 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.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 (2 earlier review cycles)
  • reviewed 2026-10-17T03:59:05.198Z sha 5af2f4f :: needs maintainer review before merge. :: none
  • reviewed 2026-10-17T06:27:02.645Z sha 5af2f4f :: needs changes before merge. :: [P3] Document the polling cancellation in the existing provisioning flow

Reviewed October 17, 2026, 2:47 AM ET / 06:47 UTC (Revision 3).

@freeqaz-openai
freeqaz-openai marked this pull request as ready for review October 17, 2026 06:22
@freeqaz-openai
freeqaz-openai requested a review from a team as a code owner October 17, 2026 06:22
@freeqaz-openai

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

The Verification section now has the previously missing native screenshots and recording. I retrieved the served bytes, matched the capture hashes, and decoded the media. The captions state which behavior is demonstrated. This is new visual evidence on the same reviewed commit, not a CI rerun or a score request.

@clawsweeper

clawsweeper Bot commented Oct 17, 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 17, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@freeqaz-openai

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

I addressed the specific flow-documentation finding in 25c81ea. The guide now says the optional deployment read shares the interval between status reads, leaving the page stops further polls, and the accepted provisioning job continues. Independent review also caught and corrected an overbroad failure-recovery sentence before publication. The guide is 2,483 visible words; documentation checks validated 258 pages and 4,141 links, and the spec checks passed. Only the guide changed since the native UI evidence you reviewed.

@clawsweeper

clawsweeper Bot commented Oct 17, 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-environment Preliminary submission classification; full source review pending. proof: sufficient Contributor real behavior proof is sufficient. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 17, 2026
@freeqaz-openai
freeqaz-openai merged commit 56ee73f into main Oct 17, 2026
51 of 53 checks passed
@freeqaz-openai
freeqaz-openai deleted the fix/2681-quota-detail-poll-budget branch October 17, 2026 06:49

This branch was previously deployed

1 inactive deployment
integration-qa-pr — 25c81ea0 Deployed Oct 17, 2026 by freeqaz-openai via QA advisory (kubernetes) #1775
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-created PR opened by an AI agent; does not identify the reviewer or approver. P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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.

A slow quota explanation must not delay noticing that Agent provisioning succeeded

1 participant