7 Commits
Author SHA1 Message Date
james.maesandClaude Opus 5.5 84a7033ae4 feat(api): serve the sql-workbench routes as spec'd UI API extension endpoints
Replace SqlWorkbenchRouteProvider (21 raw /qqq/v1/sql-workbench Javalin
routes) with one MiddlewareSpecExtension "sql-workbench" (prefix
/sql-workbench). JSON operations use AbstractJsonEndpointSpec; the result
export stream extends AbstractEndpointSpec.

Paths, methods and payloads are unchanged, and so are the permission
checks, read-only gates, limits and audit. The generated fragment is
committed at openapi/qqq-v1/sql-workbench.yaml and checked by a contract
test. The server tests run in strict raw-route mode.

The core baseline becomes 4.1.0-RC.6, the first RC with the extension
point (QRun-IO/qqq#1128).

Closes #20 (architecture review QRun-IO/qqq#1150, finding F2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 19:48:18 -05:00
james.maesandClaude Opus 5.5 c36a0e8c94 Merge develop into feature/developer-panel; open SQL in the Runner
Brings the snake_case rename (#7) and the app home and Runner (#9).
The developer panel's "open as a new cell" links now target the Runner
app (SqlWorkbenchRunnerAppMetaDataProducer.APP_NAME, prefixed), since
/app/sqlWorkbench is the home dashboard. Tests and README updated; the
changelog entry moves under 1.0.0-RC.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:31:22 -05:00
james.maesandClaude Opus 5.5 6f2626b04f feat: app home dashboard, Runner nav entry, main tables only in the nav
Owner spec: the SQL Workbench app home is an information dashboard like
the other app homes, the notebook UI is its own nav entry ("Runner"), and
the nav lists only the main tables; sub-tables are relations on a notebook.

- Home: summary tiles and links, runs per day, recent notebooks, recent
  runs, slowest and failed queries, most-used notebooks, shared notebooks,
  committed writes, and (admins only) activity by user. Read through core
  actions in the viewer's session, so permissions and record locks apply;
  honest empty and no-permission states. Full width, inline styles only.
- Runner: sqlWorkbenchRunner child app showing the SQL_WORKBENCH widget
  (/app/sqlWorkbenchRunner?notebook=<id>).
- Nav: Runner, sql_workbench_notebook, sql_workbench_execution. Cells,
  versions, pinned results and shares stay standard tables (URL, API) as
  child lists on the notebook; new Runs child list (notebook -> execution
  join, locked to the viewer's runs) and an Open in Runner widget.
- SqlWorkbenchIntegrations: opt-in ESB and Quick Search hooks for the main
  tables, no dependency on either module.
- Tests: home widgets (H2 and Postgres), nav structure, child lists,
  hooks. README, CHANGELOG, UPGRADE, CLAUDE/AGENTS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:45:38 -05:00
james.maesandClaude Opus 5.5 e0d9312aff feat: SQL Workbench record developer panel
Add SqlWorkbenchDeveloperPanelProvider (id sqlWorkbench, order 450, icon
terminal), registered by SqlWorkbenchDeveloperPanelsMetaDataProducer via
DeveloperPanelsMetaData. For tables on an allowed RDBMS backend, and users
with the workbench access permission, it shows read-only SELECTs for the
record and its table in the backend's own table/column names (dialect
quoted identifiers, escaped primary-key literal), backend details, and
links that open each query in the workbench (?sql=&backend=, not run).

Build against QQQ 4.1.0-RC.4 (the developer panel contract).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 10:38:51 -05:00
james.maesandClaude Opus 5.5 ddd85ebe0d feat(#3): expose workbench data as standard QQQ tables secured by record locks
Notebooks, cells, versions, pinned results, shares and the execution
audit are now ordinary QQQ tables in the SQL Workbench app (nav children,
record views with child lists, edit, export, audits, developer mode)
instead of hidden admin-only tables.

- Record security locks (core-enforced, so every entry point): owner OR
  share audience for notebooks and their children (through joins), the
  audit by user; admins hold sqlWorkbenchAllAccess. Key types
  sqlWorkbenchUser / sqlWorkbenchAudience, applied to sessions by
  SqlWorkbenchSecurity.applyToSession (no keys without workbench access).
- New sqlWorkbenchNotebookShare (USER / GROUP / ALL); publishing writes an
  ALL share and visibility follows the shares.
- Per-table read/insert/edit/delete permissions, listed per role by the
  config (user / share / admin).
- Table customizers hold the notebook invariants for the notebook UI and
  the tables alike: owner from the session, cell validation and order,
  one version per change, share keys, append-only versions and audit
  (admins included), pinned results only from pinning, cascades.
- NotebookService and history run as the caller through the same actions;
  explicit owner/share checks stay as defense in depth.
- Record actions: Share Notebook, Duplicate Notebook, Restore Version.
- DDL: share table plus an idempotent backfill of library shares.
- Tests: TableSecurityMatrixTest (role x table x action over the v1 table
  API, core actions, export, PVS, record actions, notebook endpoints) and
  a PostgreSQL lock test. Docs: README, DESIGN, CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 06:08:10 -05:00
james.maesandClaude Opus 5.5 ec607016bd build: build against the released QQQ 4.1.0-RC.2
Re-pin the default-active qqq-snapshot profile from qqq-bom-pom
4.1.0-RC.1 to 4.1.0-RC.2 (now on Maven Central) and update the docs.
No SNAPSHOT dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 13:49:10 -05:00
james.maesandClaude Opus 5.5 b8d33460bf feat: SQL Workbench qbit 1.0 backend
QQQ 4.1 QBit (com.kingsrook.qbits:sql-workbench) for a super-user SQL
notebook over any RDBMS backend of the instance:

- Dialect-aware scanner, statement splitter/classifier (READ,
  EXPLAIN_ANALYZE, WRITE, DDL, FORBIDDEN) and :named parameter binding.
- Execution engine: read-only sessions in a database READ ONLY
  transaction (Postgres, MySQL, SQLite query_only; classifier on H2),
  gated write mode (rolled-back dry run, single-use confirm token,
  row guard, hard cap, drift check), statement timeouts, row/byte caps,
  cancellation, per-user concurrency, clean connection return, and a
  fail-closed execution audit (audit updates deferred until the
  session connection is released).
- Dedicated read-only/write credentials per backend; backend read-only
  replica support.
- EXPLAIN / EXPLAIN ANALYZE (always rolled back) normalized to a plan
  tree; schema introspection with QQQ table/field -> SQL name mapping.
- Notebooks (personal/shared), cells, versions with retention, result
  snapshots.
- REST routes under /qqq/v1/sql-workbench (Javalin 7, JSON-only
  bodies), CSV/XLSX/JSON export.
- Tables, notebook PVS, SQL_WORKBENCH widget and sqlWorkbench app; no
  processes. PostgreSQL DDL in docs/ddl/postgres.sql.
- Tests: 83 unit (H2, SQLite, HTTP) + 6 Testcontainers Postgres
  integration tests; JaCoCo 94% instructions.
- CircleCI qqq-orb 0.6.8 config, Maven wrapper, CLAUDE.md/AGENTS.md,
  CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:47:40 -05:00