Commit Graph

1878 Commits

Author SHA1 Message Date
Jakub Zych
fab99e0a00 chore(19.7-01): rebuild the embedded admin for account contributions and prompted actions 2026-10-22 16:38:37 +02:00
Jakub Zych
9a5f27e86c feat(19.7-01): admin SPA account contributions and prompted record actions
- AccountContributions.vue on My account: one card per contributed section
  with status and outline buttons; confirm or danger actions go through the
  shared ConfirmDialog; a returned URL opens in a new tab (noopener) and stays
  as a visible link; 409 reloads with the stale toast
- ConfirmRequest.prompt and useConfirm value; ConfirmDialog renders one
  labelled text input (maxlength, autocomplete off, aria-describedby comment,
  autofocus), confirm disabled until a value is typed, Enter confirms
- RecordActions posts {payload} for a prompted action and {} otherwise; a 422
  on payload shows the server's detail as a danger toast
- types.ts exports RecordActionPrompt, AccountContribution,
  AccountContributionAction, AccountActionResult
- vitest smokes AccountContributions.test.ts and RecordActionsPrompt.test.ts
2026-10-22 16:38:37 +02:00
Jakub Zych
9f14cf603c feat(19.7-01): account contributions, prompted record actions and backend subject events
- pact.HasAccountContributions compiled at Activate; GET /account/contributions
  and POST /account/contributions/{name}/actions/{action} behind interactiveOnly
  (AccountContributionView, AccountContributionActionView, AccountActionResultView)
- RecordAction.prompt (RecordActionPrompt) for a pact.AdminRecordAction with a
  Prompt; the record action route accepts payload only for such an action
  (trimmed JSON string, non-empty, capped at max_length) and hands it to Run as
  Value through CRUDService.RecordActionWithValue; a prompt without a label
  fails boot
- fireSubjectChanged: pact.MCPSubjectChanged for revoked tokens, Administrators
  saves that changed role, permissions or superuser, Roles saves that changed
  grants, deactivation and deletion
- phrases backend::lang.form.action_prompt_required/_too_long (en, pl)
- smoke tests TestAccountContributionsSmoke and TestRecordActionPromptSmoke;
  TestRecordActionPromptRun on Postgres; route inventories, CSRF walk and
  OpenAPI conformance cases extended for the two routes
- regenerated admin/openapi/admin.json and admin/src/api/schema.d.ts; cabana
  README, docs/backend/{admin-controllers,users-and-permissions}.md
2026-10-22 16:31:29 +02:00
Jakub Zych
6887abf575 feat(19.7-01): SDK-free pact contracts for MCP, account contributions and prompted actions
- pact/mcp.go: HasMCP, MCP, MCPTool, MCPPrompt, MCPGuard, MCPGuards,
  MCPSubject, MCPDispatch, MCPTokenVerifier, MCPGrant, ErrMCPTokenInvalid,
  MCPPersonalTokenResolver, MCPLinkedBackendResolver, LinkedBackendUser,
  MCPSubjectChanged and its kinds, FrontendPermission, HasFrontendPermissions
- capabilities.go: AdminActionPrompt, AdminRecordAction.Prompt,
  AdminRecordActionInput.Value, HasAccountContributions, AccountContribution,
  AccountAction, AccountActionInput, AccountActionResult
- discovery tests, MCPGuards registry test and a go list -deps assertion
  that pact names neither the MCP SDK, jsonschema-go nor bouncer
- pact README and docs/plugins/registration.md rows
2026-10-22 16:16:35 +02:00
Jakub Zych
5c15dea569 feat(19.7-01): streaming routes, MCP mount hook, configurable authorize scopes
- surf.Router.MountStream and recoverStream: a raw, unbuffered route kind
  whose http.Flusher reaches the client; panic after the first byte only
  aborts the body
- surf.MCPBuildTag and the mountPier hook: mcp.enabled is inert without the
  summercms_mcp tag until it is true, then boot fails naming the tag
  (pier_off.go is the untagged side)
- wristband parseAuthorizeScopes takes the server's allowed set built from
  Options.ScopesSupported; the default set is unchanged
- cooler.KeyPrefix exported for the MCP module's Redis keys
- smoke tests TestStreamingRouteSmoke, TestPierMountSmoke, TestMCPScopesSmoke
- surf, wristband and cooler READMEs, docs/services/{routing,oauth-server}.md
2026-10-22 16:11:37 +02:00
Jakub Zych
1bd91a4522 feat(19.7-01): in-process dispatch marker and compiled handler lookup
- bouncer.Dispatch, WithDispatch, Dispatched: context-only pre-resolved
  principal marker honoured by Registry.Middleware for listed guard names
- cabana.ResolveBackend honours a backend-kind marker; additive
  ResolveBackendToken, ScopeLimitFor and BackendPrincipal resolvers
- surf.Router.Handler and compileHandlers: one compiled chain per route,
  shared by BuildRouter validation and compile
- smoke tests TestDispatchSmoke, TestDispatchedSmoke, TestDispatchMarkerSmoke
- READMEs and docs/services/{authentication,routing}.md updated
2026-10-22 16:00:19 +02:00
Jakub Zych
a74a218cd9 docs(19.7): mark phase planned after verification 2026-10-22 15:46:30 +02:00
Jakub Zych
3653422572 docs(phase-19.6.1): mark phase complete after UAT and security 2026-10-22 15:36:25 +02:00
Jakub Zych
b28800ad39 docs(phase-19.6.1): add/update security threat verification 2026-10-22 15:27:39 +02:00
Jakub Zych
0a5945d681 test(19.6.1): mark verification passed after UAT retest 2026-10-22 15:24:11 +02:00
Jakub Zych
19c6a65575 test(19.6.1): pass UAT test 2 after relation-label remount fix 2026-10-22 15:24:01 +02:00
Jakub Zych
49ffb395c0 docs(19.7): add pattern map, mark D-36 informational, drop session path from plan 02 2026-10-22 14:59:54 +02:00
Jakub Zych
2f496f6200 test(19.6.1): re-verify after relation-label gap closure 2026-10-22 14:59:34 +02:00
Jakub Zych
43d0f4622c docs(19.7): revise plans after plan check 2026-10-22 14:57:52 +02:00
Jakub Zych
587f9ddf2f docs(19.6.1): review persist relation labels
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 14:51:39 +02:00
Jakub Zych
ed7da85f46 docs(19.6.1-05): mark phase ready for verification 2026-10-22 14:44:14 +02:00
Jakub Zych
1e3b006c5d docs(19.6.1-05): record plan position and decision 2026-10-22 14:44:02 +02:00
Jakub Zych
007c68bab2 docs(19.6.1-05): complete persist relation labels plan 2026-10-22 14:43:34 +02:00
Jakub Zych
51e1a1ea6e chore(19.6.1-05): rebuild embedded admin dist
- modules/boardwalk/dist matches a fresh admin build
- remount-safe relation labels ship in the embedded SPA

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 14:42:18 +02:00
Jakub Zych
d47d6182f0 docs(19.7): create phase plans (5 plans: seams, pier, user plugin, oauthserver+journal+demo, tests and security review) 2026-10-22 14:41:30 +02:00
Jakub Zych
14baafb27c feat(19.6.1-05): persist picked relation labels across FormView tab remount
- FORM_REMEMBER_LABEL inject so hosts keep picked option names
- RelationField choose() writes the label before emit
- Vitest backstops remount and tab-switch labeling

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 14:40:35 +02:00
Jakub Zych
ba0501c274 test(19.6.1): complete UAT - 25 passed, 1 issue 2026-10-22 14:30:13 +02:00
Jakub Zych
51d088a3b2 docs(quick-261022-imo): settings section panel scoped to the current category 2026-10-22 13:54:08 +02:00
Jakub Zych
80bb5aee3d chore(quick-261022-imo): rebuild embedded admin dist 2026-10-22 13:53:06 +02:00
Jakub Zych
85476fa3fe test(quick-261022-imo): settings section panel coverage
- settingsSectionOf: null cases, category order, link entry placement
- SettingsPanel: labels, links, current entry, empty category, collapse
- AppShell: hidden cases, settings-link controllers, collapse, offset, narrow, focus hand-off
2026-10-22 13:52:20 +02:00
Jakub Zych
834ef98572 feat(quick-261022-imo): settings section panel scoped to the current category
- settingsSectionOf returns the current entry's category group (null for one-entry categories)
- SettingsPanel mirrors the plugin side menu, collapse included
- AppShell shows it on settings forms and settings-linked controllers without own navigation
- docs/backend/settings.md describes moving between settings pages
2026-10-22 13:50:39 +02:00
Jakub Zych
a97743a39f test(19.6.1): persist human verification items as UAT 2026-10-22 13:48:03 +02:00
Jakub Zych
d7dc2a385a docs(19.6.1): record gap-closure code review 2026-10-22 13:44:02 +02:00
Jakub Zych
6bd2506db6 docs(19.6.1-04): complete gap-closure plan 2026-10-22 13:37:26 +02:00
Jakub Zych
e62086084b chore(19.6.1-04): require CR-01 and WR-03 tests in the phase gate
The docker stage must refuse a tree that drops TestRolesCodeDeclaredCodeRefused or TestActionExtensionOutranked.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 13:36:12 +02:00
Jakub Zych
ffc0a94afe docs(quick-261022-imo): plan settings section panel scoped to category 2026-10-22 13:34:31 +02:00
Jakub Zych
cb460b6000 docs(19.6.1-04): state Administrators outranking on the D-14 seam
- cabana, not the contributor, applies guardOutranked before a contributed Run
- A contribution to summercms.cabana.users is 403 user.outranked when the target outranks the caller

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 13:30:40 +02:00
Jakub Zych
068adaabf9 fix(19.6.1-04): refuse code-declared role capture and wrap Administrators Runs
- Roles create and update refuse a submitted code that code-declared grants attach to
- compileActionExtensions wraps contributed Administrators Runs with guardOutranked
- Prove both holes on Postgres; keep the boot smoke callable with a superuser principal

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 13:29:38 +02:00
Jakub Zych
422bd1e01f test(19.6.1): complete UAT - 24 passed, 1 issue 2026-10-22 13:17:34 +02:00
Jakub Zych
eadc7810be docs(19.6.1): create gap-closure plan 2026-10-22 13:05:53 +02:00
Jakub Zych
cfebbacc3d docs(19.6.1): verification report, gaps found (22/25) 2026-10-22 12:45:01 +02:00
Jakub Zych
d6a6e7ac60 docs(19.6.1): record code review disposition 2026-10-22 12:36:13 +02:00
Jakub Zych
d5da300e24 docs(19.6.1): add code review report 2026-10-22 12:36:02 +02:00
Jakub Zych
a4cfd628ce docs(phase-19.6.1): update tracking after wave 3 2026-10-22 12:27:11 +02:00
Jakub Zych
1a68cc5280 docs(19.6.1-03): complete privilege rule tests and phase gate plan 2026-10-22 12:26:00 +02:00
Jakub Zych
8f3d625943 docs(19.6.1-03): validation map and deferred items
- 19.6.1-VALIDATION.md: per-task map green, Wave 0 ticked with the files
  as built, wave_0_complete true
- deferred-items.md: lagoon's model validator skips string min/max;
  granted does not expand a held leading wildcard
2026-10-22 12:24:35 +02:00
Jakub Zych
7842aca7f5 chore(19.6.1-03): check-phase19.6.1 gate
Fail-closed stages go, docker, admin, docs and sc1 with the detectors of
check-phase19.5.sh: every Docker-free and Postgres rule test by required
name, the SC-1 regression tests, the vitest and browser files, the
OpenAPI and dist checks, the consuming-application name check and the
SC-1 commit check. --all reports NOT RUN docker only without a daemon
(a failure with PHASE1961_REQUIRE_DOCKER=1); --self-test proves the
detectors and that rule.
2026-10-22 12:24:30 +02:00
Jakub Zych
4c61a180d0 test(19.6.1-03): SPA trigger, record lock and footer wrap tests
- trigger.test.ts: triggerState and applyTriggers
- FormView: disable, absent-controller and hide-tab backstops, the live
  announcement
- PermissionEditorField and formState: record-locked rows, notes and the
  payload omission, record lock over request lock, read-only screens
- PreviewView: hide removes, disable shows no note
- browser record-actions-wrap at 1024px; vitest.browser.config.ts gains
  the Tailwind plugin so the footer is laid out with the admin's CSS
2026-10-22 12:18:34 +02:00
Jakub Zych
085179b676 test(19.6.1-03): trigger boot rules and per-record permission locks
- TestFieldTriggerBoot (-short): every compileTrigger and checkTriggers
  refusal names controller, field and trigger; disable and hide reach the
  localized schema; settings and relation forms refuse the key
- TestPermissionRecordLocks (-short): the save rule in radio and checkbox
  modes, no lock lookup on create, meta only for stored records with a
  provider
- TestRolesCodeDeclaredLocks (Postgres): locked_by_code grants on a role,
  a save without them, locked_self on the own record
2026-10-22 12:11:57 +02:00
Jakub Zych
1a56294d9b test(19.6.1-03): last-superuser race, lifecycle, revocation, seam and roles tests
- TestAdministratorsLastSuperuser (D-09): A and B reduce each other on the
  five paths while a test transaction holds the guard's advisory lock until
  pg_locks shows both requests waiting; one succeeds, one gets last_superuser
- TestAdministratorsLastSuperuserConcurrent: ten unsynchronized rounds
- TestAdministratorsLifecycle (D-10) and TestAdministratorsRevocation (D-12),
  two-row bulk selections included
- TestActionExtensionBoot (-short) and TestActionExtensionRun (D-14, D-15)
- TestRolesLifecycle (D-16, D-17), TestRolesPermissionCeiling (D-07)
- TestBackendScreensActivation (-short, D-01, D-04)
2026-10-22 12:09:12 +02:00
Jakub Zych
83240706b2 fix(cabana): bulk lifecycle actions change every selected administrator
actionDB returned the Unscoped instance of the action's session, whose
conditions accumulate, so a bulk activate, deactivate or restore of two
applicable rows wrote only the first (the second update matched
"id = A AND id = B") while still counting it. A bulk deactivate
therefore left the other administrators active and signed in (D-10,
D-12). actionDB now ends with a plain Session, so every query starts
anew. Found by TestAdministratorsLifecycle.
2026-10-22 12:04:01 +02:00
Jakub Zych
b684bb7d8d test(19.6.1-03): save-path privilege rule tests
- TestAdministratorsSuperuserHidden (D-03, scoped-token superusers)
- TestAdministratorsSuperuserProjected (Pitfall 1)
- TestAdministratorsPermissionCeiling and TestAdministratorsRoleCeiling (D-06, D-07)
- TestAdministratorsSelfEdit (D-08), TestAdministratorsPasswordAndIdentity (D-11)
- TestAdministratorsOutranked (D-19), TestAdministratorsOwnPassword (D-20)
- TestRoleCeiling (-short) against grantsCovered
2026-10-22 12:01:06 +02:00
Jakub Zych
461cb21b3e fix(cabana): enforce the 4-character password minimum on the Administrators form
The form's min:4 rule never applied: the model validator skips string
min and max. storePassword now refuses a typed password under 4
characters with a 422 on the field, next to the 72-byte check (D-11).
Found by TestAdministratorsPasswordAndIdentity.
2026-10-22 12:00:18 +02:00
Jakub Zych
536ea8c1bf test(19.6.1-03): screens test env and the superuser flag rule over HTTP
- administrators_harness_test.go: newScreensEnv with extra plugins, seedAdmin,
  seedRole, login, isolateSuperusers, row snapshots and error decoders; the
  harness moved out of backend_screens_smoke_test.go and gained cleanup
- export_test.go: SuperuserLockKey for the last-superuser race
- TestAdministratorsSuperuserFlag (D-05) through the assembled handler
2026-10-22 11:54:48 +02:00
Jakub Zych
1aaa8a444c docs(phase-19.6.1): update tracking after wave 2 2026-10-22 11:46:16 +02:00