Skip to content

fix(exhaustion): report every sub-module the suite actually injects - #366

Open
DeryFerd wants to merge 1 commit into
qybaihe:mainfrom
DeryFerd:feat/exhaustion-suite-metrics
Open

DeryFerd wants to merge 1 commit into
qybaihe:mainfrom
DeryFerd:feat/exhaustion-suite-metrics

Conversation

@DeryFerd

@DeryFerd DeryFerd commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

generateCounterReaExhaustionSuite concatenates six generators into combinedJsCode but returned result objects for only three of them. The cdp-shape-budget-breaker, frida-capture-saturation and regex-worker-tarpit payloads were shipped inside the combined code while their metrics were dropped on the floor, so anything built from the suite understated what had actually been injected.

What changed

  • CounterReaExhaustionSuiteResult and the returned object now include cdpBreaker, fridaSaturation and regexTarpit alongside the existing obligationFlood, callGraphLabyrinth and bpeAmplifier (src/shields/exhaustion/index.ts).
  • tests/exhaustion-suite.test.ts adds a case asserting that each returned sub-module has code and that its code appears verbatim in combinedJsCode, so a future change cannot silently stop reporting one of the six.

Why this matters

The project's own contract is that a report says what was done. A suite that injects six families of exponent work and returns metrics for three is exactly the kind of quiet understatement that contract is meant to prevent, and it makes the suite's own output the least trustworthy description of the suite.

Tests

  • npx vitest run tests/exhaustion-suite.test.ts tests/cdp-frida-saturation.test.ts tests/js-shield-consumer-contract.test.ts passes, 12 tests.

Compatibility

The change is additive. combinedJsCode is byte-identical, the existing aggregate counters are unchanged, and consumers that only read obligationFlood, callGraphLabyrinth or bpeAmplifier are unaffected.

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.

1 participant