Title: aggregator: Cost Explorer inline-script computations from PR #1390 (recommendations, Pareto, projection) ship with no committed tests · Issue #1405 · developing-today/code · GitHub
Open Graph Title: aggregator: Cost Explorer inline-script computations from PR #1390 (recommendations, Pareto, projection) ship with no committed tests · Issue #1405 · developing-today/code
X Title: aggregator: Cost Explorer inline-script computations from PR #1390 (recommendations, Pareto, projection) ship with no committed tests · Issue #1405 · developing-today/code
Description: Finding PR #1390 (merged, merge commit 37418e56339c315cf0ddf3e61c9c55c1e9d0c0a2) added roughly a thousand lines of new computation to the Cost Explorer's inline browser script in pm-stack/aggregator/src/render.ts — the recommendations en...
Open Graph Description: Finding PR #1390 (merged, merge commit 37418e56339c315cf0ddf3e61c9c55c1e9d0c0a2) added roughly a thousand lines of new computation to the Cost Explorer's inline browser script in pm-stack/aggregato...
X Description: Finding PR #1390 (merged, merge commit 37418e56339c315cf0ddf3e61c9c55c1e9d0c0a2) added roughly a thousand lines of new computation to the Cost Explorer's inline browser script in pm-stack/aggre...
Opengraph URL: https://github.com/developing-today/code/issues/1405
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"aggregator: Cost Explorer inline-script computations from PR #1390 (recommendations, Pareto, projection) ship with no committed tests","articleBody":"## Finding\n\nPR #1390 (merged, merge commit `37418e56339c315cf0ddf3e61c9c55c1e9d0c0a2`) added roughly a thousand lines of new computation to the Cost Explorer's inline browser script in `pm-stack/aggregator/src/render.ts` — the recommendations engine, the Pareto frontier tables, the Pareto-gap inequality filters, and the task-assumptions projection — with no committed tests for any of that logic. The PR's test changes cover only the data layer (`aaCaiPoints`, `caiFamily`, catalog rate windows) plus HTML `toContain` assertions that the new sections' element ids exist. The PR body says the script was \"runtime-smoke-tested against the fixture data\" — a one-off manual check that is not in the repo and cannot regress.\n\n## Evidence\n\n- PR: https://github.com/developing-today/code/pull/1390 (MERGED 2026-10-27)\n- New untested logic on current main, all inside the `AA_EXPLORER_SCRIPT` template string in `pm-stack/aggregator/src/render.ts`:\n - `render.ts:2092` `pctRank` — percentile ranks shown in every Pareto table cell\n - `render.ts:2105` `paretoSet` — non-dominated set behind all four frontier tables\n - `render.ts:2170` `gapMetrics` — score gap / price premium / speed gap behind the inequality filters\n - `render.ts:2814` `computeRecs` — banding, near-top floors, relative price/speed ceilings, dominance removal, tradeoff ranking `(relative time)^w × (relative price)^(1−w)`, lab-diversity passes\n - `render.ts:3191` `project` (+ `pjBand` band/window selection) — projected $/task and time/task; the PR body hand-verifies one fixture case (~$0.106/task, ~5m 53s) that is not encoded as a test\n- `pm-stack/aggregator/test/aa.test.ts` on current main contains zero references to `computeRecs`, `project`/`pjBand`, `gapMetrics`, or `pctRank` (grep-verified); the new render assertions are `expect(html).toContain('id=\"xpl-pf-score\"')`-style presence checks.\n\n## Why it matters\n\nThese functions produce numbers a reader acts on (shortlists, projected costs). Because they live in a template string, neither `tsc` nor the existing test suite exercises them at all — a sign flip in `pctRank`, a band-selection off-by-one in `pjBand`, or a dominance error in `computeRecs` ships silently. The one hand-verified projection example in the PR body is exactly the kind of case that should have become a fixture test.\n\n## Acceptance criteria\n\n- [ ] The explorer script's pure computations (at minimum `project`/`pjBand`, `paretoSet`, `pctRank`, `gapMetrics`, and `computeRecs` banding/ranking) are covered by committed tests that run in the aggregator's normal `bun test` — e.g. by extracting them into an importable module the template string also uses, or by evaluating the script against the fixture data in a test harness.\n- [ ] The PR body's hand-verified projection case (Luna fixture rate: 3 turns × (10k uncached @ $0.75 + 10k cache reads @ $0.075 + 6k output @ $4.50) ≈ $0.106/task; time ≈ 5m 53s) is encoded as a test expectation.\n- [ ] Existing suite stays green (`bun test` in `pm-stack/aggregator`, `bunx tsc --noEmit` clean).\n\nFound by pr-diff-review-b reviewing PR #1390's diff against current main. Remainder items for the same PR are already tracked in #1400; this test-coverage gap is not among them.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-27T11:30:09Z","url":"https://github.com/developing-today/code/issues/1405"}
| 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:643530c2-3a1d-1a77-d99d-0bb6a0bfd1ff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E72E:1CD523:88000C:B0E83C:6B062F8E |
| html-safe-nonce | 39ff085df6eac8ef36d2929a961120bc01194cad93f4c0c7dd47b4af91bde202 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzJFOjFDRDUyMzo4ODAwMEM6QjBFODNDOjZCMDYyRjhFIiwidmlzaXRvcl9pZCI6IjY4MTI3MTAwNTE5MzAwNTg2MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bac67575289227dd68fa8b4f082e42ca81b88524f047c075c676211bfa5bbaa3 |
| hovercard-subject-tag | issue:6058313016 |
| 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/1405/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9004a378e70bad318d1275e3843edb34c888502339cb4514841bc09d113356d4/developing-today/code/issues/1405 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9004a378e70bad318d1275e3843edb34c888502339cb4514841bc09d113356d4/developing-today/code/issues/1405 |
| og:image:alt | Finding PR #1390 (merged, merge commit 37418e56339c315cf0ddf3e61c9c55c1e9d0c0a2) added roughly a thousand lines of new computation to the Cost Explorer's inline browser script in pm-stack/aggregato... |
| 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