Files
summercms/.planning/phases/19.7-generic-mcp-module/deferred-items.md
Jakub Zych 81266de77d docs(19.7-04): plan 04 summary; oauthserver v0.1.2 and Journal v0.2.3 released, pinned in the demo
- SUMMARY with every deviation from the checkpoint report
- deferred items: sm-demo-app push and deploy wait for the user, release
  builds on summercms v0.4.4 lack the cabana subject-event fix, Redis for a
  second instance, the real-client check, the retracted mimetype
2026-10-23 13:17:36 +02:00

8.2 KiB

Deferred items

Out-of-scope discoveries made while executing phase 19.7 plans. Nothing here was changed by the plan that recorded it.

Deferred Items

  • Pre-existing gofmt drift in cabana (found during 19.7-01 Task 1) status: open What: gofmt -l modules/cabana lists account_tokens.go, account_tokens_test.go, field_trigger_smoke_test.go, token_postgres_smoke_test.go, token_routes_test.go and token_scopes_test.go as unformatted before this plan touched the module (alignment of map literals and struct tags). Left as is: reformatting would add diff noise unrelated to the plan (a whole-file gofmt -w on token_routes_test.go rewrote 132 lines and was reverted). A one-line gofmt -w on those six files in a style(cabana) commit of its own fixes it.
  • AdminRecordAction.Prompt acceptance grep counted two prompt,omitempty tags in schema_types.go (found during 19.7-01 Task 4) status: resolved What: the second match is the pre-existing FormField.Prompt JSON tag at schema_types.go:376, not a duplicate of the new RecordAction.Prompt; the criterion's "prints 1" was written without that line in mind. No change needed.
  • Stateful pier sessions cannot carry the SDK's protocol-version context value (found during 19.7-02 Task 3) status: open What: go-sdk v1.8.0's StreamableHTTPHandler.ServeHTTP stores the Mcp-Protocol-Version header under an unexported context key that the transport's servePOST/serveGET read; pier's own session router (needed for Redis-shared sessions, D-25) serves StreamableServerTransport directly and cannot set that key, so stateful streams run with the SDK's 2025-03-26 defaults for stream close/reconnect hints and the JSON-RPC batch rule (lenient, spec-compliant for older clients; 2026-07-28 clients go through the SDK's own stateless handler). Revisit if a later SDK exports the key or a transport-level setter; plan 05 may add a test pinning the behaviour.
  • notifications/initialized landing on another instance than initialize (found during 19.7-02 Task 3) status: open What: the session state is persisted after initialize and again after the client's initialized notification; when a load balancer sends the notification to a second instance, the first instance's local copy keeps InitializedParams nil and refuses calls until that copy is dropped (session end, revocation or process restart) while the second instance serves them. Sticky sessions or a per-request re-read of the stored initialized flag would close the gap; not needed for the single-instance demo.
  • cabana's backend subject events never reach pier (found during 19.7-03 Task 2) status: resolved What: modules/cabana/subject_events.go fires pact.MCPSubjectChanged as a value (app.Events.Fire(ctx, pact.MCPSubjectChanged{...})), while modules/pier/events.go listens for a pointer (func(ctx, ev *pact.MCPSubjectChanged)). festival.Bus keys listeners by the type parameter, so pier never sees the backend subject events cabana fires (admin deletion, permission and role changes, token revocation): no list_changed and no session close for the backend guard from cabana. cabana also fires inside the save's transaction instead of after commit, so a rolled-back save would still notify. sm-user-plugin v0.1.10 fires *pact.MCPSubjectChanged (pointer) through lagoon.AfterCommit, which pier does receive. Fix in the framework: fire &pact.MCPSubjectChanged{} from cabana and defer it with lagoon.AfterCommit, with a pier test that a cabana save reaches handleEvent. Must be fixed before v0.5.0. Resolved: cabana now fires &pact.MCPSubjectChanged{} through lagoon.AfterCommit (immediately outside a transaction); subject_events_test.go pins delivery to a pointer listener, no firing before commit and none after a rollback.
  • pier publishes *pier.Pier once per application (found during 19.7-04 Task 1) status: open What: pier.Mount publishes the mounted endpoint on the app, so a second surf.BuildRouter/surf.Assemble on the same *backpack.App with mcp.enabled: true fails with backpack: duplicate provider for *pier.Pier. A binary builds its router once, so serving is unaffected; tests that build twice on one app (sm-demo-app TestRealtimeRoutes, socialServer) now set mcp.enabled: false. A find-or-replace publish (or skipping the publish when the same app already carries one) in pier would lift it.
  • MCP grants are not in the authorized-apps list (found during 19.7-04 Task 2) status: open What: the MCP flow (wristband IssueCode, sm-oauthserver-plugin's MCPStore) stamps the client's consented_at but writes no row to golem15_oauthserver_consents, so GET /oauth/authorizations does not list an MCP client and DELETE /oauth/authorizations/{client_id} answers 404 for it. The access token itself can still be revoked (row revoked_at, refused by the verifier at once) and the user cascade removes every grant, but a user has no self-service "disconnect this agent" for MCP yet. A consent row per MCP grant (written at IssueCode) would make the existing list and revocation (which already fires the revoked event) cover MCP clients; plan 05's revoke matrix should decide.
  • Pre-existing gofmt drift in sm-journal-plugin (found during 19.7-04 Task 3) status: open What: gofmt -l lists classes/blog_editor_test.go before this plan touched the repository. Left as is.
  • sm-demo-app push and the demo deploy wait for the user (found during 19.7-04 Task 5) status: open What: sm-demo-app master is eight commits ahead of origin (a25444e, 985af53 and this plan's 44cac13, 8668918, the pins aec16c4 oauthserver v0.1.2, 996586c journal v0.2.3, 7e76957 vue-demo-app 21a22b6, and c21ae9d with the nginx MCP locations and DEPLOY.md "MCP endpoint"). None is pushed and nothing is deployed: both need the user's go-ahead. The deploy also installs the changed vhost (DEPLOY.md, "When deploy/nginx/demo.summercms.io.conf changed") and runs the MCP smoke. The sm-oauthserver-plugin v0.1.2 and sm-journal-plugin v0.2.3 tags and the vue-demo-app commit are pushed.
  • Release builds pinning summercms v0.4.4 lack the cabana subject-event fix (found during 19.7-04 Task 5) status: open What: the demo (GOWORK=off release build), oauthserver v0.1.2 and Journal v0.2.3 require summercms v0.4.4, which predates d96c726 (cabana fires *pact.MCPSubjectChanged after commit). Development builds use the go.work replace and carry the fix; a release binary does not: admin deletion, permission or role changes and token revocation in the admin do not end MCP sessions or send list_changed until the next framework tag is required by the demo. The verifier and the backend resolver still refuse at the next request, so access does not outlive the change; only the live session notification is missing. Deploy the demo after the next framework tag, or accept the gap for the demo.
  • Redis for MCP sessions on rome (found during 19.7-04 Task 5) status: open What: the demo runs one instance with mcp.sessions.store: memory. A second instance needs SUMMER_MCP__SESSIONS__STORE=redis and SUMMER_REDIS__URL on every instance (DEPLOY.md, "MCP endpoint") and a Redis on rome; also see the notifications/initialized item above.
  • Real MCP client check of the demo not run (found during 19.7-04 Task 5) status: open What: Task 5's human check (a real client against the local demo: OAuth sign-in on /connect, user_me only, link an admin through /link-admin, reconnect with backend, the journal_ tools, a draft post, unlink) was not performed in the executor run; the automated TestMCPEndToEnd covers the same path. The local setup is DEPLOY.md, "MCP endpoint", "Locally".
  • Retracted github.com/gabriel-vasile/mimetype v1.4.15 in sm-demo-app (found during 19.7-04 Task 5) status: open What: go get in sm-demo-app warns that mimetype v1.4.15 is retracted (quadratic time on crafted CDF files). It arrives indirectly and predates this plan; a go get github.com/gabriel-vasile/mimetype@latest in the framework (and a tag) would lift it for every consumer.