Repository navigation
feat(cli): x upgrade --only, and no check runs on main alone - #1274
Conversation
`x upgrade --only <step>[,<step>…]` runs the hop's `x verify` on the named steps, read by the same reader as `x verify --only` (verify-only.ts). The report never reads as a full gate: proof `verify-only`, `verify.only[]`, `verify.notRun[]`, a NOT THE FULL GATE summary, a human line and a `then` naming `x verify --only <the rest> --json`. Default stays the full gate. deploy-proof (ci.yml) and tutorial-run.yml ran only on pushes to main and went red on the merge of a green PR (#1272). Both now run on pull requests that touch the paths they depend on; scripts/ci-workflow-main-only.test.ts fails a workflow or ci.yml job that checks main alone. verify stays the one verdict; the health row reads main's tutorial runs only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Reviewed — nothing blocking0 actionable comment(s) · grounded on your code |
There was a problem hiding this comment.
Review summary — 23 file(s), 4 finding(s).
Critical 0 · Major 1 · Minor 3 · Nit 0
Adds scoped upgrade verification and PR coverage for deployment proofs and tutorials. Two edge cases remain: follow-up verification uses the driver's step list rather than the installed release's, and tutorial health can include fork PR runs.
| File | Findings |
|---|---|
.dz/briefs/health.md |
🚫 1 major |
packages/cli/src/upgrade-gate.ts |
1 minor |
scripts/ci-workflow-main-only.test.ts |
1 minor |
scripts/lib/health-tutorials.ts |
1 minor |
Findings outside the diff
.dz/briefs/health.md:1🚫 major · other .dz/briefs/health.md (schedule health) is 10065 chars with its header, over 10000: refused on every tick. Graded by the platform's.dzcontract, the reader that acts on this file after merge.
- verify.notRun counts the installed CLI's gate (its `x verify plan --parts 1`), so the follow-up names steps that CLI has; this CLI's list stands in when it has no plan. - The ci.yml job rule evaluates each `if` for a push to main and for a pull request (scripts/lib/workflow-if.ts) instead of matching text. - The tutorials health row reads `--branch main --event push`: a fork's PR from a branch named main is not main. - .dz/briefs/health.md trimmed under the platform cap with its header; brief-cap.test.ts reserves 100 characters for that header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Superseded: a newer review of this pull request, on commit aceb28b, no longer requests changes.
There was a problem hiding this comment.
Review summary — 13 file(s), 2 finding(s).
Critical 0 · Major 0 · Minor 2 · Nit 0
The increment discovers installed verification steps, evaluates workflow conditions, and restricts tutorial health checks to main pushes. One edge case still reports a full installed gate as a partial run.
Findings outside the diff
.dz/briefs/health.md:1minor · other .dz/briefs/health.md (schedule health) declares no## Rows: the checkup fires and can file nothing. Graded by the platform's.dzcontract, the reader that acts on this file after merge.
1 non-blocking finding(s) below major (no thread on a re-review — only blocking findings open threads)
packages/cli/src/upgrade-gate.ts:308minor · bug When --only names every installed step but omits newer driver steps, installedNotRun returns [], yet this branch emits only/notRun metadata for a partial gate. Treat an empty notRun as a full gate and add a regression using an older plan with all its steps selected.
…s it as the full gate Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Superseded: a newer review of this pull request, on commit 38253ef, replaces this approval.
Two problems seen on 2026-11-19.
1.
x upgradealways ran the full gateOn a loaded machine one app's hop took 55 minutes, with no way to hand
unit,liveande2eto CI.x upgrade --only <step>[,<step>…]: the hop's last stage isx verify --only <steps> --jsoninstead ofx verify --jsonpackages/cli/src/verify-only.ts, the onex verify --onlynow uses too: same step list, same declared order, same refusals (X_CLI_BAD_FLAG, fix = the correctedx upgrade --only …)proof: "verify-only",verify.only[],verify.notRun[], summary… green on typecheck,lint only — NOT THE FULL GATE; not run: …, a human linenot run by this hop … x verify --only <rest> --json, and athennaming that commandproof: "verify", noonly/notRunkeys)x verify, so a list would narrow nothingThe earlier stages (codemods, manifest, doctor, guards, a Bun-floor hop's coverage rebaseline, exercise) run either way, because each one writes what the hop leaves behind. No template changes, so no codemod row. Docs:
wiki/CLI-Reference.md,wiki/Upgrading.md,CHANGELOG.md.2. Jobs that run only on
mainbrokemainafter green PRsci / deploy-proofscripts/deploy-proof-due.tsfinds aVERDICT_PATHSfile in the PR diff (merge commit vs first parent, checkout depth 2), and skips its heavy steps otherwise. Inherits nothing;mainstill decides by the predecessor ruletutorial-run.ymlpull_request.paths=push.paths. The list gainedcmd-new*,cmd-db*,db-*,messages*(#1272's break wasx db genoutput). Concurrency is grouped per ref, so main never cancels a PR's runverifyis still the one verdict: neither job is in itsneedsand neither is required. A path-filtered workflow never leaves a check pending.scripts/ci-workflow-main-only.test.tsenforces the rule. A workflow pushed onmainwith nopull_requesttrigger, or with different paths, fails the test unless it is a named publisher (wiki.yml,scorecard.yml). So does aci.ymljob whoseifadmits a push but not a PR.scripts/lib/health-tutorials.tsreads--branch mainonly, so a PR's red tutorial run never counts against main's health.docs/history/ci-split.mdhas a new dated section.Checks run locally
bun teston the upgrade, verify-only, deploy-proof-due, health, tutorial-run and ci-workflow* suites passed.bun run typecheckpassed.bun run verify --only typecheck,lint,boundaries,filesize,package-shape,errors,manifest(throughx heavy run) passed after the fixes.🤖 Generated with Claude Code