Problem
A single final browser snapshot is not enough to find memory spikes or leaks in browser-hosted Codebox flows. Consumers need named checkpoints across a user journey and repeated iterations to detect retained memory.
Proposed behavior
Add a generic checkpoint protocol to wordpress.browser-probe.
Possible contract:
- expose
window.__wpCodeboxProbeCheckpoint(name, metadata = {}) inside the page before the probe script runs
- each call records a generic memory/performance snapshot
- write newline-delimited checkpoint records to
files/browser/checkpoints.jsonl
- include checkpoint summaries in
files/browser/summary.json
Add optional repeat/leak controls:
repeat=<n> to run the probe journey more than once where feasible
reset-between=none|reload|new-page to define repeated-run behavior
- summarize per-iteration peak/final/delta values
Acceptance criteria
- Probe scripts can record named checkpoints without app-specific code in WP Codebox.
- Checkpoint artifacts include timestamp, name, optional metadata, and generic memory/perf snapshot fields.
- Repeated-run output distinguishes iterations and final retained values.
- Existing browser probes are unchanged unless checkpoint/repeat options are used.
- Smoke coverage exercises at least two checkpoints and verifies
checkpoints.jsonl plus summary references.
Problem
A single final browser snapshot is not enough to find memory spikes or leaks in browser-hosted Codebox flows. Consumers need named checkpoints across a user journey and repeated iterations to detect retained memory.
Proposed behavior
Add a generic checkpoint protocol to
wordpress.browser-probe.Possible contract:
window.__wpCodeboxProbeCheckpoint(name, metadata = {})inside the page before the probe script runsfiles/browser/checkpoints.jsonlfiles/browser/summary.jsonAdd optional repeat/leak controls:
repeat=<n>to run the probe journey more than once where feasiblereset-between=none|reload|new-pageto define repeated-run behaviorAcceptance criteria
checkpoints.jsonlplus summary references.