Repository navigation
fix(android): require a nonzero chunk before a recorder counts as ready - #4559
shahjahanpak wants to merge 1 commit into
Conversation
A rollover chunk whose recorder exits without writing left a zero-byte file. Its existence counted as readiness, so the sequential fallback never ran and record stop later failed on the empty artifact. Closes callstack#4550
There was a problem hiding this comment.
No issues found across 2 files
You’re at about 93% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
|
The code change at 5630ceb looks right for the reported case, but there is no live Android run of the route it changes yet. All 14 checks pass at this head.
Not blocking, and you can take or leave these: |
Summary
Fixes #4550. A rollover chunk counted as ready as soon as its file existed. When the device refuses a second concurrent
screenrecord, the new recorder exits and leaves a 0-byte file. The rotation committed that chunk, the sequential fallback never ran, andrecord stopfailed withartifact is not stable.waitForReadynow needs a non-zero size, as the readiness check did before #1724 moved it ontoexists. A dead recorder with an empty file now fails the start, so the existing concurrent-start recovery runs. A recorder that stays alive still counts as ready after the bounded wait, as before. If the sequential start also fails, the rotation gives today's typed error.Partial-recording return and the close/claim path are unchanged.
2 files:
chunks.tsandruntime.test.ts(one new case; the SIGINT case now counts calls after start). No scope expansion.Validation
Base
d78be6c88, head5630ceb28.pnpm exec vitest run --project unit-core packages/platform-android/src/recording/runtime.test.ts: base 1 failed, 16 passed; head 17 passed.pnpm check:quick: passed.pnpm check:affected --run --base upstream/main --head 5630ceb28(exactCommit: true): format, lint, typecheck, layering, fallow and build passed.vitest-relatedfailed by 5 s timeouts across 67 provider files on a heavily loaded host.android-recording.test.tsalone times out on base (6 of 10) and head (7 of 10), with no assertion failure. CI owns these.No device run: the defect needs a device that refuses a second recorder, and I had none.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.