Title: aggregator(aa): num() reinterprets hex/binary/octal strings as measurements — a drifted '0x10' raw_score renders as intelligence 16 instead of 'not measured' · Issue #2985 · developing-today/code · GitHub
Open Graph Title: aggregator(aa): num() reinterprets hex/binary/octal strings as measurements — a drifted '0x10' raw_score renders as intelligence 16 instead of 'not measured' · Issue #2985 · developing-today/code
X Title: aggregator(aa): num() reinterprets hex/binary/octal strings as measurements — a drifted '0x10' raw_score renders as intelligence 16 instead of 'not measured' · Issue #2985 · developing-today/code
Description: Evidence (verified this run, main cffd524f) pm-stack/aggregator/src/aa.ts, num() (lines 26–37): // The Supabase Management API serializes numeric columns as JSON // strings, so every number crosses a coercion gate here; anything // unpar...
Open Graph Description: Evidence (verified this run, main cffd524f) pm-stack/aggregator/src/aa.ts, num() (lines 26–37): // The Supabase Management API serializes numeric columns as JSON // strings, so every number crosses...
X Description: Evidence (verified this run, main cffd524f) pm-stack/aggregator/src/aa.ts, num() (lines 26–37): // The Supabase Management API serializes numeric columns as JSON // strings, so every number crosses...
Opengraph URL: https://github.com/developing-today/code/issues/2985
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"aggregator(aa): num() reinterprets hex/binary/octal strings as measurements — a drifted '0x10' raw_score renders as intelligence 16 instead of 'not measured'","articleBody":"## Evidence (verified this run, main `cffd524f`)\n\n`pm-stack/aggregator/src/aa.ts`, `num()` (lines 26–37):\n\n```ts\n// The Supabase Management API serializes numeric columns as JSON\n// strings, so every number crosses a coercion gate here; anything\n// unparseable becomes null (\"not measured\"), never 0.\n\nexport function num(v: unknown): number | null {\n if (typeof v === \"number\") return Number.isFinite(v) ? v : null;\n if (typeof v === \"string\" && v.trim() !== \"\") {\n const n = Number(v);\n return Number.isFinite(n) ? n : null;\n }\n return null;\n}\n```\n\n`num()` is the single coercion gate for every AA figure the aggregator renders: Test_Runs sheet fields (`raw_score` → intelligence, `cost_per_task_usd`, `output_speed_tps`, `ttft_seconds`, … at aa.ts:96–102), workbook rankings/thresholds (aa.ts:917–956), and catalog context/output limits (aa.ts:878–879). Its header contract promises that anything unparseable becomes `null` (\"not measured\"). But bare `Number()` accepts radix-prefixed and whitespace-padded spellings that neither Postgres numeric serialization (the Supabase Management API's format) nor a workbook cell produces — so a drifted value is silently reinterpreted into a *different measured number* instead of reading as not-measured.\n\nProbe (laptop, importing the real module — `aa.ts` md5 `969672a1a6e49152544ceca205a2fedc` identical on both clones at main `cffd524f`; probe `~/git/fleet/probe-2026-10-31-laneA-aanum/`, bun 1.4.2):\n\n| input | `num()` result |\n|---|---|\n| `\"0x10\"` | **16** (hex reinterpreted as a measurement) |\n| `\"0b101\"` | **5** (binary reinterpreted) |\n| `\"0o17\"` | **15** (octal reinterpreted) |\n| `\"1e2\"` | **100** (scientific reinterpreted) |\n| `\" 12 \"` | **12** (whitespace-padded accepted) |\n| controls: `\"12\"`, `\"12.5\"` | 12, 12.5 (correct) |\n| controls: `\"\"`, `\" \"`, `\"abc\"`, `\"12abc\"`, `\"Infinity\"`, `\"1,200\"`, `42`, `NaN`, `null` | null / null / null / null / null / null / 42 / null / null (correct) |\n\nNo test in `aggregator/test/aa.test.ts` exercises `num()` directly.\n\n## Why it matters\n\nThis is the same reinterpretation class already filed and fixed for sibling gates — meta-exporter's `num()` (#2789) and cloudflare-export's `num()` (#2791) — but the aggregator's AA gate was never covered. The AA section feeds model rankings, cost-per-task and speed figures that the dashboard presents as measured data. A shape-drifted upstream string (the exact failure this gate exists to absorb, per its own header) currently publishes as a plausible wrong measurement — e.g. a drifted `raw_score` of `\"0x10\"` renders as intelligence 16 — instead of the section's honest \"not measured\" null.\n\n## Acceptance criteria\n\n- `num()` returns `null` for radix-prefixed string spellings (`0x…`, `0b…`, `0o…`, any case) at every call site — sheet fields, rankings/thresholds, and catalog limits.\n- Whitespace-padded numeric strings (`\" 12 \"`) return `null`, or triage explicitly pins padded acceptance with a test; plain decimal spellings (`\"12\"`, `\"12.5\"`, `\"-3\"`) and finite numeric inputs keep working exactly as today.\n- Scientific spellings (`\"1e2\"`): triage pins whether any AA source legitimately serializes a float column in e-notation as a *string*; if none does, they also return `null`. The pin is recorded in the `num()` header comment.\n- New unit tests in `aggregator/test/aa.test.ts` cover `num()` directly for the cases above (today it has none).\n- Existing aggregator tests pass (`bun test` in `pm-stack/aggregator`).\n\nDedup: searched open + closed for aa/ainventory `num()` coercion — no hit. #2789 (meta-exporter) and #2791 (cloudflare-export) are different modules with their own gates; #2835 is the env-config number contract, not data-ingest coercion.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-31T07:44:16Z","url":"https://github.com/developing-today/code/issues/2985"}
| 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:f53de206-e590-3edb-d9eb-7312ff484eb3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C00:48D18:D4A0CC:1120F1C:6B06417A |
| html-safe-nonce | 188b20e847a5aa701db99294657dd94e66a439c34f237703a1dab3900f9feaf4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzAwOjQ4RDE4OkQ0QTBDQzoxMTIwRjFDOjZCMDY0MTdBIiwidmlzaXRvcl9pZCI6IjI1MTQ5NzMxMjkwODkzNjg0NDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d4d423d070b71ab2f336f5a4b1569937ac4c24488c312aa1ffb646f7228bf101 |
| hovercard-subject-tag | issue:6132521267 |
| 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/2985/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3b06aa99c635664e55b6328b3289cb9f6ce20c19f5fc5b0281cc10e769459ca4/developing-today/code/issues/2985 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3b06aa99c635664e55b6328b3289cb9f6ce20c19f5fc5b0281cc10e769459ca4/developing-today/code/issues/2985 |
| og:image:alt | Evidence (verified this run, main cffd524f) pm-stack/aggregator/src/aa.ts, num() (lines 26–37): // The Supabase Management API serializes numeric columns as JSON // strings, so every number crosses... |
| 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 | 1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652 |
| 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 | ac613d3698d3d8565651455086e1f74da07bf277 |
| 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