Skip to content

feat(device-client): check an invite, re-export the settings names - #135

Merged
kinqsradio merged 2 commits into
mainfrom
feat/check-invite-and-names
Nov 12, 2026
Merged

kinqsradio merged 2 commits into
mainfrom
feat/check-invite-and-names

Conversation

@kinqsradio

@kinqsradio kinqsradio commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • DeviceClient::check_invite(code) wraps POST /v1/invites/check ({invite} -> 204): Ok when the code can start a sign-up, InviteInvalid for an unknown, used or expired one (the server gives one answer for all), RateLimited after too many wrong tries; a server that asks for no invites says yes. It spends nothing and sends the code as typed. No InviteRequired variant exists, so the existing InviteInvalid is used.
  • Scripted-transport tests (fake engine route; 429 and a dead network) and a real-server test in invite mode (good code however typed, unknown, empty, expired, used).
  • docs/device-client.md: one paragraph in the sign-up section.
  • Re-exports from orbyn-engineering through orbyn-device-client: ZONE_SETTINGS, PERSON_SETTINGS, PERSON_RECORD_ID, Settings, and the types its methods expose (SettingsError, Rule, Accepted, Rejected), so the app does not spell the names by hand. New dependency edge orbyn-device-client -> orbyn-engineering, approved by the lead, added to ALLOWED in scripts/check_structure.py; orbyn-engineering does not depend on the device client (no cycle). Tested by tests/reexports.rs; single_crate and the D6 scan stay green. Noted in docs/device-client.md.

Testing

  • Full gate with Postgres: fmt, clippy, structure, wasm32, workspace tests (991 pass).
  • Mutation checks: 3 mutations (always Ok, wrong path, altered code), all killed.
  • Not tested: the CI clippy toolchain (local only).

Co-authors

none

AI usage

  • Written by hand, with no AI
  • Harness and version: Claude Code 2.1.317
  • Models: claude-sonnet-5-5 (all)
  • Effort: medium
  • Human role: set scope (Engineering 2's request)
  • Sources: none

Checklist

  • Works on Windows, macOS and Linux
  • docs/architecture.md with any rule change; generated wire types with any contract change
  • No copied source, secrets, credentials or personal data; no AI attribution in commits, title or branch

check_invite wraps POST /v1/invites/check: Ok when the code can start a
sign-up, InviteInvalid for an unknown, used or expired one, RateLimited
after too many wrong tries. It spends nothing.
The app no longer spells the zone, record id and record type by hand:
ZONE_SETTINGS, PERSON_RECORD_ID, PERSON_SETTINGS, Settings and the types
its methods expose come from orbyn-engineering through this crate. This
adds the edge orbyn-device-client -> orbyn-engineering to the ownership
map; orbyn-engineering does not depend on the device client.
@kinqsradio kinqsradio changed the title feat(device-client): check an invite code before sign-up feat(device-client): check an invite, re-export the settings names Nov 12, 2026
@kinqsradio
kinqsradio merged commit ace5e23 into main Nov 12, 2026
20 checks passed
@kinqsradio
kinqsradio deleted the feat/check-invite-and-names branch November 12, 2026 02:21
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