release: v4.4.0 — auto-rebake on class-B drift + widen compat-test paths#306
Merged
Conversation
Closes the manual-remediation step in the drift loop. Before: detection → issue opened → maintainer SSHes to a CC-installed machine → capture-and-bake → review diff → commit → PR → merge. After: detection → issue + bot PR opened → maintainer reviews compat-test result + diff → merge. cc-drift-template-watch.yml gains an "Auto-rebake + open PR" step that fires on --check exit 2: - Skips if bot/template-rebake-* PR is already open (de-dup by branch prefix; mirrors class-A's cc-drift-watch.yml pattern) - Runs the real bake (writes src/cc-template-data.json) - Bails with workflow warning if bake produced no diff vs HEAD - Commits as cc-drift-template-watch[bot], pushes to bot branch - Opens a labeled PR linking the drift report - NOT auto-merged: template is the wire-shape contract for non-CC clients; compat-test exercises only passthrough, so a human eyes the rebuild-from-canonical diff and clicks merge The existing "Open / update drift issue" step now references the open PR (or a rebake-skipped note) so the issue body links the remediation in flight. Permissions: contents write (was read) for bot/* push, pull-requests write (added) for PR open. Master branch protection still gates the actual merge. compat-test-self-hosted.yml path filter widens to include src/scrub-template.ts and scripts/capture-and-bake.mjs. v4.3.1's scrubber fix would not have triggered the gate under the old filter — exactly the regression class the gate exists to catch. 74/74 default suite green. No src/ changes.
Contributor
Compat test: ✅ PASSEDRan Output |
shellcheck flagged consecutive 'echo X >> $GITHUB_OUTPUT' lines as SC2129 style. Group them under a brace block with a single redirect.
5 tasks
askalf
added a commit
that referenced
this pull request
May 17, 2026
Both compat-test-self-hosted.yml and cc-billing-classifier-canary.yml were silently piggybacking on the platform's existing dario instance (askalf-dario docker container at :3456), not the freshly-built dist they were supposed to test. Mechanism: dario proxy's EADDRINUSE handler probes /health when its target port is occupied, sees an existing dario, prints "dario — already running" and exits 0 (intentional: makes `dario login` / `dario proxy` idempotent for users). On the production runner the docker askalf-dario already binds :3456, so the workflow's `dario proxy` short-circuits and the workflow's curls hit the platform's dario using PLATFORM credentials. For the canary: produced 401 + claim='' because the platform's account is in a different state right now. For compat-test: every PR check on PRs #303, #304, #306, #308, #310, #311 was validating the platform dario, not the PR's freshly-built dist. The PR-time gate was measuring the wrong thing. Fix: both workflows now bind --port 3457 and the harnesses read DARIO_TEST_URL=http://127.0.0.1:3457. Eliminates the port collision. Validated locally on the production runner: HOME=/root/.claude- runner dario proxy --port 3457 starts clean, /health responds, single tiny haiku request returns 200 with a subscription representative-claim. The runner workflow will produce the same result once landed. 75/75 default suite green. No src/ changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Closes the manual-remediation step in the drift loop. Pre-v4.4.0: detection ✓ → issue opened ✓ → maintainer SSHes into a CC-installed machine → `capture-and-bake` → review diff → commit → PR → merge → issue auto-closes. v4.4.0 replaces the three middle steps with a bot, mirroring `cc-drift-watch.yml`'s class-A auto-PR pattern.
Auto-rebake workflow change
`.github/workflows/cc-drift-template-watch.yml` gets a new "Auto-rebake + open PR" step that fires on `--check` exit 2:
Not auto-merged. The bundled template is the wire-shape contract for non-CC clients. compat-test exercises only the passthrough plane; the rebuild-from-canonical plane is not currently covered by an end-to-end test, so a human approves the bake. Compat-test still fires automatically on the bot's PR because the path filter includes `src/cc-template-data.json`.
Permission bump
`contents: write` (was `read`) for `bot/*` push, `pull-requests: write` (added) for PR open. Master branch protection still gates the actual merge.
Compat-test path filter widened
`.github/workflows/compat-test-self-hosted.yml` now also fires on PRs touching `src/scrub-template.ts` and `scripts/capture-and-bake.mjs`. The v4.3.1 scrubber fix would not have triggered the compat gate under the old filter — exactly the regression class the gate is designed to catch.
How to test
```bash
git fetch origin feat/v4.4.0-auto-rebake
git checkout feat/v4.4.0-auto-rebake
npm run build && npm test # 74/74 green (no src/ changes)
End-to-end test happens organically: once merged, the next 30-min cron
tick runs --check on master. If it detects drift, the auto-rebake step
will fire and we'll see a bot/template-rebake-* PR open in the repo.
That's the real validation. Workflow dispatch on master is also available
for immediate trigger.
```
Checklist