Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .agents/skills/verify-dms-database/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ One file per feature. `covers:` lists the source globs it owns, `docs:` the page
|---|---|---|
| [smoke](smoke.md) | # Smoke | smoke |
| [overview](overview.md) | # Overview | the-connection-card-reads-the-probe, a-configured-driver-label-shows-beside-the-age, without-a-driver-label-the-card-shows-a-dash, the-card-age-counts-up-and-the-probe-repeats-every-thirty-seconds, schema-cards-list-every-schema-largest-first, largest-tables-rank-the-default-instances-by-rows, recent-queries-list-your-last-five-runs, the-header-buttons-lead-to-the-working-pages, an-unreachable-database-shows-unavailable-and-check-again-recovers |
| [config](config.md) | # Config | built-in-patterns-label-schemas-by-the-start-of-their-id, an-exact-key-beats-a-pattern-which-beats-a-built-in-label, a-glob-key-matches-the-whole-schema-id, a-label-takes-each-of-the-seven-tones |
| [access](access.md) | # Access | every-route-needs-a-signed-in-session, a-member-gets-403-from-every-route-and-writes-nothing, a-member-sees-neither-the-pages-nor-the-catalog-tile, the-catalog-tile-reads-the-database, the-owner-only-gate-is-logged-at-start |
| [schemas](schemas.md) | # Schemas | the-source-counts-rows-columns-indexes-relations-and-modifiers-of-each-table, schema-instance-search-and-structure-filters-narrow-the-source-and-combine, rows-are-counted-in-the-picked-instance-default-named-or-all, the-instances-route-searches-sorts-and-limits-the-named-instances-of-a-schema, a-table-is-read-by-its-schema-and-name-id, columns-are-declared-in-code-and-inferred-from-sampled-rows, the-tables-and-schemas-routes-answer-the-platform-owner-only, each-filter-of-the-bar-narrows-the-list-and-sets-its-own-url-key, the-url-restores-every-filter-after-a-reload-and-clear-removes-them, slash-focuses-the-search-field-but-not-while-typing-or-with-a-modifier, a-filter-that-matches-nothing-says-no-result-and-clear-filters-restores-the-list, each-of-the-five-sortable-columns-sorts-both-ways-and-the-third-click-restores-the-default-order, the-relations-and-modifiers-columns-name-the-tables-and-the-flags, a-row-click-opens-the-inspector-and-previous-next-j-and-k-step-through-the-list, dragging-the-drawer-edge-resizes-it-and-it-opens-at-the-width-you-left-it, the-inspector-states-the-counts-and-lists-each-column-with-its-type-null-and-notes, a-column-named-constructor-is-listed-like-any-other-column, the-indexes-and-relations-tabs-list-what-the-table-declares-and-a-relation-opens-the-other-table, the-sample-row-tab-shows-one-row-and-another-row-pages-through-the-table, browse-query-and-diagram-actions-open-the-other-pages-on-the-same-table |
| [diagram](diagram.md) | # Diagram | the-layout-api-stores-one-layout-per-schema-and-refuses-bad-positions, the-notes-api-creates-lists-updates-and-deletes-notes-per-schema, the-notes-api-refuses-missing-numbers-with-400-and-unknown-notes-with-404, every-diagram-route-answers-the-platform-owner-only, tables-list-their-columns-with-types-and-icons-and-relations-are-arrows, an-encrypted-column-carries-the-lock-icon-of-the-legend, a-table-of-more-than-twelve-columns-comes-folded-and-folding-is-not-saved, folding-is-a-setting-of-your-own-view-and-is-not-saved-with-the-team-layout, finding-a-column-a-folded-table-hides-unfolds-that-table, the-fold-keeps-the-twelve-column-boundary-and-every-column-an-arrow-ends-on, a-large-schema-opens-at-forty-percent-on-its-top-left-and-fit-view-shows-it-whole, a-relation-to-a-table-not-drawn-ends-on-a-dashed-chip-that-opens-that-table, a-relation-to-another-schema-ends-on-a-chip-that-opens-that-table, the-url-picks-the-schema-and-the-table-and-names-what-it-cannot-find, a-schema-without-a-table-says-so-and-offers-no-note-or-auto-layout, dragging-a-table-saves-the-layout-and-everyone-reads-it, a-table-not-placed-yet-takes-its-automatic-place-and-placed-tables-stay, auto-layout-previews-the-arrangement-and-keep-or-discard-decides, auto-layout-keeps-groups-together-and-clear-of-notes-that-never-move, n-and-the-note-button-drop-a-note-ready-to-write-and-it-is-saved-with-the-schema, a-double-click-edits-a-note-and-the-trash-button-and-delete-remove-it, notes-belong-to-their-schema-and-everyone-reads-them, undo-and-redo-cover-every-move-and-note-and-are-saved, escape-leaves-the-find-field-then-lifts-the-focus-then-clears-the-selection |
| [data](data.md) | # Data | the-instance-picker-lists-named-instances-with-a-search-and-a-limit, list-clamps-the-page-and-orders-the-rows, list-filters-search-and-counts-follow-the-wire-tokens, the-selection-decodes-schema-table-and-instance, columns-get-and-tables-answer-what-the-grid-needs, references-count-the-rows-pointing-at-a-row, the-browse-api-answers-the-platform-owner-only, the-sidebar-counts-each-table-in-the-picked-instance, tables-open-as-preview-tabs-and-are-kept-on-demand, links-open-the-table-in-the-instance-they-name, search-filters-and-sort-narrow-and-order-the-rows, the-footer-pages-1250-rows-with-exact-ranges-at-every-size, r-refreshes-the-rows-and-the-search-shortcut-works-from-the-grid, the-row-drawer-steps-through-the-page-with-j-and-k, the-row-drawer-shows-fields-json-and-the-rows-pointing-at-it, the-fields-tab-widens-long-values-and-sets-null-with-the-dashed-circle, all-instances-is-a-read-only-view-with-the-instance-column, recently-opened-tables-are-offered-when-no-tab-is-open, no-match-and-empty-tables-say-so, a-refused-read-shows-the-error-and-try-again-reads-it-again |
| [editing](editing.md) | # Editing | edits-are-staged-then-reviewed-then-written-one-put-per-row, invalid-drafts-are-refused-esc-cancels-and-a-click-away-decides, null-empties-a-cell-and-backslash-null-is-the-text-null, object-and-array-cells-open-the-json-editor-in-a-side-drawer, the-json-editor-is-as-tall-as-the-drawer, discard-and-closing-a-tab-with-staged-changes-ask-first, undo-writes-the-previous-values-back-within-the-window, undo-is-offered-for-ten-seconds-then-the-values-stay, a-row-deleted-meanwhile-drops-its-changes-and-the-rest-is-saved, a-failed-write-stops-the-save-and-the-rows-left-stay-staged, a-saved-row-shows-in-place-unless-the-save-may-move-rows, a-save-under-a-search-or-a-filter-reads-the-page-again, an-edit-and-its-undo-land-in-the-instance-of-the-tab-only, saved-cells-keep-their-type-numbers-booleans-dates-and-objects, the-edit-route-writes-typed-values-and-refuses-the-rest, hashed-encrypted-and-localized-columns-are-written-as-typed, the-row-drawer-stages-edits-like-the-cells-do, an-undo-whose-write-fails-keeps-the-saved-values-and-offers-undo-again |
| [config](config.md) | # Config | a-label-takes-each-of-the-seven-tones |
| [access](access.md) | # Access | a-member-sees-neither-the-pages-nor-the-catalog-tile, the-catalog-tile-reads-the-database |
| [schemas](schemas.md) | # Schemas | each-filter-of-the-bar-narrows-the-list-and-sets-its-own-url-key, the-url-restores-every-filter-after-a-reload-and-clear-removes-them, slash-focuses-the-search-field-but-not-while-typing-or-with-a-modifier, a-filter-that-matches-nothing-says-no-result-and-clear-filters-restores-the-list, each-of-the-five-sortable-columns-sorts-both-ways-and-the-third-click-restores-the-default-order, the-relations-and-modifiers-columns-name-the-tables-and-the-flags, a-row-click-opens-the-inspector-and-previous-next-j-and-k-step-through-the-list, dragging-the-drawer-edge-resizes-it-and-it-opens-at-the-width-you-left-it, the-inspector-states-the-counts-and-lists-each-column-with-its-type-null-and-notes, a-column-named-constructor-is-listed-like-any-other-column, the-indexes-and-relations-tabs-list-what-the-table-declares-and-a-relation-opens-the-other-table, the-sample-row-tab-shows-one-row-and-another-row-pages-through-the-table, browse-query-and-diagram-actions-open-the-other-pages-on-the-same-table |
| [diagram](diagram.md) | # Diagram | tables-list-their-columns-with-types-and-icons-and-relations-are-arrows, an-encrypted-column-carries-the-lock-icon-of-the-legend, a-table-of-more-than-twelve-columns-comes-folded-and-folding-is-not-saved, folding-is-a-setting-of-your-own-view-and-is-not-saved-with-the-team-layout, finding-a-column-a-folded-table-hides-unfolds-that-table, the-fold-keeps-the-twelve-column-boundary-and-every-column-an-arrow-ends-on, a-large-schema-opens-at-forty-percent-on-its-top-left-and-fit-view-shows-it-whole, a-relation-to-a-table-not-drawn-ends-on-a-dashed-chip-that-opens-that-table, a-relation-to-another-schema-ends-on-a-chip-that-opens-that-table, the-url-picks-the-schema-and-the-table-and-names-what-it-cannot-find, a-schema-without-a-table-says-so-and-offers-no-note-or-auto-layout, dragging-a-table-saves-the-layout-and-everyone-reads-it, a-table-not-placed-yet-takes-its-automatic-place-and-placed-tables-stay, auto-layout-previews-the-arrangement-and-keep-or-discard-decides, auto-layout-keeps-groups-together-and-clear-of-notes-that-never-move, n-and-the-note-button-drop-a-note-ready-to-write-and-it-is-saved-with-the-schema, a-double-click-edits-a-note-and-the-trash-button-and-delete-remove-it, notes-belong-to-their-schema-and-everyone-reads-them, undo-and-redo-cover-every-move-and-note-and-are-saved, escape-leaves-the-find-field-then-lifts-the-focus-then-clears-the-selection |
| [data](data.md) | # Data | the-sidebar-counts-each-table-in-the-picked-instance, tables-open-as-preview-tabs-and-are-kept-on-demand, links-open-the-table-in-the-instance-they-name, search-filters-and-sort-narrow-and-order-the-rows, the-footer-pages-1250-rows-with-exact-ranges-at-every-size, r-refreshes-the-rows-and-the-search-shortcut-works-from-the-grid, the-row-drawer-steps-through-the-page-with-j-and-k, the-row-drawer-shows-fields-json-and-the-rows-pointing-at-it, the-fields-tab-widens-long-values-and-sets-null-with-the-dashed-circle, all-instances-is-a-read-only-view-with-the-instance-column, recently-opened-tables-are-offered-when-no-tab-is-open, no-match-and-empty-tables-say-so, a-refused-read-shows-the-error-and-try-again-reads-it-again |
| [editing](editing.md) | # Editing | edits-are-staged-then-reviewed-then-written-one-put-per-row, invalid-drafts-are-refused-esc-cancels-and-a-click-away-decides, null-empties-a-cell-and-backslash-null-is-the-text-null, object-and-array-cells-open-the-json-editor-in-a-side-drawer, the-json-editor-is-as-tall-as-the-drawer, discard-and-closing-a-tab-with-staged-changes-ask-first, undo-writes-the-previous-values-back-within-the-window, undo-is-offered-for-ten-seconds-then-the-values-stay, a-row-deleted-meanwhile-drops-its-changes-and-the-rest-is-saved, a-failed-write-stops-the-save-and-the-rows-left-stay-staged, a-saved-row-shows-in-place-unless-the-save-may-move-rows, a-save-under-a-search-or-a-filter-reads-the-page-again, an-edit-and-its-undo-land-in-the-instance-of-the-tab-only, saved-cells-keep-their-type-numbers-booleans-dates-and-objects, hashed-encrypted-and-localized-columns-are-written-as-typed, the-row-drawer-stages-edits-like-the-cells-do, an-undo-whose-write-fails-keeps-the-saved-values-and-offers-undo-again |
| [query](query.md) | # Query | a-query-returns-its-rows-in-the-order-it-asks, an-instance-and-every-instance-are-targeted, a-failed-query-says-what-failed-and-offers-the-nearest-name, the-insert-chips-add-their-operation, ctrl-space-completes-schemas-and-tables-from-the-workspace, an-empty-console-offers-examples-built-on-your-own-tables, results-over-1000-rows-are-cut-at-1000, the-table-view-shows-every-returned-row, an-export-of-uneven-rows-keeps-every-key-in-csv-and-json, csv-quotes-a-comma-a-quote-and-a-line-break-so-the-cell-reads-back, format-strips-trailing-spaces-and-blank-lines, ctrl-space-inside-a-filter-completes-the-columns-of-the-table, the-chart-plots-the-first-numeric-column-with-pickers-for-both-axes, open-in-data-browser-opens-the-target-table-or-the-row, copy-as-json-puts-the-returned-rows-on-the-clipboard, a-link-opens-the-console-on-the-table-in-the-instance-it-names |
| [guard](guard.md) | # Guard | a-delete-names-its-operation-target-and-rows-and-waits-for-the-table-name, every-write-names-its-operation-and-counts-the-rows-it-would-touch, confirming-a-single-row-update-needs-the-table-name-as-the-docs-say, a-confirmed-write-acts-on-the-data-of-that-moment, a-read-query-runs-straight-away |
| [library](library.md) | # Library | history-keeps-your-last-500-runs-newest-first, history-records-failures-and-writes-with-their-status, history-is-searchable-and-clearing-it-keeps-the-saved-queries, a-saved-query-needs-a-name-and-can-be-edited-and-deleted, a-shared-query-reaches-the-team-and-only-its-author-changes-it, history-belongs-to-its-user-and-a-link-restores-a-run, the-library-survives-a-backend-restart, history-groups-runs-by-day-with-yesterday-and-older-dates, a-history-row-without-a-status-reads-as-ok |
| [extending](extending.md) | # Extending | a-registered-schema-shows-its-tables-columns-indexes-relations-and-modifiers, deep-links-open-the-documented-pages-on-the-table, without-the-automation-module-the-trigger-registration-is-a-silent-no-op |
| [library](library.md) | # Library | history-keeps-your-last-500-runs-newest-first, history-records-failures-and-writes-with-their-status, history-is-searchable-and-clearing-it-keeps-the-saved-queries, a-saved-query-needs-a-name-and-can-be-edited-and-deleted, a-shared-query-reaches-the-team-and-only-its-author-changes-it, history-belongs-to-its-user-and-a-link-restores-a-run, history-groups-runs-by-day-with-yesterday-and-older-dates, a-history-row-without-a-status-reads-as-ok |
| [extending](extending.md) | # Extending | deep-links-open-the-documented-pages-on-the-table, without-the-automation-module-the-trigger-registration-is-a-silent-no-op |
| [external](external.md) | # External | an-external-database-is-picked-browsed-edited-and-left, an-external-database-refuses-what-it-cannot-serve-with-sentences |
| [package](package.md) | # Package | none: `src/test/package.test.ts` checks the tarball, the locales and the ranges |

Expand Down
15 changes: 11 additions & 4 deletions .agents/skills/verify-dms-database/features/access.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ The pages and the module's API answer to the platform owner only, and the module

## Sub-features

- `every-route-needs-a-signed-in-session`: every read and write route answers 401 without a session.
- `a-member-gets-403-from-every-route-and-writes-nothing`: a member with the module's permissions gets 403 from every route and changes nothing.
- `every-route-needs-a-signed-in-session`: every read and write route answers 401 without a session. Integration test in `src/test/access.journeys.test.ts`.
- `a-member-gets-403-from-every-route-and-writes-nothing`: a member with the module's permissions gets 403 from every route and changes nothing. Integration test in `src/test/access.journeys.test.ts`.
- `a-member-sees-neither-the-pages-nor-the-catalog-tile`: no tile and no page for a member; the owner sees the tile.
- `the-catalog-tile-reads-the-database`: the tile's two readout lines, version and category.
- `the-owner-only-gate-is-logged-at-start`: the five 'gated owner-only' log lines.
- `the-owner-only-gate-is-logged-at-start`: the owner-only gate the start log reports, each of the five pages' layout routes answering the owner and refusing a member with the module's permissions. Integration test in `src/test/access.journeys.test.ts`.

## How to get to it (user POV)

Expand All @@ -34,9 +34,16 @@ The pages and the module's API answer to the platform owner only, and the module
pnpm e2e:run specs/access.spec.ts
```

The journeys marked integration test run in `pnpm test`; one file alone after `pnpm run build`:

```bash
pnpm exec ajs module test . -f dist/test/access.journeys.test.js
```

## Gotchas

- The member is made by the playground's fixture (`POST /verify-database/member`) with a role of the given permission ids.
- The integration tests make it with `createMemberWithRole` (`src/test/ownerSession.ts`).

## Coverage

Expand All @@ -45,6 +52,6 @@ pnpm e2e:run specs/access.spec.ts
| Pages reserved to the platform owner; routes answer only to the owner | the first three journeys |
| Tenants and their members never see it | `a-member-sees-neither-the-pages-nor-the-catalog-tile` |
| Adds a Database entry to the Modules catalog | `the-catalog-tile-reads-the-database` |
| FAQ: the backend logs the owner-only gate at start | `the-owner-only-gate-is-logged-at-start` |
| FAQ: the backend logs the owner-only gate at start | `the-owner-only-gate-is-logged-at-start`: the integration test checks the gate the line reports, each page's layout route under `/modules/database/<page>` answering the owner and refusing a member with the module's permissions; the line itself is written once at start, before a test can listen |
| Own tables (`dms-database` schema) hold layouts, notes, history, saved queries | `schemas` feature lists the schema; persistence journeys of `diagram` and `library` |
| Blocks carry names so the role editor can hide one per role | Not driven: the role editor lists blocks of pages the owner alone reaches; a hidden block has no observable effect on the owner |
13 changes: 10 additions & 3 deletions .agents/skills/verify-dms-database/features/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ The `schemaLabels` option and the built-in patterns that badge schemas.

## Sub-features

- `built-in-patterns-label-schemas-by-the-start-of-their-id`: with no configuration, app, core, global, staging, reviews and production schemas get their label and tone; others get none.
- `an-exact-key-beats-a-pattern-which-beats-a-built-in-label`: the resolution order, and that the first matching `*` key wins.
- `a-glob-key-matches-the-whole-schema-id`: a `*` key labels a schema only when it covers the whole id, from its first to its last character.
- `built-in-patterns-label-schemas-by-the-start-of-their-id`: with no configuration, app, core, global, staging, reviews and production schemas get their label and tone; others get none. Integration test in `src/test/config.journeys.test.ts`.
- `an-exact-key-beats-a-pattern-which-beats-a-built-in-label`: the resolution order, and that the first matching `*` key wins. Integration test in `src/test/config.journeys.test.ts`.
- `a-glob-key-matches-the-whole-schema-id`: a `*` key labels a schema only when it covers the whole id, from its first to its last character. Integration test in `src/test/config.journeys.test.ts`.
- `a-label-takes-each-of-the-seven-tones`: each tone, the primary default, and that options are read at start.

## How to get to it (user POV)
Expand All @@ -28,8 +28,15 @@ The `schemaLabels` option and the built-in patterns that badge schemas.
pnpm e2e:run specs/config.spec.ts
```

The journeys marked integration test run in `pnpm test`; one file alone after `pnpm run build`:

```bash
pnpm exec ajs module test . -f dist/test/config.journeys.test.js
```

## Gotchas

- The integration tests read the `schemaLabels` the test harness sets (`src/test/schemaLabelConfig.ts`), whose keys match only their own schemas; the built-in journey removes the option with `setModuleConfig` for its run.
- `withConfig` restarts the backend with `VERIFY_DATABASE_SCHEMA_LABELS` (`key:Label:tone;...`) and again without it.

## Coverage
Expand Down
Loading
Loading