docs(32.2): re-verify phase after code review fixes
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
phase: 32.2-mcp-oauth-with-administrator-subjects
|
phase: 32.2-mcp-oauth-with-administrator-subjects
|
||||||
verified: 2026-11-21T01:50:18Z
|
verified: 2026-11-21T12:27:00Z
|
||||||
status: human_needed
|
status: human_needed
|
||||||
score: 4/5 roadmap success criteria verified (SC-5 partial: docs and tests verified, release held)
|
score: 4/5 roadmap success criteria verified (SC-5 partial: docs and tests verified, patch tags held by the user)
|
||||||
covered_files:
|
covered_files:
|
||||||
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-01-PLAN.md
|
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-01-PLAN.md
|
||||||
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-01-SUMMARY.md
|
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-01-SUMMARY.md
|
||||||
@@ -14,6 +14,8 @@ covered_files:
|
|||||||
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-04-SUMMARY.md
|
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-04-SUMMARY.md
|
||||||
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-05-PLAN.md
|
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-05-PLAN.md
|
||||||
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-05-SUMMARY.md
|
- .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-05-SUMMARY.md
|
||||||
|
- admin/openapi/admin.json
|
||||||
|
- admin/src/api/schema.d.ts
|
||||||
- admin/src/api/types.ts
|
- admin/src/api/types.ts
|
||||||
- admin/src/app/pageTitle.ts
|
- admin/src/app/pageTitle.ts
|
||||||
- admin/src/app/router.ts
|
- admin/src/app/router.ts
|
||||||
@@ -41,6 +43,7 @@ covered_files:
|
|||||||
- modules/cabana/admin_openapi.go
|
- modules/cabana/admin_openapi.go
|
||||||
- modules/cabana/backend_access_revoked_smoke_test.go
|
- modules/cabana/backend_access_revoked_smoke_test.go
|
||||||
- modules/cabana/backend_access_revoked_test.go
|
- modules/cabana/backend_access_revoked_test.go
|
||||||
|
- modules/cabana/backend_access_revoked_tx_test.go
|
||||||
- modules/cabana/backend_roles_admin.go
|
- modules/cabana/backend_roles_admin.go
|
||||||
- modules/cabana/backend_users_admin.go
|
- modules/cabana/backend_users_admin.go
|
||||||
- modules/cabana/commands.go
|
- modules/cabana/commands.go
|
||||||
@@ -72,47 +75,54 @@ covered_files:
|
|||||||
- modules/wristband/consent_path_smoke_test.go
|
- modules/wristband/consent_path_smoke_test.go
|
||||||
- modules/wristband/consent_path_test.go
|
- modules/wristband/consent_path_test.go
|
||||||
- modules/wristband/server.go
|
- modules/wristband/server.go
|
||||||
covered_digest: "v2:sha256:86b5eea8e8068bf2e020b2d37be27f44223397447c083980b6ea461008d034b6"
|
covered_digest: "v2:sha256:cecde21ecf0b63d819c14d6ed77d9bc7a1d890137f0819f9e2b47497916d1159"
|
||||||
# The fingerprint tool refuses files outside the project root, so the sibling
|
# The fingerprint tool refuses files outside the project root, so the sibling
|
||||||
# repositories cannot be fingerprinted. They were verified at these commits:
|
# repositories cannot be fingerprinted. They were verified at these commits:
|
||||||
# ../sm-oauthserver-plugin HEAD 1124fd1 (6 commits ahead of origin/master 7b9899f = v0.1.7)
|
# summercms.go HEAD 5a54122e (code at 0ade662a; highest tag v0.6.6)
|
||||||
# ../sm-grzybyfunkcjonalne-app HEAD df554d5 (4 ahead of origin/master), submodule working tree at 4c209c1, committed gitlink 7b9899f
|
# ../sm-oauthserver-plugin HEAD f9819b3 (15 commits ahead of origin/master 7b9899f = v0.1.7; local ` M go.work` not touched)
|
||||||
|
# ../sm-grzybyfunkcjonalne-app HEAD 013d3f9 (8 ahead of origin/master); committed gitlink 7b9899f, submodule working tree 4c209c1 (pre-fix), go.mod v0.1.7
|
||||||
|
# App gates were run through a temporary GOWORK in the session scratchpad that
|
||||||
|
# points golem15.oauthserver at ../sm-oauthserver-plugin (f9819b3); the app's
|
||||||
|
# go.work was not edited.
|
||||||
behavior_unverified: 0
|
behavior_unverified: 0
|
||||||
overrides_applied: 0
|
overrides_applied: 0
|
||||||
|
re_verification:
|
||||||
|
previous_status: human_needed
|
||||||
|
previous_score: 4/5 roadmap success criteria verified (SC-5 partial)
|
||||||
|
gaps_closed: []
|
||||||
|
gaps_remaining: []
|
||||||
|
regressions: []
|
||||||
|
note: "The previous report had no gaps: section. It was regenerated after the code-review fixes (framework fa7a8482..0ade662a, plugin 1f872f6..f9819b3, app 3215b68..013d3f9). All five truths were re-checked in full, not as a regression pass."
|
||||||
coincidental_reliance_items:
|
coincidental_reliance_items:
|
||||||
- truth: "SC-4: sm-grzybyfunkcjonalne-app mounts golem15.oauthserver in backend mode and the local stack completes discovery, registration, sign-in and a Journal tool call over OAuth"
|
- truth: "SC-4: sm-grzybyfunkcjonalne-app mounts golem15.oauthserver in backend mode and the local stack completes discovery, registration, sign-in and a Journal tool call over OAuth"
|
||||||
reason: undeclared-precondition
|
reason: undeclared-precondition
|
||||||
harden: "The smoke and the app tests pass only because the submodule working tree sits at the unpushed plugin commit 4c209c1. The committed app state (gitlink 7b9899f, go.mod v0.1.7, plugins.gen.go Version v0.1.7) predates backend mode, so a fresh clone builds a user-mode OAuth server with OIDC (review PA-CR-01). Close it with the release pointer bump (gitlink, go.mod require, regenerated plugins.gen.go) and add the check-deploy guard PA-CR-01 proposes, so the committed state cannot silently regress."
|
harden: "The proof holds only for a build whose oauthserver module is the unpushed plugin checkout (here via a scratch GOWORK at f9819b3; with the app's own go.work the submodule working tree sits at 4c209c1, which predates every PA-WR fix). The committed app state (gitlink 7b9899f, go.mod v0.1.7) still has no backend mode. The new check-deploy guard (2190109) now makes this visible: check-deploy fails at app HEAD until the held release pointer bump lands (PA-CR-01, deferred to UAT item 4)."
|
||||||
human_verification:
|
human_verification:
|
||||||
- test: "Live connector check (cross-site SameSite=Strict admin cookie, D-03 / RESEARCH A2). After the production deploy, add https://grzybyfunkcjonalne.pl/mcp as a connector in Claude while signed in to /gfadmin, start the OAuth sign-in, then call a Journal tool and revoke the connection on My account. Procedure: ../sm-grzybyfunkcjonalne-app/DEPLOY.md, section 'Live connector check (deferred)'; 32.2-VALIDATION.md, Manual-Only Verifications row 1."
|
- test: "Live connector check (cross-site SameSite=Strict admin cookie, D-03 / RESEARCH A2). After the production deploy, add https://grzybyfunkcjonalne.pl/mcp as a connector in Claude while signed in to /gfadmin, start the OAuth sign-in, then call a Journal tool and revoke the connection on My account. Procedure: ../sm-grzybyfunkcjonalne-app/DEPLOY.md, section 'Live connector check (deferred)'; 32.2-VALIDATION.md, Manual-Only Verifications row 1."
|
||||||
expected: "After the cross-site redirect from Claude, the /gfadmin/connect consent card shows the signed-in administrator, not the login screen. If it shows login, signing in must return to the same consent request."
|
expected: "After the cross-site redirect from Claude, the /gfadmin/connect consent card shows the signed-in administrator, not the login screen. If it shows login, signing in must return to the same consent request."
|
||||||
why_human: "A localhost stack is same-site, so neither the smoke script nor any test can reproduce the cross-site navigation chain. Status: UNVERIFIED (not passed, not failed). No test in the phase claims to cover it."
|
why_human: "A localhost stack is same-site, so neither the smoke script nor any test can reproduce the cross-site navigation chain. Status: unverified."
|
||||||
status: unverified
|
|
||||||
- test: "Live connector scope behaviour (32.2-VALIDATION.md, Manual-Only Verifications row 2). In the same live run, note which scope value Claude sends to /oauth/mcp/authorize and whether the consent card offers the expected scopes."
|
- test: "Live connector scope behaviour (32.2-VALIDATION.md, Manual-Only Verifications row 2). In the same live run, note which scope value Claude sends to /oauth/mcp/authorize and whether the consent card offers the expected scopes."
|
||||||
expected: "The consent card lists grantable catalog scopes (journal, journal:read and so on). If Claude asks only for offline_access, the card currently shows 'no grantable scope' with Deny only (review FW-WR-01, deferred-items.md); in that case the WR-01 fix is needed before the connector is usable."
|
expected: "The consent card lists the catalog scopes the signed-in administrator can grant (for example journal, journal:read; `*` collapses the grant to everything the administrator may use) and offers Stay connected. Since FW-WR-01 (fa7a8482) a request whose only scope is offline_access gets the backend-mode DefaultScopes (the token catalog) plus offline_access, so it must no longer end on 'no grantable scope' with Deny only. If it still does, that is a regression to report."
|
||||||
why_human: "Depends on the real Claude connector's authorize request, which cannot be reproduced locally."
|
why_human: "Depends on the real Claude connector's authorize request; the fallback is proven in wristband unit tests with a catalog-shaped server, not against the live connector."
|
||||||
status: unverified
|
|
||||||
- test: "Production resource override (review PA-WR-09). During the deploy, check that SUMMER_GOLEM15__OAUTHSERVER__MCP__RESOURCE is set in go/.env and that GET /.well-known/oauth-protected-resource/mcp .resource equals the authorization server's resource (https://grzybyfunkcjonalne.pl/mcp)."
|
- test: "Production resource override (review PA-WR-09). During the deploy, check that SUMMER_GOLEM15__OAUTHSERVER__MCP__RESOURCE is set in go/.env and that GET /.well-known/oauth-protected-resource/mcp .resource equals the authorization server's resource (https://grzybyfunkcjonalne.pl/mcp)."
|
||||||
expected: "Both resources are the public https URL; the committed loopback default (http://127.0.0.1:8096/mcp) is not served."
|
expected: "Both resources are the public https URL. Since PA-WR-09 the plugin release with backend mode refuses to boot when the key is missing (loopback resource on a public issuer), and `scripts/check-deploy.sh --live` on the server reports ok."
|
||||||
why_human: "Deploy-time environment; a missing key only logs a warning, and nothing in check-deploy or the boot test checks it."
|
why_human: "Deploy-time environment; the --live branch of check-deploy was never run on a server."
|
||||||
status: unverified
|
|
||||||
- test: "SC-5 release go-ahead. 32.2-05-release-decision.txt records hold (framework-base v0.6.6, plugin-base v0.1.7). Decide whether to run plan 05 task 5's tag-and-publish branch: framework next free v0.6 patch (v0.6.7 if still free, must contain b1b96d85), sm-oauthserver-plugin v0.1.8 requiring that tag, push the plugin, then the grzyby pointer bump as its own commit (gitlink, go.mod require, regenerated plugins.gen.go), then the two changelog posts the same day."
|
- test: "SC-5 release go-ahead. 32.2-05-release-decision.txt records hold (framework-base v0.6.6, plugin-base v0.1.7). Decide whether to run plan 05 task 5's tag-and-publish branch: framework next free v0.6 patch (v0.6.7 if still free, must contain b1b96d85), sm-oauthserver-plugin v0.1.8 requiring that tag, push the plugin, then the grzyby pointer bump as its own commit (gitlink, go.mod require, regenerated plugins.gen.go), then the two changelog posts the same day."
|
||||||
expected: "Tags v0.6.x and v0.1.8 on origin, plugin go.mod on the framework tag, app gitlink and go.mod on v0.1.8, two changelog URLs recorded in 32.2-05-changelog-published.txt; task 5's automated verify passes on the tag-and-publish branch."
|
expected: "The framework tag contains the review fixes up to 0ade662a (the plugin's d581799 calls wristband.CheckConsentPath, which exists only from 1dcc2ed0). Tags v0.6.x and v0.1.8 on origin, plugin go.mod on the framework tag, app gitlink and go.mod on v0.1.8 (also moves the submodule working tree off 4c209c1), two changelog URLs recorded in 32.2-05-changelog-published.txt; task 5's automated verify passes and `scripts/check-deploy.sh` in the app passes again."
|
||||||
why_human: "Releases are gated on the user's word (project memory: tag only at phase completion after verification). SC-5 is NOT met until this runs; it is a pending user decision, not a code gap."
|
why_human: "Releases are gated on the user's word (tag only at phase completion after verification). SC-5's tag clause is not met until this runs; it is a pending user decision, not a code gap."
|
||||||
status: pending
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Phase 32.2: MCP OAuth with administrator subjects Verification Report
|
# Phase 32.2: MCP OAuth with administrator subjects Verification Report
|
||||||
|
|
||||||
**Phase Goal:** As an editor of a blog-only application whose MCP tools are backend-guarded (Journal) and which has no frontend users, I want to add the site's `/mcp` as a connector and sign in once as my administrator account over OAuth, so that agents no longer need a hand-copied `g15_` personal token. Delivered as an additive, off-by-default backend-subject mode of `sm-oauthserver-plugin`.
|
**Phase Goal:** As an editor of a blog-only application whose MCP tools are backend-guarded (Journal) and which has no frontend users, I want to add the site's `/mcp` as a connector and sign in once as my administrator account over OAuth, so that agents no longer need a hand-copied `g15_` personal token. Delivered as an additive, off-by-default backend-subject mode of `sm-oauthserver-plugin`, so applications on the frontend-user flow are unchanged.
|
||||||
**Verified:** 2026-11-21T01:50:18Z
|
**Verified:** 2026-11-21T12:27:00Z
|
||||||
**Status:** human_needed
|
**Status:** human_needed
|
||||||
**Re-verification:** No, initial verification
|
**Re-verification:** Yes, regenerated after the code-review fixes (the previous report had no gaps)
|
||||||
**Mode:** mvp
|
**Mode:** mvp
|
||||||
|
|
||||||
## MVP user-story guard
|
## MVP user-story guard
|
||||||
|
|
||||||
`msd_run query user-story.validate` answers `valid: false` with "Story must start with "As a [user role],"". The only cause is the article: the goal reads "As **an** editor", and the canonical regex requires the literal `As a `. The role, capability and outcome slots are all present and well formed, and every plan restates the same story. Verification proceeds; the discrepancy is reported as a warning. Either the validator should accept "As an", or the ROADMAP goal can be reworded ("As a blog editor ...").
|
As in the previous run, `user-story.validate` rejects the goal only because it reads "As **an** editor" and the canonical regex wants the literal `As a `. Role, capability and outcome slots are present. Verification proceeds; reported as a wording warning.
|
||||||
|
|
||||||
## User Flow Coverage
|
## User Flow Coverage
|
||||||
|
|
||||||
@@ -120,16 +130,16 @@ Outcome clause: "agents no longer need a hand-copied `g15_` personal token".
|
|||||||
|
|
||||||
| # | Step | Expected | Evidence in codebase | Status |
|
| # | Step | Expected | Evidence in codebase | Status |
|
||||||
|---|------|----------|----------------------|--------|
|
|---|------|----------|----------------------|--------|
|
||||||
| 1 | Add `<site>/mcp` as a connector | Anonymous `/mcp` answers 401 with `resource_metadata`; protected-resource and authorization-server metadata point at `/oauth/mcp/*` | grzyby smoke steps 1-3 (re-run here, pass); nginx `= /.well-known/oauth-authorization-server` and `^~ /oauth/mcp/` in both vhosts; check-deploy ok | VERIFIED (locally) |
|
| 1 | Add `<site>/mcp` as a connector | 401 with `resource_metadata`; metadata points at `/oauth/mcp/*`; OIDC off | smoke steps 1-3, re-run here against plugin f9819b3 | VERIFIED (locally) |
|
||||||
| 2 | Client registers and starts authorize | DCR 201; authorize 302 to `<app.url>/gfadmin/connect?request=<id>` | smoke steps 4-6; plugin `servers.go` ConsentPath = `cabana.AdminPrefix + "/connect"`; wristband `consentPath()` | VERIFIED |
|
| 2 | Client registers, authorize hands off | DCR 201; 302 to `/gfadmin/connect?request=<id>` | smoke 4-6; `servers.go` ConsentPath = admin prefix + `/connect`, now checked at boot (`wristband.CheckConsentPath`, d581799) and at authorize (1dcc2ed0) | VERIFIED |
|
||||||
| 3 | Sign in once as the administrator | Anonymous visitor of `/connect` goes through the normal admin login and back | router `/connect` without shell/public; `router.test.ts` "sends an anonymous visitor of /connect to login ... returns there"; smoke step 7 (cookie login) | VERIFIED (same-site); cross-site cookie UNVERIFIED (human item 1) |
|
| 3 | Sign in once as the administrator | anonymous visitor goes through admin login and back | router `/connect`; `router.test.ts`; smoke 7 | VERIFIED same-site; cross-site cookie is human item 1 |
|
||||||
| 4 | Consent | Card shows client, redirect host, grantable scopes, Stay connected; Allow issues a code | `ConnectView.vue`; cabana `GET/POST {api}/mcp/consent/{request}`; plugin `MCPAdminConsent` provider; smoke step 8; `ConnectView.test.ts` (30 tests) | VERIFIED |
|
| 4 | Consent | card with client, redirect host, grantable scopes; Allow issues a code | `ConnectView.vue` (39 tests), cabana `mcpConsentShow`/`mcpConsentDecide`, plugin provider; smoke 8 | VERIFIED |
|
||||||
| 5 | Token exchange | Access and refresh token whose rows name the administrator only | smoke step 9; `TestBackendModeSmoke`, `TestBackendGrantRows` (user_id NULL, backend_user_id set) | VERIFIED |
|
| 5 | Token exchange | tokens whose rows name the administrator only | smoke 9; `TestBackendModeSmoke`, `TestBackendGrantRows` | VERIFIED |
|
||||||
| 6 | Agent calls a Journal tool | tools/list contains `journal_list_posts`; tools/call succeeds | smoke step 10 (11 tools, isError false) | VERIFIED (locally) |
|
| 6 | Agent calls a Journal tool | `journal_list_posts` listed and callable | smoke 10 (11 tools, isError false) | VERIFIED (locally) |
|
||||||
| 7 | `g15_` tokens keep working | Same tool list and call with a personal token | smoke step 11; `TestBackendGrantToolsMatchPersonalToken` (OAuth and `g15_` tool lists equal name for name) | VERIFIED |
|
| 7 | `g15_` tokens keep working | same list and call with a personal token | smoke 11; `TestBackendGrantToolsMatchPersonalToken` | VERIFIED |
|
||||||
| 8 | Access ends when it should | Password change, deactivate, delete, role/permission change or My account revoke ends the grant | smoke step 12 (401 after password change); `TestBackendCascade`, `TestBackendRevokeFromAccount`, `TestBackendAccessRevokedEvent` | VERIFIED |
|
| 8 | Access ends when it should | password change, deactivate, delete, role/permission change, My account revoke | smoke 12 (401 after password change); `TestBackendCascade`, `TestBackendRevokeFromAccount`, `TestBackendAccessRevokedEvent`, `TestBackendSubjectRevalidatedUnderLock` | VERIFIED |
|
||||||
|
|
||||||
The outcome holds on a local stack built from the working trees. On the committed app master it does not hold yet (the pinned plugin v0.1.7 has no backend mode; see SC-4 and SC-5).
|
The outcome holds for a build from the working trees. On the committed app master it does not yet hold (pinned plugin v0.1.7 has no backend mode); check-deploy now refuses that tree, and the held release closes it.
|
||||||
|
|
||||||
## Goal Achievement
|
## Goal Achievement
|
||||||
|
|
||||||
@@ -137,11 +147,11 @@ The outcome holds on a local stack built from the working trees. On the committe
|
|||||||
|
|
||||||
| # | Truth | Status | Evidence |
|
| # | Truth | Status | Evidence |
|
||||||
|---|-------|--------|----------|
|
|---|-------|--------|----------|
|
||||||
| SC-1 | Backend mode: authorize recognises a signed-in administrator, sends an anonymous browser through admin login and back, shows a branded consent page; the grant carries `BackendUserID` and no frontend user. Mode off (default): every existing flow and test of sm-oauthserver-plugin and sm-bm-app passes unchanged. | VERIFIED | Handoff `{issuer}{ConsentPath}?request=` (`wristband/authorize.go:189`), default byte-identical (`TestAuthorizeConsentPath`, `TestConsentPathSmoke`). Consent card `admin/src/views/ConnectView.vue` (LoginView palette and wordmark) over cabana `mcp_consent.go`, interactive-only, X-Requested-With, 16 KiB cap, scope policy = `scopeOverlaps` + `validateTokenScopes`. Grant rows user_id NULL / backend_user_id set (`TestBackendModeSmoke`, `TestBackendGrantRows`, `TestBackendSubjectMigration`). User consent routes and OIDC unmounted in backend mode (`routes.go:45,71,93`; `TestBackendMode`). Mode off: full plugin suite re-run here (`go test -count=1 ./...`, exit 0, 115 s) and sm-bm-app through a scratch go.work against the new plugin and framework (`go test -tags summercms_mcp ./...`, exit 0). Wording note: the ROADMAP says "server-rendered"; D-03 (user-selected in 32.2-DISCUSSION-LOG.md, "Admin SPA route ✓") moved consent into the admin SPA because the `SameSite=Strict`, `Path=<admin prefix>` cookie never reaches `/oauth/mcp/authorize`. The intent (a branded consent page shown to the signed-in administrator) is met; consider updating the SC-1 wording. |
|
| SC-1 | Backend mode: authorize recognises a signed-in administrator, anonymous browser goes through admin login and back, branded consent page; grant carries `BackendUserID` and no frontend user. Mode off: every existing flow and test of sm-oauthserver-plugin and sm-bm-app passes unchanged. | VERIFIED | Handoff `{issuer}{ConsentPath}?request=` with the new same-origin guard (`wristband/authorize.go:167` `CheckConsentPath` before storing; refusals of `//evil`, `@evil`, `?`, `#`, `\` in `TestCheckConsentPath`). Consent in the admin SPA (D-03; ROADMAP still says "server-rendered", wording note carried from the previous report). Decide now loads the request through Show first and rejects a provider redirect that leaves the registered redirect URI (`mcpConsentSameRedirect`, `TestMCPConsentSameRedirect`). Grant rows user_id NULL / backend_user_id set (`TestBackendGrantRows`, `TestBackendSubjectMigration`). Mode off re-run here: plugin full suite `go test -count=1 ./...` (Docker) and sm-bm-app `go test -short -tags summercms_mcp ./...` through a scratch GOWORK against plugin f9819b3 and framework HEAD, both exit 0. User-mode impacts of the fixes reviewed: user mode keeps `read` in `fixedMCPScopes`, so the new `invalid_scope` refusal (no `read` and no DefaultScopes) cannot fire there; administrator rows are refused in user mode (`TestUserModeRefusesAdministratorGrants`), which only narrows; a loopback `mcp.resource` only warns in user mode; an invalid `mcp.consent_path` with MCP on now fails boot in user mode too (documented behaviour note, Info). |
|
||||||
| SC-2 | pier resolves such a grant straight to the backend subject, no link lookup; tools/list and calls are capped by cabana permissions and granted scopes like a scope-limited `g15_` token. | VERIFIED | `pier/identity.go` `resolveBackendGrant` (branch before the UserID==0 refusal; binding `oauth:backend:<client>:<admin>`; no Frontend; `ScopeLimited: true`); `backend_guard.go:112` widens the ScopeLimitFor condition only by `ScopeLimited`. Tests re-run here: `TestBackendOnlyGrant` (no resolver calls, distinct bindings, fingerprint), `TestLinkedGrantNoScopeLimit` (user-mode linked grants unchanged), `TestBackendSubjectSmoke` (real /mcp request, read tool listed, write tool hidden), and `TestBackendGrantToolsMatchPersonalToken` (`-tags summercms_mcp`: acme:read lists/calls only the read tool, acme lists/calls the write tool, both equal the `g15_` token lists). |
|
| SC-2 | pier resolves such a grant straight to the backend subject, no link lookup; tools capped by cabana permissions and granted scopes like a scope-limited `g15_` token. | VERIFIED | `pier/identity.go:218` now switches on `grant.Subject`: backend to `resolveBackendGrant`, empty to the user path, anything else `ErrUnauthorized` (FW-WR-03, regression grants `member` and `Backend` refused in `backend_only_grant_test.go`). `resolveBackendGrant` refuses UserID != 0 or BackendUserID == 0, binding `oauth:backend:<client>:<admin>`, `ScopeLimited: true`. Re-run here: `go test -count=1 ./modules/pier` (Docker, includes `TestBackendSubjectSmoke`) ok; plugin `TestBackendGrantToolsMatchPersonalToken` (`-tags summercms_mcp`) PASS. |
|
||||||
| SC-3 | Revoking the grant (My account connected-apps list), or deleting, deactivating or re-passwording the administrator, ends the grant's tokens and open MCP sessions (`MCPSubjectChanged`). | VERIFIED | cabana `BackendAccessRevokedEvent` fired in-transaction at delete, deactivate, password set, own password change, `admin:reset-password` (now `lagoon.Transaction`, fix b1b96d85), user role/permissions/superuser and role permission changes (`backend_users_admin.go:235,291,856,861`; `backend_roles_admin.go:201`; `account.go:399`; `commands.go:169`); the three after-commit `fireSubjectChanged` calls are unchanged. Plugin `BackendCascade` (backend mode only, `plugin.go:121-124`) calls `RevokeBackendGrants` and `FireBackendRevokedAfterCommit` (Guard backend, Kind revoked, ClientID), which pier's `revokedMatch` matches through `subjectFor("backend")`. My account section `mcp_connections` with Danger `revoke` (`account.go`), admin-wide screen gated by `golem15.oauthserver.manage_mcp_connections`. Tests re-run here: `TestBackendAccessRevokedEvent` (all seven sites, rollback on listener error), `TestBackendCascade`, `TestBackendRevokeFromAccount`, `TestBackendRevocationSmoke`, `TestBackendAccountSmoke`, and in `TestBackendGrantToolsMatchPersonalToken` the open session of a revoked client answers 401 while the other client's session keeps working; smoke step 12 shows the same after a password change. |
|
| SC-3 | Revoking the grant (My account), or deleting, deactivating or re-passwording the administrator, ends the grant's tokens and open MCP sessions. | VERIFIED | cabana fires `BackendAccessRevokedEvent` in the save's transaction and now refuses a nil `Tx` (FW-WR-04, `TestBackendAccessRevokedNeedsTransaction`); deactivate passes the plain tx, not Unscoped (FW-WR-05, smoke asserts `ev.Tx.Statement.Unscoped` false in `TestBackendAccessRevokedSmoke`). Plugin `BackendCascade` refuses a nil Tx (`ErrBackendRevocationNoTx`, `TestBackendCascadeRefusesNoTx`), so revocation is always atomic under the lock. The race closed by PA-WR-03: the decision and the code exchange re-read the administrator under the grants lock (`BackendSubjectCurrent`, `TestBackendSubjectRevalidatedUnderLock`: 404/no code, 400 after cutoff move, 400 after deactivation). Double decision serialized (`MarkIssued` conditional update, `TestMCPMarkIssuedOnlyOnce`). Re-run here: `TestBackendCascade`, `TestBackendRevokeFromAccount`, `TestBackendRevocationSmoke`, `TestBackendAccountSmoke`, `TestBackendAccessRevokedEvent`, all PASS; smoke step 12 (401 after a password change). |
|
||||||
| SC-4 | grzyby mounts golem15.oauthserver in backend mode, its proxy routes discovery and `/oauth/mcp/*` to Go, and an MCP client completes discovery, registration, sign-in and a Journal tool call over OAuth on a local stack; `g15_` tokens keep working. | VERIFIED (coincidental-reliance) | `config/golem15.oauthserver.yaml` (oidc.enabled false, mcp.enabled true, mcp.subject backend); `.gitmodules`, go.work use, go.mod require + replace, summer.yaml, build.sh, plugins.gen.go list golem15.oauthserver; config/mcp.yaml keeps `allow_personal_tokens: true`. `scripts/smoke-mcp-oauth.sh` re-run here: all twelve steps, "ok (12 steps)", no token, code or g15_ value in the output. `scripts/check-deploy.sh` re-run: ok. App `go vet -tags summercms_mcp,nodynamic ./...` clean. The client is scripted; the real Claude connector is human item 1. Caveat: this holds only with the submodule working tree at the unpushed plugin commit 4c209c1. The committed gitlink, go.mod and plugins.gen.go pin v0.1.7, which has no backend mode (review PA-CR-01). That is closed by the SC-5 pointer bump. |
|
| SC-4 | grzyby mounts golem15.oauthserver in backend mode, proxy routes discovery and `/oauth/mcp/*` to Go, an MCP client completes discovery, registration, sign-in and a Journal tool call over OAuth on a local stack; `g15_` tokens keep working. | VERIFIED (coincidental-reliance) | Config, nginx and wiring unchanged from the previous verification and re-checked by check-deploy (every check before the CR-01 version guard passes). `scripts/smoke-mcp-oauth.sh` re-run here with `GOWORK` pointing at plugin f9819b3 (the script's `go -C "$ROOT" build` inherits it): "ok (12 steps)", grep for token or JWT values in the output: 0. App `go vet -tags summercms_mcp ./...` and `go test -short -count=1 -tags summercms_mcp ./...` through the same GOWORK: exit 0, which includes the plugin's new WR-09 boot check (the smoke sets the resource override). Caveat: see `coincidental_reliance_items` (committed app state still pins v0.1.7; `scripts/check-deploy.sh` at app HEAD exits 1 with "go.mod requires sm-oauthserver-plugin v0.1.7, which predates mcp.subject backend", on purpose). |
|
||||||
| SC-5 | Module READMEs, `docs/` pages and the app's DEPLOY.md updated; new code has unit tests in the phase's last plan; the framework and sm-oauthserver-plugin get patch tags. | PARTIAL (release held) | Docs: pact, wristband, pier, cabana READMEs name the new identifiers; `docs/services/{mcp,oauth-server,events}.md`, `docs/backend/{users-and-permissions,admin-spa}.md`, `docs/plugins/registration.md` updated; `summer docs:build --check` re-run: "no problems found"; no consuming application named in framework code or docs (`git grep -i grzyby` over modules, docs, admin/src, phrasebook is empty). Plugin README has "Backend-subject mode", config rows and the MCP connections screen. DEPLOY.md MCP section covers OAuth sign-in, config, minimum plugin version, migration, nginx, local check, rollback and "Live connector check (deferred)". Tests: plan 05 is the tests plan; all named tests pass (see spot-checks). Tags: NOT met. `32.2-05-release-decision.txt` = hold; no v0.6.7 tag in summercms.go (highest v0.6.6), no v0.1.8 on the plugin's origin, plugin still requires framework v0.6.0 through a replace, app pointer not bumped, no changelog posts. Routed to human item 4 (user decision, not a code gap). |
|
| SC-5 | READMEs, `docs/` and DEPLOY.md updated; unit tests in the last plan; framework and sm-oauthserver-plugin get patch tags. | PARTIAL (tags held) | Docs: new exported identifiers of the fixes are documented: `wristband.CheckConsentPath` (wristband README:150, 208; `docs/services/oauth-server.md:109`, including the offline_access fallback), plugin README lists `BackendSubjectCurrent`, `ErrBackendRevocationNoTx`, `BackendSubjects` and the loopback refusal; DEPLOY.md covers the rollback SQL (PA-WR-07), the resource override and `check-deploy.sh --live` (PA-WR-09), and the minimum plugin version guard (CR-01). `summer docs:build --check` re-run: "no problems found". Tests: plan 05 is the tests plan; the review fixes each added a test (red-checked by the fixer except WR-05/WR-06 plugin tests, which do not compile on the old code). Tags: NOT met. Highest framework tag v0.6.6, no v0.6.7 on origin, plugin origin/master still 7b9899f (v0.1.7), app pointer not bumped, no changelog posts; `32.2-05-release-decision.txt` = hold. Routed to human item 4 (user decision; tagging follows verification by project rule). |
|
||||||
|
|
||||||
**Score:** 4/5 roadmap truths verified (0 present-but-behavior-unverified). SC-5 is partial and pending the user's release go-ahead.
|
**Score:** 4/5 roadmap truths verified (0 present-but-behavior-unverified). SC-5 is partial and pending the user's release go-ahead.
|
||||||
|
|
||||||
@@ -149,141 +159,130 @@ The outcome holds on a local stack built from the working trees. On the committe
|
|||||||
|
|
||||||
| Plan | Must-have group | Status | Notes |
|
| Plan | Must-have group | Status | Notes |
|
||||||
|------|-----------------|--------|-------|
|
|------|-----------------|--------|-------|
|
||||||
| 01 | wristband ConsentPath/DefaultScopes, pact grant shape, pier branch, cabana consent endpoint, TokenScopeNames/Labels, account items, BackendAccessRevokedEvent, docs | VERIFIED | Two documented deviations: item action route is `POST {api}/account/contribution-items/{name}/{item}/actions/{action}` (the planned path overlapped controller routes and surf refused boot); a requested `*` is offered on consent as on `g15_` creation (review FW-IN-01). Role delete fires nothing because deleting a held role is refused. |
|
| 01 | wristband ConsentPath/DefaultScopes, pact grant shape, pier branch, cabana consent endpoint, TokenScopeNames/Labels, account items, BackendAccessRevokedEvent, docs | VERIFIED | Fixes FW-WR-01..06 extend these without changing the contract shape; `CheckConsentPath` is additive (no `NewServer` signature change). `parseAuthorizeScopes` gained a `defaultsSet` parameter (unexported). |
|
||||||
| 02 | /connect route, ConnectView states, switch account, login hint, scope rules, account item rows, regenerated openapi, rebuilt dist | VERIFIED | `check-admin-openapi.sh --check` exit 0; `check-admin-dist.sh` "matches a fresh build"; no admin/src change after dist commit ee754b6b. The planned "sign-out failure shows decide_failed" is coded (`ConnectView.vue` catch) but unreachable because `logout()` never throws; the test pins that the switch still reaches login. |
|
| 02 | /connect route, ConnectView states, switch account, scope rules, account item rows, regenerated openapi, rebuilt dist | VERIFIED | SPA redirect guard now also refuses `blob:`, `file:`, `about:`, `filesystem:` and requires the destination to return to `client.redirect_host` (`ConnectView.vue:192`, tests in `ConnectView.test.ts`). `check-admin-openapi.sh --check` exit 0; `check-admin-dist.sh` "matches a fresh build"; 6 SPA files, 105 tests pass. |
|
||||||
| 03 | config keys and boot refusals, migration, store/verifier branches, consent provider, revocation listener, My account section, MCP connections screen, README | VERIFIED | Bulk revoke is Detached (derived table cannot `FOR UPDATE`); consent last_used_at stamped by the verifier. `Requires()` still `[golem15.user]`. |
|
| 03 | config keys and boot refusals, migration, store/verifier branches, consent provider, revocation listener, My account section, connections screen | VERIFIED | Plus PA-WR-01 (refresh reads the administrator on the rotation tx, `TestBackendRefreshOnOneConnection` with a one-connection pool), PA-WR-02 (lookup errors are retryable, `TestBackendLookupFailureIsNotTerminal`), PA-WR-05 (administrator grants honoured in backend mode only), PA-WR-09 (loopback resource refused in backend mode, `TestLoopbackResourceOnPublicIssuer`), `TestConsentPathCheckedAtBoot`, `TestAdminConsentAnswersThePendingRedirect`. |
|
||||||
| 04 | app wiring, smoke, nginx, check-deploy, DEPLOY.md, UI backstop recorded as unverified | VERIFIED (local) | Rollback documented with `MCP__SUBJECT=user` too (the single-key rollback fails boot). Committed state caveat as in SC-4. |
|
| 04 | app wiring, smoke, nginx, check-deploy, DEPLOY.md | VERIFIED (local) | Smoke no longer puts secrets on argv (jq `env.*`, curl `@file`, `umask 077`; PA-WR-08). check-deploy gained the CR-01 version guard and the env.example/--live resource checks. |
|
||||||
| 05 | tracer tools test, framework/SPA/plugin unit tests, regression runs, release checkpoint | VERIFIED except the release truth | Four UI backstops (`verification: backstop`) have explicit passing evidence: ConnectView.test.ts (`*` rule, no auto-allow and window.location.assign, switch round trip, forbidden schemes), router.test.ts, AccountContributions.test.ts (null items unchanged, `[]` empty block, `:title` confirm). The fifth backstop (cross-site cookie) is human item 1, unverified. The release truth is human item 4. |
|
| 05 | tracer tools test, unit tests, regression runs, release checkpoint | VERIFIED except the release truth | UI backstops as in the previous report (cross-site cookie remains human item 1). Release truth is human item 4. |
|
||||||
|
|
||||||
### Required Artifacts
|
### Required Artifacts
|
||||||
|
|
||||||
| Artifact | Expected | Status | Details |
|
| Artifact | Expected | Status | Details |
|
||||||
|----------|----------|--------|---------|
|
|----------|----------|--------|---------|
|
||||||
| `modules/pact/mcp.go` | MCPGrant.Subject, MCPGrantSubjectBackend, ScopeLimited, MCPAdminConsent + types + sentinels | VERIFIED | lines 140-147, 289-394 |
|
| `modules/pact/mcp.go` | MCPGrant.Subject, backend constant, ScopeLimited, MCPAdminConsent | VERIFIED | unknown subject documented as refused |
|
||||||
| `modules/pact/capabilities.go` | Items/ItemActions/ItemsEmpty, AccountItem*, ErrAccountItemNotFound | VERIFIED | lines 613-673 |
|
| `modules/wristband/authorize.go`, `server.go` | ConsentPath, DefaultScopes, CheckConsentPath | VERIFIED | `CheckConsentPath` at authorize.go:167, 214; offline_access fallback in `parseAuthorizeScopes` |
|
||||||
| `modules/wristband/server.go`, `authorize.go` | ConsentPath, DefaultScopes | VERIFIED | used at authorize.go:189, 199-222 |
|
| `modules/pier/identity.go`, `backend_guard.go` | backend-only branch, subject switch, ScopeLimited | VERIFIED | identity.go:218-227, 262-283 |
|
||||||
| `modules/pier/identity.go`, `backend_guard.go` | backend-only branch, ScopeLimited condition and fingerprint | VERIFIED | identity.go:218, 245-274, 115; backend_guard.go:112 |
|
| `modules/cabana/mcp_consent.go` | GET/POST consent with redirect check | VERIFIED | `mcpConsentSameRedirect` at :91 |
|
||||||
| `modules/cabana/mcp_consent.go` | GET/POST consent handlers | VERIFIED | mounted http.go:354-355 in the backend group |
|
| `modules/cabana/admin_events.go` | event, reasons, nil-Tx refusal | VERIFIED | `backend_access_revoked_tx_test.go` (new) |
|
||||||
| `modules/cabana/token_scopes_export.go` | TokenScopeNames, TokenScopeLabels | VERIFIED | used by the plugin's servers.go:210 and account.go:106 |
|
| `admin/src/views/ConnectView.vue` | consent card, redirect guard | VERIFIED | `window.location.assign` at :274 after the deny-list and host match |
|
||||||
| `modules/cabana/admin_events.go` | BackendAccessRevokedEvent, six reasons, fire helper | VERIFIED | 8 call sites |
|
|
||||||
| `admin/src/views/ConnectView.vue` | consent card, all states | VERIFIED | window.location.assign after scheme deny-list |
|
|
||||||
| `admin/src/components/account/AccountContributions.vue` | item rows and actions | VERIFIED | data-account-item, -items-empty, -item-action |
|
|
||||||
| `modules/boardwalk/dist` | rebuilt SPA | VERIFIED | check-admin-dist passes |
|
| `modules/boardwalk/dist` | rebuilt SPA | VERIFIED | check-admin-dist passes |
|
||||||
| `../sm-oauthserver-plugin/updates/202611200001_...go` | additive migration with rollback | VERIFIED | partial unique index, NOT VALID checks, rollback deletes backend rows |
|
| `../sm-oauthserver-plugin/classes/mcp_backend_subject.go` | locks, revoke, `BackendSubjectCurrent` | VERIFIED | |
|
||||||
| `../sm-oauthserver-plugin/classes/mcp_backend_subject.go` | locks, RevokeBackendGrants, after-commit events | VERIFIED | |
|
| `../sm-oauthserver-plugin/classes/mcp_store.go` | exchange re-check, conditional MarkIssued, tx-bound refresh | VERIFIED | |
|
||||||
| `../sm-oauthserver-plugin/classes/mcp_verifier.go` | backend branch | VERIFIED | verifyBackend, BackendPrincipal + tokens_valid_after |
|
| `../sm-oauthserver-plugin/classes/mcp_verifier.go` | backend branch gated by `BackendSubjects` | VERIFIED | set in `servers.go` from `cfg.BackendMode()` |
|
||||||
| `../sm-oauthserver-plugin/controllers/mcp_admin_consent.go` | pact.MCPAdminConsent | VERIFIED | published in backend mode (plugin.go:108) |
|
| `../sm-oauthserver-plugin/classes/backend_cascade.go` | listener, nil-Tx refusal | VERIFIED | |
|
||||||
| `../sm-oauthserver-plugin/classes/backend_cascade.go` | listener | VERIFIED | registered in backend mode only |
|
| `../sm-oauthserver-plugin/controllers/mcp_admin_consent.go` | provider, re-check under lock | VERIFIED | |
|
||||||
| `../sm-oauthserver-plugin/account.go`, `controllers/mcp_connections.go` | My account section, admin screen | VERIFIED | |
|
| `../sm-oauthserver-plugin/servers.go` | DefaultScopes = catalog, CheckConsentPath at boot | VERIFIED | lines 240-285 |
|
||||||
| `../sm-grzybyfunkcjonalne-app/config/golem15.oauthserver.yaml` | backend mode, OIDC off | VERIFIED | |
|
|
||||||
| `../sm-grzybyfunkcjonalne-app/scripts/smoke-mcp-oauth.sh` | twelve-step proof | VERIFIED | re-run, pass |
|
| `../sm-grzybyfunkcjonalne-app/scripts/smoke-mcp-oauth.sh` | twelve-step proof | VERIFIED | re-run, pass |
|
||||||
| `../sm-grzybyfunkcjonalne-app/deploy/nginx/*.conf` | OAuth locations | VERIFIED | production:229,249; staging:232,253 |
|
| `../sm-grzybyfunkcjonalne-app/scripts/check-deploy.sh` | deploy guard incl. CR-01 | VERIFIED (fails on purpose until the release bump) | |
|
||||||
|
|
||||||
### Key Link Verification
|
### Key Link Verification
|
||||||
|
|
||||||
| From | To | Via | Status |
|
| From | To | Via | Status |
|
||||||
|------|----|-----|--------|
|
|------|----|-----|--------|
|
||||||
| wristband authorize | Options.ConsentPath | handoff URL | WIRED |
|
| plugin `NewServers` (backend mode) | wristband `Options.DefaultScopes` | `slices.Clone(catalog)` | WIRED; offline_access-only requests now use it |
|
||||||
| pier resolveBackendGrant | backend guard ScopeLimitFor | MCPSubject.ScopeLimited | WIRED (TestBackendSubjectSmoke) |
|
| plugin `NewServers` | `wristband.CheckConsentPath` | boot error when `mcp.enabled` | WIRED (`TestConsentPathCheckedAtBoot`) |
|
||||||
| cabana mcp_consent.go | pact.MCPAdminConsent | `app.Lookup` at request time | WIRED |
|
| wristband authorize | `Options.ConsentPath` | handoff URL, guarded | WIRED |
|
||||||
| cabana save sites | admin_events.go | fireBackendAccessRevoked with the save's tx | WIRED (TestBackendAccessRevokedEvent) |
|
| pier `resolveOAuth` | `resolveBackendGrant` | `switch grant.Subject` | WIRED |
|
||||||
| ConnectView | cabana /mcp/consent/{request} | openapi-fetch typed by schema.d.ts | WIRED |
|
| pier backend subject | backend guard ScopeLimitFor | `MCPSubject.ScopeLimited` | WIRED (`TestBackendSubjectSmoke`) |
|
||||||
| AccountContributions | cabana /account/contribution-items/... | openapi-fetch | WIRED (path differs from plan text, documented) |
|
| cabana `mcpConsentDecide` | provider Show then Decide | `mcpConsentSameRedirect` on the answer | WIRED |
|
||||||
| plugin servers.go | cabana.TokenScopeNames, wristband ConsentPath/DefaultScopes | backend-mode NewServers | WIRED |
|
| cabana save sites | plugin `BackendCascade` | event with non-nil save tx | WIRED (`TestBackendAccessRevokedEvent`, `TestBackendCascade`) |
|
||||||
| plugin Boot | pact.MCPAdminConsent | app.Publish in backend mode | WIRED |
|
| plugin consent provider | `classes.BackendSubjectCurrent` | inside `WithinBackendGrantsLock` | WIRED (`TestBackendSubjectRevalidatedUnderLock`) |
|
||||||
| plugin BackendCascade | pier session teardown | MCPSubjectChanged revoked + ClientID after commit | WIRED |
|
| plugin `NewServers` | store and verifier `BackendSubjects` | `cfg.BackendMode()` | WIRED (`TestUserModeRefusesAdministratorGrants`) |
|
||||||
| grzyby config mcp.resource | pier resource | equal string; production via env | WIRED locally; production is human item 3 |
|
| app config `mcp.resource` | plugin loopback check / pier resource | env override | WIRED locally; production is human item 3 |
|
||||||
|
|
||||||
### Data-Flow Trace (Level 4)
|
### Data-Flow Trace (Level 4)
|
||||||
|
|
||||||
| Artifact | Data | Source | Real data | Status |
|
| Artifact | Data | Source | Real data | Status |
|
||||||
|----------|------|--------|-----------|--------|
|
|----------|------|--------|-----------|--------|
|
||||||
| ConnectView | consent request | cabana Show → plugin provider → wristband `PendingRequest` (mcp_codes row) | yes | FLOWING (smoke step 8) |
|
| ConnectView | consent request | cabana Show, plugin provider, wristband pending row | yes | FLOWING (smoke 8) |
|
||||||
| ConnectView fact box | admin login/name/email | cabana loads `backend_users` | yes | FLOWING |
|
| ConnectView fact box | admin login/name/email | `backend_users` | yes | FLOWING |
|
||||||
| My account `mcp_connections` | items | consents ⋈ clients for the administrator | yes | FLOWING (TestBackendAccountSmoke) |
|
| My account `mcp_connections` | items | consents joined with clients | yes | FLOWING (`TestBackendAccountSmoke`) |
|
||||||
| MCP connections screen | rows | derived table over backend consents ⋈ backend_users ⋈ clients | yes | FLOWING |
|
| MCP connections screen | rows | backend consents, backend_users, clients | yes | FLOWING |
|
||||||
|
|
||||||
### Behavioral Spot-Checks (run in this verification)
|
### Behavioral Spot-Checks (run in this verification)
|
||||||
|
|
||||||
| Behavior | Command | Result | Status |
|
| Behavior | Command | Result | Status |
|
||||||
|----------|---------|--------|--------|
|
|----------|---------|--------|--------|
|
||||||
| Framework phase tests | `go test -count=1 -run 'TestAuthorizeConsentPath\|TestAuthorizeDefaultScopes\|TestConsentPathSmoke\|TestBackendOnlyGrant\|TestLinkedGrantNoScopeLimit\|TestBackendSubjectSmoke\|TestTokenScopeNames\|TestMCPAdminConsent$\|TestAccountContributionItems\|TestBackendAccessRevokedEvent' -v ./modules/wristband ./modules/pier ./modules/cabana` | 11 top-level PASS, no SKIP | PASS |
|
| Framework vet and fast suite | `go vet ./...`; `go test -short -count=1 ./...` | exit 0, exit 0 | PASS |
|
||||||
| Plugin backend-mode tests | `go -C ../sm-oauthserver-plugin test -count=1 -tags summercms_mcp -run 'TestBackendGrantToolsMatchPersonalToken\|TestBackendModeSmoke\|TestBackendRevocationSmoke\|TestBackendAccountSmoke\|TestBackendMode$\|TestBackendConsent\|TestBackendSubjectMigration\|TestBackendGrantRows\|TestBackendRevokeFromAccount\|TestBackendCascade' -v .` | 10 PASS, no SKIP | PASS |
|
| Framework Docker tests, touched modules | `go test -count=1 ./modules/wristband ./modules/pier`; `go test -count=1 -run 'TestMCPAdminConsent\|TestMCPConsentSameRedirect\|TestBackendAccessRevoked\|TestAccountContributionItems\|TestTokenScopeNames\|TestMCPConsent' -v ./modules/cabana` | ok, ok; 9 top-level PASS incl. `TestBackendAccessRevokedNeedsTransaction`, `TestBackendAccessRevokedSmoke` | PASS |
|
||||||
| Plugin full suite (user mode unchanged) | `go -C ../sm-oauthserver-plugin test -count=1 ./...` | ok, exit 0 | PASS |
|
| Plugin vet and fast suite | `go vet ./...`; `go test -short -count=1 ./...` (also with `-tags summercms_mcp`) | exit 0 | PASS |
|
||||||
| sm-bm-app against the new plugin | scratch go.work, `go -C ../sm-bm-app test -count=1 -tags summercms_mcp ./...` | ok, exit 0; sm-bm-app tree unchanged | PASS |
|
| Plugin backend-mode and review-fix tests (Docker) | `go test -count=1 -tags summercms_mcp -run '<19 named tests>' -v .` | 19 PASS, 0 SKIP | PASS |
|
||||||
| Admin SPA consent and items | `npm --prefix admin run test -- ConnectView router LoginView AccountContributions connect.smoke account-items.smoke` | 6 files, 96 tests pass | PASS |
|
| Plugin full suite (user mode unchanged) | `go test -count=1 ./...` | ok (128 s), exit 0 | PASS |
|
||||||
| grzyby local proof | `bash ../sm-grzybyfunkcjonalne-app/scripts/smoke-mcp-oauth.sh` | "ok (12 steps)"; secret grep count 0 | PASS |
|
| sm-bm-app against the fixed plugin | scratch GOWORK, `go test -short -count=1 -tags summercms_mcp ./...` | exit 0; sm-bm-app tree unchanged | PASS |
|
||||||
| grzyby deploy guard | `bash ../sm-grzybyfunkcjonalne-app/scripts/check-deploy.sh` | "check-deploy: ok" | PASS |
|
| App against the fixed plugin | scratch GOWORK, `go vet -tags summercms_mcp ./...`; `go test -short -count=1 -tags summercms_mcp ./...` | exit 0, exit 0 | PASS |
|
||||||
| Docs, contract, dist | `summer docs:build --check`; `check-admin-openapi.sh --check`; `check-admin-dist.sh` | no problems; exit 0; matches a fresh build | PASS |
|
| grzyby local proof | `GOWORK=<scratch> bash scripts/smoke-mcp-oauth.sh` | "ok (12 steps)"; secret grep 0 | PASS |
|
||||||
| Vet | `go vet ./...` (framework); app `go vet -tags summercms_mcp,nodynamic ./...` | clean | PASS |
|
| grzyby deploy guard | `bash scripts/check-deploy.sh` | exit 1: "go.mod requires sm-oauthserver-plugin v0.1.7, which predates mcp.subject backend" | EXPECTED FAIL (PA-CR-01, held release) |
|
||||||
|
| Admin SPA | `npm --prefix admin run test -- ConnectView router LoginView AccountContributions connect.smoke account-items.smoke` | 6 files, 105 tests | PASS |
|
||||||
|
| Contract, dist, docs | `check-admin-openapi.sh --check`; `check-admin-dist.sh`; `summer docs:build --check` | exit 0; matches a fresh build; no problems found | PASS |
|
||||||
|
|
||||||
### Probe Execution
|
### Probe Execution
|
||||||
|
|
||||||
Step 7c: no probe scripts are declared by the phase and no `scripts/*/tests/probe-*.sh` applies; the grzyby smoke above is the phase's runnable check and was executed by the verifier.
|
Step 7c: the phase declares no probe scripts and no `scripts/*/tests/probe-*.sh` applies; the grzyby smoke is the phase's runnable check and was executed by the verifier.
|
||||||
|
|
||||||
### Requirements Coverage
|
### Requirements Coverage
|
||||||
|
|
||||||
No requirement IDs are registered for this phase in REQUIREMENTS.md (ROADMAP: "Requirements: TBD"). Plans declare SC-1..SC-5 as stand-ins; coverage is as in the truths table. No orphaned requirements.
|
No requirement IDs are registered for this phase (ROADMAP: "Requirements: TBD"). Plans use SC-1..SC-5 as stand-ins; coverage is the truths table. No orphaned requirements.
|
||||||
|
|
||||||
### Code Review Findings: goal-blocking assessment
|
### Code review disposition (32.2-REVIEW-DISPOSITION.md)
|
||||||
|
|
||||||
All 29 findings in 32.2-REVIEW-DISPOSITION.md are still open. None makes a must-have truth false as stated; none is classified a goal-blocking gap. Grouped by what they gate:
|
16 of 29 findings fixed (FW-WR-01..06, PA-WR-01..09), PA-CR-01 deferred to the release (detection landed), 13 info findings open. Each fix named in the fix reports was located in the code at the stated commit and its test re-run here. None of the open info findings makes a truth false. Two observations from this verification, both Info:
|
||||||
|
|
||||||
**Release gate (must be closed by or before the release):**
|
- FW-WR-01 also changes wristband for hosts that set `ScopesSupported` without `read` and no `DefaultScopes`: a scopeless request is now refused with `invalid_scope` instead of storing `read`. The plugin's user mode always includes `read`, so no current consumer is affected, but the framework release notes should mention it.
|
||||||
- PA-CR-01 (critical): committed app master pins v0.1.7 without backend mode. Closed by the SC-5 pointer bump itself. Do not push or deploy app master before that commit. The proposed check-deploy guard is recommended so the state cannot recur.
|
- PA-WR-03 uses `tokens_valid_after`, which cabana sets one second ahead. A decision started, or a code issued, within that second after a password change is refused. This fails closed; the administrator retries.
|
||||||
|
|
||||||
**Recommended before tagging (security or correctness of a published contract; the tags are costly to revise):**
|
|
||||||
- PA-WR-03: a consent decision racing a password change or deactivation can mint a grant past the cutoff (neither the decision nor the code exchange re-checks the administrator under the lock). Narrow race, but it weakens SC-3's guarantee.
|
|
||||||
- PA-WR-01: administrator refresh takes a second pool connection inside the rotation transaction (confirmed: `refreshUserUsable` calls `cabana.BackendPrincipal`, which reads through the app's users finder, not `t.db`). Pool exhaustion under concurrent refreshes.
|
|
||||||
- FW-WR-03: pier treats an unknown `MCPGrant.Subject` as a user grant (fail-open on a new public field).
|
|
||||||
- FW-WR-01: an `offline_access`-only authorize ends on "no grantable scope". Pre-existing in user mode, but it may make the real connector unusable; tied to human item 2.
|
|
||||||
- PA-WR-02: transient lookup errors become terminal `invalid_grant`/401 in backend mode only.
|
|
||||||
- PA-WR-05 and PA-WR-07: backend grants keep verifying after a mode switch, and the documented rollback leaves them alive for a later re-enable.
|
|
||||||
|
|
||||||
**Hardening (no change to the phase goal):** FW-WR-02, FW-WR-04, FW-WR-05, FW-WR-06, PA-WR-04, PA-WR-06, PA-WR-08 (smoke puts throwaway secrets on argv, contradicting its own header and the 32.2-04 SUMMARY claim), PA-WR-09 (covered by human item 3), and all info findings.
|
|
||||||
|
|
||||||
### Anti-Patterns Found
|
### Anti-Patterns Found
|
||||||
|
|
||||||
| File | Line | Pattern | Severity | Impact |
|
| File | Line | Pattern | Severity | Impact |
|
||||||
|------|------|---------|----------|--------|
|
|------|------|---------|----------|--------|
|
||||||
| phase diffs (framework 45eb34e5..HEAD, plugin 7b9899f..HEAD, app c06a2d8..HEAD) | - | TBD/FIXME/XXX added | none found | - |
|
| phase diffs (framework 45eb34e5..HEAD, plugin 7b9899f..HEAD, app c06a2d8..HEAD) | - | TBD/FIXME/XXX/TODO/HACK added | none found | - |
|
||||||
| same | - | TODO/HACK/placeholder added | none found | - |
|
| `admin/src/views/ConnectView.vue` | switchAccount catch | unreachable error branch (`logout()` never throws) | Info | carried from the previous report |
|
||||||
| `../sm-grzybyfunkcjonalne-app/scripts/smoke-mcp-oauth.sh` | 344, 372, 391, 420-421 | secrets on process argv despite the header's claim | Warning | Throwaway values; false guarantee in a script others will copy (PA-WR-08) |
|
| `../sm-grzybyfunkcjonalne-app` working tree | - | submodule `plugins/golem15/oauthserver` checked out at 4c209c1, behind every plugin fix | Info | a build with the app's own go.work uses pre-fix plugin code; resolved by the release pointer bump |
|
||||||
| `admin/src/views/ConnectView.vue` | switchAccount catch | unreachable error branch (`logout()` never throws) | Info | Behaviour is fine; the planned inline alert never shows |
|
|
||||||
|
|
||||||
### Human Verification Required
|
### Human Verification Required
|
||||||
|
|
||||||
#### 1. Live connector check (cross-site cookie), status UNVERIFIED
|
UAT evidence (Step 8b): `32.2-UAT.md` has four rows, all `pending`; none settles an item. The four items keep their exact row names; rows 2 and 3 have updated expected text for the fixed code.
|
||||||
|
|
||||||
**Test:** After the production deploy, add `https://grzybyfunkcjonalne.pl/mcp` as a connector in Claude while signed in to `/gfadmin`, complete the sign-in, call a Journal tool, then revoke the connection on My account. See `../sm-grzybyfunkcjonalne-app/DEPLOY.md`, "Live connector check (deferred)", and 32.2-VALIDATION.md, Manual-Only Verifications row 1.
|
#### 1. Live connector check (cross-site cookie)
|
||||||
**Expected:** The consent card shows the signed-in administrator, not the login screen, after the cross-site redirect.
|
|
||||||
**Why human:** The `SameSite=Strict` admin cookie on a cross-site navigation chain cannot be reproduced on localhost. Not passed, not failed.
|
|
||||||
|
|
||||||
#### 2. Connector scope behaviour, status UNVERIFIED
|
**Test:** After the production deploy, add `https://grzybyfunkcjonalne.pl/mcp` as a connector in Claude while signed in to `/gfadmin`, sign in, call a Journal tool, then revoke on My account.
|
||||||
|
**Expected:** The consent card shows the signed-in administrator after the cross-site redirect; if it shows login, signing in returns to the same request.
|
||||||
|
**Why human:** Cross-site `SameSite=Strict` navigation cannot be reproduced on localhost.
|
||||||
|
|
||||||
**Test:** In the same run, note the scope value Claude sends and what the card offers.
|
#### 2. Connector scope behaviour
|
||||||
**Expected:** Grantable catalog scopes appear. If Claude sends only `offline_access`, the card shows "no grantable scope" and FW-WR-01 must be fixed first.
|
|
||||||
**Why human:** Depends on the real connector's request (VALIDATION.md manual row 2).
|
|
||||||
|
|
||||||
#### 3. Production MCP resource, status UNVERIFIED
|
**Test:** In the same run, note the scope value Claude sends to `/oauth/mcp/authorize` and what the card offers.
|
||||||
|
**Expected:** The card lists the catalog scopes the administrator can grant and offers Stay connected. A request with only `offline_access` now gets the catalog (FW-WR-01 fixed), so "no grantable scope" with Deny only would be a regression.
|
||||||
|
**Why human:** Depends on the real connector's request.
|
||||||
|
|
||||||
**Test:** Check that `SUMMER_GOLEM15__OAUTHSERVER__MCP__RESOURCE` is set and that the protected-resource `.resource` equals the authorization server's resource.
|
#### 3. Production MCP resource
|
||||||
**Expected:** Both are `https://grzybyfunkcjonalne.pl/mcp`.
|
|
||||||
**Why human:** Deploy-time environment, unchecked by any guard (PA-WR-09).
|
|
||||||
|
|
||||||
#### 4. SC-5 release go-ahead, status PENDING
|
**Test:** Check that `SUMMER_GOLEM15__OAUTHSERVER__MCP__RESOURCE` is set, run `scripts/check-deploy.sh --live`, and compare the protected-resource `.resource` with the authorization server's resource.
|
||||||
|
**Expected:** Both `https://grzybyfunkcjonalne.pl/mcp`; `--live` ok. A missing key now fails boot instead of logging only.
|
||||||
|
**Why human:** Deploy-time environment; `--live` has not been run on a server.
|
||||||
|
|
||||||
**Test:** Decide whether to run plan 05 task 5's tag-and-publish branch in its documented order (framework v0.6 patch containing b1b96d85, plugin v0.1.8 on that tag, plugin push, app pointer bump commit, two changelog posts).
|
#### 4. SC-5 release go-ahead (pending)
|
||||||
**Expected:** Task 5's automated verify passes on the tag-and-publish branch.
|
|
||||||
**Why human:** The release needs the user's word; the checkpoint answered hold. SC-5 stays unmet until then.
|
**Test:** Decide whether to run plan 05 task 5's tag-and-publish branch.
|
||||||
|
**Expected:** Framework v0.6 patch (v0.6.7 is still free) containing b1b96d85 and the review fixes through 0ade662a (the plugin now calls `wristband.CheckConsentPath`); plugin v0.1.8 on that tag, pushed; app pointer bump commit (gitlink, go.mod, plugins.gen.go), after which `scripts/check-deploy.sh` passes; two changelog posts the same day.
|
||||||
|
**Why human:** Releases need the user's word; the checkpoint answered hold.
|
||||||
|
|
||||||
### Gaps Summary
|
### Gaps Summary
|
||||||
|
|
||||||
No code gaps block the phase goal. SC-1 to SC-4 are achieved and were re-proven by the verifier: an administrator signs in over OAuth through the admin SPA consent card, the grant names only the administrator, pier caps it exactly like a `g15_` token with the same scopes, every D-13 change and the My account revoke end it, and the first consumer completes the whole flow locally while `g15_` tokens keep working. User mode is unchanged (full plugin suite and sm-bm-app pass against the new code).
|
No code gaps block the phase goal. SC-1 to SC-4 were re-proven on the post-review code: the administrator signs in over OAuth through the admin SPA consent card, the grant names only the administrator, pier caps it like a `g15_` token with the same scopes and now refuses unknown subject kinds, every revocation path and the decision/exchange race end the grant, and the first consumer completes the flow locally while `g15_` tokens keep working. User mode is unchanged: the full plugin suite and sm-bm-app pass against the fixed plugin and framework.
|
||||||
|
|
||||||
What remains is release and live evidence, not implementation: SC-5's tags, the plugin push, the app pointer bump (which also closes PA-CR-01) and the changelog posts wait for the user's go-ahead, and the cross-site cookie, connector scope behaviour and production resource can only be checked after the deferred deploy. Seven review warnings (PA-WR-03, PA-WR-01, FW-WR-03, FW-WR-01, PA-WR-02, PA-WR-05, PA-WR-07) are worth triaging before tagging, because the tags publish the pact, wristband and plugin contracts to other applications.
|
What remains is release and live evidence: SC-5's tags, the plugin push, the app pointer bump (which also closes PA-CR-01 and makes check-deploy pass again) and the changelog posts wait for the user's go-ahead. The cross-site cookie, the connector's scope request and the production resource can only be checked after the deferred deploy.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
_Verified: 2026-11-21T01:50:18Z_
|
_Verified: 2026-11-21T12:27:00Z_
|
||||||
_Verifier: Claude (msd-verifier)_
|
_Verifier: Claude (msd-verifier)_
|
||||||
|
|||||||
Reference in New Issue
Block a user