docs(19.5): close user-plugin console database todo

This commit is contained in:
Jakub Zych
2026-10-20 23:07:22 +02:00
parent 5e0a04e4da
commit 464f7fa0bb

View File

@@ -10,3 +10,7 @@ area: sm-user-plugin
Found in Phase 14.2 research (gap G1): the same gap stopped `fonoteka:reindex`. Plan 14.2-01 fixed the Fonoteka plugin's own commands (`fonoteka:reindex`, `fonoteka:oauth-client`, `fonoteka:prune-notifications`, and the new `fonoteka:dev-seed`) with a helper that returns the published handle when there is one and otherwise opens `database.dsn` with `lagoon.OpenFromApp` and publishes it with `lagoon.Publish`, so `lagoon.OnDatabase` hooks still run. The seed mints its own API token, so the local stack does not need `user:token:create`.
Suggested fix, in the sm-user-plugin repository: the same published-else-open-and-publish pattern in the user plugin's command helper. It is additive and non-breaking (no route, payload, table, migration ID or config key changes). It is deferred here because sm-user-plugin is a shared core plugin and Phase 14.2 must not modify it; commit and push the plugin first, then bump the submodule pointers in the applications as separate commits. A framework helper (for example in lagoon) that every plugin command can call would remove the duplication; that needs its own decision.
## Done (2026-10-20, Phase 19.5 plan 19.5-01)
Resolved by sm-user-plugin 24b16b1 (`Plugin.withDB` for the token and require-password-change commands) and c43ba87 (plan 19.5-01: `user:backfill-handles` opens its own database with `lagoon.OpenFromApp`). The commands open the database for their run without publishing it, so `lagoon.OnDatabase` hooks do not run for them; a framework helper is still a separate decision.