Repository navigation
fix(bench): require the state-reader task counter - #198912
Conversation
Broker worker metrics can omit tasksCompleted, while this benchmark requires the state-reader pool counter to validate reply coverage. Assert that contract before summing rather than treating missing telemetry as zero. Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 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. What this changesThe benchmark asserts that state-reader task counts exist before adding them. Example: Typecheck the benchmark after worker metrics made tasksCompleted optional.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review This PR is a focused, correct repair for a current script-typechecking failure. No actionable findings remain, and exact-head typechecking and the CI gate pass; maintainer authorship also requires keeping it open. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe benchmark sends synthetic state-read requests through real workers and consumes lifecycle metrics to verify reply coverage and calculate GC measurements. flowchart LR
A[Synthetic state fixture] --> B[Benchmark requests]
B --> C[State reader pool]
C --> D[Worker lifecycle metrics]
D --> E[Required counter assertion]
E --> F[Reply coverage and GC results]
Technical reviewBest possible solution: Retain this local assertion so the benchmark accepts the broader metrics type without weakening its required task-count invariant. Do we have a high-confidence way to reproduce the issue? The pinned main reduction adds a number to an optional counter, establishing the TS18048 path; the author reports a failing-base/passing-head comparison, and exact-head typechecking passes. Is this the best way to solve the issue? This is the smallest complete fix: assert the benchmark's stronger counter requirement at consumption while leaving broker metrics optional and preserving the existing reply-coverage assertion. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b27440329b4c. Provenance checked
SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceOther +3. Total +3 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 14, 2026, 9:42 AM ET / 14:42 UTC. |
* commit 'e741fd0d21ff7f9857a9c49f91d95166beaae83f': feat: invite members as existing people on a claw (#198773) fix(anthropic): report owner loss after a broken CLI input pipe (#198778) feat(browser): support experimental Kitesurf browsing (#198833) fix(bench): require the state-reader task counter (#198912)
Broker worker metrics can omit tasksCompleted, while this benchmark requires the state-reader pool counter to validate reply coverage. Assert that contract before summing rather than treating missing telemetry as zero. Co-authored-by: RomneyDa <[email protected]>
Preserve the benchmark invariant when diagnostics also include worker kinds without task counters. Integrates the exact upstream #198912 repair for the PR merge type failure. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]>
Allow Kubernetes deployment help to print before deployment tools or cluster access are available, while preserving preflight checks for all operational modes. Validated the exact script in 18 isolated base/head scenarios, including both help flags, absent tools, unreachable-cluster controls, and all three teardown modes. CI exception: check-test-types in run 43605802000, attempt 2, fails on TS18048 in scripts/perf/state-read-worker-bench.ts:373. The tested baseline and merge have identical benchmark inputs; main already contains the repair from #198912. No passing CI conclusion is claimed for that failed attempt. Security and review gates remain required. Closes #198913. Co-authored-by: Leonardo Bohac <[email protected]> Co-authored-by: sallyom <[email protected]>
Allow Kubernetes deployment help to print before deployment tools or cluster access are available, while preserving preflight checks for all operational modes. Validated the exact script in 18 isolated base/head scenarios, including both help flags, absent tools, unreachable-cluster controls, and all three teardown modes. CI exception: check-test-types in run 43605802000, attempt 2, fails on TS18048 in scripts/perf/state-read-worker-bench.ts:373. The tested baseline and merge have identical benchmark inputs; main already contains the repair from openclaw#198912. No passing CI conclusion is claimed for that failed attempt. Security and review gates remain required. Closes openclaw#198913. Co-authored-by: Leonardo Bohac <[email protected]> Co-authored-by: sallyom <[email protected]>
) * fix(ui): reveal selected mobile pages without drawer delay Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * fix(ui): show mobile destinations without the drawer exit delay Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 217faa0a-9598-84e4-bd22-22f7f548856b * fix(perf): require the state-reader task census Preserve the benchmark invariant when diagnostics also include worker kinds without task counters. Integrates the exact upstream #198912 repair for the PR merge type failure. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * test(ui): expose pending end-to-end setup phases Record opt-in setup starts before the fixture awaits that completed-only intervals cannot identify when CI reaches its step deadline. Preserve the completed schema and owner outcomes even when diagnostic writes fail. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * test(ui): remove redundant phase log coercions Use the already-string writeSync mock arguments directly so the phase helper assertions satisfy the required type-aware lint rule. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * test(ui): remove temporary setup investigation probes Restore the five diagnostic-only files to their pre-investigation content. Keep canonical completed phase records and error preservation while retaining the mobile navigation fix and upstream task census repair. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * fix(ui): simplify drawer close state Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> --------- Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: RomneyDa <[email protected]>
…claw#198879) * fix(ui): reveal selected mobile pages without drawer delay Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * fix(ui): show mobile destinations without the drawer exit delay Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 217faa0a-9598-84e4-bd22-22f7f548856b * fix(perf): require the state-reader task census Preserve the benchmark invariant when diagnostics also include worker kinds without task counters. Integrates the exact upstream openclaw#198912 repair for the PR merge type failure. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * test(ui): expose pending end-to-end setup phases Record opt-in setup starts before the fixture awaits that completed-only intervals cannot identify when CI reaches its step deadline. Preserve the completed schema and owner outcomes even when diagnostic writes fail. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * test(ui): remove redundant phase log coercions Use the already-string writeSync mock arguments directly so the phase helper assertions satisfy the required type-aware lint rule. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * test(ui): remove temporary setup investigation probes Restore the five diagnostic-only files to their pre-investigation content. Keep canonical completed phase records and error preservation while retaining the mobile navigation fix and upstream task census repair. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * fix(ui): simplify drawer close state Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> --------- Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Related: #197510, #198894; follows the optional broker metric introduced by #198866.
What Problem This Solves
check-test-typesfails atscripts/perf/state-read-worker-bench.ts:373with TS18048 aftertasksCompletedbecame optional for broker workers. The benchmark selects the state-read pool worker, where a completed-task count is required to verify every measured reply.Why This Change Was Made
Assert that the selected worker supplies its task count before summing it. This narrows the real contract without a cast or a fabricated zero. Missing telemetry now fails clearly; the task-delta assertion, measurement boundaries and GC calculations stay unchanged. One script changes: four lines added, one removed. No production runtime, schema, configuration or dependency change.
User Impact
Restores script typechecking and keeps benchmark results from silently treating unavailable counters as measured zero. No user-facing runtime behavior changes.
Evidence
b27440329b4c450ec4c572e40ed338ed98f3d9c7: exactnode scripts/run-tsgo.mjs -p tsconfig.scripts.json --noEmitfails with TS18048 at the unchanged reduction. The same graph passes with this fix; the negative-control swap restored the candidate and verified byte equality.git diff --checkpass.node --import ./scripts/tsx.mjs scripts/perf/state-read-worker-bench.ts --output <new-fixture> --iterations 1 --rows 500exits 0. After the required 200 warmups, the measured worker counter advances 200 → 201 and the existing complete-reply assertion passes. This is functional smoke evidence, not a performance comparison.346f83a28308f15240cb345c6bab35862a2539f0. The hosted review reports no findings at that same head, and the complete review-thread query has zero threads. This does not qualify fix: reduce Gateway stalls under filesystem pressure #197510’s integrated Linux/btrfs, Doctor/upgrade or performance campaign. No merge or backport requested.