Repository navigation
env numbers: strict parse for the last pm-stack sites + write the #2835 contract - #10770
Conversation
…e the #2835 contract Phase 3 of #2835 (code#2837): - pm-stack/aggregator/scripts/gather-quota.ts: QUOTA_SUBCOMMAND_TIMEOUT_MS (and the since-renamed QUOTA_GATHER_TIMEOUT_MS remainder) now parses digits-only millis 1..2^31-1 and fails at boot naming the variable. - pm-stack/aggregator/src/config.ts: ALERT_ACK_WINDOW_MIN parses as a strict count >= 1 via parseAggregatorCount instead of Number() + clamp. - pm-stack/README.md: the environment-number contract (spelling, kind ranges, boot-failure rule, named exemptions). - bin/proxy-port.mjs: the same contract stated in the header for the bin/ family.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 15 minutes. View limit details
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
What this does
Phase 3 (closing inventory) of design #2835 for code#2837: the last uncoerced numeric env parses in
pm-stack/are converted, and the env-number contract is written where the next service meets it.pm-stack/aggregator/scripts/gather-quota.ts—QUOTA_SUBCOMMAND_TIMEOUT_MSparses digits-only millis1..2147483647and fails at boot naming the variable and value. This is the successor of the audit'sQUOTA_GATHER_TIMEOUT_MSsite (the constant was renamed when the subcommand took over quota reading; the coercion survived).pm-stack/aggregator/src/config.ts—ALERT_ACK_WINDOW_MINbecomes a strict count>= 1viaparseAggregatorCountinstead ofNumber()+ clamp (garbage no longer silently becomes 15).pm-stack/README.md— new "Environment numbers" section: spelling (decimal digits only), kind ranges (port, millis, count, id), boot-failure rule, and the exemption rule.bin/proxy-port.mjs— header states the same contract alongside the existing bin proxies: *_PROXY_PORT parsed with bare parseInt — invalid values crash opaquely or bind the wrong port #483 port note.Inventory and dispositions (grep of
bin/,pm-stack/,pkgs/,scripts/,.opencode/at0cd5bd4b09)pm-stack/aggregator/scripts/gather-quota.tsQUOTA_SUBCOMMAND_TIMEOUT_MS:103 QUOTA_GATHER_TIMEOUT_MS)pm-stack/aggregator/src/config.tsALERT_ACK_WINDOW_MIN.opencode/skills/.../fleet-merge.tsFLEET_MAX_RETRIESbin/socket-activation.mjsLISTEN_FDS,LISTEN_PIDnull(direct bind) fallbackbin/opencode-route-proxy.mjsOPENCODE_ROUTE_PROXY_NOW_MSNumber.isFiniteguarded, falls back to wall clockpkgs/id/e2e/playwright.config.tsTEST_PORTpkgs/pkarr-worker/src/index.tsDNS_TTLpkgs/bedside-and-away/external/gateway/proxy.mjsGATEWAY_PORTNumber.isInteger-checked with an explicit 1024–65535 boot throwNo site is left undispositioned; no straggler needed a follow-up issue.
Verification
bun run typecheck(aggregator) — clean.bun test test/config.test.ts— 10 pass, 0 fail.QUOTA_SUBCOMMAND_TIMEOUT_MS=abc bun run scripts/gather-quota.ts→error: QUOTA_SUBCOMMAND_TIMEOUT_MS="abc" is not a valid millisecond count (expected an integer 1-2147483647), exit 1.Closes #2837 (closing evidence also recorded on the issue). The design issue #2835 closes with this evidence once merged.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.