fix(hub): JWKS warm should not block port binding#61
Merged
Conversation
The Titanium JWKS warm at boot called process.exit(1) on any failure,
which has been taking down every Coolify deploy of remo-code-hub since
the upstream Keygen JWKS endpoint at
`/v1/accounts/{ACCOUNT_ID}/.well-known/jwks.json` returns 404.
Architecturally, a stalled Titanium JWKS endpoint should never block the
hub from binding its port — the hub serves health checks, public
webhooks (Coolify, Sentry intake), the web SPA, the scheduler, and the
agent WebSocket, none of which require Titanium JWT verification. Only
license-gated routes do, and those fail closed at request time via
`verifyLicenseJwt` which already lazy-warms on first use through
jose's `createRemoteJWKSet` resolver.
Change: log the warm failure loudly and continue binding the port.
Misconfiguration remains visible in deploy logs; production stays up.
Unblocks PR #60 (started_at scheduler fix) from going live before the
midnight cron fires.
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
Why this is urgent
Blocks PR #60 (started_at scheduler fix) from reaching production before the midnight 4h cron fires.
Verification
Probed `https://keygen.titaniumlabs.us\` directly:
Keygen self-hosted does not expose a JWKS endpoint at any standard path. A follow-up should investigate the correct license-key distribution mechanism (likely RSA/ED25519 public key via account metadata), but production cannot wait.
Test plan
🤖 Generated with Claude Code