Files
reverse-engineering-anything/tests/boundary/browser
b6363efc97 refactor(errors): compose multi-part provider cleanup failures through one owner (#12002)
* refactor(errors): compose multi-part provider cleanup failures through one owner

CdpBrowserProvider, CdpElectronProvider, FridaInstrumentationManager and
PlaywrightBrowserScenarioProvider each built the same composite by hand: a
ProviderCleanupError listing the parts' resources, an AggregateError cause,
and bindCleanupDependencies over the parts. providerCleanupErrorFromFailures
in src/domain/analysisErrorCleanup.ts now owns that composition. `causes`
keeps non-AnalysisError failures in the aggregate cause without making them
own completion, as the CDP providers did; `message` keeps the aggregate
messages Frida and Playwright used.

Tests: helper unit tests, new close-composition tests for both CDP providers,
and a Playwright test with two failed cleanup retries. They pass on the base
revision and on this change, and fail when the helper drops the dependency
binding, the extra causes or the message.

Lowers the cleanup-dependency-binding baseline to 43 files / 73 sites.

Refs #11859

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style(test): format the Playwright cleanup test with oxfmt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(errors): assert cleanup composition facts instead of reason prose

Follows docs/development/testing.md: the close-composition tests now check
provider, operation, resources, aggregate causes and completion, not the
explanatory reason or aggregate message. A harmless wording change passes;
a lost binding, lost cause or wrong operation still fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Anant Mandanka <anant.mandanka@renaissancejewel.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 12:51:28 +00:00
..