Skip to content

TD-5301: what no phone permission opens - #127

Merged
captcrock merged 1 commit into
mainfrom
td/5301-phone-never-rules
Nov 24, 2026
Merged

captcrock merged 1 commit into
mainfrom
td/5301-phone-never-rules

Conversation

@captcrock

Copy link
Copy Markdown
Contributor

Owner decision #5: a paired phone can never release a computer-use stop, shut the daemon down, send a saved key to another server, or change the mail server without typing the password. These are hard refusals (loopback_only), with or without a grant.

Runtime check before the change (live test daemon, paired phone, unchanged main):

  • set_email_notify with a new SMTP host and no password: accepted with no grant. The saved password would have gone to the new server on the next send.
  • set_credential moving the saved OpenRouter key's host: refused without a grant, accepted once "Adding models and keys" was on.
  • add_model reusing a saved key at another URL: already refused for every client (TD-5182).
  • shutdown from a phone: accepted; the daemon stopped.

Change

  • phone_verbs.never_from_a_phone now also covers shutdown.
  • New phone_never.py holds the rules that depend on saved config: a set_credential that changes or clears an existing key's host, a set_tier_credential that binds a key saved without a host to a model on another server, and an SMTP host change without a password. It reuses key_hosts.key_refusal.
  • Hub.intercept runs these before the permission check, so the answer doesn't depend on a grant.
  • Still allowed: renaming a key, saving a new key with its own host, set_api_key (the phone types the key), and moving mail with the password typed in the same message.
  • Docs updated: architecture rows, DECISIONS entry, backlog story, and the phone-permission disclosure.

Tests: test_phone_never.py (19). Full core suite 9031 passed; ruff, mypy, tsc and vitest are clean; release scan 0 hits.

🤖 Generated with Claude Code

A paired phone is refused, with any grant, when it would release the
computer-use stop, shut the daemon down, send a saved key to a server
it does not already reach, or point the mail server elsewhere without
typing the password. Checked against a live test daemon first: the
mail-host change was open to any paired phone with no grant, a saved
key's host could be moved once "Adding models and keys" was on, and
shutdown stopped the daemon.

The rules read off the message stay in phone_verbs; the ones that
depend on what is saved are in phone_never, asked by Hub.intercept
before the permission check through a callable the daemon passes with
its live config, so peer_policy.check stays a pure table. The key rule
reuses TD-5182's key_refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@captcrock
captcrock merged commit dde0903 into main Nov 24, 2026
4 checks passed
@captcrock
captcrock deleted the td/5301-phone-never-rules branch November 24, 2026 16:19
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