Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
68fdd1e
ci(doop): train S4c compat sandbox, isolation probes, env allowlist, …
Nov 17, 2026
6641ed1
fix(deploy): real smoke ops, supervised clone migration, probe the sa…
Nov 17, 2026
db1a433
fix(deploy): bounded quiescence proof and durable needs_operator guar…
Nov 17, 2026
212ddb7
fix(deploy): persist the needs_operator guard before the clone migrat…
Nov 17, 2026
bb7bb29
ci(doop): widen drawingBrowser waits to 30s for loaded runners (CHE-6…
Nov 17, 2026
eed3352
test(doop): wait for the element probe before navigating away in page…
Nov 17, 2026
21140da
test(doop): raise the expect.poll default to 30s for loaded runners (…
Nov 17, 2026
ef9adae
test(doop): name the stalled drawingBrowser beforeEach step (CHE-6913)
Nov 17, 2026
281a381
test(doop): reload the drawing fixture when Chrome aborts its module …
Nov 17, 2026
ac5a685
test(doop): give elementPanelBrowser waits 12 s on loaded runners (CH…
Nov 18, 2026
3c362be
ci(doop): merge cheese/main, refresh smoke routes for new groups (CHE…
Nov 19, 2026
c4089fc
ci(doop): merge cheese/main (v0.15.0, split drawing browser tests) (C…
Nov 19, 2026
c7f27c7
ci(doop): smoke routes for agents, custom-providers, image-descriptio…
Nov 19, 2026
50608e1
ci(doop): smoke write chains for agents and image descriptions, provi…
Nov 20, 2026
7459535
ci(doop): train S5 — readback delay, confirm, rollback, evidence (CHE…
congvc-bot-x99[bot] Nov 20, 2026
b48fa9d
ci(doop): train S7 watchers and /healthz revision (CHE-5550) [squash]…
congvc-bot-x99[bot] Nov 20, 2026
571a041
ci(doop): train S3b — audited lift workflow (CHE-5551) [squash] (#104)
congvc-bot-x99[bot] Nov 23, 2026
cadced2
ci(doop): merge cheese/main, add design-attestations smoke route, fix…
Nov 23, 2026
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
4 changes: 4 additions & 0 deletions .context/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ confirm, and written `suspended:*` (never clear) by recovery, drill and rollback
and a GitHub App token from environment `doop-deploy-marker`. Setup and rules:
[`deploy/cd/README.md`](../deploy/cd/README.md).

Lifting a suspension is `cd-lift.yml` (S3b): dispatch with the id of an approved Multica decision; it checks the
decision against the standing marker, proves quiescence and health on C00, and writes `clear:*` with evidence.
It never turns the train on.

## Desktop app (Tauri: macOS DMG + Windows NSIS installer + Linux AppImage/.deb/.rpm)

Driven by `.github/workflows/desktop-release.yml`; every desktop job shares the toolchain setup
Expand Down
13 changes: 13 additions & 0 deletions .context/TECHSTACK.md
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,19 @@ data-doop-webfonts>` for the roster families the frame names and does not load i
- `.github/workflows/cd-deploy.yml` - D2, the only workflow that deploys to C00: schedule (3 a day) and
dispatch, off unless repo variable `DOOP_DEPLOY_TRAIN` is `on`; the `DOOP_DEPLOY_SUSPENDED` marker is written
only by `scripts/deploy-marker.mjs`. See `deploy/cd/README.md`.
- `.github/workflows/cd-lift.yml` - S3b, the audited lift: dispatch only (`decision_id`), allowlisted dispatcher,
C00 runner under the deploy lock. Writes `clear:*` only for an approved `doop.deploy_lift` Multica decision whose
`marker_value` equals the standing marker, with quiescence and `/healthz` proven and the decision and marker
re-read before the write; evidence in `lift-evidence.json`. Logic in `scripts/deploy-lift.mjs`
(`c00.sh lift` supplies the C00 facts). Never touches `DOOP_DEPLOY_TRAIN`.
- `.github/workflows/cd-freshness-watch.yml` and `cd-live-revision.yml` - the two D2 watchers (every 15 min):
a backup `schedule_backup` dispatch when D2 is 45 min late (alarm at 90 min), and a check that C00's
`/healthz` `revision` is not behind the last successful D2 SHA. Both idle while `DOOP_DEPLOY_TRAIN` is not `on`.
Logic in `scripts/cd-watch.mjs`; `/healthz` reads the commit baked into the image (`server/revision.ts`).
The last successful D2 SHA is read from a GitHub deployment (environment `c00-doop`) that D2's evidence job
writes on each confirmed deploy (typed JSON booleans, read back), reconciled with the D2 runs newer than the
record (a confirmed deploy without a record is `unknown`), and without a record a paginated scan of
`deploy-evidence` artifacts; unreadable history is `unknown` and fails visibly, never "nothing deployed".
- `.github/workflows/cla.yml` - CLA check (this is an AGPL-3.0 project with CLA-based
contribution).
- `.github/workflows/desktop.yml` / `desktop-release.yml` - Tauri desktop app CI and installer
Expand Down
142 changes: 124 additions & 18 deletions .github/workflows/cd-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ name: CD deploy
#
# resolve (hosted) enter the run, pick the candidate, read the D1 manifest
# admit (hosted) pin: manifest, D1 run, image label and migration inventory all name the candidate
# deploy (C00) pre-arm check, ARM the marker, then apply (flock + pre-apply check) and readback
# readback-confirm confirm check on C00 that the candidate is what runs; a train run then restores the marker
# rollback rollback check, roll back by digest only if C00 still runs the candidate, then suspend
# deploy (C00) pre-arm check, ARM the marker, then apply (flock + pre-apply check) and readback (3 healthy
# checks in 90 s; records T0: restart count, time)
# readback-delay waits 15 min in environment c00-readback-delay (a wait timer); hosted, so no runner is held
# readback-confirm `c00.sh confirm` on C00, under the flock: migration quiescence, the confirm check, restart count
# unchanged since T0, health, digest; a train run then restores the marker
# rollback `c00.sh rollback` on C00, under the flock: migration quiescence, then the rollback check on what
# C00 runs at that moment. The candidate rolls back to the retained predecessor by digest and the
# predecessor is read back; a predecessor or a newer deploy is left alone; then suspend, and the
# job fails
# evidence every run: deploy-evidence.json (artifact) and the run summary (CHE-5549, C-12)
#
# The suspension marker (repo variable DOOP_DEPLOY_SUSPENDED, CHE-5545, plan C-10) is written only by the three
# C00 jobs, with scripts/deploy-marker.mjs: a train run arms it before its first change and only a passing
# confirm of that same run restores it; recovery and drill runs, and a rollback, write `suspended:*` and never
# `clear:*`. Every failure leaves it armed or suspended, which stops the train. Lifting is S3b.
# `clear:*`. Every failure leaves it armed or suspended, which stops the train. Lifting is cd-lift.yml.
# The train ships OFF: the repository variable DOOP_DEPLOY_TRAIN is absent or not 'on', so a scheduled run
# ends at `resolve` as a clean skip.
# Schedule: 23:17, 07:17 and 15:17 UTC = 06:17, 14:17 and 22:17 ICT.
Expand Down Expand Up @@ -157,8 +164,14 @@ jobs:
outputs:
go: ${{ steps.prearm.outputs.go }}
predecessor_digest: ${{ steps.prearm.outputs.predecessor_digest }}
predecessor_sha: ${{ steps.prearm.outputs.predecessor_sha }}
attempted: ${{ steps.apply.outputs.attempted }}
marker: ${{ steps.arm.outputs.marker }}
lock_wait_seconds: ${{ steps.apply.outputs.lock_wait_seconds }}
# T0 of the readback (C-9): what readback-confirm compares with.
restart_count: ${{ steps.readback.outputs.restart_count }}
health: ${{ steps.readback.outputs.health }}
t0_epoch: ${{ steps.readback.outputs.t0_epoch }}
env:
DEPLOY_REF: ${{ format('ghcr.io/{0}@{1}', github.repository, needs.admit.outputs.digest) }}
DEPLOY_SHA: ${{ needs.admit.outputs.candidate }}
Expand Down Expand Up @@ -234,15 +247,29 @@ jobs:
MARKER_EXPECT: ${{ steps.arm.outputs.marker }}
run: bash deploy/cd/c00.sh apply
- name: Read back (digest, SHA, health)
id: readback
if: ${{ steps.prearm.outputs.go == 'true' }}
run: bash deploy/cd/c00.sh readback
- name: Log out of GHCR
if: always()
run: docker logout ghcr.io

readback-confirm:
# The 15-minute wait is the environment's wait timer (repository setting, see deploy/cd/README.md). A job that
# waits on an environment holds no runner, so this one is hosted and does nothing once released.
readback-delay:
needs: [admit, deploy]
if: ${{ needs.deploy.result == 'success' && needs.deploy.outputs.attempted == 'true' && github.repository == 'cheese-work/doop' }}
runs-on: ubuntu-latest
timeout-minutes: 5
environment: c00-readback-delay
permissions: {}
steps:
- name: Delay over
run: echo "readback delay over; readback-confirm checks the candidate on C00"

readback-confirm:
needs: [admit, deploy, readback-delay]
if: ${{ needs.readback-delay.result == 'success' && needs.deploy.result == 'success' && needs.deploy.outputs.attempted == 'true' && github.repository == 'cheese-work/doop' }}
runs-on: [self-hosted, cheese-c00-deploy]
timeout-minutes: 20
environment: doop-deploy-marker
Expand All @@ -251,13 +278,24 @@ jobs:
concurrency:
group: c00-deploy-doop
cancel-in-progress: false
outputs:
restart_count_confirm: ${{ steps.confirm.outputs.restart_count_confirm }}
confirmed_epoch: ${{ steps.confirm.outputs.confirmed_epoch }}
env:
DEPLOY_REF: ${{ format('ghcr.io/{0}@{1}', github.repository, needs.admit.outputs.digest) }}
DEPLOY_SHA: ${{ needs.admit.outputs.candidate }}
DEPLOY_MODE: ${{ needs.admit.outputs.mode }}
# T0 of the readback in the deploy job: the restart count and the time the delay is measured from.
RESTART_T0: ${{ needs.deploy.outputs.restart_count }}
T0_EPOCH: ${{ needs.deploy.outputs.t0_epoch }}
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
EXTRA: ${{ vars.C00_DEPLOY_AUTHORIZERS }}
# Quiescence reads the live database (C-8.8), so confirm needs what deploy and rollback have: the compose
# project and, when set, the Postgres container (empty: c00.sh finds the project's `db` service).
C00_COMPOSE_DIR: ${{ vars.C00_DOOP_COMPOSE_DIR || '/home/congvc/.local/share/doop' }}
DOOP_DEPLOY_TRAIN: ${{ vars.DOOP_DEPLOY_TRAIN }}
C00_PG_CONTAINER: ${{ vars.C00_DOOP_PG_CONTAINER }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -268,10 +306,14 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Confirm check
# Everything is decided under the flock: quiescence, the confirm check (this run's marker, the candidate's digest
# and label), the delay, and that the container did not restart since T0 and is healthy. A failure here leaves
# the marker armed and starts the rollback job.
- name: Confirm on C00 (quiescence, marker, restarts, health, digest)
id: confirm
env:
MARKER_EXPECT: ${{ needs.deploy.outputs.marker }}
run: node scripts/deploy-gate.mjs recheck "$DEPLOY_MODE" --op confirm --expect "$MARKER_EXPECT"
run: bash deploy/cd/c00.sh confirm
# The marker is a repository variable; `github.token` cannot write one, so a GitHub App token does. It is
# minted in the environment that holds the App key, only for variables, and just before its first use.
- name: Mint the marker token
Expand All @@ -292,8 +334,8 @@ jobs:
run: node scripts/deploy-marker.mjs restore

rollback:
needs: [admit, deploy, readback-confirm]
if: ${{ always() && needs.deploy.outputs.attempted == 'true' && (needs.deploy.result == 'failure' || needs.readback-confirm.result == 'failure') && github.repository == 'cheese-work/doop' }}
needs: [admit, deploy, readback-delay, readback-confirm]
if: ${{ always() && needs.deploy.outputs.attempted == 'true' && (needs.deploy.result == 'failure' || needs.readback-delay.result == 'failure' || needs.readback-confirm.result == 'failure') && github.repository == 'cheese-work/doop' }}
runs-on: [self-hosted, cheese-c00-deploy]
timeout-minutes: 20
environment: doop-deploy-marker
Expand All @@ -302,11 +344,15 @@ jobs:
concurrency:
group: c00-deploy-doop
cancel-in-progress: false
outputs:
action: ${{ steps.rollback.outputs.action }}
applied: ${{ steps.rollback.outcome }}
env:
DEPLOY_REF: ${{ format('ghcr.io/{0}@{1}', github.repository, needs.admit.outputs.digest) }}
DEPLOY_SHA: ${{ needs.admit.outputs.candidate }}
DEPLOY_MODE: ${{ needs.admit.outputs.mode }}
PREDECESSOR_DIGEST: ${{ needs.deploy.outputs.predecessor_digest }}
PREDECESSOR_SHA: ${{ needs.deploy.outputs.predecessor_sha }}
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
EXTRA: ${{ vars.C00_DEPLOY_AUTHORIZERS }}
Expand All @@ -325,33 +371,93 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
# Acts on what C00 runs: the candidate rolls back; the predecessor or a newer deploy is left alone.
- name: Rollback check
id: check
# One step, all under the C00 flock: migration quiescence, then the rollback check on what C00 runs and what the
# marker says at that moment. Only a candidate that is still running rolls back; the predecessor already running
# (`none`) or a newer deploy (`superseded`) changes nothing. A decision made before the lock could replace a
# newer deployment, so none is made here.
- name: Roll back by digest
id: rollback
env:
MARKER_EXPECT: ${{ needs.deploy.outputs.marker }}
run: node scripts/deploy-gate.mjs recheck "$DEPLOY_MODE" --op rollback --expect "$MARKER_EXPECT"
- name: Roll back by digest
if: ${{ steps.check.outputs.action == 'rollback' }}
run: bash deploy/cd/c00.sh rollback
# The marker is a repository variable; `github.token` cannot write one, so a GitHub App token does. It is
# minted in the environment that holds the App key, only for variables, and just before its first use.
- name: Mint the marker token
id: app
if: ${{ !cancelled() && steps.rollback.outputs.go == 'true' }}
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
app-id: ${{ vars.DOOP_MARKER_APP_ID }}
private-key: ${{ secrets.DOOP_MARKER_APP_KEY }}
repositories: doop
permission-variables: write
# Whatever the rollback did, even if it failed: this run's armed value becomes suspended (C-10.3). Only a
# lift (S3b) clears it. Not after a refused check, where the marker is no longer this run's own.
# lift (cd-lift.yml) clears it. Not after a refused check, where the marker is no longer this run's own.
- name: Suspend the marker
if: ${{ !cancelled() && steps.check.outputs.go == 'true' }}
if: ${{ !cancelled() && steps.rollback.outputs.go == 'true' }}
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
MARKER_EXPECT: ${{ needs.deploy.outputs.marker }}
RUN_ID: ${{ github.run_id }}
SHA: ${{ needs.admit.outputs.candidate }}
ACTION: ${{ steps.check.outputs.action }}
ACTION: ${{ steps.rollback.outputs.action }}
run: node scripts/deploy-marker.mjs suspend --reason "rollback-$ACTION"
# The run ends red whatever the rollback did: a readback or confirm failure is a failed deploy (C-9).
- name: Fail the run
if: ${{ !cancelled() }}
env:
ACTION: ${{ steps.rollback.outputs.action }}
run: |
echo "deploy failed after the change started; rollback action: ${ACTION:-none (check refused)}; the marker is suspended or armed"
exit 1

# Every run, whatever happened above: deploy-evidence.json and the run summary (C-12). Hosted, read only.
evidence:
needs: [resolve, admit, deploy, readback-delay, readback-confirm, rollback]
if: ${{ always() && github.repository == 'cheese-work/doop' }}
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Write the evidence
env:
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
MODE: ${{ needs.resolve.outputs.mode }}
CANDIDATE: ${{ needs.admit.outputs.candidate }}
DIGEST: ${{ needs.admit.outputs.digest }}
PREDECESSOR_SHA: ${{ needs.deploy.outputs.predecessor_sha }}
PREDECESSOR_DIGEST: ${{ needs.deploy.outputs.predecessor_digest }}
RESOLVE_RESULT: ${{ needs.resolve.result }}
ADMIT_RESULT: ${{ needs.admit.result }}
DEPLOY_RESULT: ${{ needs.deploy.result }}
DELAY_RESULT: ${{ needs.readback-delay.result }}
CONFIRM_RESULT: ${{ needs.readback-confirm.result }}
ROLLBACK_RESULT: ${{ needs.rollback.result }}
ROLLBACK_ACTION: ${{ needs.rollback.outputs.action }}
ROLLBACK_APPLIED: ${{ needs.rollback.outputs.applied }}
HEALTH: ${{ needs.deploy.outputs.health }}
RESTART_COUNT: ${{ needs.deploy.outputs.restart_count }}
RESTART_COUNT_CONFIRM: ${{ needs.readback-confirm.outputs.restart_count_confirm }}
T0_EPOCH: ${{ needs.deploy.outputs.t0_epoch }}
CONFIRMED_EPOCH: ${{ needs.readback-confirm.outputs.confirmed_epoch }}
LOCK_WAIT_SECONDS: ${{ needs.deploy.outputs.lock_wait_seconds }}
run: node scripts/deploy-evidence.mjs deploy-evidence.json
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: deploy-evidence
path: deploy-evidence.json
if-no-files-found: error
# After the artifact, so a failed record never loses it: a confirmed deploy is also recorded as a GitHub
# deployment. That is the durable last successful D2 SHA the watchers (CHE-5550, C-7) read; neither artifact
# expiry nor a run of skipped slots can lose it.
- name: Record a confirmed deploy
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
run: node scripts/cd-watch.mjs record deploy-evidence.json
40 changes: 40 additions & 0 deletions .github/workflows/cd-freshness-watch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ci-policy: class=scheduled
name: CD freshness watch

# C-7.1 of the deploy train (CHE-5550, plan CHE-5474). D2 (`cd-deploy.yml`) runs at 06:17, 14:17 and 22:17 ICT; this
# watcher is its backup. Every 15 minutes it asks, in `scripts/cd-watch.mjs freshness`: is the last D2 slot 45 min
# old, is a qualified candidate ahead of the last successful D2 SHA, and does no D2 run exist since the slot? Then it
# sends one `schedule_backup` dispatch. At 90 min it fails this run with `::error::`. A failed D1 build is rerun once.
# The last successful D2 SHA is read from the deployment record D2 writes after each confirmed deploy (artifacts are the
# fallback), not from a run conclusion: a skipped D2 ends green. An unreadable history fails this run.
#
# The dispatch is made with the workflow token, so D2 sees `github-actions[bot]`, the one actor it admits for
# `schedule_backup`. It does nothing while repo variable DOOP_DEPLOY_TRAIN is not `on`.
on:
schedule:
- cron: '12,27,42,57 * * * *'
workflow_dispatch:

permissions:
contents: read
actions: write
deployments: read

# Deliberately no concurrency group and no self-hosted runner: a dead deploy runner or a stuck queue must not
# silence the alarm. Public repo: GitHub-hosted minutes are free.
jobs:
freshness:
if: github.repository == 'cheese-work/doop'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
# Via env, never inlined into the script.
- name: Check D2 freshness
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
DOOP_DEPLOY_TRAIN: ${{ vars.DOOP_DEPLOY_TRAIN }}
run: node scripts/cd-watch.mjs freshness
Loading
Loading