Skip to content

test(scripts): batch accepted Docker stats fixtures - #134133

Merged
steipete merged 1 commit into
mainfrom
codex/test-docker-stats-fixture
Aug 31, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-docker-stats-fixture

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Six accepted-input Docker stats cases each create a temporary log and launch the same Node CLI, despite the parser supporting mixed streaming samples.

Why This Change Was Made

Use one mixed log with LF, a padded sample, an exactly capped CRLF line, standalone CR separators, byte-unit memory and a terminal zero-capacity row. Require exactly six counted samples, the original memory/CPU peaks and the exact line-cap boundary. Retain every distinct rejection and streaming-memory guard.

User Impact

No resource policy or runtime change. Five fewer Node processes and temporary roots; thirteen tests become eight while retaining all accepted-input scenarios. Production +0/-0; tests +17/-55.

Evidence

node scripts/run-vitest.mjs test/scripts/docker-stats-resource-ceiling.test.ts
{"numPassedTests":8,"numFailedTests":0,"numPendingTests":0,"success":true}

Local suite time decreased from 476.8 ms to 364.0 ms; not a CI-wide benchmark. The six-sample assertion detects dropped accepted rows or an incorrectly counted terminal row. Malformed JSON, invalid limits and fields, oversized lines, terminal-only logs, nonpositive memory and streaming-memory coverage remain. Full changed-file gate, formatting, diff check and structured Codex autoreview pass.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 9:34 AM ET / 13:34 UTC.

ClawSweeper review

What this changes

The PR combines six accepted Docker-stats parsing cases into one mixed streamed fixture while retaining separate rejection and memory-streaming checks.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking correctness finding: the mixed fixture retains the accepted-input checks through peak and exact sample-count assertions, while rejection and streaming guards remain separate. Current main does not contain this consolidation, and the MEMBER-authored, maintainer-labeled PR needs an explicit maintainer merge decision.

Priority: P3
Reviewed head: 6d1204680a8a73f6730e95eada14400c29670556
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving test cleanup with no identified correctness or security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored test-only PR does not require contributor real-behavior proof; the supplied terminal result is focused validation rather than user-flow proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored test-only PR does not require contributor real-behavior proof; the supplied terminal result is focused validation rather than user-flow proof.
Evidence reviewed 4 items Introduced test consolidation: The PR-introduced hunk builds one mixed stream containing LF, CRLF, standalone CR, byte-unit, capped-line, and terminal samples, then requires six counted samples and the original peaks.
Production owner and callers: The unchanged assertion script handles CR/LF-delimited streaming samples and terminal zero-capacity rows; four Docker E2E runners invoke it after collecting stats.
Current-main check: The fetched current main has no change to this test since the PR base, and the PR head is not an ancestor of it, so the consolidation is not already implemented on main.
Findings None None.
Security None None.

How this fits together

Docker E2E runners write resource samples to a stats log, then a Node assertion script parses the stream and enforces memory and CPU ceilings. This PR changes the focused test fixture for that script, not the production assertion or Docker runners.

flowchart LR
  A[Docker stats log] --> B[Focused test fixture]
  B --> C[Resource ceiling assertion]
  C --> D[Streaming line parser]
  D --> E[Peak and sample accounting]
  E --> F[Test result]
Loading

Decision needed

Question Recommendation
Should this maintainer-authored test consolidation be merged? Merge the consolidation: Accept the single mixed-stream fixture because it retains the accepted-input invariants while preserving separate rejection coverage.

Why: The protected maintainer label and MEMBER authorship require explicit human handling, although source review found no discrete defect.

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -38. Total -38 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 17 55 -38
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 17 55 -38

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +17/-55 (net -38) The change consolidates test setup without changing the resource-ceiling runtime.

Technical review

Best possible solution:

Keep the production assertion unchanged and merge the fixture consolidation if the responsible maintainer accepts the reduced test-process overhead.

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

Not applicable: this PR consolidates deterministic test fixtures rather than reporting a product defect. The supplied focused test result covers the changed test surface.

Is this the best way to solve the issue?

Yes. One mixed stream exercises the parser’s accepted line formats and terminal-row exclusion together, while separate tests preserve distinct failure behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • P3: This is a focused test-only cleanup with no production behavior change.
  • 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: This MEMBER-authored test-only PR does not require contributor real-behavior proof; the supplied terminal result is focused validation rather than user-flow proof.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • qingminlong: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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 (2 earlier review cycles)
  • reviewed 2026-08-31T13:17:21.771Z sha 6d12046 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T13:25:56.077Z sha 6d12046 :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 31, 2026
@steipete
steipete marked this pull request as ready for review August 31, 2026 13:28
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 31, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Validated head 6d1204680a8a73f6730e95eada14400c29670556: the required CI gate passed.

All eight focused tests passed. One real streamed CLI invocation covers the six accepted input scenarios and terminal-row exclusion through exact sample-count and peak assertions; separate rejection and streaming guards remain. Five Node child launches and temporary roots are removed. Production +0/-0; tests +17/-55. Local suite time was 476.8 ms before and 364.0 ms after.

The full changed-file gate, formatting/diff checks and structured Codex review passed. I read the latest full ClawSweeper review and its Rank-up moves; there are no actionable code findings. Exact-head CI and the evidence above address the remaining validation requests.

@steipete
steipete merged commit 22c6cef into main Aug 31, 2026
195 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the codex/test-docker-stats-fixture branch August 31, 2026 14:46
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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