Skip to content

fix(plugins): refuse plugin source captures when the target volume is low on disk - #161840

Closed
BorClaw wants to merge 2 commits into
openclaw:mainfrom
BorClaw:fix/plugin-source-capture-low-disk
Closed

BorClaw wants to merge 2 commits into
openclaw:mainfrom
BorClaw:fix/plugin-source-capture-low-disk

Conversation

@BorClaw

@BorClaw BorClaw commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

On 2026.9.7, createCaptureDirectory stages full copies of plugin source trees with no free-space check. During plugin load churn on a production gateway, that consumed ~50 GB of capture staging in under an hour (~3 GB/min), driving the volume to ENOSPC. The ENOSPC then amplified: failed loads were retried, each retry staged another capture, and the gateway's own database writes started failing ("database or disk is full"), killing agent runs and Telegram delivery. Full incident timeline in #161839.

This PR adds a free-space preflight at the single staging choke point (createCaptureDirectory): below the floor (512 MiB default, env-overridable, 0 disables), capture creation fails fast with a typed PluginSourceCaptureLowDiskError before any payload is written, breaking the amplification loop. Cross-volume fallback to the temporary placement is preserved. Volume detection delegates to the shared disk-space reader (tryReadDiskSpace), which probes the nearest existing ancestor — the same volume the directory would be created on. If the volume cannot be inspected, the guard stays open. Per the capture-mandatory direction discussed in #161839, the refusal error carries an actionable recovery message (free space, or disable the floor, then retry the load).

Evidence

  • Unit tests: src/plugins/plugin-source-capture-low-disk.test.ts (6 tests) + the full existing capture suite (32 tests), both green:
    node scripts/run-vitest.mjs run --config test/vitest/vitest.plugins.config.ts src/plugins/plugin-source-capture-low-disk.test.ts src/plugins/plugin-source-capture-directory.test.ts → 38 passed (38)
    Includes a non-mocked regression test (real statfsSync) for the ENOENT fail-open flaw found in live validation, and malformed-override rejection (0oops must never disable the guard).
  • Lint: oxlint clean on all touched files.
  • Live deployment (production gateway, 2026.9.7 dist hotpatched with this exact logic): restart at 13:59:27 loaded all 13 configured plugins through the patched createCaptureDirectory — zero load failures, zero ENOSPC (the incident's own storm boot produced ~70), staging steady at ~2.5 GB across the monitored window, volume steady at ~56 GB free.
    Boot line: [gateway] http server listening (13 plugins: acpx, browser, codex, firecrawl, fusion, keenable, llama-cpp, memory-core, memory-wiki, openai, tavily, telegram, telegram-topic-memory; 34.2s)
  • Refusal trace (standalone import of the patched dist, 1 TiB floor):
    PluginSourceCaptureLowDiskError: plugin source capture refused: /Users/alex/.openclaw/tmp has 60285063168 free bytes, below the 1099511627776-byte floor
    The probe walked to /Users/alex/.openclaw/tmp — the nearest existing ancestor of the not-yet-created target — and refused before writing anything; floor 0 passed through and staged normally.
  • Temporary-volume fallback trace (vitest): "falls back to the temporary placement when the state volume is low but tmp has headroom" — passing (state volume mocked below floor, tmp healthy → root staged under tmp).

Notes

  • Found during live validation on our production gateway: the first cut statfs'd the not-yet-existing target and silently passed on ENOENT; reusing the shared reader + the non-mocked regression test now cover exactly that.
  • Malformed OPENCLAW_PLUGIN_CAPTURE_MIN_FREE_BYTES values are rejected (warning + 512 MiB default) so a numeric-prefix parse can never disable the guard.
  • Retention-side total-size capping of unreferenced captures is raised in Bug: plugin source capture can consume the entire volume during plugin load churn (ENOSPC amplification loop) #161839 as a design discussion (needs design acceptance per CONTRIBUTING); this PR intentionally scopes to the allocation guard.

@clawsweeper

clawsweeper Bot commented Sep 30, 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 triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. size: S labels Sep 30, 2026
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 30, 2026
@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 30, 2026, 9:27 AM ET / 13:27 UTC (Revision 4).

ClawSweeper review

What this changes

The branch checks free space before creating plugin source-capture directories, adds a configurable refusal floor and focused tests, and registers the new helper with the PR wrapper.

Merge readiness

⛔ Blocked before merge - 6 items remain

Keep this PR open. Current main lacks the proposed disk guard, and the linked incident remains active. The earlier upgrade-policy finding still applies; the latest commit only updates the PR wrapper inventory.

Priority: P0
Reviewed head: 5dc7ae2679685e13ab2254c3b011d29d7d3476dd
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused guard and tests are useful, but low-space plugin-load proof and the default upgrade policy remain unresolved.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The contributor reports that a production Gateway with the patched capture owner loaded 13 plugins with ample space and supplies a separate patched-distribution refusal trace. Neither observation shows low-space refusal or cross-volume recovery through an actual plugin-load request; fallback proof uses mocked disk readings. No stored-data contract changes. A redacted terminal trace or log from that real path would close the gap; redact private paths, addresses, and credentials. After updating the PR body, a fresh ClawSweeper review should trigger automatically; otherwise ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The contributor reports that a production Gateway with the patched capture owner loaded 13 plugins with ample space and supplies a separate patched-distribution refusal trace. Neither observation shows low-space refusal or cross-volume recovery through an actual plugin-load request; fallback proof uses mocked disk readings. No stored-data contract changes. A redacted terminal trace or log from that real path would close the gap; redact private paths, addresses, and credentials. After updating the PR body, a fresh ClawSweeper review should trigger automatically; otherwise ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 8 items Introduced guard: The pinned merge-base-to-head diff adds checks before initial capture allocation and subsequent allocation under an existing root.
Default refusal: An unset override selects a 512 MiB floor; a lower measured value throws before allocation. Setting the override to zero disables the check.
Load consequence: The model-catalog worker requests a capture before preparing its worker; capture refusal propagates from the allocation owner. The architecture guide describes capture-dependent loading and temporary-volume fallback.
Findings 1 actionable finding [P1] Establish the upgrade policy for default capture refusal
Security None None.

How this fits together

OpenClaw captures plugin source before some plugin and model-catalog loads. The capture owner chooses a state or temporary volume and supplies staged files to the loader.

flowchart LR
  A[Plugin load] --> B[Capture request]
  B --> C[Choose volume]
  C --> D[Check free space]
  D --> E{Enough space?}
  E -->|Yes| F[Stage source]
  E -->|No| G[Fallback or refuse]
  F --> H[Load plugin]
Loading

Decision needed

Question Recommendation
Should existing installations refuse plugin loads by default when both capture volumes fall below the new 512 MiB floor? Adopt the protective default: Keep the 512 MiB default, explicitly accept earlier refusal on low-space installations, and require upgrade and recovery proof.

Why: The reported disk-exhaustion incident supports protective refusal, but the change can make a previously loadable plugin unavailable during an upgrade; source inspection cannot approve that tradeoff.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The contributor reports that a production Gateway with the patched capture owner loaded 13 plugins with ample space and supplies a separate patched-distribution refusal trace. Neither observation shows low-space refusal or cross-volume recovery through an actual plugin-load request; fallback proof uses mocked disk readings. No stored-data contract changes. A redacted terminal trace or log from that real path would close the gap; redact private paths, addresses, and credentials. After updating the PR body, a fresh ClawSweeper review should trigger automatically; otherwise ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Establish the upgrade policy for default capture refusal (P1) - The unset override now refuses mandatory captures below 512 MiB, including on an existing installation where a particular capture might previously have completed. Obtain an explicit owner decision and prove the selected upgrade behavior before merging; the latest commit does not change this earlier finding.
  • Resolve merge risk (P1) - On an existing installation with less than 512 MiB free on both candidate volumes, mandatory plugin captures now fail before a capture that might previously have completed; the default upgrade policy has not been accepted.
  • Resolve merge risk (P2) - The supplied runtime evidence does not show low-space refusal or separate-volume fallback through an actual plugin-load request.
  • Complete next step (P2) - Resolve the default refusal policy, provide redacted low-space plugin-load and recovery proof, and report the new test file's measured cost before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Establish the upgrade policy for default capture refusal — src/plugins/plugin-source-capture-low-disk.ts:16
Agent review details

Security

None.

PR surface

Source +66, Tests +113, Other +1. Total +180 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 66 0 +66
Tests 1 113 0 +113
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 4 180 0 +180

Review metrics

Metric Value Why it matters
New operator override 1 environment variable; 512 MiB default; zero disables The default and disable value determine the low-space upgrade behavior.
Production versus test growth production +66 lines, tests +113 lines The production growth implements the guard; the new test file has no measured wall time in the PR body.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #161839
Summary: This PR is a candidate allocation mitigation for the paired disk-exhaustion issue; that issue also tracks retention and recovery behavior.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Accept protective refusal (recommended)
    Approve the default as an intentional upgrade tradeoff after a real low-space plugin-load and recovery trace establishes its effect.
  2. Preserve the prior default
    Make strict refusal opt-in and prove that existing installations retain their previous load behavior.

Technical review

Best possible solution:

Use one capture-owner guard with an explicitly approved default and clear recovery guidance, prove fresh-install and upgrade behavior through plugin loading, and leave broader retention design with the linked incident.

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

Yes at the source level: current main allocates captures without a free-space guard, and the paired issue describes a concrete disk-exhaustion incident. I did not execute a disk-filling reproduction.

Is this the best way to solve the issue?

Unclear. The shared disk reader and capture-allocation owner are a narrow repair boundary, but the default refusal needs an upgrade decision and production-path low-space proof.

Full review comments:

  • [P1] Establish the upgrade policy for default capture refusal — src/plugins/plugin-source-capture-low-disk.ts:16
    The unset override now refuses mandatory captures below 512 MiB, including on an existing installation where a particular capture might previously have completed. Obtain an explicit owner decision and prove the selected upgrade behavior before merging; the latest commit does not change this earlier finding.
    Confidence: 0.93

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P0: The reported capture burst exhausted the volume and disrupted Gateway writes, agent runs, and message delivery.
  • merge-risk: 🚨 compatibility: The new default can refuse captures on existing low-space installations that previously attempted to load.
  • merge-risk: 🚨 availability: Capture refusal propagates to plugin and model-catalog loading when neither volume meets the floor.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The contributor reports that a production Gateway with the patched capture owner loaded 13 plugins with ample space and supplies a separate patched-distribution refusal trace. Neither observation shows low-space refusal or cross-volume recovery through an actual plugin-load request; fallback proof uses mocked disk readings. No stored-data contract changes. A redacted terminal trace or log from that real path would close the gap; redact private paths, addresses, and credentials. After updating the PR body, a fresh ClawSweeper review should trigger automatically; otherwise ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Introduced guard: The pinned merge-base-to-head diff adds checks before initial capture allocation and subsequent allocation under an existing root. (src/plugins/plugin-source-capture-directory.ts:454, 5dc7ae267968)
  • Default refusal: An unset override selects a 512 MiB floor; a lower measured value throws before allocation. Setting the override to zero disables the check. (src/plugins/plugin-source-capture-low-disk.ts:16, 5dc7ae267968)
  • Load consequence: The model-catalog worker requests a capture before preparing its worker; capture refusal propagates from the allocation owner. The architecture guide describes capture-dependent loading and temporary-volume fallback. (src/agents/prepared-model-catalog-worker.ts:172, 5dc7ae267968)
  • Current main still lacks guard: Fetched main allocates capture directories without this preflight; the new helper is absent there. This PR remains a distinct candidate fix. (src/plugins/plugin-source-capture-directory.ts:449, 058adf3f0689)
  • Latest-head scope: The commit after the prior completed review changes only the wrapper inventory, leaving the previously reviewed default and test behavior unchanged. (scripts/pr-lib/wrapper-components.txt:1144, 5dc7ae267968)
  • Contributor runtime evidence: The PR body reports a hotpatched production Gateway loading 13 plugins with ample free space and gives a separate patched-distribution refusal trace. It does not show refusal or cross-volume fallback through a real plugin-load request; the fallback result is a mocked test. The hotpatch's equivalence to the pinned branch is contributor-reported.

Likely related people:

  • Peter Steinberger: Raw commit fbd4228 adds src/plugins/plugin-source-capture-directory.ts:440 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: fbd4228457c4; files: src/plugins/plugin-source-capture-directory.ts)
  • Vyctor H. Brzezowski: 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.

  • Capture a redacted after-fix plugin-load trace showing low-space refusal and, on separate volumes, temporary-volume fallback.
  • Record and prove the owner-approved default behavior for an existing installation.
  • Add the new test file's measured one-worker wall time to the PR body.

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-30T11:33:23.931Z sha 8422ab1723acd5c52af3f53008b76224bdef07a2 :: needs real behavior proof before merge. :: [P1] Measure the existing ancestor before staging into a new capture path | [P2] Reject malformed byte-floor values instead of parsing prefixes
  • reviewed 2026-09-30T12:01:36.865Z sha 0cf7f5fcaf42af7a5b3c01f0ed63330dcd2e3031 :: needs real behavior proof before merge. :: [P1] Reuse the shared disk-space reader | [P2] Reject malformed free-space overrides | [P1] Make the new default refusal safe for upgrades
  • reviewed 2026-09-30T12:35:37.951Z sha d088bbc :: needs real behavior proof before merge. :: [P1] Establish the upgrade policy for default capture refusal

@BorClaw
BorClaw force-pushed the fix/plugin-source-capture-low-disk branch from 8422ab1 to 0cf7f5f Compare September 30, 2026 11:56
@BorClaw

BorClaw commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Live deployment validation — we hit this exact failure mode today on a production gateway (2026.9.7), so we deployed the guard as a hotpatch on the installed dist to validate it under real churn. The smoke test caught a flaw in the first cut of this branch: when the capture target does not exist yet, statfsSync throws ENOENT and the guard's fail-open path silently passed — precisely when it is needed most. The unit tests masked it because the mock answers uniformly for all paths.

The guard now probes the nearest existing ancestor (same volume the directory would be created on), and the branch gained a non-mocked regression test (real statfsSync, env floor set ~1000x above actual capacity -> must refuse). Smoke-tested on the hotpatched install: the refusal fires with the correct probe path, floor=0 disables the guard, normal staging is unaffected.

Also observed live, for the design discussion in #161839: during the churn window the mechanism was staging at ~3 GB/min with 1-hour grace and hourly sweeps — the preflight stops the amplification, and a total-size cap on unreferenced captures remains worth considering.

… low on disk

During plugin load churn, every capture attempt stages a full copy of the
plugin source tree. When the volume runs low, staging fails with ENOSPC
only after writing partial payloads, the failed load is retried, and each
retry amplifies the pressure. Observed in the wild: ~50 GB of capture
staging accumulated in under an hour, driving the gateway's own database
writes to fail ("database or disk is full") while loads kept retrying.

Guard the staging choke point (createCaptureDirectory) with a statfs
free-space check. Below the floor (512 MiB default, override with
OPENCLAW_PLUGIN_CAPTURE_MIN_FREE_BYTES, 0 disables), creation fails fast
with a typed PluginSourceCaptureLowDiskError before any payload is
written; the existing cross-volume fallback to the temporary placement is
preserved.

- Volume detection reuses the shared disk-space reader (tryReadDiskSpace),
  which probes the nearest existing ancestor - the same volume the
  directory would be created on. Live deployment validation caught the
  first cut statfs-ing the missing target and failing open on ENOENT; a
  non-mocked regression test covers it.
- Malformed OPENCLAW_PLUGIN_CAPTURE_MIN_FREE_BYTES values are rejected
  (warning + default) so a numeric-prefix parse can never disable the
  guard.
- The refusal error carries an actionable recovery message (free space or
  disable the floor), per the capture-mandatory decision in openclaw#161839.
@BorClaw
BorClaw force-pushed the fix/plugin-source-capture-low-disk branch from 0cf7f5f to d088bbc Compare September 30, 2026 12:30
@BorClaw

BorClaw commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review — head updated to d088bbc: reuses the shared tryReadDiskSpace reader (no more duplicated walk), strict malformed-override rejection (0oops can no longer disable the guard), recovery action in the refusal message, and the PR body now carries the What-Problem/Evidence sections with the live-deployment refusal + fallback traces requested above.

@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 30, 2026
…nventory

The eager-import-closure test caught the new plugin-source-capture-low-disk
module missing from scripts/pr-lib/wrapper-components.txt - the trusted PR
wrapper extracts only inventoried components, so the new module's import
from plugin-source-capture-directory.ts was unresolved in the wrapper
context, failing the worktree-provisioning tests. Register the module in
sorted position.
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 30, 2026
@a2750309601

Copy link
Copy Markdown

Independent Linux/Docker reproduction of the leaked capture staging

Adding a second environment to the corpus, because this matches the openclaw-plugin-build-* pattern exactly and is currently in the growth phase rather than after the fact.

Environment

  • OpenClaw 2026.9.5 (official package), Docker container, Ubuntu 24.04, Node v24.19.0.
  • TMPDIR (/tmp) and the state volume (/home/node/.openclaw) are on the same 120 GB volume — so capture staging competes with gateway state and DB writes directly.
  • Gateway main process started 2026-10-03T06:58:52Z; measurement at 2026-10-03T09:41Z (~2 h 43 m uptime).

Observation

Metric Value
openclaw-plugin-build-* dirs under /tmp 197
Total size 24 GB (~230 MB each)
Oldest 2026-10-02 08:54Z — predates the current gateway process (survives restart)
Newest 2026-10-03 09:34Z — ~7 min before measurement (still churning)
Volume 85 GB / 120 GB used (74%), 31 GB free
Also present openclaw-model-catalog-* staging dir (the catalog-worker side, #156571)

Reference scan (why these look orphaned)

I checked every one of the 197 dirs against all running processes: 0 of 197 are held via any process's fd, cwd, root, or maps. That is consistent with orphaned captures rather than live plugin roots. Caveat: pure-JS references do not show up in maps, so this rules out native/fd/cwd holders but does not prove every dir is unreferenced at the JS level.

Why this is relevant to this PR

  • The accumulation is ongoing, not historical: the newest dir is minutes old, and the oldest outlived a full gateway restart. That is the shape the preflight guard targets.
  • The guard here (refuse before writing, below the floor) is the right primitive for the allocation half of the ENOSPC loop. On our host the loop is currently in the growth phase (24 GB and climbing), so a fail-fast refusal would have engaged well before the volume filled.
  • This PR does not cover the already-orphaned 24 GB; a retention-side cap/sweeper is still required, as the PR notes. Both halves are needed to actually reclaim a gateway that is already in this state.
  • Still relevant on the latest release: as of v2026.9.8 (published 2026-10-03) this PR is unmerged and the changelog carries no equivalent guard, so the latest build does not change this behavior.

Happy to re-measure after a maintenance restart, or run a provided branch, if another data point would help land this.

roboclaw-bot added a commit that referenced this pull request Nov 3, 2026
Supersedes #161840, thanks @BorClaw.

Refuse new plugin source captures and installed snapshot staging below 512 MiB of available space. Reuse the shared statfs reader and source-acquisition failure handling, preserving healthy-volume behavior, state-to-temporary fallback, and setup preparation recovery. Existing user data is retained.

The discarded-setup-capture optimization in #191501 (779f51d) does not protect the remaining capture paths. The floor is a preflight check rather than a reservation for an in-flight copy.

Evidence: four new cases fail on main 3e3911e and pass after the fix; 111 tests in seven named files pass on Blacksmith Testbox. Touched-file typed lint, formatting and diff checks pass. Independent Codex autoreview of the pinned complete patch is scoped-clean through P2. Production +15 lines; 142 regression-test lines have an exact allocation.

Exact-head CI passes product tests, types, lint, builds, docs and security. Its only root failure is the existing six-line test-line ceiling deficit, independently reproduced on clean main 31ad71a in Testbox run 41601398255. All 142 new test lines have exact allocation credit. Native inherited-failure admission retains the failed CI result.

Co-authored-by: BorClaw <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Thanks @BorClaw for tracing and working on this. Merged the smaller, credited replacement in #191757 (caf53264ed30), covering the remaining capture and snapshot allocations after #191501 while preserving temporary-volume fallback and setup failure containment.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
…aw#191757)

Supersedes openclaw#161840, thanks @BorClaw.

Refuse new plugin source captures and installed snapshot staging below 512 MiB of available space. Reuse the shared statfs reader and source-acquisition failure handling, preserving healthy-volume behavior, state-to-temporary fallback, and setup preparation recovery. Existing user data is retained.

The discarded-setup-capture optimization in openclaw#191501 (8ba9cac) does not protect the remaining capture paths. The floor is a preflight check rather than a reservation for an in-flight copy.

Evidence: four new cases fail on main 9f352e8 and pass after the fix; 111 tests in seven named files pass on Blacksmith Testbox. Touched-file typed lint, formatting and diff checks pass. Independent Codex autoreview of the pinned complete patch is scoped-clean through P2. Production +15 lines; 142 regression-test lines have an exact allocation.

Exact-head CI passes product tests, types, lint, builds, docs and security. Its only root failure is the existing six-line test-line ceiling deficit, independently reproduced on clean main f77ae72 in Testbox run 41601398255. All 142 new test lines have exact allocation credit. Native inherited-failure admission retains the failed CI result.

Co-authored-by: BorClaw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants