fix(browser): preserve body API provenance through script export

Label new captured response bytes as Playwright body API results and retain the possibility of a credentialed follow-up load. Preserve legacy representations and source limitations through export without treating body-origin uncertainty as missing event coverage.

Validated source and filesystem boundary tests plus real Chrome CLI and MCP network workflows covering binary, compressed, empty, unfinished, and same-URL responses and profile cleanup.
This commit is contained in:
morluto
2026-10-12 14:12:19 +08:00
parent 6bae774328
commit 966f7cc84b
15 changed files with 270 additions and 92 deletions
@@ -128,7 +128,7 @@ export class PlaywrightScenarioNetwork {
transaction.response = { source: response, sequence };
}
/** Record completion and read the original completed response, never a later refetch. */
/** Record completion and read selected content through the response API. */
finished(request: ScenarioNetworkRequest): void {
if (!this.accepting) return;
const transaction = this.transaction(request);