Skip to content

feat(apps): let apps abort a legacy handoff and see its availability #618

Done

Description

@RentnerKev

Problem

Building the Monitoring app's import of the legacy handoff (RentnerProxy/app-monitoring#5) showed gaps in the App API around a handoff that the app cannot complete. Most important: once an app has begun a handoff, built-in monitoring stays paused until the installation is removed or reset by an administrator, even when the app refuses the export as invalid.

Changes (App SDK 1.x, platform API minor)

  1. App-callable abort (needed before a release). An idempotent abortLegacyHandoff(domain) that an app may call only before commit. It calls abortLegacyFeatureHandoffInTransaction with the source's restore, so built-in monitoring resumes right away after the app rejects an export. Today the platform aborts only when an installation becomes removable (checkAppRuntimeDependenciesInTransaction, action removable).
  2. Failure visibility. GetLegacyHandoff returns only platform, exported or committed. Let an app report a failure reason with the abort, or record an audit event, so an administrator can see why a handoff did not complete.
  3. Availability signal. An app cannot tell "source not offered yet" from other 404s on begin, and there is no event for it, so it polls. A field on GetLegacyHandoff, for example offered/hasState, or a legacyHandoffAvailable platform event, would remove the polling.
  4. Empty or absent source. Once built-in monitoring is removed (Phase 5 of app-monitoring#1), a fresh installation must still get an empty export or committed from begin. Otherwise the app stays frozen forever.
  5. Documentation.
    • Document the digest derivation (label, domain, part count, SHA-256 of each part's compact JSON), so apps can verify parts.
    • In the SetIncident description, state that the link filter rejects www. anywhere in text.

Coordination

Bundle these with the platform API version gate in RentnerProxy/app-monitoring#4: SDK 1.3.0 raises PROTOCOL_VERSION to 1.1.0, the platform and Marketplace adopt it, and the app requires it.

Acceptance criteria

  • An app can abort an uncommitted handoff; the source's restore runs and built-in monitoring resumes.
  • An administrator can see that and why an app refused a handoff.
  • An app learns that a source is offered without polling begin.
  • A platform without built-in monitoring state lets the app finish the handoff.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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