Skip to content

Extract an atomic iOS host-readiness state machine from PR #193 #241

Description

@BunsDev

Outcome

Deliver the first focused iOS replacement slice from PR #193: host readiness must be atomic, deterministic, and unable to expose a newly fetched workspace as authoritative when authentication, host persistence, snapshot acceptance, or workspace application fails.

Control metadata

Required state model

  • unknown
  • discovering
  • pairing
  • authenticating
  • host_committed
  • synchronizing
  • ready
  • degraded
  • reconnecting
  • revoked

Work

  • Extract the smallest current-main readiness core from Complete iOS Bonjour host connection flow #193 rather than rebasing the full branch as one unit.
  • Persist authoritative paired-host identity and selected-host state before applying a new host's workspace snapshot.
  • Apply the snapshot only after authentication, host commit, decoding/revision validation, and workspace acceptance all succeed.
  • Define rollback behavior for transport, authentication, secure-store, decode/revision, and workspace-apply failure.
  • Preserve clearly labeled stale/offline state from the previously authoritative host, or no state for a failed new host.
  • Prevent concurrent pairing/readiness flows from overwriting committed authority.
  • Add deterministic transition and failure-boundary tests.
  • Keep Bonjour discovery, selection UI, and physical-device acceptance out of this first PR except for narrow adapters required by the state-machine contract.

Acceptance criteria

  • A secure-store failure cannot leave the new workspace visible while readiness reports failure.
  • No failure path labels newly fetched state as ready.
  • Previously authoritative stale state is visually and semantically distinct from live state.
  • Revoked or wrong-host identity fails closed.
  • Tests cover every allowed transition and every rollback boundary.
  • The focused PR is current with main, reviewable, green, and merged before later iOS capability PRs.

Non-goals

Evidence

Link the extraction PR, transition table/tests, exact head SHA, required checks, review findings/resolution, and merged commit.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions