Skip to content

feat(desktop): show current relay-authenticated binding status - #4987

Draft
cea-block wants to merge 3 commits into
cea/o5-durable-audit-operator-lifecycle-4941806from
cea/j3c-current-binding-status
Draft

feat(desktop): show current relay-authenticated binding status#4987
cea-block wants to merge 3 commits into
cea/o5-durable-audit-operator-lifecycle-4941806from
cea/j3c-current-binding-status

Conversation

@cea-block

@cea-block cea-block commented Aug 6, 2026

Copy link
Copy Markdown

Why

The desktop should present trust from the relay-authenticated current binding status associated with its active connection. Profile metadata and NIP-85-derived names are not connection-scoped authority and can outlive a withdrawal, expiry, reconnect, or binding change.

This PR follows #4847 and adds the desktop consumer for the current-binding status protocol introduced earlier in the stack.

What changed

  • Bootstrap current-binding status within the authenticated relay connection and bind the native session to the exact socket, relay signer, author, domain, epoch, and expiry
  • Keep the desktop projection memory-only and fail closed on malformed, stale, conflicting, withdrawn, expired, disconnected, or replaced status
  • Show a generic current-binding badge only when the message event signer exactly matches the current relay-authenticated projection
  • Remove profile- and NIP-85-derived trust presentation and verified-name fallback while retaining inherited compatibility plumbing
  • Add native session, WebSocket, projection-store, author-match, and browser coverage without adding a production fixture or provider

Desktop run-event lifecycle handling is organized in a dedicated behavior-neutral module.

Risk boundary

The projection is current-connection state, not durable identity state. It is cleared whenever its authenticated scope or freshness cannot be established, and it is never restored from profile metadata. The stock relay still installs no deployment-specific authorization provider, and this change does not enable protected behavior, operator routes, or external identity policy.

Delivery limitation

Status and moderation delivery is durable and crash-recoverable with at-least-once semantics, and clients deduplicate redeliveries.

Moderation commit-to-dispatch is in-process at-most-once: delivery records are crash-recoverable, but external moderation side effects are not replayed after a crash.

Validation

  • Exact production outbound bytes across a real loopback WebSocket into the native status session
  • Signed connection-scope relay harness covering withdrawal, expiry, reconnect, scope changes, malformed status, and replay ordering
  • Native connection and projection-session tests
  • Focused desktop projection, author-match, socket-binding, and expiry tests
  • TypeScript and desktop builds
  • Playwright coverage where badge.spec.ts emits current-binding projections through the mock bridge and verifies exact-author display plus fail-closed rejection of malformed projection shapes
  • Source and test coverage confirming retired profile-derived trust presentation is absent

Generated with Codex.

@cea-block
cea-block force-pushed the cea/o5-durable-audit-operator-lifecycle-4941806 branch from 42bf4c4 to 29506f8 Compare August 9, 2026 12:34
@cea-block
cea-block force-pushed the cea/j3c-current-binding-status branch from b042940 to 5b6578b Compare August 9, 2026 12:34
cea-block added a commit that referenced this pull request Aug 10, 2026
Cumulative PR layer #4987. Installs the native and desktop current-binding status consumer while preserving the lower verified-profile presentation.

Neighbor disclosure: the core status contract remains owned by #4790 and relay runtime remains owned by #4847; this layer adds connection-scoped status without replacing the lower verified-profile pipeline.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
@cea-block
cea-block force-pushed the cea/o5-durable-audit-operator-lifecycle-4941806 branch from 29506f8 to b58106b Compare August 10, 2026 22:53
@cea-block
cea-block force-pushed the cea/j3c-current-binding-status branch from 5b6578b to 4612eab Compare August 10, 2026 22:53
cea-block added a commit that referenced this pull request Aug 11, 2026
Cumulative PR layer #4987. Installs the reviewed native and desktop current-binding status consumer, reconciles public dependency locks, preserves provider application, retires profile-derived trust presentation, and co-commits exact WebSocket operations with stable same-actor status sessions.

Neighbor disclosure: the core status contract remains owned by #4790 and relay production remains owned by #4847; this layer intentionally retires the legacy profile presentation replaced by connection-scoped status.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
@cea-block
cea-block force-pushed the cea/o5-durable-audit-operator-lifecycle-4941806 branch from b58106b to c8a9ea0 Compare August 11, 2026 12:35
@cea-block
cea-block force-pushed the cea/j3c-current-binding-status branch from 4612eab to 88af04d Compare August 11, 2026 12:35
cea-block added a commit that referenced this pull request Aug 11, 2026
Cumulative PR layer #4987. Installs the reviewed native and desktop current-binding status consumer, reconciles public dependency locks, preserves provider application, retires profile-derived trust presentation, and co-commits exact WebSocket operations with stable same-actor status sessions.

Neighbor disclosure: the core status contract remains owned by #4790 and relay production remains owned by #4847; this layer intentionally retires the legacy profile presentation replaced by connection-scoped status.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
@cea-block
cea-block force-pushed the cea/o5-durable-audit-operator-lifecycle-4941806 branch from c8a9ea0 to 49c061f Compare August 11, 2026 15:03
@cea-block
cea-block force-pushed the cea/j3c-current-binding-status branch 2 times, most recently from 4c6ebb6 to 5a3dd92 Compare August 11, 2026 17:04
cea-block added a commit that referenced this pull request Aug 11, 2026
Cumulative PR layer #4987. Installs the reviewed native and desktop current-binding status consumer, reconciles public dependency locks, preserves provider application, retires profile-derived trust presentation, and co-commits exact WebSocket operations with stable same-actor status sessions.

Neighbor disclosure: the core status contract remains owned by #4790 and relay production remains owned by #4847; this layer intentionally retires the legacy profile presentation replaced by connection-scoped status.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
@cea-block
cea-block force-pushed the cea/o5-durable-audit-operator-lifecycle-4941806 branch from 49c061f to 1b2289f Compare August 11, 2026 17:04
cea-block added a commit that referenced this pull request Aug 11, 2026
Cumulative PR layer #4987. Installs the reviewed native and desktop current-binding status consumer, reconciles public dependency locks, preserves provider application, retires profile-derived trust presentation, and co-commits exact WebSocket operations with stable same-actor status sessions.

Neighbor disclosure: the core status contract remains owned by #4790 and relay production remains owned by #4847; this layer intentionally retires the legacy profile presentation replaced by connection-scoped status.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
@cea-block
cea-block force-pushed the cea/o5-durable-audit-operator-lifecycle-4941806 branch from 1b2289f to 761140e Compare August 11, 2026 17:33
@cea-block
cea-block force-pushed the cea/j3c-current-binding-status branch from 5a3dd92 to 1d8ea57 Compare August 11, 2026 17:33
cea-block added a commit that referenced this pull request Aug 11, 2026
Cumulative PR layer #4987. Installs the reviewed native and desktop current-binding status consumer, reconciles public dependency locks, preserves provider application, retires profile-derived trust presentation, and co-commits exact WebSocket operations with stable same-actor status sessions.

Neighbor disclosure: the core status contract remains owned by #4790 and relay production remains owned by #4847; this layer intentionally retires the legacy profile presentation replaced by connection-scoped status.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
@cea-block
cea-block force-pushed the cea/o5-durable-audit-operator-lifecycle-4941806 branch from 761140e to 5e6ca74 Compare August 11, 2026 18:10
@cea-block
cea-block force-pushed the cea/j3c-current-binding-status branch from 1d8ea57 to 736497f Compare August 11, 2026 18:10
Cumulative PR layer #4987. Installs the reviewed native and desktop current-binding status consumer, reconciles public dependency locks, preserves provider application, retires profile-derived trust presentation, and co-commits exact WebSocket operations with stable same-actor status sessions.

Neighbor disclosure: the core status contract remains owned by #4790 and relay production remains owned by #4847; this layer intentionally retires the legacy profile presentation replaced by connection-scoped status.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
…file-size gate

Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
@cea-block
cea-block force-pushed the cea/o5-durable-audit-operator-lifecycle-4941806 branch from 5e6ca74 to 5446360 Compare August 12, 2026 01:13
@cea-block
cea-block force-pushed the cea/j3c-current-binding-status branch from 736497f to 2d48ffb Compare August 12, 2026 01:13
Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant