Repository navigation
health: surface auth-readiness config (fixes #2) - #3
Merged
Merged
Conversation
Issue #2's diagnosis (TURNO_DATA_DIR/tenants.json bind mount) describes pre-stateless-refactor architecture that no longer exists on main — the current design has no tenant store to lose. The real single point of failure today is TURNO_ENCRYPTION_KEY, and index.ts already fails fast at boot if it's missing/short. But /health gave no visibility into that config, so the "healthy-looking but structurally can't authenticate anyone" failure mode this issue warns about was still possible. /health now reports transport, enrollEnabled, and encryptionKeyConfigured, and flips status to "degraded" if the key isn't usable.
This was referenced Aug 20, 2026
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.
Summary
Issue #2's diagnosis and proposed fix (bind-mount
TURNO_DATA_DIR, migrate/deletetenants.json) describe an architecture that predates the stateless-JWT-bearer refactor already onmain. There is noTURNO_DATA_DIR,TURNO_TENANTS_FILE, or tenant store anywhere in the current codebase — verified with a repo-wide grep, the only hits are historical notes inBUILDOUT.md/CLAUDE.mddescribing the migration away from that model. Adocker-compose.ymlvolume mount for that path would be a no-op today; nothing reads or writes it.What's likely actually going on in production: the VPS container was still running a pre-refactor build (the
.legacy-tenant-store/snapshot dated 2026-04-21 lines up with that), so redeploying currentmainshould already resolve the enrollment/401 symptom — self-contained bearers mean there's no tenant file to lose.That said, the underlying concern in the issue — a server that looks healthy on every external probe while being structurally unable to authenticate anyone — maps onto a real gap in the current design. The one persistent secret today is
TURNO_ENCRYPTION_KEY;src/index.tsalready refuses to boot in http mode without one, but/healthgave no visibility into that config after boot.Changes
GET /healthnow reportstransport,enrollEnabled, andencryptionKeyConfigured, and flipsstatusto"degraded"if the encryption key isn't usable.Out of scope (not code changes)
docker-compose.yml/Dockerfilechanges — the tenant-store volume mount this issue proposed doesn't apply to currentmain's stateless design..legacy-tenant-store/cleanup on the VPS is an ops task (already tracked as aBUILDOUT.mdfollow-up), not something a code PR can touch.Test plan
npm run typechecknpm test(22/22 passing, including new/healthassertions)npm run buildCloses #2.