Skip to content

feat(planning): stable guest link for shared interview sessions #8607

Closed

Description

@kyle-sexton

Problem

The shared interview page runs behind a Cloudflare quick tunnel. The quick-tunnel hostname changes whenever cloudflared restarts (a reboot, a tunnel restart), so every guest needs a new link, and a guest who opens the new link on a fresh browser rejoins as a new person.

What the owner asked for

A guest link that survives a restart, so guests do not need a new link after a reboot and keep their identity.

Current behavior

plugins/planning/shared/tunnel.py (behind share.sh) starts a quick tunnel; on start the owner view shows "New guest link, share again". A stable-link transport was recorded as a later alternative when the quick tunnel was chosen.

Options to weigh

  • A named Cloudflare tunnel (needs an account and a hostname), replacing only tunnel.py.
  • Identity carry-over across a link change, so a returning guest is recognized even when the hostname changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9

Activity

  1. added
    needs-triage
    on Oct 20, 2026
  2. github-actions commented on Oct 20, 2026

    @github-actions
    Contributor

    Thanks for the report. Automated triage handed this issue to a maintainer.

    Automated triage. A maintainer reviews it.

  3. added
    needs-human
    on Oct 20, 2026
  4. removed
    needs-triage
    on Oct 20, 2026
  5. kyle-sexton commented on Oct 21, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded.

    Question (asked 2026-10-20 19:42Z):

    2 of 5: #8607, a guest link that survives a restart

    The problem: the free Cloudflare tunnel gets a new random address every time it restarts, for example after a reboot.

    • Every guest then needs a new link.
    • A guest who opens the new link in a fresh browser comes back as a new person, and their old answers stay under their old identity.

    There are two separate fixes:

    a. Keep people's identity across a link change. When a guest opens the new link in the same browser, the page recognizes them and they keep their name and answers.

    b. A link that never changes. This uses a named Cloudflare tunnel with a hostname you own, such as interview.yourdomain.com. The tunnel code is already contained in one file, so it's a swap of the transport, not a rewrite.

    • Cost to you, once: a Cloudflare account with a domain on it, and a one-time login on each machine that hosts the page, including your work laptop.
    • I haven't checked whether melodic-software already has a domain on Cloudflare that fits. The org architecture repo would say, and I'd read it before building this.

    Recommendation:

    • Build (a) now.
    • Build (b) as an opt-in setting. The free tunnel stays the default, and the named tunnel turns on only when a hostname is configured.

    Basis: judgment, from the issue.

    One question for (b): do you want it to run on a domain you already have on Cloudflare, or leave it as an opt-in setting with no domain set up yet?

    Owner's answer (2026-10-20 19:54Z):

    Well, I have a Cloudflare account, and I have a domain I could use, but that needs to be configurable in the plugin, right? That sounds like a user config, probably, or our config cascade. Obviously, I could use it for my own stuff, like Melodic Software. I can have you use Playwright, open the Cloudflare UI, and set up all the stuff for me. I can just log you in, and you can drive it. You can set up the user config. That would be something that would have to go through dotfiles again, but that's the cleanest way.

    On my work machine, it would probably just be the random unauthenticated one, not a specific domain or account. For us from Melodic Software, let's also discuss the domain: what makes sense, is semantically accurate, and is not going to collide.

    Question (asked 2026-10-20 19:58Z):

    I agree with the note. I'd go one step further and use a narrow API token instead of a browser login.

    Recommended approach: a scoped API token, with no dashboard session for me at all.

    1. You create one API token in the dashboard. It can edit DNS for melodicsoftware.com only, plus Cloudflare Tunnel on the account, and has no other permissions. I'll give you the exact permission names after I check them against Cloudflare's token docs; I haven't read those docs yet this session.
    2. You store it in Key Vault, and I read it only through vault-exec, as with your other secrets.
    3. Read-only first: I list every existing record in the zone and show you:
      • the one record I plan to add (planning-interview → the tunnel, proxied)
      • proof that no existing name clashes, including [redacted]
    4. I write only after you say yes to that exact list. Deleting the record removes it again.

    Why this beats Playwright: the token can't touch email settings, the auth providers' configuration, other zones, or billing. A wrong edit is limited to DNS records in one zone, and step 3 guards those. Basis: judgment. [redacted]

    Still open from before: do you want planning-interview.melodicsoftware.com as the name? The choice of token over browser login also needs your yes. Then we'll move on to #8608, signing in as owner on another device.

    Owner's answer (2026-10-20 20:01Z):

    That makes sense. Works for me.

    Question (asked 2026-10-21 02:57Z):

    ❓ Q1: Should the fixed guest link use planning-interview.melodicsoftware.com?
    Your "works for me" may have answered only the scoped-token approach, not the name.

    ➡️ My recommendation: yes, planning-interview. It names the purpose (planning) and the format (interview), avoids reading as a job interview, and nothing else at Melodic Software would want it. It's one level under the domain, which Cloudflare's free certificate covers; Cloudflare's docs say deeper names "are not covered".
    Basis: the certificate limit is verified from that page; the name is judgment.

    Alternatives to consider:

    • (a) interview: shortest, but reads as a job interview and could clash with a future careers page.
    • (b) shared-interview: matches the code's feature name, but keeps the job-interview reading.

    Owner's answer (2026-10-21 03:34Z):

    Go with recommendations.

    This answer covered all five questions in that interview round: Q1 (this hostname), Q2 and Q3 (#8608 paired devices), and two Ask/Reply/Move questions.

    Decision: Build both parts. (a) A guest in the same browser keeps their name and answers across a link change. (b) An opt-in named tunnel is set by the plugin userConfig tunnel_hostname: empty, the default, keeps the quick tunnel, and only a host that sets it uses the named tunnel. The hostname is planning-interview.melodicsoftware.com. Setup uses a scoped Cloudflare API token held in Key Vault, with no dashboard login. DNS is listed read-only first, and the one planned record is written only on the owner's yes to that exact list.

  6. added
    status: confirmed
    and removed
    needs-human
    on Oct 21, 2026
  7. added
    attended
    on Oct 29, 2026
  8. kyle-sexton commented on Oct 29, 2026

    @kyle-sexton
    MemberAuthor

    Done: shared interview sessions have one stable guest link, https://planning-interview.melodicsoftware.com, that any machine in the fleet can serve, one session at a time.

    Shipped

    Live check on main at fa04288733, 2026-10-29

    1. ensure-running with the hostname, run-token and API-token files on a free port: "tunnel": "named", no tunnelFallback; curl https://planning-interview.melodicsoftware.com/ returned HTTP 200. Stopped cleanly.
    2. A second session with --guest-port 8765: "tunnel": "named", route set back to 8765 for machines without the API token file. Stopped cleanly.

    Per machine, once: update the planning plugin to a release that includes #10948, then write ~/.config/planning/tunnel-token and ~/.config/planning/tunnel-api-token (mode 600) from Key Vault with vault-exec. A machine without the files gets a quick tunnel and says why.

  9. kyle-sexton commented on Oct 29, 2026

    @kyle-sexton
    MemberAuthor

    Follow-up: every lane in the fleet is set up; each serves the stable link once its planning plugin is at the first release that includes #10948 (until then it falls back to a quick tunnel and says why in tunnelFallback).

    Lane cloudflared Token files Planning
    desk WSL mise written, live-verified merged main ran the live check
    desk Windows winget written, ACL SYSTEM / Administrators / user 0.125.0
    laptop WSL mise written 0.125.0
    laptop Windows winget (dotfiles#1370) written, ACL SYSTEM / Administrators / user 0.125.0

    The run-token hash matches on all four lanes. cloudflared is declared for Windows lanes in dotfiles (melodic-software/dotfiles#1370, user-scope winget), as mise already declares it for Linux lanes.

    One-time setup on a new lane (after a dotfiles converge, which brings the settings, cloudflared and the vault-exec mapping from melodic-software/dotfiles#1367; the two secret names are in dotfiles' .chezmoidata/vault-secrets.yaml):

    • Linux/WSL: mkdir -p -m 700 ~/.config/planning, then with umask 077, vault-exec --env T=<run-token secret> -- sh -c 'printf %s "$T" > ~/.config/planning/tunnel-token' and the same with the tunnel-token secret into ~/.config/planning/tunnel-api-token. Over ssh into another WSL lane, add the Windows az directory to PATH first; an sshd session carries no /mnt/c entries.
    • Windows (pwsh 7, as the console user): New-Item -ItemType Directory -Force "$HOME\.config\planning", then vault-exec.ps1 --env T=<run-token secret> -- pwsh -NoProfile -Command '[IO.File]::WriteAllText("$HOME\.config\planning\tunnel-token", $env:T)' and the same into tunnel-api-token. A file under the profile inherits the ACL the plugin accepts.
    • Then claude plugin update planning@melodic-software and a restart.

    Repeat only after a token rotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    attendedstatus: confirmed

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions