Skip to content

sync: tailnet preview mode + autodeploy race fix (fe79c09) - #23

Closed
im-tyler wants to merge 2 commits into
mainfrom
sync/orch-preview-v2-de73a22
Closed

im-tyler wants to merge 2 commits into
mainfrom
sync/orch-preview-v2-de73a22

Conversation

@im-tyler

Copy link
Copy Markdown
Contributor

Mirror sync from Forgejo main at de73a22: tailnet preview mode (--base-domain, --http-only, --allow-ip), contracts corpus rev 6. Tree identical to Forgejo main. Replaces #22 (its head branch was swept).

🤖 Generated with Claude Code

im-tyler and others added 2 commits September 23, 2026 21:10
…llow-ip (corpus rev 6)

Implements the teploy-cli half of Tyler's 2026-09-24 preview ruling
(DELEGATED_DECISIONS_2026-09-23 section 10): previews served on plain HTTP
under <target-tailnet-ip>.sslip.io, gated to tailnet addresses.

- preview deploy flags: --base-domain <domain> (hostname base instead of
  the app domain; hyphen or dot sslip form), --http-only (explicit http://
  site address, no tls directive - Caddy never attempts ACME), --allow-ip
  <ip|cidr> (repeatable/comma; maps to caddy.Firewall.AllowIPs). Validated
  before connecting and again in Manager.Deploy before any mutation.
- caddy.TLS gains HTTPOnly (wins over Cert/Key/Internal).
- Mode persisted in the preview record as base_domain / http_only /
  allow_ips (all omitempty). Updates inherit each field unless the deploy
  overrides it (--http-only=false, --allow-ip "" clears), so a blue/green
  swap never re-enables HTTPS or drops the allowlist. Records without the
  fields behave exactly as before (app-domain host, automatic HTTPS, no
  gate). C06 identity (PreviewID/previewIDHex, route key, state path) and
  the blue/green machinery are unchanged.
- preview list --json rows gain url (http:// iff http_only, else https://);
  domain kept; empty list still []. Text list and deploy output print the
  real scheme.
- preview-exposure capability token (additive).
- contracts rev 6 (additive): preview-state schema gains optional
  record/list-row fields on both eras with the url-scheme invariant; two
  list-row fixtures generated from the real encoder; version-handshake
  fixture regenerated for the new token. No MI bump.

Tests: route written HTTP-only + gated, update inherits mode, field-by-
field overrides, default/legacy records unchanged, State round-trip incl.
pre-field and slug-era records, invalid input refused before mutation,
flag parsing through the real cobra command, list JSON url scheme, caddy
HTTPOnly rendering. Real Caddy (caddy:2-alpine via podman) accepted the
rendered blocks: adapt OK with no tls app, :80 only; non-allowed source
403, allowed source proxied.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@im-tyler im-tyler closed this Sep 24, 2026
@im-tyler
im-tyler deleted the sync/orch-preview-v2-de73a22 branch September 24, 2026 13:45
@im-tyler im-tyler changed the title sync: tailnet preview mode (de73a22) sync: tailnet preview mode + autodeploy race fix (fe79c09) Sep 24, 2026
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