Promotion: dev → staging → prod
The git-native recipe (roadmap Phase 46) that aligns the read-only-prod-Studio posture with an explicit path for how an edit gets to production. Nothing here is new machinery — it composes the pieces the framework already ships.
The loop
Section titled “The loop”- Edit in dev. Studio is writable in dev (
tesseraql.studio.readOnly: false): route form, source editor, scaffolds, migrations, policy edits — everything lands as files in the app tree, and applying serves immediately (the Phase 42 instant loop). - Branch and PR. The app tree is a git repository; Studio edits are ordinary diffs.
Open a PR from the dev branch. The Studio audit trail (
work/studio/audit/) tells you who changed what if the diff needs context —work/itself is never committed. - CI governance gate. The PR pipeline runs the machine checks the framework provides:
tesseraql lint(ortesseraql:lint) — structure, security, references; findings carrysource:line.tesseraql test+ coverage kinds (tesseraql:report) — the declarative suites, with per-kind thresholds.tesseraql release-diff --app . --baseline <deployed-tree>— what does this deploy change: routes, API contract, the migrations it will run, policy changes, schema delta. Post the Markdown to the PR; a reviewer approves the change, not a prose description of it.tesseraql:release-evidence— the SBOM, OpenAPI, and htmx-contract artifacts.
- Tag and package. On merge, CI builds the immutable artifact —
tesseraql package(.tqlapp) or the container image — stamped with the tag. Run artifacts under.tesseraql/stay out of the package by design;spec.json(byte-stable) rides along. - Promote by config, not edits. Staging and prod run the SAME artifact with a different
environment profile:
--env staging/--env prodselectsconfig/env/<profile>.yml(datasources, pool sizing, metrics/audit switches). Secrets stay in the environment or the secret provider — never in the tree. - Prod Studio is read-only.
tesseraql.studio.readOnly: true(optionally pluseditRoles: []) in the prod profile: the explorer, docs portal, ops console and release diff page stay available for inspection; every write path is disabled. An edit gets to prod exactly one way — back through steps 1-5. - Capture the next baseline. After the deploy, capture the baselines the portal diffs
against: copy
.tesseraql/docs/openapi.json→openapi.baseline.jsonandschema.json→schema.baseline.json(and keep the deployed tree/tag available as therelease-diffbaseline for the next cycle).
Rollback
Section titled “Rollback”Redeploy the previous tag with the same profile. Migrations are fix-forward (Flyway free edition has no undo): roll back code freely, roll schema forward with a follow-up migration.