Skip to content

fix(openclaw): reduce avoidable native startup I/O - #352

Merged
FumingZhang merged 3 commits into
mainfrom
fix/openclaw-retirement-startup
Oct 29, 2026
Merged

FumingZhang merged 3 commits into
mainfrom
fix/openclaw-retirement-startup

Conversation

@FumingZhang

Copy link
Copy Markdown
Member

Summary

Reduce avoidable native OpenClaw startup work without changing its runtime
image, resource limits, plugins, health checks or lifecycle deadlines:

  • Disable unrelated plugin discovery in the temporary configuration used only
    by auth-store retirement commands.
  • Disable Node's optional on-disk compile cache for native doctor,
    auth-retirement and gateway processes, avoiding ephemeral cache I/O.

Retirement still lists every start, verifies successful removal when needed,
and compacts existing databases. Normal doctor and gateway plugin behavior,
saved configuration, Hermes and legacy non-Sandbox defaults remain unchanged.

Related issue

Discovered during the explicitly requested integrated AKS validation. This is
a focused repair within that agreed scope; no separate proposal is needed.

Validation

Offline validation used the existing pinned Go 1.27.3 and Helm 3.22.0 toolchain.
HUGO identifies the local Hugo 0.164.0 extended executable.

Command: python -m pytest app/cetirun-chart/tests/test_retire_copilot_sign_in.py -q
Result: passed, 22 tests

Command: python -m unittest discover -s scripts/tests -p test_native_gateway_chart.py
Result: passed, 30 tests

Command: go -C app/cetirun-operator test ./internal/helm ./internal/sandboxworkload -count=1 -timeout=20m
Result: passed; Helm 52.696s, workload 0.196s

Command: sh -n app/cetirun-chart/agents/openclaw/bootstrap/retire-direct-model-auth.sh
Result: passed

Command: make docs-check HUGO="$HUGO"
Result: passed

Command: git diff --check
Result: passed

Not run: unrelated full repository suites on this standalone branch.

Authorized AKS observations, using unchanged qualified runtime images and
resource profiles:

  • Real imported-profile retirement completed in 123.203s, with zero profiles
    remaining.
  • The combined repaired chart completed retained OpenClaw resumes in 1081.906s
    on Kata and 420.863s on ordinary containers, both with managed ingress mTLS.
  • A fresh repaired Kata restart completed the normal owner HOME write,
    identity retention and nondecreasing nonzero-spend checks in 1192.326s.

The original Kata restart and the first plugin-only repair exceeded 1200s;
those remain failed attempts. The final restart passed with only 7.674s to
spare, so this is not a claim of robust startup headroom or an exhausted runtime
matrix. Further same-profile lifecycle observations are being recorded
separately. No credential, raw diagnostic bundle or deployment helper is
attached.

Compatibility and operational impact

No API/CRD, dependency-version, release-version or resource-budget change.
The new settings are limited to native OpenClaw startup and are adopted through
the normal runtime-chart update. The gateway still uses the same plugins and
configuration; only the separate retirement commands suppress unused discovery.
This does not skip health checks or extend any startup deadline.

Checklist

  • The change is focused and preserves unrelated work.
  • Tests cover the changed behavior, or I explained why no new test is needed.
  • Documentation and examples match any public behavior changes.
  • Generated artifacts were updated from source, or none are affected.
  • Dependency changes include lockfiles, source attribution, and license information, or none are affected.
  • I checked the diff and attachments for secrets, private endpoints or identifiers, customer data, agent conversations, and internal information.
  • I followed the applicable CLA instructions, or asked a maintainer about an unclear check.
  • I identified checks that need credentials or a live environment and did not run them without authorization.

Please confirm the applicable CLA check and independent maintainer review.

FumingZhang and others added 2 commits October 28, 2026 18:34
Disable unrelated plugins only in the temporary configuration used by native model-auth retirement commands. Preserve the Agent configuration, normal doctor behavior, profile removal/readback and database compaction while avoiding repeated CLI discovery work.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Disable Node's optional on-disk compile cache for native OpenClaw doctor, gateway and auth-retirement processes. Preserve executed JavaScript, plugin selection, resource limits and lifecycle deadlines. Cover the native settings and unchanged legacy defaults.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@feiskyer Pengfei Ni (feiskyer) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@FumingZhang

Copy link
Copy Markdown
Member Author

Further same-profile AKS qualification: the second repaired Kata restart passed in 1110.185s and suspension in 64.329s, but the following resume still exceeded the original 1200s bound (1202.424s observation, still Provisioning). Doctor took 342s and retirement 130s; the main container later failed its unchanged startup probe and was restarted by Kubelet, not OOM-killed. Later Ready does not count as passing that operation. This PR remains a bounded startup improvement, not closure of the default-profile timing blocker; no resource/probe/timeout increase has been substituted for acceptance.

Preserve both the native OpenClaw compile-cache regression and the Hermes Dashboard public-URL test from main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@FumingZhang
FumingZhang merged commit c5f0eb8 into main Oct 29, 2026
33 checks passed
@FumingZhang
FumingZhang deleted the fix/openclaw-retirement-startup branch October 29, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants