Skip to content

fix(cpu): refresh census after gateway discovery - #120

Merged
RomneyDa merged 1 commit into
mainfrom
fix/cpu-refresh-after-gateway-discovery
Sep 8, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/cpu-refresh-after-gateway-discovery

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

  • refresh the process census immediately when OCM discovers a gateway PID that the preceding census did not contain
  • keep strict incomplete-history behavior for genuinely late process discovery
  • add a regression test for the census/lookup race

Root cause

Kova #119 retries missing gateway PID lookups at sampling cadence, but each sample took its process census before querying OCM. When the gateway was born between those operations, OCM returned its PID while the stale census omitted it. The accountant first saw the gateway one full sample later with accumulated lifetime CPU, correctly marking history incomplete.

Observed in OpenClaw proof 34211366482: #119 improved the selected matrix from 12 BLOCKED records to 2, but repeat 3 of fresh-install/fresh and bundled-plugin-startup/fresh still hit this race. Both had actual gateway CPU below threshold.

Validation

  • npm run test:cpu-accounting (26 passed, 9 platform skips)
  • npm run test:assert-command-output
  • npm run test:selfcheck-isolation
  • node bin/kova.mjs self-check (280/280 passed)

@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.

@clawsweeper

clawsweeper Bot commented Sep 8, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(cpu): refresh census after gateway discovery This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@RomneyDa
RomneyDa merged commit cf6e26f into main Sep 8, 2026
7 checks passed
@RomneyDa
RomneyDa deleted the fix/cpu-refresh-after-gateway-discovery branch September 8, 2026 10:10
RomneyDa added a commit that referenced this pull request Sep 8, 2026
)

* fix(cpu): exclude process census from scan uncertainty (#118)

* fix(cpu): exclude process census from scan uncertainty

* test(cpu): compare scan uncertainty within rounding

* fix(cpu): discover starting gateway on next sample (#119)

* fix(cpu): refresh census after gateway discovery (#120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant