Repository navigation
fix(aggregator): remove inline banding copies shadowing aa-explorer module (#7562) - #8141
Conversation
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 30 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. |
|
Codex disposition (task 14444, lane code-j): the Codex code review on commit 4ef8814 did not complete - the review summary at 2026-11-10T07:23Z reports the review failed because Codex usage limits for code reviews are reached, and no review findings or inline comments were produced on this PR. There is therefore no Codex finding to fix or rebut for this diff; the failure is a reviewer-capacity limit, not a code finding. Local verification stands in the PR body (regression test run both ways; aa suites 50 pass / 0 fail). |
|
🤖 Agent note · awaiting CI (task 14444)
|
Summary
Fixes #7562. PR #3737 extracted the Cost Explorer computations into
aa-explorer-computations.js, but the inlinelogEdges/scoreEdges/bandIndexdefinitions inside the emitted page script's IIFE inpm-stack/aggregator/src/render.tswere never removed. They shadowed the module imports for every in-IIFE call site, so the browser ran untested inline copies of the banding functions while the Bun tests exercised the module copies.Change
pm-stack/aggregator/src/render.ts: remove the three inline definitions (verified byte-for-byte equivalent in logic to the module exports before removal). All call sites (logEdges/scoreEdgesfor the band comparisons,bandIndexfor membership) now resolve to theaa-explorer-computations.jsimports at the top of the emitted module script. A short comment records why no inline copies may live there.pm-stack/aggregator/test/aa.test.ts: new regression test "/aa page script does not redefine the computations it imports (aggregator(aa-explorer): #3737's shared-module extraction left inline logEdges/scoreEdges/bandIndex in the page script — they shadow the tested module imports, so the browser does not run the tested banding code #7562)". Oracle: parse the names imported fromaa-explorer-computations.jsin the served /aa page and assert the page contains nofunction <name>(definition for any of them.Verification
The new regression test fails on the unfixed code (
not /function bandIndex\s*\(/) and passes with the fix — the oracle was run both ways.bun test test/aa.test.ts test/aa-explorer-computations.test.tson the laptop: 50 pass, 0 fail. (Local runs needPM_AGG_FRESHNESS_PORTset to a free port because the laptop's long-running aggregator already holds the default freshness port 4871; the test-spawned server inherits it.)Full aggregator suite (
bun test test/): 2036 pass, 5 fail — the failures are pre-existing and unrelated (quota pool assembly intest/quota.test.tsfails identically on the clean tree with this change stashed; the remaining full-suite failures are in collector/projects/dns/program areas this diff does not touch). This diff touches only the aa banding script and the aa test file, and both aa suites are fully green.Queue: task 14444, repo-health-code-pilot, lane code-j.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.