iili: rename the shortener from r3dr, and answer HEAD (#1359, #1433) - #1435
Conversation
The domain, the API, the compose service, the image, the OTEL service
name and the public paths all read iili now: /iili/v1/shorten and
/iili/v1/r/{slug} replace /r3dr/v2/*, with no alias, so both frontends
move with the host. The Postgres role and database keep the r3dr_v2
names the live rows were provisioned under — renaming those is an
operation, not a rename — and R3DR_V2_DB_PASSWORD stays a host secret.
HEAD on a redirect returned 405: the router buckets by exact method and
only GET was registered, so unfurlers never saw the Location. A shim
answers HEAD from the GET routes and drops the body, which a keep-alive
connection cannot carry on a HEAD response. Wire tests pin the 302 and
the 404; without the shim the first fails with 405.
The deploy guard collapses to one rule now that the only legitimate
r3dr in the deploy surface is the database identifier — which also
retires the token list whose r3dr_v2 exemption matched nothing.
golang-lru and lib/pq leave go.mod and the gazelle use_repo list; the
Go service that imported them is gone.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ST7XLGWstRE4CfUF84ijKD
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
1d4-web | 8bbf03a | Commit Preview URL Branch Preview URL |
Aug 22 2026, 06:10 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
iili | 8bbf03a | Aug 22 2026, 11:52 PM |
|
Blocker, and it needs a dashboard change — I can't fix this one from the repo.
The cause is the directory move. That Cloudflare project's Root directory is The fix is one field on the
This moves ahead of the merge in the order. The production build fails the same way a PR build does, so merging first would leave Generated by Claude Code |
Keeps the branch current with #1436; no overlap with the rename.
|
Two retries of Ruling the repo out as a cause: I ran the dashboard's exact commands from the new location, So the build stays red until the Generated by Claude Code |
The shortener is called iili everywhere now:
domains/iili/apis/iili, theiilicompose service andghcr.io/muchq/iiliimage, theiiliOTEL service name, themoonbase.iilismithy namespace, and the public paths/iili/v1/shortenand/iili/v1/r/{slug}.Folds in the two things left parked: #1433, and the
go.modprune deferred from #1434.The wire moves with no alias
/r3dr/v2/*stops answering the moment the host takes this. Both frontends have to move with it, which makes the order load-bearing:iiliWorkers project's Root directory to/domains/iili/apps/iili_web. The app moved and that setting lives in the Cloudflare dashboard, not this repo, so its build fails until it is changed — see the comment below. This has to come first, oriili.ukkeeps serving the pre-rename bundle.iili_web, which now calls/iili/v1— minting on iili.uk is down until step 2. Redirects keep working (the old Caddy still rewrites onto the old path, and the old container still serves it).deploy.shon the host, promptly. API and Caddy flip together, so iili.uk recovers andi.iili.uk/r/{slug}never has a gap. muchq.com/iili is now down.deploy.shverifies images exist before touching the host, so step 2 has to wait forpublish.ymlto buildghcr.io/muchq/iilion main. A rollback to any commit before this one will be rejected for that service, as it is for any service younger than the target.The database keeps the old name
The Postgres role and database stay
r3dr_v2, andR3DR_V2_DB_PASSWORDstays the~/.envsecret — renaming a role and database holding the live rows is an operation with a cutover, not a rename of this repo.iili_db_initprovisions them under the old names, the container-facing URL var becomesIILI_DB_URL, and the mismatch is stated incompose.yaml, the deploy README and the service README rather than left to be discovered.HEAD (#1433)
HEAD /r3dr/v2/r/{slug}returned 405: smithy-cpp's router buckets by exact method (routes_.find(request.method)) and only GET was registered, so unfurlers and link checkers leading with HEAD never saw theLocation.WithHeadAsGetanswers HEAD from the GET routes and clears the body — content on a HEAD response desynchronizes a keep-alive connection.main.ccand both test harnesses share the one composition, so the wire test exercises what production runs.Two wire tests pin it. Mutation-checked by removing the shim from the harness:
HeadGetsTheSameRedirectAsGetWithNoBodyfails withWhich is: 405— the exact defect the issue describes.One guard instead of two
TestNoDeployConfigNamesR3drreplaces bothTestR3drNetCaddySitesAreGoneandTestNoDeployConfigNamesTheGoR3drStack: after the rename the only legitimater3drin the deploy surface is the database identifier, so the rule is "no r3dr except that", which subsumes the old host check and the Go-stack token list.Worth flagging on the test it replaces: that token list carried an
r3dr_v2→V2rewrite I described in #1434 as keeping the replacement service from tripping the tokens. It never did — no line in any scanned file would have tripped one without it. The exemption is load-bearing in the new rule, where it protects the database identifier, and that is checked rather than asserted.Also
hashicorp/golang-lru/v2andlib/pqleavego.mod,go.sumand the gazelleuse_repolist — the Go service that imported them retired in r3dr: retire the Go service and its serving stack (#1359 chunk 3) #1434, and nothing else in the repo does..gitignoredropsgo/r3dr/deploy/deploy.sh, a path from a layout that no longer exists.Verified
bazel test //domains/iili/... //deploy/... //domains/platform/apis/prom_proxy/... //bazel/rules:rules_test— 23 targets green.iili_web: 39 tests, typecheck clean.scripts/format-allclean. The build caught one real break the greps could not:smithy_handler.hincluded asmithy/http/http.hthat does not exist (RequestHandlerlives insmithy/http/transport.h).After deploy
Metrics continuity breaks by design: the OTEL service name changes, so history stays under
service_name="r3dr_v2"while the dashboard tiles now queryiili. The panels will look empty until new data accumulates; the old series are still in Prometheus under the old name.Also worth clearing once the deploy lands: a stale
R3DR_V2_SHA=line in the host's~/.env, if a targeted deploy ever wrote one. The pin-clearing loop only iterates variables the currentcompose.yamlreads, and it now readsIILI_SHA.🤖 Generated with Claude Code
https://claude.ai/code/session_01ST7XLGWstRE4CfUF84ijKD