Skip to content

iili: Caddy answers short links at i.iili.uk/r/{slug} - #1432

Merged
aaylward merged 2 commits into
mainfrom
redirilli
Aug 21, 2026
Merged

iili: Caddy answers short links at i.iili.uk/r/{slug}#1432
aaylward merged 2 commits into
mainfrom
redirilli

Conversation

@aaylward

@aaylward aaylward commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Short links mint as i.iili.uk/r/{slug} now: Caddy on the consolidated box rewrites those onto r3dr_v2, and the Cloudflare Worker at iili.uk is SPA-only. Pulled the old r3dr.net / www.r3dr.net Caddy sites (Go service still in compose until chunk 3).

Deploy config tests pin the new host and the gone ones; iili_web unit tests cover the mint base. After deploy, curl a known slug on i.iili.uk and mint once from the SPA to confirm.

SPA stays on Cloudflare at iili.uk; redirects terminate on the
consolidated host (rewrite → r3dr_v2). Drop the r3dr.net Caddy sites;
mint base and Worker become SPA-only.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
1d4-web 07088b8 Commit Preview URL

Branch Preview URL
Aug 21 2026, 11:30 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
iili 07088b8 Commit Preview URL

Branch Preview URL
Aug 21 2026, 11:30 PM

@aaylward aaylward left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single-pass code review at xhigh effort (the Agent tool was unavailable in this context, so this is one reviewer working all angles in sequence — not the usual multi-agent fan-out with an independent verify pass). 6 findings, ranked most-severe first in the inline comments.

Headline: the method GET HEAD matcher forwards HEAD to r3dr_v2, but the smithy-cpp router (verified at the pinned 46bcd4d) does exact method-bucket dispatch and the model registers only GET — so HEAD i.iili.uk/r/{slug} answers 405 Allow: GET, not the 302 the PR's comments, READMEs, and the deleted worker test all promise. Verified against the router source; a Send("HEAD", ...) wire_test would pin it.

Also verified clean: the bare respond 404 after handle is correct under Caddy's directive order; rewrite * /r3dr/v2{path} preserves the query string; trailing-slash tolerance is re-established by the router's NormalizedTarget (so that deleted worker test's invariant survives); the {path} braces don't break the Go tests' depth counting; compose wiring (service name, TRUSTED_PROXY_CIDRS, db init) checks out; localStorage recent links self-heal to the new base.


Generated by Claude Code

Comment thread deploy/consolidated/Caddyfile
Comment thread domains/r3dr/apps/iili_web/worker/index.js
Comment thread deploy/consolidated/deploy_config_test.go Outdated
Comment thread deploy/consolidated/deploy_config_test.go Outdated
Comment thread deploy/consolidated/README.md
Comment thread domains/r3dr/apps/iili_web/README.md Outdated
Pin reverse_proxy to r3dr_v2:8091; substring-guard against r3dr.net
returning on any address line; drop the orphaned www mount and caddy's
depends_on r3dr. Docs say r3dr.net links died with the Caddy sites;
HEAD end-to-end 302 tracked in #1433; no iili.uk/r mint window existed.
@aaylward

Copy link
Copy Markdown
Collaborator Author

Folded review follow-ups in 07088b8:

Copy link
Copy Markdown
Collaborator Author

Rechecked 07088b8 against the review — all six findings verified addressed. Checked out the head, re-read the diff, and ran the deploy config suite (go test ./deploy/consolidated → ok; gofmt clean).

  • add scala 3 build support #1 HEAD → 405: deferred honestly. r3dr_v2: HEAD /r3dr/v2/r/{slug} returns 405, not 302 #1433 exists and states the mechanism correctly (exact method-bucket dispatch at smithy-cpp pin 46bcd4d, no HEAD fallback); the Caddyfile comment, test comment, and both READMEs now say 405-today instead of claiming HEAD works.
  • improve scala support #2 mint window: closed as attested — "no iili.uk/r/{slug} links minted" is stated in the Worker header and README, which is the note the review asked for. (Author-knowledge claim; not independently verifiable from the repo.)
  • try bazel_deps #3 substring guard: verified. strings.Contains over directiveLines, which strips full-line and inline comments before matching, so the guard can't false-positive on comments; no remaining line in the Caddyfile contains r3dr.net. The www/r3dr.net double-report on a hit is cosmetic.
  • fix readme grammar #4 port pin: verified. Test requires reverse_proxy r3dr_v2:8091 verbatim and the i.iili.uk block has it (Caddyfile line 184); suite passes.
  • srsly? 🤦 #5 compose orphans: verified removed (/var/www/r3dr mount, depends_on: r3dr), and the README inventory now lists the internal-only r3dr service. One crumb of the same class remains: deploy.sh:355 still scps r3dr_web assets to ~/r3dr-assets and deploy.sh:379-380 copies them into /var/www/r3dr, which nothing mounts or serves anymore. Harmless dead work each deploy; fine to leave for chunk 3 with the files themselves, just flagging so chunk 3's sweep includes it.
  • IntelliJ? 🍕 #6 docs: verified. Both READMEs now say the r3dr.net frontage and its links died with this change and only the service body waits for chunk 3.

CI on 07088b8: everything completed is green (test-deploy, test-iili-web, format-check included); sanitizers and build-and-test still running at time of writing.


Generated by Claude Code

@aaylward
aaylward merged commit 5a526d9 into main Aug 21, 2026
20 checks passed
@aaylward
aaylward deleted the redirilli branch August 21, 2026 23:41
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