Skip to content

PANA-8612: Add snapshot capture orchestration - #3722

Draft
jonathanmos wants to merge 1 commit into
feature/sr-new-pipelinefrom
jmoskovich/02-sr-new-pipeline
Draft

PANA-8612: Add snapshot capture orchestration#3722
jonathanmos wants to merge 1 commit into
feature/sr-new-pipelinefrom
jmoskovich/02-sr-new-pipeline

Conversation

@jonathanmos

Copy link
Copy Markdown
Member

What does this PR do?

Adds the orchestration layer for the composition capture pipeline: SnapshotCaptureOrchestrator serializes snapshot "generations" end-to-end (traversal, async processing, expiry, handoff), coalescing overlapping capture requests into one follow-up and tracking a CaptureChangeset describing what changed (accepted for now, not yet consumed by traversal). Wires this and its supporting pieces (generation/time-budget primitives, Android scheduling and lifecycle glue, the completion queue) into DefaultRecorderProvider.

Motivation

Continues the new composition-tree capture pipeline (stacked on PANA-8500). The recorder and processing pieces already existed; this PR adds the piece that actually drives a capture end-to-end — deciding when a generation starts, enforcing its time budget, serializing overlapping requests, and handing the result off — while keeping platform callback wiring and the real view-traversal producer out of scope for later workstreams (CompositionCapturePipeline's producer is still a test seam here).

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@datadog-official

datadog-official Bot commented Aug 18, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 72.82% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1ca510f | Docs | View more details | Give us feedback!

@codecov-commenter

codecov-commenter commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.82403% with 108 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.31%. Comparing base (2ebd855) to head (1ca510f).

Files with missing lines Patch % Lines
...nternal/composition/SnapshotCaptureOrchestrator.kt 80.74% 10 Missing and 16 partials ⚠️
...ay/internal/composition/SnapshotCompletionQueue.kt 63.08% 13 Missing and 11 partials ⚠️
...lay/internal/composition/CompositionDrawSignals.kt 64.58% 12 Missing and 5 partials ⚠️
...y/internal/composition/CaptureGenerationContext.kt 81.13% 4 Missing and 6 partials ⚠️
...ay/internal/composition/AndroidCaptureExecution.kt 70.00% 4 Missing and 5 partials ⚠️
.../sessionreplay/internal/DefaultRecorderProvider.kt 83.33% 6 Missing and 2 partials ⚠️
...ionreplay/internal/composition/CaptureWorkToken.kt 75.00% 3 Missing and 2 partials ⚠️
...nal/composition/AndroidSnapshotCaptureLifecycle.kt 82.61% 3 Missing and 1 partial ⚠️
...ionreplay/internal/composition/CaptureExecution.kt 70.00% 2 Missing and 1 partial ⚠️
...nreplay/internal/composition/SnapshotProcessing.kt 86.67% 2 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##           jmoskovich/01-sr-new-pipeline    #3722      +/-   ##
=================================================================
+ Coverage                          73.30%   73.31%   +0.01%     
=================================================================
  Files                               1009     1019      +10     
  Lines                              37438    37896     +458     
  Branches                            6515     6598      +83     
=================================================================
+ Hits                               27443    27781     +338     
- Misses                              8116     8186      +70     
- Partials                            1879     1929      +50     
Files with missing lines Coverage Δ
...nternal/composition/CaptureSkippedFrameNotifier.kt 100.00% <100.00%> (ø)
...sessionreplay/internal/composition/CapturedTree.kt 90.24% <100.00%> (+0.24%) ⬆️
...internal/composition/CompositionCapturePipeline.kt 100.00% <100.00%> (+54.55%) ⬆️
...nreplay/internal/composition/SnapshotProcessing.kt 86.67% <86.67%> (ø)
...ionreplay/internal/composition/CaptureExecution.kt 70.00% <70.00%> (ø)
...nal/composition/AndroidSnapshotCaptureLifecycle.kt 82.61% <82.61%> (ø)
...ionreplay/internal/composition/CaptureWorkToken.kt 75.00% <75.00%> (ø)
.../sessionreplay/internal/DefaultRecorderProvider.kt 91.28% <83.33%> (-3.35%) ⬇️
...ay/internal/composition/AndroidCaptureExecution.kt 70.00% <70.00%> (ø)
...y/internal/composition/CaptureGenerationContext.kt 81.13% <81.13%> (ø)
... and 3 more

... and 39 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonathanmos
jonathanmos force-pushed the jmoskovich/02-sr-new-pipeline branch from 001809f to 1ca510f Compare August 18, 2026 10:38
Base automatically changed from jmoskovich/01-sr-new-pipeline to feature/sr-new-pipeline August 18, 2026 12:16
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.

2 participants