ci: bound default Binaryen optimizer threads in NPM builds - #5198
ktechmidas wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: dashpay/platform/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Final review complete — no blockers (commit 23b41b4) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
Verified the two-file change at exact head 23b41b4 and found no actionable in-scope defects. The shared build action defaults unset or empty Binaryen budgets to two, preserves explicit positive integer budgets, rejects malformed values before building, and preserves release configuration and application failure propagation; all 40 local CI tests, shell syntax validation, and the diff whitespace check passed, while the base-action negative control reproduced 11 expected failures without harness errors. These checks do not establish that the hosted NPM build completes within its deadline; the stated hosted-validation and rollout gates remain applicable.
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: glm-5.3-flash (agent: phase1-reviewer, role: architecture-layering); reviewer 3: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 4: gpt-6-astra (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6-astra (agent: astra-verifier, role: final-verifier)
- Triage:
lowbygpt-6-astra(effort low) — The diff is a small, contained CI build-wrapper change that defaults and validates Binaryen's thread budget while preserving explicit settings and build failure propagation, with focused regression tests and no critical-surface changes. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer,glm-5.3-flash— architecture-layering (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 87% left, weekly 83% left; passed overgemini-3.8-flash-high(antigravity below 15% reserve: weekly 13% left, 5h 100% left) - Fresh verifier:
gpt-6-astra— final-verifier; agentastra-verifier - Phase 2 reviewers:
gpt-6-astra— general (completed, effort medium); agentphase2-reviewer,gpt-6-astra— architecture-layering (completed, effort medium); agentphase2-reviewer
Out-of-scope follow-up suggestions (1)
These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.
- Root cause (Binaryen ignoring cgroup CPU quota) lives upstream, and the CPU-quota↔budget relationship is not encoded in the runner contract — Outside scope and below the exceptional-follow-up threshold. The runner requirements manifest and runner-image.py do not encode an optimizer budget, but the shared action directly implements the PR's bounded-default policy for both callers while preserving explicit overrides. Adding per-image capacity policy is a broader redesign, and independently diagnosing or reporting upstream Binaryen behavior is not necessary to validate this local mitigation; no concrete additional defect introduced by this PR was demonstrated.
- Follow-up: Consider creating a separate issue or author/maintainer-requested PR for this.
Issue being fixed or feature implemented
infraclaw: bound CI optimizer resource usage, without changing application optimization or test assertions. The ordinary NPM validation worker has an 8-CPU quota on a 32-logical-CPU host and does not set
BINARYEN_CORES. Binaryen 121 defaults tostd::thread::hardware_concurrency(), ignoring Docker CPU quota.An isolated experiment with the same SHA256-verified Binaryen 121 archive used here, on the published immutable runner image, observed 33 process threads under a 2-CPU quota without a budget and 3 threads with
BINARYEN_CORES=2. Both synthetic optimizations exited 0 and produced byte-identical output. This proves the resource mismatch, not that it caused or fixes the two-hour timeout in held PR5186's NPM job. That full-build validation remains unresolved; no blind retry is claimed.What was done?
13bfed47403b7c0ba56b4be55107a337b846cd88.yarn buildstep when no explicit budget is supplied. Preserve explicit candidate/release-runner budgets; reject malformed/nonpositive values before the build.yarn build,CARGO_BUILD_PROFILE=release, every optimization flag, packaging/generated-client checks, timeout, image recipe, trust boundary and every other action step unchanged. Application failures remain fatal.How Has This Been Tested?
git diff --checkpass. All non-.githubroot-tree objects match the exact base; only the build step'srunfield changes within the action.Attributable validation update — 2026-09-29
23b41b477bc038965b686b4a75412b1c21fc6d98; no source or test changes were made for this update.ubuntu-runner-1(runner97036). Release build/pack, generated-client validation, archive verification and artifact upload all passed; hosted contract and selector also passed./self-reviewed, status forgery or a bypass. All existing holds and author-controlled rollout guidance below remain unchanged.Rollout / author guidance
No merge until normal reviews/checks are clear and the fresh attributable NPM validation result is classified. Do not rerun the old held #5186 job or modify contributors' branches. Once this exact repair is reviewed and adopted on an author's actual target, the author can update their own PR and let its new head start CI. An old-head rerun cannot adopt this action change. Keep recipe/capacity holds on #5166/#5172 and all other rollout holds.
Breaking Changes
None intended. Explicit positive optimizer budgets and release/application behavior remain unchanged.
Checklist
Authored and operated by infraclaw under latte's scoped CI authorization. Protected account attribution is transport, not latte's personal review or approval. No self-approval, test suppression, protection bypass or unsolicited author communication.