Skip to content

feat(api): sql-workbench routes as spec'd UI API extension endpoints (#20) - #21

Merged
KofTwentyTwo merged 2 commits into
developfrom
feature/arch-ui-api-specs
Oct 14, 2026
Merged

KofTwentyTwo merged 2 commits into
developfrom
feature/arch-ui-api-specs

Conversation

@KofTwentyTwo

Copy link
Copy Markdown
Member

Summary

Closes #20 (architecture review QRun-IO/qqq#1150, finding F2). sql-workbench was the largest blocker for the strict raw-route flip (G2, QRun-IO/qqq#1159).

  • Deletes SqlWorkbenchRouteProvider and its 21 raw /qqq/v1/sql-workbench/* routes.
  • Adds one MiddlewareSpecExtension named sql-workbench, with the established prefix /sql-workbench (so the full paths are unchanged), and 21 endpoint specs. JSON operations extend AbstractJsonEndpointSpec; the export stream extends AbstractEndpointSpec.
  • Security unchanged. The permission checks, read-only/role gates, rate and row limits and audit run in the specs exactly as before; tests cover the denied cases.
  • Fragment src/main/resources/openapi/qqq-v1/sql-workbench.yaml, checked by SqlWorkbenchApiContractTest (the qbit-collaboration#8 pattern).
  • Server tests run with withStrictUiApiRoutes(true).
  • Docs: docs/UI-API.md, README, CHANGELOG.
Method Path (under /qqq/v1/sql-workbench) operationId
GET /capabilities sqlWorkbenchGetCapabilities
GET /schema/{backendName} sqlWorkbenchGetSchema
POST /execute sqlWorkbenchExecute
POST /explain sqlWorkbenchExplain
GET /executions/{uuid}/rows sqlWorkbenchGetRows
GET /executions/{uuid}/export sqlWorkbenchExportResult
POST /executions/{uuid}/cancel sqlWorkbenchCancelExecution
GET /history sqlWorkbenchGetHistory
GET, POST /notebooks sqlWorkbenchListNotebooks, sqlWorkbenchCreateNotebook
GET, PUT, DELETE /notebooks/{id} sqlWorkbenchGetNotebook, ...UpdateNotebook, ...DeleteNotebook
POST /notebooks/{id}/publish, /duplicate sqlWorkbenchPublishNotebook, sqlWorkbenchDuplicateNotebook
GET /notebooks/{id}/versions, /versions/{n} sqlWorkbenchListVersions, sqlWorkbenchGetVersion
POST /notebooks/{id}/versions/{n}/restore sqlWorkbenchRestoreVersion
GET, POST /notebooks/{id}/snapshots sqlWorkbenchListSnapshots, sqlWorkbenchCreateSnapshot
DELETE /notebooks/{id}/snapshots/{snapshotId} sqlWorkbenchDeleteSnapshot

Wire changes: none. Next keeps working unchanged. Next can then vendor sql-workbench.yaml and drop these 21 calls from its off-spec list.

Draft until QQQ 4.1.0-RC.6 is released

The pom targets RC.6, which has the extension point (#1128). It was verified locally against core develop as -Dqqq.snapshot.version=4.1.0-ARCHRC6-SNAPSHOT:

  • mvn verify: 133 unit tests and 8 Postgres integration tests, 0 failures;
  • coverage and checkstyle gates pass.

CI goes green once RC.6 is on Central.

🤖 Generated with Claude Code

KofTwentyTwo and others added 2 commits October 13, 2026 19:48
…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>
Enforce the qbit-bom#10 guardrails (G1, G3, G4, G7) and run tests in
strict raw-route mode (G2). All pass on the released QQQ 4.1.0-RC.6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KofTwentyTwo
KofTwentyTwo marked this pull request as ready for review October 14, 2026 12:15
@KofTwentyTwo

Copy link
Copy Markdown
Member Author

QQQ 4.1.0-RC.6 is released. Verified locally against it with ./mvnw -B verify. This PR also adopts qbit-build-parent 2.1.0 with guardrails enforced (qbit.guardrails.enforce=true) and strict raw-route mode; every guardrail passes. Marked ready for review.

@KofTwentyTwo
KofTwentyTwo merged commit c59b2ae into develop Oct 14, 2026
2 checks passed
KofTwentyTwo added a commit that referenced this pull request Oct 14, 2026
…guardrails)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the 21 sql-workbench routes onto spec'd /qqq/v1 extension classes

1 participant