Repository navigation
fix(cpu): exclude process census from scan uncertainty - #118
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 4:48 AM ET / 08:48 UTC. ClawSweeper reviewWhat this changesMoves Linux CPU snapshot timing after process discovery and adds a regression test that accommodates outward rounding of CPU bounds. Merge readiness✅ Ready for maintainer review The prior rounding finding is resolved, and no blocking defect remains. This focused fix is still needed: current main and v0.1.5 include process discovery in CPU scan uncertainty. Priority: P2 Review scores
Verification
How this fits togetherKova samples OpenClaw processes during runtime validation and converts Linux CPU counters into conservative measurement bounds. Those bounds determine whether CPU evidence passes, fails, or blocks qualification as inconclusive. flowchart LR
A[OpenClaw workload] --> B[Process discovery]
B --> C[Timed Linux counter scan]
C --> D[CPU interval accounting]
D --> E[Conservative CPU bounds]
E --> F[Qualification verdict]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep uncertainty tied to actual counter-scan margins while retaining conservative bounds and existing incomplete-evidence safeguards. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main starts the clock before process discovery and includes that latency in scan uncertainty. The regression isolates this with a 100 ms discovery delay; no tests were executed during this read-only review. Is this the best way to solve the issue? Yes. Moving the clock to the counter-snapshot boundary directly repairs the producer and preserves the documented qualification rules; the revised assertion respects existing outward rounding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7c2ea36ab802. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review CI follow-up only: the Linux regression now compares the zero-uncertainty interval within the summary’s documented outward 0.1-point rounding, instead of requiring the independently rounded endpoints to be byte-equal. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
/proccounter census it boundsRoot cause
startResourceSamplerread the CPU clock before invokingps. The uncertainty calculation therefore charged the process census to the/proccounter scan. In OpenClaw release validation this widened a gateway observation from a 308.1% upper bound down to a 229.4% lower bound—about 79 percentage points of uncertainty—and made Kova returnBLOCKED.Kova is correct to block inconclusive evidence; the measurement window was wrong. This fixes the producer rather than teaching OpenClaw to accept a blocked gate.
Verification
npm run test:cpu-accounting(25 passed locally; Linux-only regression runs in CI)npm run checkreached the unrelated existing selfcheck-isolation timeout fixture after focused suites passed+4/-8(net -4); tests+41/-1