Skip to content

fix(ci): prepare kernel memory containment for semantic checks - #160014

Merged
vincentkoc merged 8 commits into
mainfrom
fix/semantic-memory-ci-backend
Sep 28, 2026
Merged

vincentkoc merged 8 commits into
mainfrom
fix/semantic-memory-ci-backend

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Related: #160010

What Problem This Solves

Lint and compiler checks need a verified Linux containment backend before they can enforce aggregate memory limits, including compiler inventory during CI planning.

Result

Selected semantic CI jobs prepare a systemd user manager and verify an actual 64 MiB cgroup, zero swap allowance, and group OOM policy. Ordinary Node setup stays unchanged. This prerequisite does not itself activate lint/compiler limits.

Shared setup keeps the probe inline for selected-source callers. Tagged npm preflight uses an identical workflow-SHA-pinned helper so old release tags also receive qualification; a contract test prevents drift. Shared YAML inputs keep the workflow below its unchanged 480,000-byte guard.

Validation

Reviewed head: 0edcfe55d6614e00e2d537bf05f6e21ab142dd33, patch-identically rebased onto 40019980f2687648942b0788fb8523fef58ff7ff.

  • Exact-head hosted CI completed all jobs successfully, including workflow checks and Docker seed E2E. Required aggregate status is being finalized before merge.
  • The real setup probe passed on GitHub production types, Blacksmith core lint, Blacksmith test types, and GitHub hydration.
  • On the identical setup/helper patch, focused setup/performance/routing cases, workflow-size validation, actionlint, zizmor, Git-owner checks, formatting and whitespace passed under a 7 GiB Testbox scope in 45.936 seconds.
  • Earlier native qualification verified inline/helper equality, a release tag lacking the new setup input, a minimal inherited environment, and unsupported-runner refusal before privileged commands. Tagged-layout proof, minimal-environment proof.
  • Independent and latest exact-head ClawSweeper review found no code/security defect. ClawSweeper's custom-group rollout concern is addressed by current configuration and exact-head proof: no repository or repository-visible organization OPENCLAW_RELEASE_RUNNER_GROUP is configured, and these jobs have no environment override. Active GitHub/Blacksmith routes are qualified. This does not claim that no organization groups exist; their inventory was inaccessible.
  • Future custom-group enrollment requires systemd, logind, noninteractive sudo and delegated cgroup-v2 controls. docs/ci.md documents provisioning and restoration of ordinary routing by unsetting the override. No configured custom fleet is migrated by this PR.

Production/tooling +113/-35; tests +122/-18; docs +14/-0. Growth supplies runner qualification and its contracts. No CodeQL suppression, queue-policy change or raised workflow-size limit.

@vincentkoc vincentkoc self-assigned this Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 28, 2026 01:24
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 4:40 AM ET / 08:40 UTC (Revision 9).

ClawSweeper review

What this changes

The branch adds an opt-in Linux kernel-memory probe to shared Node setup, enables it in selected CI jobs, and adds a workflow-pinned helper for older release tags, tests, and operator guidance.

Merge readiness

⛔ Blocked before merge - 3 items remain

Current main still lacks this CI prerequisite, and the branch remains useful. The reviewed source and prior Linux proof support the setup change; the fail-closed effect on custom release runners needs an explicit CI owner decision before merge.

Priority: P2
Reviewed head: 0edcfe55d6614e00e2d537bf05f6e21ab142dd33
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has focused real-run evidence and no discrete correctness finding; custom-runner rollout remains the material merge decision.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Prior Testbox evidence reports the changed shared setup and tagged helper running against a real Linux user manager, observing the 64 MiB ceiling, zero swap, group OOM policy, and unsupported-runner refusal; GitHub records successful setup steps. The prior run logs and old reviewed commit were inaccessible to this reviewer, so exact patch identity across the rebase was not independently checked. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Prior Testbox evidence reports the changed shared setup and tagged helper running against a real Linux user manager, observing the 64 MiB ceiling, zero swap, group OOM policy, and unsupported-runner refusal; GitHub records successful setup steps. The prior run logs and old reviewed commit were inaccessible to this reviewer, so exact patch identity across the rebase was not independently checked. No stored-data contract changes.
Evidence reviewed 7 items Introduced CI setup: The opt-in action provisions a systemd user manager and checks an actual 64 MiB scope, zero swap, and group OOM policy before continuing.
Tagged-source coverage: npm preflight checks out a harness at the workflow SHA and runs its containment helper before the setup action from the selected release tag. This addresses the prior review's tagged-source finding.
Custom-runner behavior: The documented release-group route now requires systemd, noninteractive sudo, and delegated memory controls; unsupported runners fail setup. The PR discussion contains no separate human acceptance of this compatibility change.
Findings None None.
Security None None.

How this fits together

OpenClaw CI selects a runner and source revision before shared Node setup prepares lint, compiler, test, and release jobs. Opted-in Linux setup now verifies a memory-limited user scope before those jobs continue.

flowchart TD
  A[CI or release job] --> B[Select runner and source]
  B --> C{Semantic setup enabled?}
  C -- No --> F[Ordinary Node setup]
  C -- Yes --> D[Trusted Linux setup]
  D --> E{Memory scope enforced?}
  E -- Yes --> G[Run checks]
  E -- No --> H[Setup error]
Loading

Decision needed

Question Recommendation
Should selected CI and release-validation jobs fail setup on custom release-group runners that lack the new systemd and cgroup capabilities? Certify and accept the new contract: Verify affected release runner groups can pass the probe, then approve fail-closed setup with the documented fallback.

Why: The branch deliberately changes an existing runner contract; Linux proof on a qualified runner cannot establish whether current custom groups are ready or whether their operator disruption is acceptable.

Before merge

  • Resolve merge risk (P2) - Existing custom release-group runners without systemd, logind, noninteractive sudo, or delegated cgroup-v2 memory controls will now stop selected CI and release-validation jobs during setup; the documented fallback requires operator action.
  • Complete next step (P1) - Have the CI owner decide the custom-runner fail-closed policy and confirm affected release runner groups are qualified before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Tests +104, Docs +14, Config +78. Total +196 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 123 19 +104
Docs 1 14 0 +14
Config 7 112 34 +78
Generated 0 0 0 0
Other 0 0 0 0
Total 12 249 53 +196

Review metrics

Metric Value Why it matters
Production and test growth production/tooling +113/-35; tests +122/-18 The tooling growth supplies runner qualification, while the tests cover setup selection and the tagged-source contract.
CI setup surface 1 new opt-in action input The input changes which jobs require privileged Linux runner capabilities.

Root-cause cluster

Relationship: partial_overlap
Canonical: #160010
Summary: This PR supplies CI runner qualification for the broader memory-pressure repair; it does not activate limits on semantic commands.

Members:

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

Merge-risk options

Maintainer options:

  1. Qualify release runners (recommended)
    Confirm affected custom groups pass the new probe and explicitly accept fail-closed setup before merge.
  2. Delay the new requirement
    Retain existing custom-group behavior until those runners have a qualified migration route.

Technical review

Best possible solution:

Keep kernel qualification in trusted shared setup and the workflow-pinned tagged helper, while certifying release runner groups and approving the documented operator fallback before rollout.

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

Not applicable to this prerequisite PR. The linked issue records a controlled memory-limit failure, while this branch prepares CI runners and does not activate compiler or lint caps.

Is this the best way to solve the issue?

Yes for the setup boundary: one shared action handles selected-source jobs, and a pinned helper covers older tags. The custom-runner compatibility choice still needs owner acceptance.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b140acb1ea3b.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded CI prerequisite for memory containment, with limited direct impact on the shipped runtime.
  • merge-risk: 🚨 compatibility: Selected jobs can stop working on existing custom release runners that lack the newly required capabilities.
  • merge-risk: 🚨 automation: The diff changes setup admission across CI and release workflows, so a runner-capability mismatch can prevent checks from starting.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Prior Testbox evidence reports the changed shared setup and tagged helper running against a real Linux user manager, observing the 64 MiB ceiling, zero swap, group OOM policy, and unsupported-runner refusal; GitHub records successful setup steps. The prior run logs and old reviewed commit were inaccessible to this reviewer, so exact patch identity across the rebase was not independently checked. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Prior Testbox evidence reports the changed shared setup and tagged helper running against a real Linux user manager, observing the 64 MiB ceiling, zero swap, group OOM policy, and unsupported-runner refusal; GitHub records successful setup steps. The prior run logs and old reviewed commit were inaccessible to this reviewer, so exact patch identity across the rebase was not independently checked. No stored-data contract changes.

Evidence

What I checked:

  • Introduced CI setup: The opt-in action provisions a systemd user manager and checks an actual 64 MiB scope, zero swap, and group OOM policy before continuing. (.github/actions/setup-node-env/action.yml:115, 0edcfe55d661)
  • Tagged-source coverage: npm preflight checks out a harness at the workflow SHA and runs its containment helper before the setup action from the selected release tag. This addresses the prior review's tagged-source finding. (.github/workflows/openclaw-npm-preflight.yml:135, 0edcfe55d661)
  • Custom-runner behavior: The documented release-group route now requires systemd, noninteractive sudo, and delegated memory controls; unsupported runners fail setup. The PR discussion contains no separate human acceptance of this compatibility change. Public docs: docs/ci.md. (docs/ci.md:173, 0edcfe55d661)
  • Current-main necessity: The fetched current main has no semantic-checks input or containment helper; the branch introduces both. (b140acb1ea3b)
  • Relevant main history: Main history identifies prior shared-setup and release-workflow contributors; missing older blob objects prevented source-line introduction verification. (.github/actions/setup-node-env/action.yml, 84bf30fecf13)
  • Prior real-run evidence: The PR body reports a real 64 MiB cgroup probe on the earlier head, and GitHub records successful setup steps in the linked Testbox runs. Their Run Testbox steps were canceled during lease shutdown. The review proxy blocked the run logs, and the older reviewed commit was unavailable locally, so this review could not independently compare the earlier patch bytes.

Likely related people:

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

  • Obtain CI owner acceptance of the custom-runner requirement and confirm the affected release groups can pass the probe or use the documented fallback.

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 (8 earlier review cycles)
  • reviewed 2026-09-28T01:41:32.659Z sha 26dcfb01bc51039dd0bfa4a2224b91466f06ca86 :: blocked before merge. :: none
  • reviewed 2026-09-28T01:57:19.689Z sha b8ba018dbd1df8c0efd68ad4f1e0c63f79ed47ac :: blocked before merge. :: none
  • reviewed 2026-09-28T02:58:30.369Z sha 171f91b50f66e4630b94bc3dfa163deef45ba5f7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T03:17:11.296Z sha 19fc4e7f0f3bb031c4d4872850bc4673e31862d4 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T03:33:37.361Z sha a7b55793a849903486b7dade4fe55195c571b858 :: needs changes before merge. :: [P2] Run trusted containment setup for tagged npm preflight
  • reviewed 2026-09-28T04:07:36.791Z sha 2aa2b9677fff7b48e080c660ce515dc3760b2f89 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T04:23:41.901Z sha 490129b9c50ab72c939d1e106728fc535c86910a :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T05:53:12.158Z sha f855eb1 :: needs maintainer review before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M and removed size: S labels Sep 28, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head d26134d8106853df1252f463fbd8eff2b8e8fb33. The only changes since the ready review are four test fixtures repairing current-main CI failures. All 144 relevant tests and strict root test typechecking passed; the PR body links the proof. The semantic setup implementation and accepted custom-runner policy are unchanged.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head 19fc4e7f0f3bb031c4d4872850bc4673e31862d4 resolves a new conflict with main's equivalent static-evidence repairs. Both conflicting test files now match main verbatim. The only remaining fixture repair is the two checkout-script lines already covered by the 72-case proof. Semantic setup and accepted custom-runner policy are unchanged; current-head CI is running. Please review this head, superseding the earlier d26134d request.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 28, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head a7b55793a849903486b7dade4fe55195c571b858. The isolated static-step and real worker fixture failures are repaired; 449 planning and 27 package-build tests passed. The PR body records the proof and adopted main baseline. Please refresh findings and rank-up moves for this head.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 490129b9c50ab72c939d1e106728fc535c86910a. The tagged-source fix remains: workflow-SHA-pinned probe plus byte-identical inline shared setup. The new incremental change qualifies the graph-planning job too and deduplicates YAML inputs/condenses comments to pass the existing workflow-size guard.

Blacksmith Testbox run verified six source/dependency hashes, parsed workflow equality (only check-plan's semantic input changed), all seven setup contracts, the focused size guard, workflow validation, formatting, and whitespace. Command exit 0; the one-shot lease was then stopped normally. Independent P0–P2 review is clean. The PR body now carries the consolidated proof and limitations.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Rebased onto main with the previously blocking fixture repairs. Exact head f855eb1 passed fresh focused remote proof and independent P0-P2 review; evidence is in the PR body.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc
vincentkoc force-pushed the fix/semantic-memory-ci-backend branch from f855eb1 to 0edcfe5 Compare September 28, 2026 08:31
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review current head 0edcfe55d6614e00e2d537bf05f6e21ab142dd33. The CI qualification unblock #160187 is now merged; this branch was rebased onto that main revision with every patch unchanged (verified by range-diff). Prior focused proof and independent review remain applicable to the unchanged patch. Current-head hosted CI is running; the PR body distinguishes fresh and reused evidence.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

Reviewed the custom-runner rank-up move against the effective repository configuration and exact-head CI.

At 2026-09-28 08:46 UTC, the repository has no OPENCLAW_RELEASE_RUNNER_GROUP variable, and there are no repository-visible organization variables. The affected CI, performance, and npm-preflight jobs declare no job environments. The active backend is hybrid. Therefore this change does not migrate or newly reject a currently configured custom release group. Organization group inventory was inaccessible; this is not a claim that no groups exist.

Both active runner routes passed the opted-in setup on reviewed head 0edcfe55d6614e00e2d537bf05f6e21ab142dd33:

The setup step includes the actual 64 MiB cgroup probe, zero swap, and group OOM policy. The earlier focused real-run proof remains patch-identical across this rebase.

Disposition: the configured routes are qualified. Keep the documented capability check as a prerequisite for any future custom-group enrollment; no unknown host is provisioned and no existing custom-group rollout is part of this PR. This satisfies the current deployment concern without weakening containment. Activation of semantic command limits remains in separate PRs.

@vincentkoc
vincentkoc merged commit 6e0e17d into main Sep 28, 2026
188 checks passed
@vincentkoc
vincentkoc deleted the fix/semantic-memory-ci-backend branch September 28, 2026 09:00
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…law#160014)

Prepare and verify the Linux systemd/cgroup memory backend for selected semantic CI jobs, including workflow-pinned qualification of older release tags. Exact-head hosted checks pass. Active GitHub and Blacksmith routes passed the real probe; no custom release group is configured. Future custom enrollment prerequisites are documented.

Related: openclaw#160010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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.

1 participant