Skip to content

refactor(mobile): clarify retained lease cleanup and retirement - #16

Draft
kvnloo wants to merge 9 commits into
review/1209-basefrom
review/1209-maintainer-cleanup
Draft

kvnloo wants to merge 9 commits into
review/1209-basefrom
review/1209-maintainer-cleanup

Conversation

@kvnloo

@kvnloo kvnloo commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Existing upstream work

Target: tester-army/e2e#1209 by knowbody. This fork draft uses exact origin head efa739b1889028853ec44ead5929bdecd711f246 as its base. It addresses concrete requests from maintainer okwasniewski's follow-up review. It is not another origin PR.

Changes

  • Restore the six deleted lifecycle/API comments from 37f5681d: scheduler forced interrupt, worker shutdown permission, slot lease ownership, pool finalization, recording lifetime, and TestMu retained lease.
  • Separate retired-worker reuse revocation from retirement. When an interrupt sees an already-retired worker, revokeReuse() sends the final-shutdown message without restarting its existing kill deadline. The existing scheduler tests assert preserveResources: true followed by a final shutdown, including forced termination of a still-live retired worker.
  • Name the mobile engine's four-way session-retention condition canKeepSession without changing its predicate.
  • Document native recording resets next to device.closeApp and in the mobile changeset: a leftover native recording forces a session close at the next attempt, dropping the leased session's claim.

Evidence / next gate

  • Compared to upstream current head: 8 modified files, 42 changed lines, no unrelated feature or new API surface.
  • Source checked existing scheduler.test.ts cases for final-drain revocation and force-revocation, and verified exact unchanged IPC message semantics.
  • pnpm check, relevant unit suites and native device runs not executed locally in this constrained workspace; wait for CI/maintainer review before promotion.
  • Independent design decisions explicitly reserved to the maintainers (reuse after a failing unit, provider stop uncertainty) remain unresolved and are not expanded by this patch.
  • Cubic's possible lost recovered VideoSegment is not fixed here. Retrospectively mutating a finalized attempt requires a separate supported report/artifact contract decision; don't silently attach a late artifact to the next attempt.

Credit: original contribution knowbody, architecture/review okwasniewski, additional inline issue report Cubic. This small fork draft is a cherry-pick/review aid only. Do not edit the author's upstream branch without consent, auto-approve, or merge.

Coordination: #12

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