Skip to content

feat(cli): x upgrade --only, and no check runs on main alone - #1274

Merged
sebyx07 merged 3 commits into
mainfrom
fix/upgrade-gate-and-main-only-jobs
Nov 19, 2026
Merged

sebyx07 merged 3 commits into
mainfrom
fix/upgrade-gate-and-main-only-jobs

Conversation

@sebyx07

@sebyx07 sebyx07 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Two problems seen on 2026-11-19.

1. x upgrade always ran the full gate

On a loaded machine one app's hop took 55 minutes, with no way to hand unit, live and e2e to CI.

flag x upgrade --only <step>[,<step>…]: the hop's last stage is x verify --only <steps> --json instead of x verify --json
reader packages/cli/src/verify-only.ts, the one x verify --only now uses too: same step list, same declared order, same refusals (X_CLI_BAD_FLAG, fix = the corrected x upgrade --only …)
honest report proof: "verify-only", verify.only[], verify.notRun[], summary … green on typecheck,lint only — NOT THE FULL GATE; not run: …, a human line not run by this hop … x verify --only <rest> --json, and a then naming that command
default unchanged: no flag, or every step named, is the full gate and reports as one (proof: "verify", no only/notRun keys)
no app refused: the hop runs scripts there, not x verify, so a list would narrow nothing

The 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 main broke main after green PRs

Job On a pull request now
ci / deploy-proof runs when scripts/deploy-proof-due.ts finds a VERDICT_PATHS file in the PR diff (merge commit vs first parent, checkout depth 2), and skips its heavy steps otherwise. Inherits nothing; main still decides by the predecessor rule
tutorial-run.yml pull_request.paths = push.paths. The list gained cmd-new*, cmd-db*, db-*, messages* (#1272's break was x db gen output). Concurrency is grouped per ref, so main never cancels a PR's run
  • verify is still the one verdict: neither job is in its needs and neither is required. A path-filtered workflow never leaves a check pending.
  • scripts/ci-workflow-main-only.test.ts enforces the rule. A workflow pushed on main with no pull_request trigger, or with different paths, fails the test unless it is a named publisher (wiki.yml, scorecard.yml). So does a ci.yml job whose if admits a push but not a PR.
  • scripts/lib/health-tutorials.ts reads --branch main only, so a PR's red tutorial run never counts against main's health.
  • docs/history/ci-split.md has a new dated section.

Checks run locally

  • bun test on the upgrade, verify-only, deploy-proof-due, health, tutorial-run and ci-workflow* suites passed.
  • New tests fail against the old sources and workflows.
  • bun run typecheck passed.
  • bun run verify --only typecheck,lint,boundaries,filesize,package-shape,errors,manifest (through x heavy run) passed after the fixes.
  • actionlint and zizmor found nothing new.

🤖 Generated with Claude Code

`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>
@developerz-ai

developerz-ai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Reviewed — nothing blocking

0 actionable comment(s) · grounded on your code

@developerz-ai developerz-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .dz contract, the reader that acts on this file after merge.

Comment thread packages/cli/src/upgrade-gate.ts Resolved
Comment thread scripts/ci-workflow-main-only.test.ts Resolved
Comment thread scripts/lib/health-tutorials.ts Resolved
- 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>
@developerz-ai
developerz-ai Bot dismissed their stale review November 19, 2026 07:48

Superseded: a newer review of this pull request, on commit aceb28b, no longer requests changes.

developerz-ai[bot]
developerz-ai Bot previously approved these changes Nov 19, 2026

@developerz-ai developerz-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:1 minor · other .dz/briefs/health.md (schedule health) declares no ## Rows: the checkup fires and can file nothing. Graded by the platform's .dz contract, 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:308 minor · 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>
@developerz-ai
developerz-ai Bot dismissed their stale review November 19, 2026 07:59

Superseded: a newer review of this pull request, on commit 38253ef, replaces this approval.

@developerz-ai developerz-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary — 3 file(s), 0 finding(s).

The increment treats a selection covering every installed verify step as a full gate run, adds regression coverage, and updates the CLI reference. No concrete defects found in the supplied changes.

@sebyx07
sebyx07 merged commit 103c717 into main Nov 19, 2026
49 checks passed
@sebyx07
sebyx07 deleted the fix/upgrade-gate-and-main-only-jobs branch November 19, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant