Title: aggregator(saas-extract): Cloudflare, Turso and GitHub count patterns still use bare \d+ — grouped counts truncate (1,234 → 234) or drop the whole metric · Issue #3000 · developing-today/code · GitHub
Open Graph Title: aggregator(saas-extract): Cloudflare, Turso and GitHub count patterns still use bare \d+ — grouped counts truncate (1,234 → 234) or drop the whole metric · Issue #3000 · developing-today/code
X Title: aggregator(saas-extract): Cloudflare, Turso and GitHub count patterns still use bare \d+ — grouped counts truncate (1,234 → 234) or drop the whole metric · Issue #3000 · developing-today/code
Description: Summary Three more saas-extract.ts extractors parse counts with bare \d+, so a comma-grouped figure is either silently truncated to its last digit group or drops the metric(s) entirely. This is the same defect class as #2997 (bitwarden),...
Open Graph Description: Summary Three more saas-extract.ts extractors parse counts with bare \d+, so a comma-grouped figure is either silently truncated to its last digit group or drops the metric(s) entirely. This is the...
X Description: Summary Three more saas-extract.ts extractors parse counts with bare \d+, so a comma-grouped figure is either silently truncated to its last digit group or drops the metric(s) entirely. This is the...
Opengraph URL: https://github.com/developing-today/code/issues/3000
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"aggregator(saas-extract): Cloudflare, Turso and GitHub count patterns still use bare \\d+ — grouped counts truncate (1,234 → 234) or drop the whole metric","articleBody":"## Summary\n\nThree more `saas-extract.ts` extractors parse counts with bare `\\d+`, so a comma-grouped figure is either silently truncated to its last digit group or drops the metric(s) entirely. This is the same defect class as #2997 (bitwarden), in extractors that issue does **not** name: Cloudflare counts, the Turso database count, and the GitHub comped-minutes pair. The wrong `used` values flow into durable snapshot records the same way #2997 describes (`recordsFromSaasServices`, `snapshot-records.ts:85`).\n\n## Evidence (main `1c6d5174`)\n\n`pm-stack/aggregator/src/saas-extract.ts`:\n\n- **:308 (Cloudflare)** — `/(\\d+) Workers, (\\d+) R2 buckets[^;]*; (\\d+) D1, (\\d+) KV, (\\d+) Queues/`. `\\d+` cannot cross a comma. When the **first** count is grouped, the engine slides and records only the last group. When a **later** count is grouped, the pinned literal separators (`, `, `; `) leave nowhere to slide, so the whole match fails and all five count metrics vanish.\n- **:324 (Turso)** — `/(\\d+) DB/` records the last group of a grouped database count.\n- **:395 (GitHub)** — `/(\\d[\\d,]*) Linux \\+ (\\d+) macOS minutes/`: the Linux group already accepts commas (and strips them at :426), but the macOS group is bare `\\d+` pinned by the ` Linux + ` literal, so a grouped macOS figure makes the whole comped-minutes metric disappear instead of being recorded.\n\nVerified this run on the laptop with the **real** `extractSaasServices` (`saas-extract.ts` md5 `2b540acdb7924e834941a63b0416cf44` on both clones; probe `~/git/fleet/probe-2026-10-31-laneA-saascounts/`):\n\n```text\nCF grouped-first \"1,234 Workers, 56 R2 buckets ~2 GB; 7 D1, 8 KV, 9 Queues\"\n -> workers-count=234 (want 1234), r2=56, d1=7, kv=8, queues=9\nCF grouped-later \"3 Workers, 2 R2 buckets ~2 GB; 2 D1, 1,234 KV, 2 Queues\"\n -> {} — all five count metrics missing (want kv=1234, rest present)\nCF control \"3 Workers, 2 R2 buckets ~2 GB; 2 D1, 2 KV, 2 Queues\" -> 3/2/2/2/2\nTurso grouped \"1,234 DB total\" -> databases=234 (want 1234); control \"12 DB\" -> 12\nGitHub grouped \"5,000 Linux + 1,234 macOS minutes\" -> actions-comped-minutes missing\n (want 6234); control \"5,000 Linux + 234 macOS minutes\" -> 5234\n```\n\n## Why it matters\n\n- The truncated figures are indistinguishable from true reads (234 could be a real Workers count), and they persist as snapshot history — silent corruption, not a display glitch.\n- The drop modes are worse in a different way: one grouped figure in the wrong position erases the whole Cloudflare footprint line or the comped-minutes metric, so the hub reports \"not measured\" for data that was recorded in the view.\n- The house pattern already exists in the same file: `allowance()` captures `[\\d,.]+`, `dns.ts` `parsePriceUsd` and `snapshot-records.ts:177` use `[\\d,]+` + strip-commas, and the GitHub extractor's own Linux group does it — these three sites are the outliers. Existing fixtures only exercise ungrouped counts (`3 Workers, 2 R2 buckets…`, `1 DB`), so the suite cannot see the gap.\n\n## Acceptance criteria\n\n- [ ] Cloudflare counts parse comma-grouped figures at face value in **every** position: `1,234 Workers, …` → 1234, and `…, 1,234 KV, …` → kv-count 1234 with the other four counts still present.\n- [ ] Turso `databases` parses `1,234 DB` → 1234.\n- [ ] GitHub comped minutes parse `5,000 Linux + 1,234 macOS minutes` → 6234.\n- [ ] Regression tests in `pm-stack/aggregator/test/usage.test.ts` cover grouped figures for all three extractors alongside the existing ungrouped fixtures; ungrouped reads are unchanged and a bullet with no counts still yields no count metrics.\n\n## Dedup\n\nSearched open and closed issues 2026-10-31 for `cloudflare counts comma`, `turso comma`, `macOS minutes`, `saas-extract grouped counts`, and the counts-line text: the only hit is #2997, which is scoped to the bitwarden extractor (landed in PR #2987) and names only the Modal comma-dollar patterns as a sibling for triage ruling. The Cloudflare, Turso, and GitHub sites predate that commit and are not mentioned there. #2985/#2791 concern `num()` *reinterpretation* of non-decimal strings in different functions, not grouped-decimal truncation/dropping.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-31T09:12:56Z","url":"https://github.com/developing-today/code/issues/3000"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7821f8e7-4d95-710a-a00e-fad9f44d1563 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C17E:6AD3D:78ECE1:9D7136:6B062A34 |
| html-safe-nonce | 3dd4c48e4884dceb31a207f37814d5946902f6415934cb6ebddd7a25501fd97a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTdFOjZBRDNEOjc4RUNFMTo5RDcxMzY6NkIwNjJBMzQiLCJ2aXNpdG9yX2lkIjoiMjYyNzgwNjg2MzQ2MjY0MDE4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1194d6c4fec97c8259461fecfaf5448ada3a749115c2d02934e1492ed724712f |
| hovercard-subject-tag | issue:6133200368 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/3000/issue_layout |
| twitter:image | https://opengraph.githubassets.com/81bb0ebc618a64310ddd7c82a9b936924fb9951ebf841a539fa9d03a0f04a49a/developing-today/code/issues/3000 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/81bb0ebc618a64310ddd7c82a9b936924fb9951ebf841a539fa9d03a0f04a49a/developing-today/code/issues/3000 |
| og:image:alt | Summary Three more saas-extract.ts extractors parse counts with bare \d+, so a comma-grouped figure is either silently truncated to its last digit group or drops the metric(s) entirely. This is the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width