Skip to content

fix(cloudflare-export): reject non-decimal measurement strings - #3488

Merged
dezren39 merged 2 commits into
mainfrom
queue/4021-2791-cloudflare-decimal
Nov 1, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/4021-2791-cloudflare-decimal

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Accept string measurements only when they use the design-record plain-decimal grammar.
  • Keep request-count strings integer-only; allow decimal payload-size strings.
  • Preserve existing numeric-input behavior and field-specific unparseable errors.

Closes #2791

Evidence

  • Before: Number("") → 0, Number("0x10") → 16, Number("1e2") → 100, and fractional request-count strings were accepted.
  • After: added regression coverage across R2, KV, aggregate counts, and R2 payload size.
  • Test: node --test pm-stack/cloudflare-export/cloudflare-quota-export.test.mjs — 19 passed.

Merge Danger

Door: two-way

Blast Radius: low — validation of string inputs at existing measurement call sites only.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 10:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T12:04:40.533347Z 239ed1e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 31 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c787d817-4cd8-4b53-81e5-28a43a0346c3
Commits

Reviewing files that changed from the base of the PR and between 26e2bd4 and 239ed1e.

Files selected for processing: 2
  • pm-stack/cloudflare-export/cloudflare-quota-export.mjs
  • pm-stack/cloudflare-export/cloudflare-quota-export.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 99df3a8ff6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…decimal option

Codex P2 on PR #3488: firstSum applied integer-only string validation to totalNeurons, rejecting plain-decimal fractional neuron strings (e.g. 4114515.31) that the numeric fixture accepts. firstSum now takes an integerString option (default true, counts unchanged); the ai totalNeurons call site passes false so PLAIN_DECIMAL applies. Regression coverage: fractional neuron string parses to the same metric, drifted spellings still throw unparseable naming ai.totalNeurons.
@dezren39

dezren39 commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

🤖 Codex disposition — task 4021, lane E resume

The single Codex P2 finding on the original head (99df3a8) — "Allow fractional decimal strings for neuron measurements" (firstSum / totalNeurons) — was fixed in commit 239ed1e: firstSum gained an integerString option so request-count call sites stay integer-only while neuron measurements accept fractional decimal strings.

Verification, re-checked fresh this shift:

  • Review thread for that finding: resolved and outdated.
  • Codex re-review at head 239ed1e: has_any_findings: false, has_unresolved_findings: false.
  • PR state: MERGEABLE / CLEAN; only check present is CodeRabbit (neutral, skipping).
  • Tests (prior lane, laptop): node --test pm-stack/cloudflare-export/cloudflare-quota-export.test.mjs — 19/19 passed.
  • The two zero-job Jules workflow failures on the PR head were also reproduced on clean base 26e2bd4, i.e. pre-existing infra, unrelated to this diff (2 files: the exporter + its tests).

Merging under the standing merge criteria.

@dezren39
dezren39 merged commit c31fc8f into main Nov 1, 2026
1 check passed
@dezren39
dezren39 deleted the queue/4021-2791-cloudflare-decimal branch November 1, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cloudflare-export: num() reinterprets empty, hex and scientific strings as real measurements — a drifted '' request count exports as a measured 0

1 participant