Skip to content

test(gateway): publish mobile contract conformance - #63205

Draft
ericlewis wants to merge 18 commits into
NousResearch:mainfrom
ericlewis:codex/mobile-contract-conformance
Draft

test(gateway): publish mobile contract conformance#63205
ericlewis wants to merge 18 commits into
NousResearch:mainfrom
ericlewis:codex/mobile-contract-conformance

Conversation

@ericlewis

Copy link
Copy Markdown

Summary

  • add one generic FastAPI + real WebSocket conformance path for the Mobile Client Contract
  • authenticate through the configured dashboard flow, mint a fresh scoped ticket for every connection, and validate the effective gateway.ready grant
  • prove an unread prompt ACK recovers through cursor resume and same-ID retry with exactly one persisted user turn
  • prove an unread approval request recovers with the same Hermes identity, resolves once, and replays one stable durable result
  • prove replay complete, gap/replay_evicted, reset/stream_changed, and reset/server_instance_changed
  • publish the normative custom-client contract in Programmatic Integration, with the internal contract file reduced to implementation notes

Public-boundary proof

The conformance test keeps the real FastAPI route, dashboard authentication, single-use ticket consumption, WebSocket transport, dispatcher, lazy session-row creation, prompt runner, AIAgent.run_conversation, turn-context persistence, SessionDB flushing, synchronization stream, durable mutation store, and approval core. Only the external model-provider response is deterministic.

The client intentionally disconnects without consuming the prompt ACK and later without consuming approval.request; both are recovered on fresh authenticated WebSockets.

Stack / review order

This final conformance/docs slice is stacked on the integrated approval PR #63197, which itself combines:

  1. feat(gateway): negotiate scoped WebSocket grants #62858 — versioned hello and scoped WebSocket grants
  2. feat(gateway): add revisioned conversation sync #63149 — revisioned snapshots and replay
  3. feat(gateway): persist mobile mutation receipts #63190 — durable mobile mutation receipts

Cuttle tracking: https://github.com/ericlewis/cuttle/issues/6
Parent contract: https://github.com/ericlewis/cuttle/issues/1

Validation

  • conformance test passed 5 consecutive real-path runs
  • 62 passed — complete authenticated WebSocket test file
  • 204 passed — relevant auth/ticket/hello/sync/mutation/approval suite
  • Ruff passed
  • git diff --check passed
  • Docusaurus English production build passed; only unrelated pre-existing broken-link/anchor warnings remain
  • independent Standards and Spec reviews completed with no remaining findings

ericlewis and others added 18 commits July 12, 2026 07:27
Port mr.Shu’s upstream exact-request binding onto the current gateway architecture.

Assign Hermes-owned approval IDs with redacted lifecycle descriptors, finite expiry, terminal metadata, and short-lived tombstones. Preserve legacy FIFO/all callers while making targeted late, duplicate, stale, expired, invalid, and unknown outcomes deterministic.

Propagate the core identity through the gateway notify seam and every current approval surface: Slack, Telegram, Feishu, Discord, Matrix, QQBot, WhatsApp Cloud, and Teams. Keep each platform’s current authorization checks and prevent raw secret-shaped prompt data from crossing those boundaries.
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure comp/gateway Gateway runner, session dispatch, delivery comp/dashboard Web dashboard / control panel UI (dashboard/, landing) area/auth Authentication, OAuth, credential pools sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages P3 Low — cosmetic, nice to have labels Jul 12, 2026
@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/dashboard Web dashboard / control panel UI (dashboard/, landing) comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants