Skip to content

fix: let Forget access remove Tailscale grants when the peer is offline - #31

Merged
eliophan merged 1 commit into
eliophan:mainfrom
techbrewboss:fix/forget-tailscale-route-offline
Nov 15, 2026
Merged

eliophan merged 1 commit into
eliophan:mainfrom
techbrewboss:fix/forget-tailscale-route-offline

Conversation

@techbrewboss

Copy link
Copy Markdown
Collaborator

Purpose

Fixes #30.

If you paired over Tailscale and that machine later left your tailnet, or Tailscale was stopped, you couldn't remove it. Forget access and Remove both failed with an error that blamed the system credential store, and the saved grant stayed in the keychain. docs/COMPATIBILITY.md says Forget access works offline, so this broke a documented promise.

Changes

  • Forgetting a grant now finds it from the route's address alone. The address must be HTTPS, or HTTP on a loopback or tailnet-range IP; checking it no longer calls the Tailscale daemon.
  • Connecting and pairing still require a verified, live tailnet peer.
  • The scope string matches the one saved at pairing, so existing grants are found. No migration is needed.
  • Added a CHANGELOG entry under Unreleased.

Validation

  • Regression test: forgetting_a_tailnet_route_does_not_require_a_reachable_peer covers IPv4 and IPv6 tailnet routes with no reachable peer. It failed with InvalidRoute before the fix and passes after.
  • Negative case: the rejection test now also checks that a plain LAN HTTP route (192.168.1.20) is still refused.
  • Full check: bash scripts/check.sh passes on macOS arm64 with Rust 1.99.1: 49 frontend tests, the contract check, the frontend build, all seven Rust crates and 34 Tauri host tests.
  • Not run: Linux checks were not run locally, and no packaged native acceptance was done. This change only touches domain logic.

Proved with a failing-then-passing regression test and the full check script. Reviewed with sol-loop: 1 round with GPT-6.1 Sol. Sol verdict: approved.

UI captures

Not applicable.

Contribution checks

  • No personal database, pairing key, token, credential, or unredacted private data is included.
  • User-visible changes and compatibility limits are documented where applicable.
  • New dependencies, copied code, and artwork have compatible licenses and required attribution.

Created with Claude Opus 5.5 in Claude Code (T3 Code). Candidate found independently by Claude Fable 5.2.

🤖 Generated with Claude Code

Forgetting a direct grant derived its credential scope through
validated_base, which asks the running Tailscale daemon whether the peer
is on the tailnet right now. Once the peer left the tailnet or Tailscale
stopped, Forget access and Remove connection failed with a credential
store error and left the grant in the keychain.

Derive the scope from the route's syntax alone: an HTTPS origin, or HTTP
on loopback or a tailnet-range address. Connecting and pairing still
require a verified peer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliophan

Copy link
Copy Markdown
Owner

Reviewed: CI macOS/Linux pass; no blocking issue found in the changed Tailscale grant-removal path. The regression coverage matches the fix.

Review model: OpenAI gpt-6.1-sol.

@eliophan
eliophan merged commit 4a17672 into eliophan:main Nov 15, 2026
2 checks passed
@techbrewboss
techbrewboss deleted the fix/forget-tailscale-route-offline branch November 16, 2026 10:10
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.

[Bug]: Forget access fails for Tailscale routes when the peer is offline

2 participants