Files
hyperframes/packages
Miguel Ángel 690cf1b7a5 fix(producer): stop retrying capture attempts that made zero progress (#1725)
* fix(producer): stop retrying capture attempts that made zero progress

A structurally broken composition (never-ready page, zero duration, or
unparseable HTML) captures no frames, so the adaptive retry loop kept
re-running it at halved parallelism — 16->8->4->2->1 workers — each attempt
burning a full readiness/protocol timeout per worker. That multiplied
wall-clock to ~46min on broken renders and was the driver of the render
P95 blowup (~370k -> 2.79M ms) seen Jun 20-22.

Add captureAttemptMadeProgress(): when an attempt leaves at least as many
frames missing as it set out to capture, it made no forward progress, so the
composition is broken rather than the workers being flaky. Bail immediately
instead of retrying. A partially-captured attempt still retries, so genuine
flaky-worker gaps are unaffected.

* fix(producer): log the zero-progress bail + cover it with an integration test

Address review feedback on the no-progress capture guard:

- Warn before bailing so an oncall can tell a structurally-broken render that
  bailed fast apart from one that exhausted worker-halving retries (both
  previously threw the same "frame(s) are missing" message).
- Add an integration test that drives executeDiskCaptureWithAdaptiveRetry
  through the bail (capture functions mocked to write nothing) and asserts a
  single attempt runs — the gate would otherwise walk 4->2->1 workers. Guards
  the placement of the gate, not just the predicate.
- Reword the helper docstring (drop stray prefix and internal incident detail).
2026-06-25 17:50:57 -04:00
..
2026-06-25 11:54:10 -04:00
2026-06-25 11:54:10 -04:00
2026-06-25 11:54:10 -04:00
2026-06-16 13:16:09 -04:00
2026-06-25 11:54:10 -04:00