Repository navigation
refactor(qa-lab): share process tree metric reader - #130419
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 6:04 PM ET / 22:04 UTC. ClawSweeper reviewWhat this changesThe PR replaces duplicated QA Lab CPU and RSS process-tree collection bodies with one private parameterized reader while preserving the exported functions. Merge readinessNo blocking correctness finding: the refactor preserves both exported metric wrappers and their platform-specific parser/metric selection. This fresh maintainer-authored, protected PR should remain open for ordinary review after its branch is refreshed. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherQA Lab reads a gateway child process ID and collects CPU or memory totals by traversing its process tree. It uses POSIX flowchart LR
A[Gateway child process] --> B[CPU or RSS wrapper]
B --> C[Shared process-tree reader]
C --> D{Platform dispatch}
D --> E[POSIX process snapshot]
D --> F[Windows process snapshot]
E --> G[Tree aggregation]
F --> G
G --> H[QA runtime metrics]
Decision needed
Why: Repository policy keeps maintainer-authored and Before merge
Agent review detailsSecurityNone. PR surfaceSource -25. Total -25 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one private shared reader and land it after a rebase confirms the existing POSIX and Windows process-tree suites on the refreshed head. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a behavior-preserving internal refactor, with existing focused POSIX and Windows coverage for the changed reader. Is this the best way to solve the issue? Yes: parameterizing the existing shared validation, snapshot, traversal, and aggregation flow removes duplication without widening the exported API or changing the platform-specific parsers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1f60d9eca21e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…-retirement-v13 * origin/main: (243 commits) fix: preserve Gateway error reasons in text logs (#130645) refactor(video): deduplicate generation contracts (#130635) fix(agents): preserve direct-message sender identity (#124548) fix(agents): preserve silent reply after settled tools (#130675) fix(talk): preserve replacement speech when an old utterance is canceled (#130687) fix(browser): preserve literal names and formatter-owned snapshot refs (#130599) fix(auth): reset only the profile replaced by a successful login (#124014) fix: bind session creation to admitted Gateway (#130686) refactor(qa-lab): reuse model reference splitter (#130317) docs(gateway): clarify independent HTTP endpoint switches (#130690) fix(ui): Control UI smooth scrolling ignores the reduced-motion preference (#130428) refactor(lmstudio): remove unreachable catalog merge (#130689) fix(crabbox): restore cloud machine CPU and RAM (#130684) fix(secrets): compare proxy bearer tokens directly (#127054) fix(matrix): show recovery key availability in text status (#128051) fix(ios): restore approval settings navigation and remove duplicate shell state (#130651) refactor(agents): use fixed tool-loop defaults directly (#130681) refactor(qa-lab): share process tree metric reader (#130419) refactor(models): simplify prepared owner access (#130683) fix(parallels): main install and update smoke cannot complete (#130658) ...
What Problem This Solves
QA process-tree CPU and RSS readers duplicated the same input validation, platform dispatch, bounded process snapshot, tree construction, root validation, and aggregation flow. Keeping those paths separate made platform and failure semantics easier to drift.
Why This Change Was Made
Use one private metric reader parameterized by the closed POSIX column/parser and Windows metric map. The exported CPU and RSS wrappers, subprocess options, unit conversions, and null behavior remain unchanged.
User Impact
No user-visible behavior changes. QA runtime resource metrics are easier to maintain consistently across platforms.
Evidence
blacksmith-testbox, leasetbx_01m10qmwynap26xr9xd2qvptqm, remote-fetch sync, 9/9 tests, timing JSONexitCode: 0andrunStatus: succeeded: https://github.com/openclaw/openclaw/actions/runs/33039543090node scripts/check-changed.mjspassed, including extension production/test typecheck, lint, dead exports, plugin boundaries, and import cycles.git diff --checkpassed.gpt-5.6-solat high reasoning reported no accepted/actionable findings (0.93confidence).openclaw/ci-gatepassed via run33015327766.71d4a8c3e305c623aa3ffe92696eec18f116cfc6, the process-tree owner, production caller, metric consumer, and both focused test blobs are byte-identical to the PR parent; the synthetic merge and live GitHub merge result are clean.+29/-54, net-25.