Repository navigation
Log why sessions and OAuth authorizations fail, not just that they did (v1.9.8) - #30
Open
christophdb wants to merge 1 commit into
Open
christophdb wants to merge 1 commit into
christophdb wants to merge 1 commit into
Conversation
…d (v1.9.8) The production log after v1.9.7 raised three questions it could not answer. "seatable-mcp started" appeared before every session, because buildServer() runs once per HTTP session and logged it. It read like constant restarts and made up half the log. It is now logged once per process, by startHttpServer() (with mode, tool count, host, port) and by the stdio entry point. buildServer() logs "MCP server built" at debug. Most sessions were preceded by "Initialize request ended without a session" with status 400. Every POST without a session ID is treated as initialize; when it is something else, the SDK answers 400 and reports why only through transport.onerror, which was not set. The line now carries the SDK's reason and the JSON-RPC method(s) of the body. Methods that don't look like protocol names are logged as "invalid". "OAuth authorize rejected: unknown or expired client registration" came in bursts with no fields at all. It now logs ip, callback, a fingerprint of the client_id (the same one the refresh log uses) and a reason from the new TokenCipher.inspect(): missing, foreign (not our envelope), invalid (forged or sealed under another secret) or expired. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The production log after v1.9.7 raised three questions it could not answer. Logging only, no change in behaviour.
seatable-mcp startedonce per processbuildServer()runs once per HTTP session and logged the startup line each time, which read like constant restarts and made up half the log. It is now logged once bystartHttpServer()(withmode,tools,host,port; replacesStreamable HTTP server listening) and by the stdio entry point.buildServer()logsMCP server builtat debug.Reason for the 400 before most sessions
Every POST without a session ID is treated as initialize; when it is something else, the SDK answers 400 and reports why only through
transport.onerror, which was not set.Initialize request ended without a sessionnow carriesreason(the SDK's message) andmethod(the JSON-RPC method(s); anything that doesn't look like a method name is logged asinvalid).Attributable OAuth rejections
OAuth authorize rejected: unknown or expired client registrationcame in bursts with no fields. It now logsip,callback,clientId(the same fingerprint as the refresh log) andreasonfrom the newTokenCipher.inspect():missing,foreign,invalid(forged or sealed under another secret) orexpired.open()is unchanged and delegates to it.Tests
tests/connectionSlots.spec.ts: method and reason of a non-initialize POST without session IDtests/oauthObservability.spec.ts: reason, IP, callback and stable fingerprint on a stale client registrationtests/tokenCipher.spec.ts: each rejection reason ofinspect()npm test(575),npm run typecheckandnpm run lintpass.🤖 Generated with Claude Code