feat: Create rows from configuration, Setup card and table help #24

Merged
KofTwentyTwo merged 3 commits from feature/tables-populated-defaults into develop 2026-10-14 22:44:58 +00:00
KofTwentyTwo commented 2026-10-14 22:09:00 +00:00 (Migrated from github.com)

Audit per table

Seeded: collaboration_feature_setting only, at run time (see below). Every other table holds user content or runtime data and starts empty by design (listed with reasons in CollaborationTablesGuardrailTest.STARTS_EMPTY). All 19 tables are read or written by runtime code; no half-wired column found (settings, permissionMode are read by FeatureSettingsProvider, TagsService, AccessRequestService).

What changed

  • Feature Settings action Create rows from configuration (standard streamed ETL, admin only). Writes INSTANCE rows for all 12 features mirroring the effective config (enabled defaults on, rest off, EDIT_OR_GRANTED, TAGS {"mode":<defaultTagMode>}) plus APP/TABLE rows wherever code declares something.
  • Why runtime, not SQL: rows depend on host config. Why per-scope rows: core applies overrides after code declarations (instance, app, table), so a bare INSTANCE row would overwrite table-level code declarations. Restating each declaring scope (and the full chain for tables in several apps) keeps resolution identical. Only runs when the table is empty. Not run automatically: seeding inside the override-refresh path would write during reads and recurse into refresh.
  • Setup card on the home (features on, where, from rows or configuration), using the runtime resolver.
  • Help bundle for the app and all 19 tables ("How rows get created"), applied by CollaborationHelp (STAND-IN core=#1198).
  • README, UPGRADE.md, CHANGELOG.

Tests

FeatureSettingsDefaultsTest (effective enabled/mode/settings identical with and without rows across 4 configs incl. two apps on one table; insert-only; edited row live; admin only; Setup card), CollaborationTablesGuardrailTest. ./mvnw verify green (checkstyle, JaCoCo).

Not done

Nothing. Caveat: once rows exist they win over later code changes to withDefaultFeatures/withTableFeatures (documented in UPGRADE.md).

🤖 Generated with Claude Code

## Audit per table Seeded: `collaboration_feature_setting` only, at run time (see below). Every other table holds user content or runtime data and starts empty by design (listed with reasons in `CollaborationTablesGuardrailTest.STARTS_EMPTY`). All 19 tables are read or written by runtime code; no half-wired column found (`settings`, `permissionMode` are read by FeatureSettingsProvider, TagsService, AccessRequestService). ## What changed - Feature Settings action **Create rows from configuration** (standard streamed ETL, admin only). Writes INSTANCE rows for all 12 features mirroring the effective config (enabled defaults on, rest off, EDIT_OR_GRANTED, TAGS `{"mode":<defaultTagMode>}`) plus APP/TABLE rows wherever code declares something. - Why runtime, not SQL: rows depend on host config. Why per-scope rows: core applies overrides after code declarations (instance, app, table), so a bare INSTANCE row would overwrite table-level code declarations. Restating each declaring scope (and the full chain for tables in several apps) keeps resolution identical. Only runs when the table is empty. Not run automatically: seeding inside the override-refresh path would write during reads and recurse into refresh. - Setup card on the home (features on, where, from rows or configuration), using the runtime resolver. - Help bundle for the app and all 19 tables ("How rows get created"), applied by `CollaborationHelp` (STAND-IN core=#1198). - README, UPGRADE.md, CHANGELOG. ## Tests `FeatureSettingsDefaultsTest` (effective enabled/mode/settings identical with and without rows across 4 configs incl. two apps on one table; insert-only; edited row live; admin only; Setup card), `CollaborationTablesGuardrailTest`. `./mvnw verify` green (checkstyle, JaCoCo). ## Not done Nothing. Caveat: once rows exist they win over later code changes to withDefaultFeatures/withTableFeatures (documented in UPGRADE.md). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.