Repository navigation
improve: reduce extension boundary check overhead - #146771
Conversation
Run the three extension boundary modes through one checker invocation while preserving each report and individual mode/JSON commands. The aggregate uses one shared timeout/output budget and one CI failure group.
|
🦞👀 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. Reviewed September 13, 2026, 2:07 AM ET / 06:07 UTC (Revision 2). ClawSweeper reviewWhat this changesRuns three plugin import checks in one process using a shared inventory, preserving individual commands and adding report-parity and shard-coverage tests. Merge readiness✅ Ready for maintainer review This remains a useful, focused optimization absent from the inspected main and latest release. No actionable correctness or security defect was found, and current-head CI now reports successful boundary, type, and aggregate gates. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s supplemental CI runner checks repository architecture rules. This checker reads bundled plugin imports and produces rule-specific diagnostics and a failing exit status when boundaries are violated. flowchart TD
A[Supplemental CI runner] --> B[Aggregate extension check]
C[Bundled plugin source] --> D[Shared import inventory]
B --> D
D --> E[Three existing boundary rules]
E --> F[Rule diagnostics]
E --> G[Combined exit status]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +60, Other +10. Total +70 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one inventory owner for all three rules while retaining standalone diagnostics and the runner’s bounded execution. Do we have a high-confidence way to reproduce the issue? Not applicable to a product bug: source confirms repeated checker invocations, and the PR reports measured overhead through the actual Linux runner. Is this the best way to solve the issue? Yes. Reusing the checker’s existing inventory and rule implementations is a narrow solution that avoids competing policy logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3c16ced26794. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
The previous run merged this head into 1cc5eea, which predates 49c3d46. That commit added the fixture copy of scripts/tsx.mjs to test/scripts/ci-workflow-guards.test.ts, which is what the guard needs now that openclaw#146771 put extension-plugin-sdk-boundaries into scripts/run-additional-boundary-checks.mts: node --import ./scripts/tsx.mjs scripts/check-extension-plugin-sdk-boundary.mts --all Without the copy the fixture root has no scripts/tsx.mjs, the boundary check dies with ERR_MODULE_NOT_FOUND, and checks-node-compact-small fails its "routes eligible core test leaves to one type owner" case. No source change; this commit only moves the merge base forward so CI exercises the fixed guard.
Run the three extension boundary modes through one checker invocation while preserving each report and individual mode/JSON commands. The aggregate uses one shared timeout/output budget and one CI failure group.
What Problem This Solves
Supplemental CI checks load the same extension inventory three times to enforce three related boundary rules.
User Impact
There is no OpenClaw runtime behavior change. Developers get the same three boundary reports with less check overhead; individual mode and JSON commands remain available.
The aggregate has one failure group and one shared ten-minute timeout and 512-KiB output tail, replacing three independent groups and budgets. It uses one inventory snapshot rather than observing source changes between scans.
Why This Change Was Made
Run all three modes through the existing checker and its invocation-owned inventory, then replace the three runner commands with one
--allcommand. Each mode still reports violations or errors, and the runner retains its default concurrency of four. The change adds 10 production lines and 49 test lines before formatting (60 test lines after formatting).Evidence
A single Linux Testbox attempt measured the actual selected runner composition in B1/C1/C2/B2 order, allowing the three baseline checks to overlap:
All nine semantic cases passed on both revisions, including complete output parity, independently expected violations, overlapping rules, test/generated exclusions and all three oversized-source errors. The real runner's command selection and expanded shard coverage also passed. Raw evidence and process cleanup were independently checked.
Sampled process-tree RSS fell 66.99%/66.69%, but reverse-order kernel child maxRSS increased 1.22%. These are two observations per arm for the selected checks on frozen source, not a whole-CI, universal memory or Gateway performance claim. The four touched files are unchanged on the current author base.
Both complete existing test files passed: 51 tests, zero failures or skips, including timeout and signal descendant cleanup. Eighteen of twenty selected changed-file gates passed, including formatting, lint and repository guards. Fresh managed Codex review found no actionable P0–P2 issues.
Local type validation remains incomplete: the fixed 6 GiB memory cap stopped
tsgo:scriptswithout compiler diagnostics, andtsgo:test:rootcould not acquire the lock retained by that stopped process. All owned children closed and the exact lock was recovered; neither type gate was retried or counted as passing. Both type checks subsequently passed in hosted type coverage on commitd788623ff9078e9b37297d696970b599bb8d3c4a, and exact-head CI is green. No full product build was selected or run.