OctaTouch

ADR 0002: Storage Enforces Channel Binding Policy

Status

Accepted.

Context

Following ADR 0001, archives are bound to channels rather than to finger positions. The question then arises: where does that binding live, and what happens when a second archive is bound to a channel that already has one?

Decision

IntentResolver is the single authoritative store of channel-to-archive bindings. The rules are:

  1. Only one archive may be bound to a channel at a time.
  2. Binding a second archive to an already-bound channel silently replaces the previous binding. The caller is responsible for any required teardown of the displaced archive.
  3. Unbinding a channel sets its binding to 0 (the sentinel “no archive” id).
  4. Bindings survive GestureEngine::Flush() calls; they are not cleared on gesture boundaries.

The storage API (BindArchive, UnbindArchive, BoundArchive) is defined in core/include/IntentResolver.h.

Consequences