You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa96af6
Browse filesBrowse the repository at this point in the historyBrowse files
fix(daemon): keep a recording downloadable when its lease ends (#3955)
* fix(daemon): keep a recording downloadable when its lease ends
Lease-end teardown finished an active recording but dropped the
completion, so a remote caller's export stayed in the daemon temp
directory with no artifact id: the client's later record stop failed
with the lease gone and the files leaked.
- A leased session's teardown (lease expiry, release, or close) registers a committed remote-temp export
and its telemetry as downloadable artifacts of the lease's tenant,
with the standard delete-after-download and 15-minute expiry. If
registration fails, it deletes the files. A failed finish keeps its
forced cleanup and registers nothing.
- The /artifacts inventory carries an optional public sessionName so
clients sharing a tenant can find their own recording.
- trackDownloadableArtifact returns the entry that already tracks a file
for the same tenant unchanged, so a record stop replay serves the same
ids instead of two ids racing to delete one file.
- record stop artifacts are built in one place for the reply and the
teardown.
Lease-end half of #2281.
* fix(daemon): load leased recording retention on demand
- session-teardown.ts imports the retention module only when the
session holds a lease, so the daemon entry keeps its merge-base eager
closure (eager-closure-budgets, which failed the Coverage job).
- The registration-failure rollback removes each file best-effort, so
one failed removal does not leak the rest.
- The unleased-teardown test also checks the tenant inventory.
- Docs: ADR 0007 names close as a teardown that keeps the recording,
ADR 0024 scopes forced cleanup to the teardown finish, and the
remote-proxy sessionName wording matches the contract.
Keep a remote recording downloadable when its leased session ends mid-recording (lease expiry, release, or `close`). Teardown finishes the recording and registers the video and gesture telemetry as downloadable artifacts of the lease's tenant, instead of leaving them unreachable in the daemon's temp directory. `GET /artifacts` entries now carry an optional `sessionName` for such artifacts. A later `record stop` replay returns the same artifact ids.
Copy file name to clipboardExpand all lines: docs/adr/0007-remote-device-leases.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@ Idle reap then shuts the daemon down within one more idle window.
76
76
77
77
A session cannot outlive the lease under which it was opened.
78
78
When the lease is released or expires, the daemon tears the session down under its execution locks and clears its device claim.
79
+
Any teardown of a leased session, including `close`, finishes an active recording. A finished export at a remote temp path then belongs to the lease's tenant as a downloadable artifact, like the artifact of any `record stop` (ADR 0024 2.5).
79
80
This applies even when the device no longer answers.
80
81
A release is a tenant `lease_release` or a host `DELETE /admin/leases/<lease-id>`.
81
82
The daemon sweeps for expired leases every second.
Copy file name to clipboardExpand all lines: docs/adr/0024-screen-recording-provable-signal.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -342,6 +342,12 @@ Artifact cleanup is a separate, explicit decision (rule 6).
342
342
Session teardown and failed-start rollback dispose through the backend under the fence.
343
343
They do this only after the manifest records that no recoverable export is lost.
344
344
345
+
A leased session's teardown that commits an export at a remote temp path registers it, and its telemetry, as downloadable artifacts of the lease's tenant (rule 1, #2281).
346
+
The inventory names the session, and the usual delete-after-download and 15-minute expiry apply.
347
+
A later `record stop` replay of that manifest serves the same artifact ids.
348
+
If registration fails, teardown deletes the files.
349
+
A failed teardown finish still runs forced cleanup (disposal intent) and registers nothing.
350
+
345
351
### 2.6 Native markers
346
352
347
353
These markers cover the windows between the spawn of a native recorder and the publication of the manifest that names it:
0 commit comments