Repository navigation
fix(ci): submit npm audit graphs in one request - #137865
vincentkoc wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 12:19 AM ET / 04:19 UTC. ClawSweeper reviewWhat this changesThe PR removes caller-side 400-package batching so each non-empty npm audit dependency graph is sent in one bulk-advisory request, with 401-package coverage for both audit callers. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 4 items remain Keep open: the focused simplification is source-correct and covered at 401 packages, but it changes the external npm request-size boundary without a successful real result for the much larger current graph; the draft also states an active release hold. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s pre-commit and release security scripts turn lockfile dependency graphs into npm bulk-advisory requests, then use returned advisories to block unsafe commits or releases. This change alters request aggregation while retaining the shared retry and fail-closed request owner. flowchart LR
A[Lockfiles] --> B[Dependency graph builder]
B --> C[Bulk advisory request]
C --> D[npm advisory service]
D --> E[Advisory results]
E --> F[Security gate result]
Decision needed
Why: The branch deliberately changes an external security-gate request boundary; source and mock tests prove the call count but not acceptance by the authoritative registry at the production graph size. Before merge
Agent review detailsSecurityNone. PR surfaceTests +20, Other -19. Total +1 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the one-request-per-graph design only after attaching a redacted successful npm bulk-advisory result for the largest current release graph, or retain a validated request-size bound if npm rejects it. Do we have a high-confidence way to reproduce the issue? Yes for the source-level behavior: both callers previously split a 401-package graph at 400, and the changed tests assert one request after the fix. Real npm acceptance at the largest graph remains unproven. Is this the best way to solve the issue? Unclear: deleting duplicated caller-side batching is the clean owner-boundary shape, but the npm payload limit and successful production-size behavior could not be independently verified. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72930f7c8758. 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)
|
Reject malformed npm advisory responses before filtering. Submit each dependency graph once, cap ordinary CI requests at 30 seconds, and publish audit summaries. Add a daily strict production audit with documented ownership and recovery. Builds on the single-request simplification in #137865 and the incomplete-coverage policy in #137881. Co-authored-by: Vincent Koc <[email protected]>
|
The single-complete-graph change is now on main through #137960, commit ec87f91. Both the production audit and release gate now send one request per non-empty graph. The replacement includes the 401-package request coverage, shared malformed-response validation, a total ordinary-CI deadline, audit summaries, and the separate strict scheduled audit. All 186 focused tests passed, and the replacement's exact-head CI run completed successfully. The hosted audit also verified the live npm outage: a 30.09-second timeout produced an explicit incomplete-coverage warning while ordinary CI continued. Vincent Koc is credited as co-author in the landed commit. Closing this proposal as superseded by the verified implementation; its original branch remains untouched. Successful full-size npm-response proof remains explicitly unclaimed while the service is unavailable. |
…#137960) Reject malformed npm advisory responses before filtering. Submit each dependency graph once, cap ordinary CI requests at 30 seconds, and publish audit summaries. Add a daily strict production audit with documented ownership and recovery. Builds on the single-request simplification in openclaw#137865 and the incomplete-coverage policy in openclaw#137881. Co-authored-by: Vincent Koc <[email protected]>
Related: #137059
What Problem This Solves
Fixes an issue where npm bulk-advisory outages were amplified by splitting each dependency graph into arbitrary 400-package batches. During https://github.com/openclaw/openclaw/actions/runs/33829936761, both attempt 1 and attempt 2 failed in
security-fastwhile the npm bulk endpoint did not return a response.Why This Change Was Made
Each non-empty dependency graph is now submitted as one complete npm bulk payload. npm Arborist and pnpm both use one request per graph; OpenClaw's 400-package limit had no upstream contract:
The change preserves the exact three-attempt timeout, network-error, and HTTP 5xx retry behavior landed in #137825. Response caps, timeout aborts, HTTP client-error handling, fail-closed results, and empty release production-graph skipping are unchanged.
Request exposure drops:
security-fast: 3 requests / 9 maximum attempts to 1 request / 3 maximum attempts.This does not weaken the vulnerability policy, change the advisory authority, or fail open during registry outages.
User Impact
Maintainers get fewer sequential npm advisory requests and materially less outage amplification during pre-commit and full release validation. A genuine npm outage still blocks the security gate with the existing actionable failure.
Evidence
Pre-fix focused run: the two 401-package regressions failed because the graph was sent as 400 packages plus 1 package.
Post-fix focused run:
node scripts/check-changed.mjs --dry-run -- <four changed files>passed.node scripts/check-changed.mjs -- <four changed files>passed.git diff --checkpassed.Scoped
gpt-5.6-solhigh-reasoning autoreview: clean, correctness 0.98.LOC: tooling
+11/-30(net-19); tests+30/-10(net+20).Attempt 1 evidence: https://github.com/openclaw/openclaw/actions/runs/33829936761/attempts/1
Attempt 2 evidence: https://github.com/openclaw/openclaw/actions/runs/33829936761
No live npm endpoint rerun was performed because the observed endpoint outage had not produced new recovery evidence.
Release State
Draft only. Do not merge while release hold
frv-reliability-repairs-2026-09-03is active.