Skip to content

fix: release checks accept census-window process births - #156

Merged
RomneyDa merged 2 commits into
mainfrom
release-ci/cpu-discovery-clock-1790613000
Sep 28, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
release-ci/cpu-discovery-clock-1790613000

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: release qualification blocks when a product process starts after a Linux process census begins but first appears in the next census.

User Impact

User impact: Kova no longer rejects a healthy OpenClaw release because ps missed a process born during its own snapshot, while processes that truly predate the prior census still fail closed without a CPU baseline.

Why This Change Was Made

Kova recorded the CPU counter clock only after ps completed. A child born after the ps snapshot but before that clock therefore looked older than the prior census when it first appeared one sample later. The sampler now carries the census-start clock separately: process birth classification uses that boundary, existing counter intervals remain unchanged, and the wider boundary applies only to the new process's conservative lower bound.

Production delta: +23/-10 across the Linux CPU sampler/accountant. The added state is the existing clock record's discovery boundary; no parallel accounting path or compatibility fallback was added.

Evidence

  • Exact OpenClaw FRV failure: performance run 36444206068, agent-cold-warm-message, 14/15 records passed. The failed artifact shows PID 62060 starting after the prior census began but before its post-ps clock, then being marked cpuHistoryComplete: false on first appearance.
  • Pre-fix focused regression: node --test tests/linux-cpu-accounting.mjs --test-name-pattern='process born during the prior census' fails false !== true at the coverage assertion.
  • After: npm run test:cpu-accounting — 79 total, 58 pass, 21 platform skips, 0 failures.
  • Complete local gate: npm run check — 280/280 self-checks plus all component suites pass.
  • Fresh AutoReview: scoped clean, patch correctness 0.96, no actionable findings.
  • Linux-only live scenario proof will be attached from exact-head CI before landing.

@clawsweeper

clawsweeper Bot commented Sep 28, 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 marked this pull request as ready for review September 28, 2026 16:12
@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 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed September 28, 2026, 4:11 PM ET / 20:11 UTC (Revision 2).

ClawSweeper review

What this changes

Kova’s Linux resource sampler records when a process census begins and uses that boundary to account for late-seen OpenClaw processes, with updated documentation and regressions.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open. Current main still uses the post-census clock for process-birth classification, and the revised PR addresses the earlier sampler error-handling finding. The linked release run succeeded, but its process records were unavailable to this review.

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused repair and regressions are strong; a maintainer still needs to verify that the linked live artifact demonstrates the exact timing case.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. A linked OpenClaw performance run succeeded, but it predates the revised head and its detailed census records were inaccessible here; focused source tests cover the changed birth and clock-error paths. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. A linked OpenClaw performance run succeeded, but it predates the revised head and its detailed census records were inaccessible here; focused source tests cover the changed birth and clock-error paths. No stored-data contract changes.
Evidence reviewed 9 items Repository guidance: The full root policy frames Kova as an OpenClaw validation lab and favors release-shaped evidence. No nested AGENTS.md or matching maintainer notes were found.
Current main timing gap: Main reads the CPU clock after process listing and uses the previous post-census ticks to classify a newly observed process; it has no discovery-clock fields.
Introduced accounting boundary: The PR classifies process birth against the earlier census boundary while retaining the existing counter interval and using the wider boundary for a new process’s lower bound.
Findings None None.
Security None None.

How this fits together

Kova samples OpenClaw scenario process trees using Linux process listings and CPU counters. Its resource summary feeds the release evaluator, which blocks qualification when product CPU coverage is incomplete.

flowchart LR
A[OpenClaw scenario] --> B[Linux process census]
B --> C[Census start clock]
B --> D[CPU counter snapshot]
C --> E[CPU coverage accounting]
D --> E
E --> F[Resource summary]
F --> G[Release qualification]
Loading

Decision needed

Question Recommendation
Does the linked earlier performance artifact demonstrate a real census-window process birth with complete CPU coverage for this PR, or is a current-head trace needed? Verify the targeted trace: Inspect the archived process records and capture a current-head Linux trace if they do not show the claimed birth and coverage result.

Why: The successful run’s metadata does not expose its Kova revision or individual process records, and this review environment could not retrieve its logs.

Before merge

  • Resolve merge risk (P1) - The linked successful release run predates the revised head, and its process records could not be inspected here. Maintainers should confirm it actually observed a census-window birth being classified with complete CPU coverage before relying on it as release-gate proof.
  • Complete next step (P2) - Maintainer: verify that the linked Linux artifact records the claimed census-window birth and complete coverage; if it does not, obtain a current-head trace before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Source and test lines production +43/-15; tests +42/-1 The production growth adds a discovery boundary to the existing sampler and accountant, with focused regression coverage.

Merge-risk options

Maintainer options:

  1. Verify census-window evidence (recommended)
    Inspect the linked artifact for the process start, prior census boundary, and complete coverage result; capture a current-head run if that observation is absent.
  2. Accept the proof gap
    Rely on the source regression and earlier successful run while accepting limited live evidence for the precise release-gate race.

Technical review

Best possible solution:

Keep strict blocking for genuinely missing CPU history, and verify with a release-shaped Linux trace that the census-start boundary clears only the process-birth race.

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

Yes at source level: main takes the process-birth comparison clock after the process listing, and the focused regression models a child first seen in the next census. This review did not execute the live timing race.

Is this the best way to solve the issue?

Yes. Using a census-start boundary for birth classification while retaining strict rejection of genuinely missing CPU history is a narrow repair; the specific live result still needs confirmation.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 maintainer-authored PR is exempt from the external-contributor proof gate. A linked OpenClaw performance run succeeded, but it predates the revised head and its detailed census records were inaccessible here; focused source tests cover the changed birth and clock-error paths. No stored-data contract changes.
  • 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: The timing race can falsely block OpenClaw release qualification, with limited scope outside Linux CPU evidence.
  • merge-risk: 🚨 automation: A wrong completeness classification would change an automated release-gate result even if ordinary checks pass.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 maintainer-authored PR is exempt from the external-contributor proof gate. A linked OpenClaw performance run succeeded, but it predates the revised head and its detailed census records were inaccessible here; focused source tests cover the changed birth and clock-error paths. No stored-data contract changes.

Evidence

What I checked:

  • Repository guidance: The full root policy frames Kova as an OpenClaw validation lab and favors release-shaped evidence. No nested AGENTS.md or matching maintainer notes were found. (AGENTS.md:3, d8cf570b5b92)
  • Current main timing gap: Main reads the CPU clock after process listing and uses the previous post-census ticks to classify a newly observed process; it has no discovery-clock fields. (src/collectors/linux-cpu.mjs:199, d69b22099051)
  • Introduced accounting boundary: The PR classifies process birth against the earlier census boundary while retaining the existing counter interval and using the wider boundary for a new process’s lower bound. (src/collectors/linux-cpu.mjs:207, d8cf570b5b92)
  • Earlier finding repaired: The later PR commit places discovery-clock reads inside sampler error handling and adds a Linux clock-failure regression. GitHub’s parent-to-head comparison confirms these were added after the first PR commit. (src/collectors/resources.mjs:99, d8cf570b5b92)
  • Focused coverage regression: The new test models a child born during the prior census and asserts complete CPU history and accountant coverage; adjacent existing tests still require incomplete earlier history to block qualification. (tests/linux-cpu-accounting.mjs:560, d8cf570b5b92)
  • Release-gate consequence: The evaluator emits a resourceCpuCoverage evidence violation when a measured product result lacks complete CPU coverage. (src/evaluator.mjs:194, d8cf570b5b92)

Likely related people:

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

  • Confirm the archived Linux process records show a census-window birth reaching complete coverage, or capture that observation on the current head.

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-28T16:17:27.798Z sha 8da3b23 :: blocked before merge. :: [P2] Catch the discovery-clock read with other sample failures

@RomneyDa
RomneyDa force-pushed the release-ci/cpu-discovery-clock-1790613000 branch from 8da3b23 to d8cf570 Compare September 28, 2026 20:07
@RomneyDa

Copy link
Copy Markdown
Member Author

Addressed the P2 sampler-boundary finding on rebased head d8cf570c121925237c1214994a7ef0bbc2e0f44c:

  • discovery-clock reads now remain inside sampler evidence handling, including terminal census setup;
  • /proc/uptime failure regression proves the sampler resolves with incomplete evidence instead of throwing;
  • rebased onto current Kova main (d69b22099051).

Proof:

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🦞👀
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
@RomneyDa

Copy link
Copy Markdown
Member Author

Maintainer decision: the release-shaped proof is sufficient.

I downloaded openclaw-performance-mock-provider-36449470124-1, expanded its retained Kova bundle, and inspected all 154 resource-samples/*.jsonl files. Three real Linux processes were first observed after being born inside the prior census window—the exact race this PR repairs—and all three retained complete CPU coverage:

  • PID 13039: previousDiscoveryTicks=16953, startTicks=16955, old post-census boundary previousCounterTicks=16960; cpuIntervalComplete=true, cpuHistoryComplete=true
  • PID 14460: 17953 < 17958 < 17965; both completeness fields true
  • PID 15743: 18855 < 18864 < 18866; both completeness fields true

All are product-owned roles (command-tree, plus build/package/runtime roles) in fresh-install target setup. This proves the live collector—not only the synthetic accountant fixture—accepts births after census start while retaining strict history coverage. The later d8cf570 commit changes only clock-read error containment and has its own focused failure regression.

Artifact/run: https://github.com/openclaw/openclaw/actions/runs/36449470124

@RomneyDa
RomneyDa merged commit 4b8b168 into main Sep 28, 2026
15 checks passed
@RomneyDa
RomneyDa deleted the release-ci/cpu-discovery-clock-1790613000 branch September 28, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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