chore: QRun qbit repo standard, producer, tables, permissions and app home #1

Merged
KofTwentyTwo merged 1 commits from feature/repo-standard into develop 2026-10-13 20:39:31 +00:00
KofTwentyTwo commented 2026-10-13 20:32:52 +00:00 (Migrated from github.com)

Summary

Brings qbit-data-analysis up to docs/QRUN-QBIT-REPO-STANDARD.md and adds the first qbit code. Design: QRun-IO/qqq#1137 (docs/DATA-ANALYSIS.md).

Repository standard

  • Files: LICENSE (Apache-2.0), NOTICE, the CONTRIBUTING, SECURITY, CODE_OF_CONDUCT and CODE_STYLE pointers, CHANGELOG, CLAUDE.md/AGENTS.md, CODEOWNERS, dependabot (develop, grouped), .editorconfig, .gitattributes, .gitignore.
  • Build: Maven wrapper (mvnw 100755, Maven 3.9.11), checkstyle config, parent qbit-build-parent:2.0.0, ${revision} 0.1.0-SNAPSHOT, the qqq-snapshot profile on 4.1.0-RC.5, JaCoCo 70%/90%.
  • CI: CircleCI on qqq-orb@0.6.8 with the configure-package-install pre-step and the standard workflows (publish_release on ^v\d+\.\d+\.\d+$ only), plus the release-rc.yml caller of QRun-IO/.github.
  • The template example code is removed, and docs/DESIGN.md points to the spec.

Code (package com.kingsrook.qbits.dataanalysis)

  • Entry point and settings: DataAnalysisQBitProducer and DataAnalysisQBitConfig. The config holds the spec §7.2 code defaults, include and exclude lists, and per-table code overrides.
  • Six tables (spec §7.1): data_analysis_table_config, data_analysis_saved, data_analysis_saved_star, data_analysis_schedule, data_analysis_watch, data_analysis_run. They come with enum PVSs, unique keys, sections and field audit. Schedules, stars and watches are child lists of a saved analysis.
  • Permissions use standard rules with full names: data_analysis.saved.*, .watch.*, .settings.* and .run.*, so they appear in the core catalog and the authentik policy editor.
  • Record locks on the owner or user id use the security key data_analysis_user, with all-access key data_analysis.admin.
  • <table>.analyze: DataAnalysisPermissions is a stand-in until core TableFeaturePermissionsMetaData (spec §3.6, phase a) ships.
  • Analyses app home: real counts (mine, shared, starred, watches enabled and firing, runs in the last 7 days) queried as the user, and empty states that say why. The nav lists only the main tables, and there are no processes.
  • DataAnalysisSchema.postgresScript: DDL generated from the metadata.

Shared READ of saved analyses is owner-only for now (README "Security"). It opens in phase f together with collaboration's sharing contract.

Test plan

  • ./mvnw verify: 10 tests, checkstyle clean, JaCoCo 99% instructions / 100% classes
  • Producer and instance validation, config validation, permission names (incl. custom base names), record locks (owner isolation, admin key), home counts with real rows and the denied and empty states, schema script

🤖 Generated with Claude Code

## Summary Brings `qbit-data-analysis` up to `docs/QRUN-QBIT-REPO-STANDARD.md` and adds the first qbit code. Design: QRun-IO/qqq#1137 (`docs/DATA-ANALYSIS.md`). **Repository standard** - Files: LICENSE (Apache-2.0), NOTICE, the CONTRIBUTING, SECURITY, CODE_OF_CONDUCT and CODE_STYLE pointers, CHANGELOG, CLAUDE.md/AGENTS.md, CODEOWNERS, dependabot (develop, grouped), `.editorconfig`, `.gitattributes`, `.gitignore`. - Build: Maven wrapper (`mvnw` 100755, Maven 3.9.11), checkstyle config, parent `qbit-build-parent:2.0.0`, `${revision}` 0.1.0-SNAPSHOT, the `qqq-snapshot` profile on **4.1.0-RC.5**, JaCoCo 70%/90%. - CI: CircleCI on `qqq-orb@0.6.8` with the `configure-package-install` pre-step and the standard workflows (`publish_release` on `^v\d+\.\d+\.\d+$` only), plus the `release-rc.yml` caller of `QRun-IO/.github`. - The template example code is removed, and `docs/DESIGN.md` points to the spec. **Code (package `com.kingsrook.qbits.dataanalysis`)** - Entry point and settings: `DataAnalysisQBitProducer` and `DataAnalysisQBitConfig`. The config holds the spec §7.2 code defaults, include and exclude lists, and per-table code overrides. - Six tables (spec §7.1): `data_analysis_table_config`, `data_analysis_saved`, `data_analysis_saved_star`, `data_analysis_schedule`, `data_analysis_watch`, `data_analysis_run`. They come with enum PVSs, unique keys, sections and field audit. Schedules, stars and watches are child lists of a saved analysis. - Permissions use **standard rules** with full names: `data_analysis.saved.*`, `.watch.*`, `.settings.*` and `.run.*`, so they appear in the core catalog and the authentik policy editor. - Record locks on the owner or user id use the security key `data_analysis_user`, with all-access key `data_analysis.admin`. - `<table>.analyze`: `DataAnalysisPermissions` is a stand-in until core `TableFeaturePermissionsMetaData` (spec §3.6, phase a) ships. - **Analyses** app home: real counts (mine, shared, starred, watches enabled and firing, runs in the last 7 days) queried as the user, and empty states that say why. The nav lists only the main tables, and there are no processes. - `DataAnalysisSchema.postgresScript`: DDL generated from the metadata. Shared READ of saved analyses is owner-only for now (README "Security"). It opens in phase f together with collaboration's sharing contract. ## Test plan - [x] `./mvnw verify`: 10 tests, checkstyle clean, JaCoCo 99% instructions / 100% classes - [x] Producer and instance validation, config validation, permission names (incl. custom base names), record locks (owner isolation, admin key), home counts with real rows and the denied and empty states, schema script 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.