Skip to content

fix(local-ai): allow cold-start runtime scan - #1609

Merged
RomneyDa merged 2 commits into
mainfrom
openclaw/investigate-onboarding-timeout-error
Oct 2, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
openclaw/investigate-onboarding-timeout-error

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • raise the managed llama-server router startup timeout from 15 seconds to 90 seconds
  • apply the same budget to the tray-owned runtime and bundled setup configuration

The first execution of the freshly extracted roughly 700 MB CUDA runtime was measured at 26.0 seconds while Windows Defender scanned it, versus 0.17 seconds warm. The former 15-second deadline made clean installs fail before the router could report healthy.

Required proof pools

  • none: this changes a bounded startup deadline and adds unit coverage; it does not change a custom hardware, installer, WSL, or interactive UI contract.

Validation

  • git diff --check (pass)
  • Standard validation deferred to CI for this constant-only change.

Real behavior proof

  • Both production deadlines are set to 90 seconds and still return immediately when llama-server becomes ready.

Rubber-duck review

  • Skipped for this constant-only change.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@RomneyDa RomneyDa added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement 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 Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codex review: needs changes before merge. Reviewed October 2, 2026, 12:06 PM ET / 16:06 UTC.

ClawSweeper review

What this changes

The PR increases Local AI router startup deadlines from 15 to 90 seconds in the companion runtime and setup defaults to accommodate cold-start antivirus scanning.

Merge readiness

⛔ Needs changes before merge - 1 item remains

The change remains useful: current main and the latest release retain the 15-second deadline. No introduced correctness defect was found, but repository-required current-head proof and validation remain incomplete.

Priority: P2
Reviewed head: 06311d96d8b996d3e898a7ccfdabfb750f473140

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent, but current-head startup evidence and required validation are incomplete.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 7 items Pinned introduced change: The verified main-to-head delta changes only three startup defaults and explanatory comments. It adds no tests, dependencies, permissions, or persistence format changes.
Readiness and cancellation remain intact: The startup loop returns immediately after verified readiness, checks cancellation on each iteration, and retains timeout cleanup. Increasing the budget does not introduce a fixed 90-second delay or change authorization and endpoint ownership checks.
Existing configuration compatibility: Setup passes the configured HealthTimeoutSeconds directly into the runtime. JSON deserialization still assigns explicit supplied values; the PR changes defaults without rewriting existing configuration or stored installation receipts. The companion construction uses the runtime default.
Findings None None.
Security None None.

How this fits together

Local AI runs a managed llama-server process on Windows. Setup and the companion wait for its verified endpoint to become ready before allowing inference through it.

flowchart TD
  A[Setup configuration] --> C[Startup deadline]
  B[Companion defaults] --> C
  C --> D[Managed Local AI process]
  D --> E[Poll endpoint readiness]
  E --> F[Publish healthy endpoint]
  E --> G[Cancel or clean up on failure]
Loading

Before merge

  • Complete next step (P2) - Provide current-head cold-start success output and required validation results, then update the PR body to reflect the final test-free diff. Redact private endpoints and credentials; updating the body should trigger re-review, or a maintainer can request @clawsweeper re-review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test LOC production +16/-3, tests +0/-0 Production growth consists of comments explaining the measured cold-start budget; the final branch adds no unit coverage.

Technical review

Best possible solution:

Keep the wider bounded startup allowance while preserving early readiness, cancellation, and explicitly configured timeout values.

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

No independently established high-confidence runtime reproduction is available. Source confirms that readiness arriving after 15 seconds fails under main's default, and the author reports a 26-second cold launch.

Is this the best way to solve the issue?

Yes. Increasing the existing bounded deadline is a narrow repair, and source inspection confirms it preserves early success and explicit timeout overrides.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a focused startup reliability fix for cold Local AI runtime launches.
  • 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: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Label justifications:

  • P2: This is a focused startup reliability fix for cold Local AI runtime launches.
  • 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: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

  • Pinned introduced change: The verified main-to-head delta changes only three startup defaults and explanatory comments. It adds no tests, dependencies, permissions, or persistence format changes. (src/OpenClaw.Connection/LocalAi/LlamaServerRuntimeService.cs:32, 06311d96d8b9)
  • Readiness and cancellation remain intact: The startup loop returns immediately after verified readiness, checks cancellation on each iteration, and retains timeout cleanup. Increasing the budget does not introduce a fixed 90-second delay or change authorization and endpoint ownership checks. (src/OpenClaw.Connection/LocalAi/LlamaServerRuntimeService.cs:548, 06311d96d8b9)
  • Existing configuration compatibility: Setup passes the configured HealthTimeoutSeconds directly into the runtime. JSON deserialization still assigns explicit supplied values; the PR changes defaults without rewriting existing configuration or stored installation receipts. The companion construction uses the runtime default. (src/OpenClaw.SetupEngine/LocalAiSetupSteps.cs:962, 06311d96d8b9)
  • Current main still needs the change: The fetched main revision defines StartupTimeout as 15 seconds, so the central change is not already implemented there. (src/OpenClaw.Connection/LocalAi/LlamaServerRuntimeService.cs:27, bc63144a4cee)
  • Latest release retains the old deadline: GitHub release metadata identifies v2026.9.4 as latest, and its source still defines the 15-second startup timeout. Local release-blob inspection failed with HTTP 403 during object retrieval; the read-only GitHub contents endpoint successfully supplied the tagged source. (src/OpenClaw.Connection/LocalAi/LlamaServerRuntimeService.cs, 3c43751b2bac)
  • Scoped proof and validation requirements: AGENTS.md and the applicable proof-validation skill require current-head evidence for onboarding behavior and mandatory validation. The captured PR body reports a 26.0-second cold launch and 0.17-second warm launch, but does not show the changed production startup path successfully completing after the fix. It explicitly defers standard validation and still claims added unit coverage although the pinned diff has no test changes. No builds or tests were executed during this read-only review. (.agents/skills/openclaw-proof-validation/SKILL.md, 06311d96d8b9)

Likely related people:

  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • karkarl: 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.

  • Attach redacted current-head output showing the managed router reaching Healthy after a cold launch exceeding 15 seconds.
  • Report the required build, Shared tests, and Tray tests, and correct the PR body's claim that the final branch adds unit coverage.

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.

@RomneyDa
RomneyDa merged commit 65300da into main Oct 2, 2026
24 checks passed
@RomneyDa
RomneyDa deleted the openclaw/investigate-onboarding-timeout-error branch October 2, 2026 16:19
/// extracted ~700 MB CUDA runtime (measured 26.0 s cold, 0.17 s once cached), and a
/// later signature update can invalidate that cache and charge it again.
/// </summary>
public TimeSpan StartupTimeout { get; init; } = TimeSpan.FromSeconds(90);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think polling should be better, timeouts are fragile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. 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