Repository navigation
Conversation
…Heliobond#838) npm ci had no package-lock.json to install from, and bun.lock was dockerignored. Install with bun --frozen-lockfile in the build and prod-deps stages, and keep the node:20-alpine runtime. The build script also never copied src/proto into dist, so the built server crashed on startup (ENOENT dist/proto/heliobond.proto). Verified: docker build succeeds, the container starts, /health -> 200.
…nd#837) ADMIN_API_KEY is not optional: requireAdminBearer fails closed with 500 server_misconfigured when it is unset. /api/portfolio and /v1/portfolio both mount apiKeyAuth, so their auth is the same.
…eliobond#836) The spec listed /portfolio with no address parameter, so the generated client's example hit a route that 404s. Document the address path param, cursor/limit query params, API-key security and 400/401 responses, regenerate openapi.json and the api-client types, and fix the README example.
Heliobond#835) Replace flat { error: "...", message } bodies across routes and middleware with the shared errorBody() helper, normalise the fallback handler code to internal_error, and update tests to assert the nested shape.
This branch has not been deployed
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.
Description
Issue: Closes #835 error shapes
Status: Every route and middleware now uses errorBody() → { error: { code,
message } }. The running container returns this shape for 401 and 404.
────────────────────────────────────────
Issue: Closes #836 /portfolio/{address}
Status: Spec now has the address path param, cursor/limit, API-key security and
400/401 responses. I regenerated openapi.json and the client types, and fixed
the README example. openapi:check passes.
────────────────────────────────────────
Issue: Closes #837 auth docs
Status: Fixed in README and API.md. I checked them against the code: admin
routes fail closed with 500 when ADMIN_API_KEY is unset, and both portfolio
mounts require a key.
────────────────────────────────────────
Issue: Closes #838 Docker
Status: Now builds from bun.lock. I also found the image still crashed on
startup because the build script never copied src/proto into dist, and fixed
that. The image builds, the container boots and /health returns 200.
Typecheck passes and lint has warnings only. The test suite shows 16 failures, and a clean checkout of the base commit fails the same 16, so this branch adds none. One of them is a separate existing mismatch (/admin/score-update vs the real route /admin/update-scores).