Skip to content

Report video finalization failures and remaining children - #1010

Merged
zlareb1 merged 1 commit into
mainfrom
fix/pipecat-finalization-diagnostics
Nov 20, 2026
Merged

zlareb1 merged 1 commit into
mainfrom
fix/pipecat-finalization-diagnostics

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Related: #1008

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry

Not required.

Why

The optional recording completed browser setup and passed the native text memory check, then failed during video finalization. Its public status identified neither the finalization phase nor the exception category. Extend the existing bounded diagnostics across receipt validation, event display, browser export, file writing and media qualification.

Scope and risk

The recorder reports numeric phases, fixed exception categories and an allowlist of existing local failure codes. It preserves the first event failure when later work or cleanup clears request diagnostics. Raw exception messages, browser logs, URLs, arguments, credentials and process identities stay out of the status.

After all four owned cleanup calls, a successful subreaper setup permits a bounded own-child census. Two snapshots verify parent relationships and process births; the status exports only empty, remaining or unavailable. Reads are limited to 4,096 bytes and 128 children, with a one-second observation budget. Read or identity failures return unavailable. An empty census is a post-cleanup observation, not continuous proof that no child changed process group. This adds no signals and changes no cleanup action.

Browser environment, sandbox, native assertions, fixture hashes, media limits, timeouts and ownership checks retain their existing behavior. This change diagnoses the finalization failure; it does not establish or repair its cause.

Compatibility, rollout and rollback

  • Wire and operator settings: none.
  • The optional recording status extends capture_failure with a fixed code and gains post_cleanup_children.
  • After merge, a separate recording selects the exact merged main commit. Reverting removes these diagnostics.

Tests

Twelve selected mocked cases failed against the original recorder. The directly related recorder module then passed all 39 cases in 0.60 seconds, including 15 added cases. They cover finalization phase attribution, fixed-code and private-message filtering, first-event failure preservation, child birth changes, read bounds and unavailable-census results. They start no browser, product service, database or provider.

Scoped Ruff formatting, lint and the diff whitespace check passed. One earlier local attempt was refused before workload admission; its result remains recorded. All required hosted CI passes on the pushed head. A fresh independent review read both affected modules and the entire diff and found no findings or nits.

Both actual recording attempts passed their native text memory case and removed their owned database fixture. The first failed during setup; the second failed after validating its native receipt. Neither produced a qualified video, and the causes remain unknown. Independent Chrome descendant cleanup is not qualified by those runs.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex wrote the change. Source inspection covers every finalization boundary, fixed diagnostic exports, subreaper ordering and unchanged signaling and media limits. Validation is listed above.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Required hosted CI passes.
  • No wire schema, migration, generated SDK, plugin or frontend change.
  • No sandbox, ownership, timeout or native assertion is weakened.
  • The pushed head receives an independent review.
  • Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 merged commit 31c95f9 into main Nov 20, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant