Part of Epic #12416 (graduated from Discussion #12412). Carved out of #12418, which is re-scoped to the boot-envelope → overrideMetadata mechanism (delivered by PR #12421). This ticket carries the runtime-presence half — the work that gates on PR #12411's state vocab merging.
Scope
- Self-register/upsert a VOLATILE HarnessPresence record overlaying the durable subscription. The record UNIONS:
- state-dim (PR #12411 / ADR 0002 §5.2):
state: unknown|idle|active|waitingOnApproval|userTyping, activeTurnId, wakePolicy, source.
- address-dim (Discussion #12412):
instanceAddress, addressType, pid, bootId — sourced from the boot envelope already wired by #12418/PR #12421.
- shared:
lastSeenAt, capabilities.
- Staleness:
bootId-mismatch + pid-alive as the PRIMARY retire signal (a new boot supersedes — resolves the phantom same-identity collision the twin lived while unbound); TTL ≈ 2× swarm-heartbeat (~10 min) backstop; degrade immediate→next_turn on presence older than ~1 heartbeat.
- Delivery dispatch on
addressType (userDataDir→pid-from-args; pid→direct; tmuxSession→tmux; webhookUrl→POST) — folds the osascript-vs-tmux special-casing into one model and retires the transitional userDataDir mirror #12418/PR #12421 emits.
Acceptance Criteria
Contract Ledger
| Surface |
Source of Authority |
Behavior |
Fallback |
Evidence |
| HarnessPresence record |
PR #12411 state-dim + Discussion #12412 address-dim union |
volatile {state∪address∪shared} overlay |
durable sub = interest SoT |
unit + live |
addressType dispatch |
wake-delivery contract |
route by address type; retire userDataDir mirror |
legacy activate / fail-closed |
unit |
Dependency
Blocked by #11822-derived #12411 (state vocab) — the union needs the merged state-dim before the record can be authored. The address-dim is already provided by #12418 (PR #12421, the boot envelope → overrideMetadata mechanism).
Related
Epic #12416; Discussion #12412; #12418 (boot-envelope mechanism, re-scoped); PR #12411 (state vocab); #12419 (Ticket C macOS fallback, downstream); #12402 (L3 validation).
Part of Epic #12416 (graduated from Discussion #12412). Carved out of #12418, which is re-scoped to the boot-envelope →
overrideMetadatamechanism (delivered by PR #12421). This ticket carries the runtime-presence half — the work that gates on PR #12411's state vocab merging.Scope
state: unknown|idle|active|waitingOnApproval|userTyping,activeTurnId,wakePolicy,source.instanceAddress,addressType,pid,bootId— sourced from the boot envelope already wired by #12418/PR #12421.lastSeenAt,capabilities.bootId-mismatch + pid-alive as the PRIMARY retire signal (a new boot supersedes — resolves the phantom same-identity collision the twin lived while unbound); TTL ≈ 2× swarm-heartbeat (~10 min) backstop; degradeimmediate→next_turnon presence older than ~1 heartbeat.addressType(userDataDir→pid-from-args;pid→direct;tmuxSession→tmux;webhookUrl→POST) — folds the osascript-vs-tmux special-casing into one model and retires the transitionaluserDataDirmirror #12418/PR #12421 emits.Acceptance Criteria
bootId-mismatch + pid-dead retire the prior presence (phantom-collision resolved); TTL backstop applies.addressTypedispatch implemented across the delivery primitive (the transitionaluserDataDirmirror is retired here).immediaterequires fresh presence; stale →next_turn/ fail-closed for targeted GUI.@neo-opus-grace's liveWAKE_SUB:84dfc4dashape.Contract Ledger
addressTypedispatchuserDataDirmirrorDependency
Blocked by #11822-derived #12411 (state vocab) — the union needs the merged state-dim before the record can be authored. The address-dim is already provided by #12418 (PR #12421, the boot envelope →
overrideMetadatamechanism).Related
Epic #12416; Discussion #12412; #12418 (boot-envelope mechanism, re-scoped); PR #12411 (state vocab); #12419 (Ticket C macOS fallback, downstream); #12402 (L3 validation).