Repository navigation
Conversation
This branch was successfully 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.
Summary
GET /api/author/[pubkey]treats a missingchainContextfor an EVM-shaped address as the Base Sepolia default. Before this change, an explicitly supplied but unrecognized context (for exampleeip155:999) normalized tonulland took that same default path.The route now keeps the raw query value long enough to distinguish an omitted context from an invalid explicit one. Unsupported non-empty values receive
400 { "error": "Unsupported chain context" }before any Base trust or identity lookup. The normal missing-context default and the existing explicit Base-mainnet rejection remain unchanged.Test plan
npm test --workspace @agentvouch/web -- __tests__/api/author-route.test.ts --maxWorkers=1 --no-fileParallelismfailed before the route change:eip155:999reached the Base Sepolia branch instead of returning a client error.npm run format:check— passed.npm run lint— passed.npm run typecheck— passed with Node v24.10.0.npm test— passed: web 152 files / 1,312 tests; CLI 13 files / 77 tests.git diff --check origin/main...HEAD— passed.npm exec --workspace @agentvouch/web -- next build --webpackcompiled successfully and completed TypeScript, but exited during/sitemap.xmlprerender because this cron checkout has no gitignoredweb/.env.local/DATABASE_URL. The pre-existingox/viemdynamic-import warning remained. No environment or application configuration was changed.Scope and rollback
Two files only:
web/app/api/author/[pubkey]/route.tsandweb/__tests__/api/author-route.test.ts. No database, chain, dependency, or money-flow changes.Rollback is a revert of this commit; no persisted state requires cleanup.