Skip to content

Add browser-probe checkpoint and repeated-run leak hooks #303

@chubes4

Description

@chubes4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions