Skip to content

fix(perf): isolate external evaluator from candidate runtime - #144162

Merged
vincentkoc merged 7 commits into
mainfrom
fix/performance-isolation-harness-20260910
Sep 11, 2026
Merged

vincentkoc merged 7 commits into
mainfrom
fix/performance-isolation-harness-20260910

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Candidate execution must not control evaluator evidence, and custom-workload
finalization failures must not skip required receipt/export handling.

Why This Change Was Made

The harness separates evaluator/candidate identities, protects reports,
validates bounded evidence and retains quiescence and fail-closed cleanup.

It captures the entire custom finalization boundary. Original workload failure
retains precedence; finalization failures remain visible in mandatory
receipt/export status.
The evidence schema validates exported JSON artifacts, not a persistent-store/database migration.

Landed benchmark prerequisite: #144159.
Dependencies: openclaw/Kova#125 followed by
openclaw/Kova#123, and openclaw/ocm#171.
Activation: #127240.

User Impact

Native capabilities remain available. Custom Kova and candidate diagnostics gain
no evaluator authority; evaluator integrity does not authenticate candidate
behavior. Mandatory failure evidence is retained without clearing gate failures.
Workflow activation remains in the separate activation PR.

Evidence

  • Head: 1d3f1c6fc58c104149e86e8c765aa7945319a8f5: signed ancestry merge;
    all four harness files unchanged from 9f0ddbbaa7abd88233ec298b9c2c700ea12f2c8d.
  • Retained 9f proof: two targeted tests and formatting passed; scoped review
    found zero P0-P2.
  • Retained c99 proof: four red regressions, then 97 runtime passes; not types.
  • Exact-head CI
    passed.
  • Cross-principal Linux/export/cleanup proof is a final activation gate with
    landed dependencies, not completed prerequisite proof.

Punchcard-Session: coral-orchard-orchard-d4

Run transported CLI samples and their temporary state through the explicit SUT transport while preserving native measurements. Reject unsupported transported runtime RSS and profiles before launching candidate code.

Punchcard-Session: coral-orchard-orchard-d4
Add the standalone off-Actions harness with separate runner and candidate identities, bounded collection, and preserved workload receipts. Retain custom evaluator diagnostics without granting gate authority; leave workflow activation to the dependent change.

Punchcard-Session: coral-orchard-orchard-d4
@vincentkoc vincentkoc self-assigned this Sep 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 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 scripts Repository scripts size: XL maintainer Maintainer-authored PR labels Sep 10, 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: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 11, 2026, 8:53 AM ET / 12:53 UTC (Revision 6).

ClawSweeper review

What this changes

Adds an isolated performance runner that separates candidate execution from evaluation, bounds exported artifacts, and preserves failure receipts.

Merge readiness

⛔ Blocked before merge - 6 items remain

The harness remains useful and is not implemented on current main. The prior finalization defect is addressed, and no new blocking code defect was established; the previously requested Linux authority-boundary proof remains outstanding.

Priority: P2
Reviewed head: 1d3f1c6fc58c104149e86e8c765aa7945319a8f5

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The coherent patch and repaired finalization path are useful, but the material authority boundary remains supported only by fixtures.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: Authority-chain proof required: remote_main delegates execution to openclaw-sut and collects after UID quiescence, but supplied tests replace identity switching, termination, collection, and export. The captured body explicitly leaves Linux qualification unrun. Evidence must cover allowed evaluation, rejected candidate report writes and escalation, descendant extinction before collection, and failure receipts; this scoped requirement applies despite MEMBER association. 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) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Authority-chain proof required: remote_main delegates execution to openclaw-sut and collects after UID quiescence, but supplied tests replace identity switching, termination, collection, and export. The captured body explicitly leaves Linux qualification unrun. Evidence must cover allowed evaluation, rejected candidate report writes and escalation, descendant extinction before collection, and failure receipts; this scoped requirement applies despite MEMBER association. 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 9 items Verified introduced scope and review continuity: The pinned base-to-head delta contains the harness, lease configuration, evidence schema, and tests. Comparing the previous reviewed head with this head produced no changes in these paths, so the reconciliation commit does not resolve the existing proof gap.
Authority-bearing production boundary: The harness grants the evaluator sudo access only to the candidate identity, protects evaluator directories, and terminates candidate-UID processes before diagnostic collection. These are real cross-principal responsibilities whose final effects need Linux qualification.
Prior finalization finding addressed: Custom collection, validation, and summary handling now execute inside a captured subshell; workload failure retains precedence, and the separate payload and receipt finalizer remains reachable after those failures.
Findings None None.
Security Needs attention Linux principal separation remains unqualified: The implementation relies on sudo restrictions, protected evaluator ancestors, and candidate-UID termination; available fixtures replace those operations, leaving forbidden writes and post-termination collection unproven.

How this fits together

OpenClaw’s performance tooling runs candidate builds through Kova and OCM, then collects measurements for regression evaluation. This harness separates candidate processes from the evaluator and controls when their diagnostic files can be collected.

flowchart TD
  A[Trusted coordinator] --> B[Isolated Linux lease]
  B --> C[Evaluator account]
  C --> D[Candidate account]
  D --> E[Candidate runtime and diagnostics]
  E --> F[Stop candidate processes]
  F --> G[Bounded artifact collection]
  C --> G
  G --> H[Evidence and failure receipts]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Authority-chain proof required: remote_main delegates execution to openclaw-sut and collects after UID quiescence, but supplied tests replace identity switching, termination, collection, and export. The captured body explicitly leaves Linux qualification unrun. Evidence must cover allowed evaluation, rejected candidate report writes and escalation, descendant extinction before collection, and failure receipts; this scoped requirement applies despite MEMBER association. 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.
  • Resolve security concern: Linux principal separation remains unqualified - The implementation relies on sudo restrictions, protected evaluator ancestors, and candidate-UID termination; available fixtures replace those operations, leaving forbidden writes and post-termination collection unproven.
  • Resolve merge risk (P1) - Candidate denial of evaluator-file writes and privilege escalation, plus descendant extinction before collection, remain unverified through the actual Linux boundary.
  • Resolve merge risk (P1) - Real collection/export failure receipts and lease cleanup remain unqualified; fixture success does not establish that failed remote workloads retain usable evidence.
  • Complete next step (P2) - Add real Linux authority and failure-path evidence before merge. Terminal output or redacted logs are sufficient; screenshots or recordings are useful when they show the diagnostics. Remove secrets, IP addresses, private endpoints, and other private data. Update the PR body to trigger review; if needed, ask a maintainer to comment @clawsweeper re-review.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [medium] Linux principal separation remains unqualified — scripts/openclaw-performance-crabbox.sh:213
Agent review details

Security

Needs attention: No concrete exploit was established, but the new cross-principal execution and collection boundary still needs final-effect proof.

PR surface

Tests +1154, Config +37, Other +926. Total +2117 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1154 0 +1154
Docs 0 0 0 0
Config 2 37 0 +37
Generated 0 0 0 0
Other 1 926 0 +926
Total 4 2117 0 +2117

Review metrics

Metric Value Why it matters
Production/tooling versus tests production/tooling +963; tests +1154 The production growth supplies a separate isolation owner; the larger fixture suite validates contracts but does not qualify Linux principal separation.

Stored data model

Persistent data-model change detected: database schema: .github/crabbox/openclaw-performance-evidence.schema.json. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Qualify the outer isolation boundary (recommended)
    Provide Linux evidence that evaluator operations succeed, candidate writes and escalation fail, and candidate descendants are gone before collection.
  2. Hold the harness with its activation stack
    Keep this PR pending until combined failure-receipt, export, and cleanup qualification is available.

Technical review

Best possible solution:

Retain one privileged isolation owner, qualify its allowed and forbidden final effects with the landed dependencies, and keep workflow activation gated on that evidence.

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

No live reproduction was established in this read-only review. Source inspection confirms the affected evaluator/candidate boundary, while supplied tests substitute its OS operations.

Is this the best way to solve the issue?

Yes, separating evaluator authority from candidate execution is a coherent owner-level approach; readiness still depends on proving the actual Linux boundary and failure paths.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is bounded performance-infrastructure hardening with activation remaining in a separate PR.
  • merge-risk: 🚨 security-boundary: The new sudo, UID, directory-permission, and collection boundary lacks final-effect Linux proof.
  • merge-risk: 🚨 automation: Remote failure handling and evidence export could fail when the harness is activated despite passing fixture tests.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Authority-chain proof required: remote_main delegates execution to openclaw-sut and collects after UID quiescence, but supplied tests replace identity switching, termination, collection, and export. The captured body explicitly leaves Linux qualification unrun. Evidence must cover allowed evaluation, rejected candidate report writes and escalation, descendant extinction before collection, and failure receipts; this scoped requirement applies despite MEMBER association. 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

Security concerns:

  • [medium] Linux principal separation remains unqualified — scripts/openclaw-performance-crabbox.sh:213
    The implementation relies on sudo restrictions, protected evaluator ancestors, and candidate-UID termination; available fixtures replace those operations, leaving forbidden writes and post-termination collection unproven.
    Confidence: 0.98

What I checked:

  • Verified introduced scope and review continuity: The pinned base-to-head delta contains the harness, lease configuration, evidence schema, and tests. Comparing the previous reviewed head with this head produced no changes in these paths, so the reconciliation commit does not resolve the existing proof gap. (scripts/openclaw-performance-crabbox.sh:1, 1d3f1c6fc58c)
  • Authority-bearing production boundary: The harness grants the evaluator sudo access only to the candidate identity, protects evaluator directories, and terminates candidate-UID processes before diagnostic collection. These are real cross-principal responsibilities whose final effects need Linux qualification. (scripts/openclaw-performance-crabbox.sh:213, 1d3f1c6fc58c)
  • Prior finalization finding addressed: Custom collection, validation, and summary handling now execute inside a captured subshell; workload failure retains precedence, and the separate payload and receipt finalizer remains reachable after those failures. (scripts/openclaw-performance-crabbox.sh:789, 1d3f1c6fc58c)
  • Tests do not exercise the OS authority boundary: The finalization tests replace identity switching, quiescence, collection, and payload export with fixture functions. They usefully verify status propagation and receipt handling, but cannot establish candidate-write denial or descendant extinction. (test/scripts/openclaw-performance-crabbox.test.ts:550, 1d3f1c6fc58c)
  • Captured proof and previous review: The complete supplied body, source revision c14a88d09659448867808ae4b4abb1875649029576fe1132efcc4652a7748099, reports targeted tests and CI while explicitly leaving cross-principal Linux/export/cleanup proof uncompleted. Both retained rank-up moves remain relevant. Deferring qualification to fix(ci): route noncanonical performance runs through isolation #127240 does not supply that evidence. (1d3f1c6fc58c)
  • Current main and release necessity check: Neither fetched main nor v2026.9.4 contains the new harness path. Current main still invokes Kova from the performance workflow; the merged benchmark prerequisite fix(perf): isolate benchmark subprocess transport #144159 does not implement this outer isolation owner. (.github/workflows/openclaw-performance.yml:583, 66c7fad06385)

Likely related people:

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

  • Add redacted Linux final-effect evidence for allowed evaluator execution, rejected candidate writes and escalation, and candidate-process extinction before collection.
  • Include actual failure receipts demonstrating that collection or summary errors still reach export finalization and cleanup.

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 (5 earlier review cycles)
  • reviewed 2026-09-10T15:58:31.869Z sha 6a6d2e1 :: needs real behavior proof before merge. :: [P2] Preserve finalization when custom diagnostic collection fails
  • reviewed 2026-09-10T20:17:07.628Z sha c99ccce :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-11T10:00:43.607Z sha 9f0ddbb :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-11T10:36:44.476Z sha 9f0ddbb :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-11T12:34:56.814Z sha 9f0ddbb :: needs real behavior proof before merge. :: none

Record evaluator-owned execution identity per suite and enforce compatible modes in comparisons, budget checks, and source summaries while preserving independent RSS semantics.

Punchcard-Session: coral-orchard-orchard-d4
Capture the complete custom collection, validation, and summary phase without disabling errexit. Preserve workload failure precedence and always reach the separate sealed-export and receipt finalizer.

Punchcard-Session: coral-orchard-orchard-d4
Punchcard-Session: coral-orchard-orchard-d4
@vincentkoc
vincentkoc marked this pull request as ready for review September 10, 2026 20:09
Punchcard-Session: coral-orchard-orchard-d4
Base automatically changed from fix/performance-bench-transport-20260910 to main September 11, 2026 12:28
Preserve the reviewed harness while incorporating the landed benchmark prerequisite.

Punchcard-Session: coral-orchard-orchard-d4

* commit '4407ed19ac63b1c1c84a0cfe6eb4bbeca9c2322c': (1196 commits)
  fix(perf): isolate benchmark subprocess transport (#144159)
  refactor(auth): await Copilot cache persistence (#144810)
  refactor(web-fetch): exercise URL normalization through the public tool (#144887)
  fix(ollama): preserve hosted subdomain model context (#144891)
  fix(doctor): explain Codex plugin health failures (#144813)
  fix(channels): honor pinned accounts in Mattermost model menus (#144880)
  fix(update): failed-update records hide the triggering error behind the excerpt tail (#144729)
  fix(logging): preserve OpenClaw package references in diagnostics (#144808)
  fix: retain plugin detail tab selections while inspection loads (#144647)
  fix: keep discovered models when sign-in tokens renew (#144861)
  fix(update): preserve local package overrides (#89985)
  fix(update): resolve compatibility bridges within the runtime graph (#144831)
  chore(i18n): refresh native locales (#144856)
  fix: preserve child signal termination during CLI respawn (#144838)
  fix(text): hide encoded MiniMax tool envelopes (#126307)
  fix(subagents): deliver child replies that match the empty placeholder (#130647)
  fix(cli): reject blank message channel selectors (#144802)
  fix(telegram): preserve mixed text order and pending stop (#144839)
  fix(memory): restore FTS fallback for same-name view collisions (#144783)
  chore(release): close out 2026.9.4 on main (#144708)
  ...
@vincentkoc
vincentkoc merged commit 5ff5dce into main Sep 11, 2026
88 checks passed
@vincentkoc
vincentkoc deleted the fix/performance-isolation-harness-20260910 branch September 11, 2026 13:09
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
…w#144162)

* fix(perf): isolate benchmark subprocess transport

Run transported CLI samples and their temporary state through the explicit SUT transport while preserving native measurements. Reject unsupported transported runtime RSS and profiles before launching candidate code.

Punchcard-Session: coral-orchard-orchard-d4

* fix(perf): isolate external evaluator from candidate runtime

Add the standalone off-Actions harness with separate runner and candidate identities, bounded collection, and preserved workload receipts. Retain custom evaluator diagnostics without granting gate authority; leave workflow activation to the dependent change.

Punchcard-Session: coral-orchard-orchard-d4

* fix(perf): reject mixed benchmark execution modes

Record evaluator-owned execution identity per suite and enforce compatible modes in comparisons, budget checks, and source summaries while preserving independent RSS semantics.

Punchcard-Session: coral-orchard-orchard-d4

* fix(perf): retain receipts after custom diagnostic failures

Capture the complete custom collection, validation, and summary phase without disabling errexit. Preserve workload failure precedence and always reach the separate sealed-export and receipt finalizer.

Punchcard-Session: coral-orchard-orchard-d4

* test(ci): preserve fixed IMDS probe argument tuples

Punchcard-Session: coral-orchard-orchard-d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL 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.

1 participant