Skip to content

Move stream post-processing behind the wire #301

Description

@vishnuv688

Part of #278

The largest lever, and a real architectural shift: the backend stops
being a pure router and gains trace, HAR, mutation-reattribution and screencast
processing from the frame stream. Anything needing the live driver, such as
screenshots, execute_script and source reads, stays in-language.

Acceptance criteria

Post-processing runs once, server-side, for every
language. Python and the JS adapters produce identical artifacts from the same
stream. The per-language surface is capture and normalize only.

Size: XL. Depends on #298.

Constraint found while scoping #330

Trace mode deliberately runs no backend. service/src/launcher.ts logs
"Trace mode — skipping backend and Chrome window" and
selenium-devtools/src/index.ts "Trace mode — skipping backend port-bind and
UI window"
. So the acceptance criterion above — "Python and the JS adapters
produce identical artifacts from the same stream"
— cannot be met by routing
every adapter through the live backend without making an offline artifact depend
on a server process.

A split that satisfies both: core stays the single implementation, the backend
gains an export path over the ActiveRun accumulator it already keeps for
Preserve & Rerun, and the JS adapters keep calling core in-process so
backend-free trace mode stays byte-stable. Resolve this before implementing.

Also needed either way: actionSnapshots (a defined TraceLog scope no adapter
sends) and screencastFrames (an exporter argument, not a wire message) have to
travel for a stream-fed export to match in-process fidelity.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions