Skip to content

fix(perf): inherit release gateway CPU calibration - #122

Merged
RomneyDa merged 1 commit into
mainfrom
fix/release-fresh-cpu-calibration
Sep 8, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/release-fresh-cpu-calibration

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Summary

  • keep the shared fresh-install gateway CPU ceiling at 250%
  • add a release-profile-only 300% override through the existing profile surface calibration
  • preserve smoke and unprofiled enforcement

Root cause

Kova #120 corrected late gateway CPU census undercounting. Two consecutive OpenClaw full validations then each produced one noisy fresh-install sample above 250% while the other two repeats passed. The latest samples were 162.4%, 270%, and 176.7%; the aggregate was classified unstable with a 176.7% median.

The release profile already calibrates general gateway CPU at 300%, but fresh-install's shared 250% surface cap shadowed it. This patch scopes the adjustment through profiles/release.json; it does not weaken smoke or unprofiled checks.

Verification

  • failing release evidence: OpenClaw run 34272365769, fresh-install/fresh repeat 2
  • same run: 14/15 records passed; health, readiness, RSS, dependencies, plugins, and restarts remained clean
  • self-check covers release=300%, smoke=250%, and unprofiled=250%
  • npm run check:full running after exact-head correction; prior 280/280 self-check green
  • autoreview rerun in progress

LOC

Production/config: +7. Tests/snapshot: +18 net.

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@RomneyDa

RomneyDa commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 4:41 PM ET / 20:41 UTC (Revision 2).

ClawSweeper review

What this changes

Sets Kova’s release-only fresh-install gateway CPU limit to 300%, preserves the shared 250% limit, and adds calibration checks and a plan snapshot update.

Merge readiness

✅ Ready for maintainer review

The prior non-release enforcement finding is resolved, and no blocking defect remains in the revised patch. This maintainer-authored change is still needed: the reviewed main and latest release lack the release-specific override.

Priority: P2
Reviewed head: 9cd35ffb5f567d92f10341674fcd240c7805ed22

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused correction using established calibration plumbing, with the previous enforcement defect resolved and appropriate regression assertions.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the ordinary contributor proof gate. Its supplied run measurements explain the calibration, while the inspected assertions cover threshold resolution; neither is claimed as an observed after-fix runtime run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the ordinary contributor proof gate. Its supplied run measurements explain the calibration, while the inspected assertions cover threshold resolution; neither is claimed as an observed after-fix runtime run.
Evidence reviewed 7 items Applicable repository policy: Read the complete root AGENTS.md; no nested AGENTS.md or matching maintainer notes were found. Applied its OpenClaw-focused evaluation boundary and read-only review constraints.
Verified introduced change: The pinned base-to-head diff adds only the release surface override, regression assertions, and the calibrated-surface count update; it does not remove the shared gateway limit.
Resolution and enforcement: resolveThresholdPolicy applies profile surface role thresholds after shared surface thresholds. evaluateRecord consumes that result for both primary CPU and role enforcement; checkCpuThreshold retains finite-value and uncertainty handling.
Findings None None.
Security None None.

How this fits together

Kova evaluates OpenClaw runtime measurements against scenario, surface, and profile thresholds. The resolved CPU limit determines whether fresh-install measurements pass the release gate.

flowchart TD
  A[OpenClaw CPU measurements] --> E[Threshold evaluation]
  B[Shared surface limit 250 percent] --> D[Resolve selected profile]
  C[Release override 300 percent] --> D
  D --> E
  E --> F[Pass or threshold violation]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
LOC delta Production/config +7; tests +18 net; snapshot 1 line replaced The production addition uses an existing calibration mechanism, with regression checks for all three profile contexts.
Calibration scope Release 250% → 300%; smoke and unprofiled remain 250% The higher allowance is limited to the intended release evaluation.

Technical review

Best possible solution:

Keep release calibration in the existing profile override mechanism while preserving shared limits and evaluator enforcement for other runs.

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

Yes, from source: on pinned main, the fresh-install surface’s 250% cap overrides the release profile’s general 300% calibration. No runtime reproduction or tests were executed during this read-only review.

Is this the best way to solve the issue?

Yes. The revision uses the existing profile surface override and preserves the shared default; its resolution assertions and existing evaluator coverage address the earlier enforcement concern.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the ordinary contributor proof gate. Its supplied run measurements explain the calibration, while the inspected assertions cover threshold resolution; neither is claimed as an observed after-fix runtime run.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded release-validation calibration correction with preserved non-release enforcement.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the ordinary contributor proof gate. Its supplied run measurements explain the calibration, while the inspected assertions cover threshold resolution; neither is claimed as an observed after-fix runtime run.

Evidence

What I checked:

  • Applicable repository policy: Read the complete root AGENTS.md; no nested AGENTS.md or matching maintainer notes were found. Applied its OpenClaw-focused evaluation boundary and read-only review constraints. (AGENTS.md:1, 9cd35ffb5f56)
  • Verified introduced change: The pinned base-to-head diff adds only the release surface override, regression assertions, and the calibrated-surface count update; it does not remove the shared gateway limit. (profiles/release.json:81, 9cd35ffb5f56)
  • Resolution and enforcement: resolveThresholdPolicy applies profile surface role thresholds after shared surface thresholds. evaluateRecord consumes that result for both primary CPU and role enforcement; checkCpuThreshold retains finite-value and uncertainty handling. (src/evaluator.mjs:105, 9cd35ffb5f56)
  • Prior finding resolved: The earlier review requested preservation of non-release enforcement. Current source retains 250% in the shared surface and explicitly checks release=300%, smoke=250%, and unprofiled=250%. Existing evaluator tests separately cover CPU violations. These checks were inspected, not executed. The earlier reviewed commit was unavailable locally, so no historical file-equality claim is made. (src/selfcheck.mjs:21319, 9cd35ffb5f56)
  • Main and release still lack the override: Inspected profiles/release.json at pinned main and v0.1.5: both have the general 300% gateway calibration but lack the fresh-install surface override. The v0.1.5 fresh-install surface retains its overriding 250% cap. (profiles/release.json:80, cf6e26f0ca12)
  • Related merged work is distinct: The supplied GitHub metadata verifies fix(cpu): refresh census after gateway discovery #120 merged into the pinned base. It repairs gateway census timing, not profile calibration, and therefore does not supersede this PR. (cf6e26f0ca12)

Likely related people:

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

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 (1 earlier review cycle)
  • reviewed 2026-09-08T20:33:21.344Z sha 9bf1bd9 :: blocked before merge. :: [P2] Preserve the gateway CPU cap for non-release runs

@RomneyDa
RomneyDa force-pushed the fix/release-fresh-cpu-calibration branch from 9bf1bd9 to 9ed0e44 Compare September 8, 2026 20:35
@RomneyDa
RomneyDa force-pushed the fix/release-fresh-cpu-calibration branch from 9ed0e44 to 9cd35ff Compare September 8, 2026 20:36
@RomneyDa

RomneyDa commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@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 merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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 8, 2026
@RomneyDa
RomneyDa merged commit 3da9582 into main Sep 8, 2026
12 checks passed
@RomneyDa
RomneyDa deleted the fix/release-fresh-cpu-calibration branch September 8, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant