Skip to content

Infrastructure: Implement settled desktop lifecycle supervision and fenced ownership records #4442

Open

Description

@JasonVMo

Current status - 2026-11-07

Implementation in #4463; F1 is already delivered by #4455, so no active prerequisite blocker. Typed resource ordering, late acquisition cleanup, guarded shutdown, exact fenced owner records and alias-specific registered identities are implemented. Main's #4464 lane/test-scope support must coexist with those identities; aliases do not become proof of physical application identity.

The Windows/Win32 follow-up proved failed disposal retained the exact channel generation/effect and refused replacement before acquiring resources. Cleanup used the original recorded stop callbacks, proved exact resource exit, and only then reconciled the owner/claim.

Remaining limitations: automatic reclaim stays disabled; dead owner/service PIDs are not cleanup proof. Cross-service exact-application exclusion and input-mutex qualification remain open with #4446/#4447/#4451. Complete macOS live failed-cleanup/restart and integrated generic-app ownership evidence under #4441/#4444. Portable generic fixtures are not a native non-React lifecycle qualification. This issue remains open for its acceptance review; PR readiness does not silently discharge these gates.

Goal

The supervisor's guard does not await abandoned work, resources acquired after cancellation are not accounted, and workload records hold a PID and run ID rather than exact owner identity and a resource ledger. Reporting delegation can imply skipping workload acquisition, and registered target IDs can collide across configured apps. #4434 added a conservative fence that retains the workload claim when cleanup fails; this item replaces that coarse fence with typed resource contributions and exact, fenced ownership records.

Part of #4435 (plan item F2).

Scope

Dependencies

Acceptance

  • Cancellation during acquisition cannot orphan a late resource.
  • A required-service failure aborts its dependants.
  • Shutdown awaits guarded work.
  • Failed or timed-out disposal retains a fenced claim with an exact ownership record.
  • Reporting inheritance does not grant workload ownership.
  • Live, unknown, or PID-reused owner probes fail closed, and concurrent reconcilers cannot both acquire.
  • New interfaces are exercised by a real generic consumer; no placeholder interfaces are frozen.

Validation

  • Iterate with focused yarn test <name> in each changed package, then run its yarn format, yarn lint, yarn build, and yarn test. Finish with yarn clean-lage-cache then yarn lage buildci; run yarn lage test-links --verbose --grouped after markdown changes.
  • Add a patch changeset for each changed published package. Update the owning references/current-status.md rows (done, work in progress, unsupported) and affected README/AGENTS guidance in the same change.
  • Native, provider, or process-topology changes need matching-OS native contracts and the affected consumer lane. JavaScript tests and bundles do not qualify native behavior; hosted capability skips are not passes. Report each check as passed, failed, skipped, not run, or unsupported.

Evidence

  • Current state: "Cleanup failure fence", "Complete lifecycle settlement", and "Cross-service/multi-target claims" in packages/agentic/desktop-test/references/current-status.md; packages/agentic/desktop-test/references/lifecycle.md.
  • Retired plan: driver-next.md at 0569e1b86, sections 6 and 8 (F2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions