Skip to content

fix(perf): isolate benchmark subprocess transport - #144159

Merged
vincentkoc merged 2 commits into
mainfrom
fix/performance-bench-transport-20260910
Sep 11, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/performance-bench-transport-20260910

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Isolated CLI benchmarks must launch candidate code outside evaluator authority
without comparing transported timings against direct-native measurements.

Why This Change Was Made

Adds benchmark subprocess transport and an explicit native-versus-transport
execution-mode marker. Saved comparisons, budget evaluation and source-summary
consumption reject mixed modes rather than silently combining incompatible
measurements.

Ordinary native execution and runtime-RSS behavior remain intact. Unsupported
transport/runtime-RSS combinations reject before prefix execution.

User Impact

CLI benchmarking remains available through the isolated source lane, with
transport overhead identified rather than hidden in native baselines.

Existing route: #144159.
Harness: #144162.
Activation: #127240.

Evidence

  • Head: d91704b4fbdbb47f6b036f198ec433d476cc331e.
  • Five intended red regressions; 65/65 owner/sibling tests passed.
  • Scoped review: zero P0-P2 findings.
  • Formatting and change classification passed; classification is not the
    full changed gate.
  • Exact-head CI
    succeeded (pull_request, attempt 1, ci.yml): 93 terminal jobs,
    76 successful and 17 skipped; gate 103034639461 passed.
    Skipped jobs are not proof.
  • Local full gates did not complete; hosted required CI passed. Cross-principal Linux execution/timing and
    cleanup proof is a final activation gate with landed dependencies; it has
    not passed.

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
@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: M 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, 6:35 AM ET / 10:35 UTC (Revision 3).

ClawSweeper review

What this changes

Adds an explicit transport for benchmark subprocesses and temporary files, and prevents comparisons between native and transported measurements.

Merge readiness

⛔ Blocked before merge - 5 items remain

This remains a distinct prerequisite for the linked isolation work. The previous mixed-mode comparison finding is resolved, and no new concrete patch defect was established; the protected, member-authored PR should remain open.

Priority: P2
Reviewed head: d91704b4fbdbb47f6b036f198ec433d476cc331e

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch resolves the prior comparison defect and preserves native compatibility, but required authority-boundary evidence is still absent.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: Authority-chain proof required: the benchmark's sample and filesystem owners now delegate through an execution prefix, but the supplied same-user test does not exercise the real Linux principal boundary. The captured body explicitly leaves allowed execution, denied evaluator-private reads/report writes, and timeout cleanup unproven; passing CI does not close that scoped gap. 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: the benchmark's sample and filesystem owners now delegate through an execution prefix, but the supplied same-user test does not exercise the real Linux principal boundary. The captured body explicitly leaves allowed execution, denied evaluator-private reads/report writes, and timeout cleanup unproven; passing CI does not close that scoped gap. 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 7 items Introduced transport boundary: The introduced path delegates sample execution and filesystem operations through the configured prefix, clears the inherited environment, and keeps report writes in the evaluator. Unsupported transported runtime RSS and profiling reject before execution.
Prior comparison finding resolved: Suites now record executionMode; omitted historical values mean native. Saved comparisons, budget checks, and source-summary comparisons reject mixed modes. Added cases cover historical native reports, matching transport reports, and invalid metadata.
Current main still uses native execution: Current main directly spawns process.execPath with inherited process.env. The transport selector and execution-mode compatibility helper are absent, so the central change remains useful.
Findings None None.
Security Needs attention Cross-principal final effects remain unverified: The configured prefix launches candidate code and filesystem helpers under another identity. Same-user emulation cannot establish that evaluator-private reads and report writes are denied through the actual handoff.

How this fits together

The CLI benchmark runs candidate commands and collects timing and memory measurements for performance reports. The transport moves candidate execution and temporary-file operations behind a configured execution boundary while the evaluator retains report generation.

flowchart LR
  A[Benchmark cases] --> B[Benchmark evaluator]
  C[Trusted transport configuration] --> B
  B --> D{Execution mode}
  D -->|Native| E[Local candidate process]
  D -->|Transport| F[Isolated candidate and temporary files]
  E --> G[Measurements and reports]
  F --> G
  G --> H[Compatible comparisons and budgets]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Authority-chain proof required: the benchmark's sample and filesystem owners now delegate through an execution prefix, but the supplied same-user test does not exercise the real Linux principal boundary. The captured body explicitly leaves allowed execution, denied evaluator-private reads/report writes, and timeout cleanup unproven; passing CI does not close that scoped gap. 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: Cross-principal final effects remain unverified - The configured prefix launches candidate code and filesystem helpers under another identity. Same-user emulation cannot establish that evaluator-private reads and report writes are denied through the actual handoff.
  • Resolve merge risk (P1) - The real cross-user prefix has not demonstrated that candidate execution cannot read evaluator-private data or overwrite evaluator reports.
  • Resolve merge risk (P2) - Transported timeout handling has not demonstrated that candidate descendants stop before temporary-state cleanup and subsequent measurements.
  • Complete next step (P2) - Provide redacted terminal traces or logs showing allowed candidate execution, denied evaluator-private reads/report writes, and descendant teardown after timeout. Remove credentials, private endpoints, and personal data; update the PR body to trigger re-review, or ask a maintainer to comment @clawsweeper re-review.

Findings

  • [medium] Cross-principal final effects remain unverified — scripts/bench-cli-startup.ts:1158
Agent review details

Security

Needs attention: No concrete exploit or supply-chain regression was established, but the changed cross-principal execution boundary remains unproven.

PR surface

Tests +243, Other +220. Total +463 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 246 3 +243
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 4 250 30 +220
Total 7 496 33 +463

Review metrics

Metric Value Why it matters
Benchmark contracts 1 transport environment variable; 1 execution-mode report field The new internal selector changes execution identity, while report metadata prevents mixing incompatible measurements.
Tooling versus test growth Production tooling +220 net lines; tests +243 net lines The tooling growth supports delegated execution, remote temporary-file lifecycle, and shared comparison validation.

Merge-risk options

Maintainer options:

  1. Establish isolation and teardown evidence (recommended)
    Provide production-boundary Linux evidence for successful candidate execution, denied evaluator access, and completed descendant cleanup before accepting the transport.
  2. Hold the prerequisite
    Keep this PR open until the linked harness can supply the required cross-principal evidence.

Technical review

Best possible solution:

Retain native defaults and legacy-report compatibility, with verified cross-user isolation and process teardown before transported benchmarking is accepted.

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

Yes, at source level: current main launches candidate code under the evaluator's process identity with its inherited environment. No live cross-principal reproduction was executed in this read-only review.

Is this the best way to solve the issue?

Yes, the explicit transport and shared comparison contract are a focused solution that preserves native behavior; acceptance still depends on evidence for the actual principal boundary.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is bounded performance-tooling isolation work with no demonstrated urgent user-facing outage.
  • merge-risk: 🚨 security-boundary: The new execution prefix crosses evaluator and candidate principals without completed final-effect isolation proof.
  • merge-risk: 🚨 automation: Unverified teardown across the transport could leave candidate processes affecting cleanup and later benchmark samples.
  • 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: the benchmark's sample and filesystem owners now delegate through an execution prefix, but the supplied same-user test does not exercise the real Linux principal boundary. The captured body explicitly leaves allowed execution, denied evaluator-private reads/report writes, and timeout cleanup unproven; passing CI does not close that scoped gap. 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] Cross-principal final effects remain unverified — scripts/bench-cli-startup.ts:1158
    The configured prefix launches candidate code and filesystem helpers under another identity. Same-user emulation cannot establish that evaluator-private reads and report writes are denied through the actual handoff.
    Confidence: 0.97

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add final-effect Linux evidence that candidate execution succeeds while evaluator-private reads and report writes are denied.
  • Show that timed-out transported samples and their descendants stop before cleanup and subsequent measurements.

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 (2 earlier review cycles)
  • reviewed 2026-09-10T15:54:03.372Z sha b88f06a :: needs real behavior proof before merge. :: [P2] Distinguish transported reports before comparing startup timings
  • reviewed 2026-09-10T20:15:07.005Z sha d91704b :: 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
@vincentkoc
vincentkoc marked this pull request as ready for review September 10, 2026 20:07
@vincentkoc
vincentkoc merged commit 4407ed1 into main Sep 11, 2026
190 checks passed
@vincentkoc
vincentkoc deleted the fix/performance-bench-transport-20260910 branch September 11, 2026 12:28
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 11, 2026
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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
* 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): 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
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: L 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