Repository navigation
fix(runtime): restore environment variable count ratchet - #125175
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 4:46 AM ET / 08:46 UTC. ClawSweeper reviewWhat this changesThe PR renames the gateway worker’s generated Node-version-check export and all local references so the environment-variable count ratchet no longer treats it as an Regression provenanceRegression provenance — verified: source commit Merge readinessKeep this focused repair open. Current main still places the internal Priority: P3 Review scores
Verification
How this fits togetherGateway worker bootstrap embeds OpenClaw’s canonical Node release check before a remote worker starts. A repository ratchet scans production flowchart LR
A[Node release policy] --> B[Generated worker check]
B --> C[Gateway worker bootstrap]
C --> D[Remote worker preflight]
C --> E[Environment-name ratchet]
E --> F[Configuration budget]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests 0, Other 0. Total 0 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the producer-side rename, preserve the unchanged generated expression and budget, then merge after current-head checks confirm the clean merge. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the checker scans Is this the best way to solve the issue? Yes. Renaming the internal producer and its only in-repository consumers fixes the false ratchet count at the producer boundary without weakening the scanner or raising its budget. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ee86b24ac170. 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
|
|
Land-ready verification for
Toolchain: Node v24.15.0, pnpm 11.15.1, with |
|
Merged via squash.
|
Related: #124812
What Problem This Solves
Fixes an issue where the environment-variable count ratchet failed on current
mainbecause a non-environment exported identifier was mistaken for a newOPENCLAW_*variable.Why This Change Was Made
Renames the worker bootstrap expression export to the semantic
PROCESS_NODE_VERSION_CHECKacross its declaration, type, production consumer, and existing tests. The environment-variable budget remains unchanged, and runtime behavior is unchanged.User Impact
Maintainers can run the environment-variable count ratchet successfully again without raising its budget or treating an internal identifier as configuration surface.
Evidence
OPENCLAW_* count 502 exceeds budget 501node --import tsx scripts/check-env-var-count.mts --base origin/main→OPENCLAW_* count 501/501node scripts/run-vitest.mjs src/gateway/worker-environments/bootstrap.test.ts→ 36 passednode scripts/check-changed.mjs -- node-version.mjs node-version.d.mts src/gateway/worker-environments/bootstrap.ts src/gateway/worker-environments/bootstrap.test.ts→ passed (ratchets, formatting, typechecks, lint, import cycles)OPENCLAW_SKIP_PROVIDERS=1,OPENCLAW_SKIP_CHANNELS=1