Point the CLI's default relay at the API origin - #34
Merged
Conversation
`drop send` failed against the hosted instance with "the relay rejected the request with status 404". The relay was healthy; the CLI was asking the wrong host. The hosted instance is a split deployment. `drop.lifbom.com` is a static host serving the browser client and `install.sh`; the relay answers elsewhere. The browser client works because its API origin is baked in at build time through `VITE_BACKEND_ORIGIN`, but the CLI carries its own compiled default, and that default named the static host. `POST /api/session/create` therefore reached a static file server, which answered 404. This points `DEFAULT_SERVER` at `api.drop.lifbom.com` and records the split in the README and in a decision entry, because a CLI default that differs from the address a person types into a browser reads as a mistake unless it is written down. The API host is named rather than provider-generated on purpose: `DEFAULT_SERVER` is compiled in, so an installed binary cannot be redirected without `--server`, `DROP_SERVER`, or a new release. A stable name means moving the relay is a DNS change instead of a re-release. This must not ship before `api.drop.lifbom.com` resolves to the relay. No binaries have been published yet, so there are no installed clients to break. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
drop sendfailing against the hosted instance with:Cause
The relay was healthy the whole time — the CLI was asking the wrong host.
The hosted instance is a split deployment:
drop.lifbom.cominstall.sh, as static filesThe browser client works because its API origin is baked into the bundle at build time via
VITE_BACKEND_ORIGIN. The CLI carries its own compiled default, and that default named the static host — soPOST /api/session/createreached a static file server and got its 404.Verified: the relay answers 200 on
/health,/ready, and/metrics, and a transfer with--serverpointed at the API origin completed byte-identical, both processes exiting 0.Change
DEFAULT_SERVERnow points atapi.drop.lifbom.com, with the split recorded in the README and in a new decision entry — a CLI default that differs from the address a person types into a browser reads as a mistake unless it is written down.The API host is a name we control rather than a provider-generated hostname on purpose.
DEFAULT_SERVERis compiled in, so an installed binary cannot be redirected without--server,DROP_SERVER, or a new release. A stable name makes moving the relay a DNS change instead of a re-release.This is only correct once
api.drop.lifbom.comresolves to the relay. Until then the default points at a name that does not resolve, which is a worse failure than the current 404.No binaries have been published yet — the release is still blocked by #33 — so there are no installed clients to break, and this is the cheapest moment to change a compiled-in default.
Sequencing: DNS → this PR → #33 → dispatch the release.
Not changed
drop.lifbom.comremains correct for the website link and theinstall.shURL, and those references are untouched. Thenormalize_origintests keep using it as a generic bare-host example, since they test the https-assumption rule rather than the default.Verification
scripts/check-secrets.sh,cargo fmt --check,cargo clippy --workspace --all-targets --all-features -D warnings, andcargo test --workspace --all-targets(56 passed) all pass.🤖 Generated with Claude Code