Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
generateCounterReaExhaustionSuiteconcatenates six generators intocombinedJsCodebut returned result objects for only three of them. Thecdp-shape-budget-breaker,frida-capture-saturationandregex-worker-tarpitpayloads 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
CounterReaExhaustionSuiteResultand the returned object now includecdpBreaker,fridaSaturationandregexTarpitalongside the existingobligationFlood,callGraphLabyrinthandbpeAmplifier(src/shields/exhaustion/index.ts).tests/exhaustion-suite.test.tsadds a case asserting that each returned sub-module has code and that its code appears verbatim incombinedJsCode, 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.tspasses, 12 tests.Compatibility
The change is additive.
combinedJsCodeis byte-identical, the existing aggregate counters are unchanged, and consumers that only readobligationFlood,callGraphLabyrinthorbpeAmplifierare unaffected.