Repository navigation
docs(spec): reconnect_required docblock names every way the grant stops working - #28862
Conversation
…ps working The `ConnectorConnectionState.status` bullet said `reconnect_required` means the authorization server refused the grant. Three paths mark it: a refused refresh, a connection with no refresh token or no client to refresh with, and an MCP server refusing the borrowed token at tool discovery. The bullet now names all three and points at `statusReason`. Claude-Session: https://claude.ai/code/session_01ADHkmTNNzkgjLj7uqRpPnk Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 168 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1d844ba0125b74bd5e061f6c87291f5c9a36c23e && git checkout 1d844ba0125b74bd5e061f6c87291f5c9a36c23e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3b920f6dd09690d88107db420f2c54fd1f2b5363 12e4f3495ae6a547dc3be726178493b53c54cb97 && git checkout -B drift-repro 3b920f6dd09690d88107db420f2c54fd1f2b5363 && git merge --no-ff 12e4f3495ae6a547dc3be726178493b53c54cb97
node scripts/docs-audit/affected-docs.mjs --json 3b920f6dd09690d88107db420f2c54fd1f2b5363 |
|
domain:spec#1 · os-steve · session_01ADHkmPi25XXKx92Xmg4viS Head-sha: 维护者速读
席位意见:可落地,等契约复审。 席位核对 — ACCEPT ·
|
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: Taken on the lane's Generated by Claude Code |
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS Generated by Claude Code |
Requested by Steve · project thread
Fixes #28614
Clause-②: no
Metadata-protocol: none
维护者速读
packages/spec/src/contracts/automation-service.ts中ConnectorConnectionState.status注释里reconnect_required那一条,外加一条@objectstack/specpatch changeset;不改任何代码。statusReason。dist的.d.ts发布);回滚即 revert 本 PR。packages/spec/src/contracts/automation-service.ts的status文档块。git diff origin/main...HEAD -- packages/spec/src/contracts/automation-service.ts,预期只见注释行变动、无一行代码变化。What changes
Comments only, plus a
patchchangeset for@objectstack/spec. The JSDoc ships in the built declaration file (packages/spec/dist/contracts/index.d.tscarries the new text afterpnpm --filter @objectstack/spec build), so the published bytes change andskip-changesetdoes not apply.The
reconnect_requiredbullet said "the authorization server refused the grant". It now reads: the grant stopped working: the authorization server refused it on refresh, the connection keeps nothing to renew an expired access token with (no refresh token was issued, or no client to refresh with), or the upstream refused the connection's token while anmcpinstance discovered its tools.statusReasonsays which.The wording is measured from the callers of
ConnectorConnectionStore#markReconnectRequiredon origin/main7e60dc23(two call sites, four triggers):oauth2-grant/grant-handle.tsgrantRefused, reached fromrefreshOncethree ways: the stored refresh token resolves to nothing (reason:reconnectRequiredReasonplus "Its authorization server issued no refresh token, so an expired access token cannot be renewed");endpointOffinds no client (reason plus "Its connection keeps no client to refresh it with"); the token endpoint answersOAuth2GrantRefusedError(barereconnectRequiredReason).plugin.tsholdConnectorForRefusedConnection(the discovery path): anmcpinstance's server refused the borrowed token while it listed its tools (reason:discoveryTokenRefusedReason, naming the HTTP status).No forced test edits.
Tests
pnpm --filter @objectstack/spec typecheck && pnpm --filter @objectstack/spec testunder the verify lock at12e4f349: VERDICT command-exit 0; Test Files 788 passed (788); Tests 23295 passed, 1 todo.Acceptance notes
connector-connections.tsmarkReconnectRequired's own docblock and thestatusfield description insys-connector-connection.object.tsstill say only "the authorization server refused it (revoked, or expired with no usable refresh)". Outside this card's file surface; reported to the seat.reconnectRequiredReasonopens with "its authorization server refused the grant" even on the two grant-handle paths where no server was asked (no refresh token, no client). Those paths append the true cause, so the storedstatusReasonfirst claims a refusal and then says what really happened. Reported to the seat.Verification
Derived gates at 12e4f34 (73 commands)
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE(each line recorded with its exit code): "73 derived, 72 run, 1 NOT-MEASURED, 0 UNRUN".check-plugin-teardown-shape.mjs --self-test(fetched its pinned fixture commit),@objectstack/lint check:doc-formula-expressionsandcheck:lean-entry-closure(built lint, formula and objectql).pnpm check:dual-build-cjs-loads, reason: it needspnpm buildof every package (91 dists absent); the diff is one comment in spec. CI's Lint & Repo Gates runs it.Generated by Claude Code