docs(36-01): add Plan 36-01 execution summary
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
---
|
||||
phase: 36-granular-mcp-oauth-api-token-scope-picker
|
||||
plan: 01
|
||||
subsystem: backend-scopes-and-contract
|
||||
tags: [pact, cabana, pier, phrasebook, openapi, mcp, api-tokens]
|
||||
key-files:
|
||||
created:
|
||||
- modules/pier/uncovered_scopes_warning.go
|
||||
modified:
|
||||
- modules/pact/capabilities.go
|
||||
- modules/cabana/token_scopes.go
|
||||
- modules/cabana/account_tokens.go
|
||||
- modules/cabana/mcp_consent.go
|
||||
- modules/cabana/token_scopes_export.go
|
||||
- modules/pier/pier.go
|
||||
- modules/phrasebook/backend/lang/en/lang.yaml
|
||||
- modules/phrasebook/backend/lang/pl/lang.yaml
|
||||
- admin/openapi/admin.json
|
||||
- admin/src/api/schema.d.ts
|
||||
- modules/pact/README.md
|
||||
- modules/cabana/README.md
|
||||
- modules/pier/README.md
|
||||
- docs/backend/users-and-permissions.md
|
||||
- docs/services/mcp.md
|
||||
decisions:
|
||||
- D-01, D-05, D-14: Added optional `Group string` on `pact.TokenScope` without altering `ValidTokenScopeName` or auto-generating plugin scopes at boot; `validateTokenScopeMessageKeys` fails boot on missing `::` keys.
|
||||
- D-15, D-16: Added always-present `plugin_id` and `group` JSON fields (no `omitempty`) to `cabana.AdminAPITokenScope` across `/account/tokens/scopes`, `/account/tokens`, and `/mcp/consent/{request}`, with deterministic 3-step fallback resolution (`<pluginID>::lang.plugin.name` -> unanimous matched permission `Tab` via `reg.permissionOrder` -> raw `PluginID`) and empty strings for framework/unknown scopes.
|
||||
- D-18: Exported `cabana.TokenScopeCovers(app, plugins, method, permissions)` excluding wildcard `*` and wired `warnUncoveredBackendWriteTools` into `pier.Mount` to emit one structured `Warn` log per plugin with uncovered backend non-`GET`/`HEAD` MCP tools without failing boot.
|
||||
metrics:
|
||||
tasks_completed: 3
|
||||
tasks_total: 3
|
||||
commits: 3
|
||||
completed_date: "2026-11-24"
|
||||
---
|
||||
|
||||
# Phase 36 Plan 01: Backend Scope Metadata, Coverage Warning, Phrasebook & OpenAPI Summary
|
||||
|
||||
Added `pact.TokenScope.Group`, deterministic D-16 `plugin_id`/`group` resolution on `cabana.AdminAPITokenScope`, `cabana.TokenScopeCovers` with a `pier.Mount` boot-time warning for uncovered backend write MCP tools, all 46 EN/PL scope-picker phrasebook keys, regenerated OpenAPI/TypeScript contracts, and updated module READMEs and docs.
|
||||
|
||||
## Tasks & Commits
|
||||
|
||||
| Task | Description | Commit | Files |
|
||||
|------|-------------|--------|-------|
|
||||
| 1 | Add `pact.TokenScope.Group`, `cabana` D-16 group resolution, and `AdminAPITokenScope` `plugin_id`/`group` end-to-end | `cb259ba9` | `modules/pact/capabilities.go`, `modules/cabana/token_scopes.go`, `modules/cabana/account_tokens.go`, `modules/cabana/mcp_consent.go` |
|
||||
| 2 | Export `cabana.TokenScopeCovers` and emit `pier.Mount` boot-time warning for uncovered backend write MCP tools (D-18) | `ca7980ef` | `modules/cabana/token_scopes_export.go`, `modules/pier/pier.go`, `modules/pier/uncovered_scopes_warning.go` |
|
||||
| 3 | Add EN/PL phrasebook copy, regenerate OpenAPI/TS schema, and update module READMEs & docs | `c8985af8` | `modules/phrasebook/backend/lang/{en,pl}/lang.yaml`, `admin/openapi/admin.json`, `admin/src/api/schema.d.ts`, `modules/{pact,cabana,pier}/README.md`, `docs/backend/users-and-permissions.md`, `docs/services/mcp.md` |
|
||||
|
||||
## Verification Results
|
||||
|
||||
All task and plan verification gates passed with zero failures:
|
||||
|
||||
- `go vet ./...` — PASS
|
||||
- `go test -short ./modules/pact ./modules/cabana ./modules/pier ./modules/phrasebook` — PASS
|
||||
- `scripts/check-admin-openapi.sh --check` — PASS (`cabana.AdminAPITokenScope` now requires `group: string` and `plugin_id: string` in both `admin/openapi/admin.json` and `admin/src/api/schema.d.ts`)
|
||||
- `go test ./cmd/summer -run 'TestCommandsDocumented|TestDocsTree' -count=1` — PASS
|
||||
- `go run ./cmd/summer docs:build --check` — PASS (`docs:build: no problems found`)
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
None — plan executed exactly as written.
|
||||
|
||||
## Notes for Wave 2
|
||||
|
||||
- `admin/src/api/schema.d.ts` now defines required `group: string` and `plugin_id: string` on `cabana.AdminAPITokenScope`, so Wave 2 (`admin/` SPA and test fixtures) can consume `AdminAPITokenScope.plugin_id` and `AdminAPITokenScope.group` immediately.
|
||||
- Note that existing Vitest fixture objects (`ConnectView.test.ts`, `connect.smoke.test.ts`, `ApiTokenCreateDialog.test.ts`, `ApiTokensPanel.test.ts`) will require `plugin_id` and `group` strings to pass `vue-tsc` as planned in Wave 2.
|
||||
|
||||
## Self-Check: PASSED
|
||||
|
||||
- Created file verified: `modules/pier/uncovered_scopes_warning.go`
|
||||
- All 15 modified files verified across commits `cb259ba9`, `ca7980ef`, `c8985af8`
|
||||
- `.planning/STATE.md` and `.planning/ROADMAP.md` untouched
|
||||
- Unrelated pre-existing workspace modifications left untouched
|
||||
Reference in New Issue
Block a user