Edge Caddy now does exactly three things:
1. Terminate TLS for researchstack.info + *.researchstack.info via
Porkbun DNS-01 (wildcard cert covers all subdomains in one renewal)
2. 301-redirect legacy subdomains to canonical path equivalents:
status.* → /server/status/
dash.*, home.* → /
media.* → /apps/jellyfin/
books.* → /apps/books/
music.* → /apps/music/
vault.* → /server/vault/
pulse.* → /api/registry/
apps.* → /apps/
*.* (wildcard fallback) → /
3. Forward all other traffic to the internal router (host Caddy :80 on
k3s-server over Tailscale) with X-Forwarded-* headers preserved.
auth.* and mail/webmail.* are forwarded unchanged (stable subdomains).
No path routing logic on the edge. Traefik Ingress (k3s-server) owns
all path decisions. This commit has no effect until nixos-rebuild switch
is run on microvm-racknerd (deploy after k3s-server is verified).
Generated with Devin (https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port conflict resolution:
- Add HelmChartConfig to pin Traefik web entrypoint to NodePort 30080
(not host :80) so k3s Traefik and host Caddy do not race for the port
- Add host Caddy on :80 as a minimal pass-through to Traefik :30080;
carries X-Forwarded-* headers so Traefik sees the real client IP and
the correct Host. No TLS, no Porkbun, no subdomain logic — all of
that stays on the edge Caddy (k3s-edge.nix)
- Caddy after= k3s.service so Traefik NodePort is ready before proxying
Authentik port fix:
- Change authentik server + worker services from NodePort 30080 to
ClusterIP; Traefik reaches Authentik via the rs-auth Ingress and
cluster DNS, no NodePort required
New manifests (internal, no public-traffic impact):
- manifests/ingress/: Traefik Ingress resources + Middleware CRDs
(/apps/*, /server/* → forward_auth + strip-prefix; /api/* → strip only;
/ → Homer + forward_auth; auth.* → Authentik, no middleware)
- manifests/hermes/: placeholder chat/orchestrator service
- manifests/credential-server/: token-auth credential vault stub
- manifests/control-plane/: registry-api, jobs-api, blobs-api health stubs
- manifests/homer/configmap.yaml: updated dashboard links to canonical paths
Deploy order: rebuild k3s-server first, verify Traefik + Ingress
internally, then deploy k3s-edge (commit 3 / next step).
Generated with Devin (https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Tests the full traffic path against live researchstack.info infrastructure:
Edge Caddy (TLS) → Tailscale → Traefik Ingress → k3s services
Coverage:
- edge-tls-redirects: HTTPS reachability, cert validity, legacy subdomain
301s (status/dash/home/media/books/music/vault/pulse/apps), stable
subdomains (auth, mail), wildcard fallback
- path-routing: /apps/*, /server/*, /api/* routes; prefix stripping; SSO
redirect vs token-auth isolation
- auth-integration: Authentik login page, OIDC discovery, forward_auth
gating on protected paths, /api/* bypass
19/40 tests pass against current live infrastructure (pre-deploy). The 21
failures are "not yet deployed" signals, not design errors. Run after each
phase of the deployment plan to use as a regression gate.
Run: cd 4-Infrastructure/k3s-flake/tests && npm test
Generated with Devin (https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
All buckets sealed at 100%:
arithmetic_gap: 14 rec=100% (omega, simpa_nat, arith8_calc)
contradiction_bridge: 6 rec=100% (notnot_by_cases, notnot_intro,
notnot_apply_chain, neg_apply_chain)
missing_assumption_bridge: 5 rec=100% (chain_exact, forall_exact_0,
exact_hyp_match)
missing_destructuring: 5 rec=100% (dot_left/right, apply_dot_left/right)
case_split_missing: 1 rec=100%
constructor_missing: 1 rec=100%
Key fixes that closed the last gaps:
- parse_theorem regex: [^:=] → [^:] so goal with '=' is captured
- Classifier: arithmetic gap (goal has +-*/) checked before rewrite
- notnot_apply_chain: ¬¬Q from P, P→Q → intro h; apply h; apply hPQ; exact hP
- neg_apply_chain: ¬P from h:P→Q, hnQ:¬Q → intro hp; apply hnQ; apply h; exact hp
- forall_exact_0: ∀ n, P n ⊢ P 0 via exact h 0
- exact_hyp_match: A→B ⊢ A→B via exact h (hyp type matches goal)
- Added ∀ hyps to _imp_objs so chain builder considers them
- Removed leading whitespace from all multi-line patch strings
Ablation: v1.2=36% → v1.3a=36% → v1.3b=54% → v1.4a=100%
Key results (Tier 2 vs Tier 1 vs baseline):
- Proof status: 83.3% vs N/A vs 50.0% — ★ strong signal
- Domain: 62.5% vs 30.9% vs 33.3% — ★ BEATS both
- Manual RRCShape: 66.7% vs 38.1% vs 29.2% — ★ BEATS both
- Obstruction: 75.0% vs N/A vs 79.2% — ↑ near-baseline
- Proof method: 20.8% vs 9.5% vs 20.8% — ↑ BEATS T1, ties baseline
- Joint: 0.0% vs N/A vs 4.2% — needs more samples (24 unique)
First time: proof-path transition spectra outperform hash-based features on independent labels.
- 24 transition matrices decomposed via power iteration
- Verified proofs: rank=4.00 vs Failed: rank=1.25
- Verified density 0.170 vs Failed 0.105
- 7 unique spectral gaps, 7 unique Laplacian zero counts
- Features from proof-state transitions, not receipt hashes
- pist_prove_and_classify.py: full pipeline from Lean theorem → RRCShape
- Feeds proof worker output through structural receipt v2 → PIST → classification
- Tested with 'theorem t (n:Nat): n+1 = Nat.succ n := by rfl' on 361395-1 worker
- Receipt v2 format with parsed operators, variables, AST metrics, proof metrics