Uh oh!
There was an error while loading. Please reload this page.
ci(lint): run the CLI's own check command against this repository - #5273
Merged
Conversation
The root `check` script is `node packages/cli/dist/cli.js check` — `objectui check`, the command this repository ships, pointed at this repository's tree. No workflow ran it. It exited 1 with 64 errors on `main`, and had done since the first `tsconfig.json` grew a comment, until someone ran it by hand while measuring something unrelated (#5237, fixed by #5245). Adds two steps to the existing lint job: build the CLI and its workspace dependency closure, then run `pnpm check`. Blocking on the ERROR arm only, which is the command's existing behaviour rather than a setting chosen here — a parse failure increments the error count, a non-zero count is the only thing that exits 1, and the unknown-schema-type warnings print without touching the exit code. No warning is promoted, reclassified or suppressed; #5127 still owns that arm. The build goes through pnpm rather than turbo deliberately. A turbo cache hit restores a task's recorded outputs, and an entry recorded with an empty output set replays as "cache hit, replaying logs" plus FULL TURBO while writing no `dist/` — measured here, with the CLI then dying on ERR_MODULE_NOT_FOUND. A blocking gate must not be able to fail for a reason that lives in a cache rather than in the tree it is judging. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
os-support-ai
marked this pull request as ready for review
August 18, 2026 23:36
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes#5246
The root
checkscript isnode packages/cli/dist/cli.js check—objectui check, the command this repository ships, pointed at this repository's own tree. Grepping.github/workflows/**finds no caller. This adds one.The ruling
Triage auto-adjudication on #5246,
auto-adjudicated, maintainer veto window open:Premise readings, taken before any YAML was written
This adds a blocking step. If it were red the moment it landed,
mainwould be red for every other agent in the repo. All three readings were taken first, onorigin/mainatbc2922a82, with the CLI built from source.1.
pnpm checkis exit 0 on currentmain. Measured, not assumed:errors 0 · exit 0 · warnings 46. One honest discrepancy: the card and the ruling both say 47 warnings; the count observed today is 46. Every one is the unknown-schema-type arm, 45 of them
"module"in apackage.jsonand one"unknown-component"in a schema-catalog fixture. The gap does not touch the ruling — the warning arm is non-blocking at any count — but the number in the card is one stale, so it is recorded rather than repeated.2. #5245 is merged, not merely open. Checked live rather than taken from the card: PR #5245 has
merged: true,merged_at 2026-08-18T20:22:07Z, basemain. Issue #5237 is in stateclosedwithstate_reason: completed. The 0-error state this gate depends on is therefore onmain, and this is not the wire-the-gate-before-the-fix-lands case.3. The exit code reflects errors only. Confirmed two independent ways.
Empirically, the run above prints 46 warnings and exits 0 — warnings alone do not fail it. By source,
packages/cli/src/commands/check.tsincrementserrorsin exactly two places, both parse failures, and the onlyprocess.exit(1)is guarded byerrors === 0; the unknown-schema-type arm is a bareconsole.logthat touches no counter. The warning arm is not load-bearing on the exit code, so there is no fork to escalate.Nothing was added to force green. No
--quiet, no output filtering, no warning downgraded or reclassified. The warning arm stays exactly as it behaves today: printed, visible in the log, non-blocking. #5127 still owns it and remains open — whatever it settles changes what this step prints, never what it fails on.What the change is
Two steps at the end of the existing
lintjob in.github/workflows/lint.yml, both carrying the sameif: steps.relevant.outputs.should_run == 'true'guard as every neighbour:Scope is what the ruling authorised and nothing else: blocking on the ERROR arm. No
--max-warnings-style strictness, no other job touched, no adjacent step tidied.Why there is a build step, and why it is not turbo
The lint job installs but never builds, and the root script executes
packages/cli/dist/cli.js. Without a build the step dies on a missing file — which is worse than no gate at all, because it is red for a reason that has nothing to do with the tree being judged, and the obvious repair from outside is to delete the step....is pnpm's dependency closure: the CLI plus every workspace package it depends on, in topological order, derived from the graph rather than listed here. The closure is a requirement, not tidiness —dist/cli.jsimports@object-ui/types' built output at startup, which is why #5237's reproduce recipe builds that package first.The first draft of this step used
pnpm turbo run build --filter='@object-ui/cli', which is the in-repo convention and would usually be free given the Turbo cache the job already restores. It was changed after a measured failure. A turbo cache hit restores a task's recorded outputs, and an entry recorded with an empty output set replays ascache hit, replaying logsplusFULL TURBOwhile writing nodist/at all:pnpm checkthen died withERR_MODULE_NOT_FOUNDon@object-ui/types/dist/zod/index.zod.js— the exact import #5237 names. To be precise about the blast radius: this was observed in a local cache shared across parallel worktrees, and I cannot prove CI's cache can reach the same state. But a blocking gate must not be able to fail for a reason that lives in a cache rather than in the tree it is judging, and building through pnpm has no cache layer to replay. It costs 46 seconds cold.Verification
Everything below was executed on
5870484f8, the head of this branch. What was reasoned about rather than run is named as such.Executed — the exact commands the two steps run, in order, from a clean-checkout-equivalent tree (every
packages/*/distand every*.tsbuildinforemoved first, with the poisoned turbo cache still present on disk — the state that broke the turbo-based draft):Executed — reverse verification, that the gate actually gates. Prediction recorded before running: exit 1, one error line, warnings unchanged at 46. Observed exactly that:
Probe removed, re-run returns to exit 0 and
git statusclean. (~above stands for the shell redirect, spelled out so the snippet survives issue rendering.) No rebuild question arises on either leg: the mutation was a data file in the scanned tree, not code in the package under test, so both legs ran the same freshly built binary.Executed — YAML validity.
.github/workflows/lint.ymlparses; thelintjob now holds 11 steps, the last two being the ones above with the run lines as written.Executed — the gates this diff derives.
scripts/check-control-bytes.mjsexit 0, plus a raw scan of both changed files for control bytes: clean.scripts/check-changeset-presence.mjsexit 0 — "2 file(s) changed, 0 of them under the src/ of a package the release covers", so no changeset is owed and none was added.scripts/check-doc-links.mjsexit 0. And the five suites that pin these two files —lint-workflow,merge-queue-reporting,ci-cd-pipeline-doc,turbo-lint-inputs,check-changeset-presence— 5 files, 140 tests passed.Reasoned about, not executed — the
needs:/setup chain that provesdist/exists when the step runs. GitHub Actions cannot run locally. Thelintjob has noneeds:; it is the only job in the workflow, so the chain is purely the step order inside it: checkout → decide-whether-to-run → corepack → pnpm version → setup-node → lint coverage → Turbo cache →pnpm install --frozen-lockfile→pnpm lint→ build → check. The build step immediately precedes the check step and both carry the sameshould_runguard, so they run together or not at all. Node and pnpm are already set up four steps earlier, and dependencies are installed two steps earlier. Nothing between the build and the check removesdist/.Reasoned about — the scan surface does not depend on the build. Worth stating because the build now runs before the check: the command's glob ignores
dist/**, and no packagedistin this repo contains a.json,.yamlor.ymlfile. Measured both ways — a run with two packagedistdirectories present and a run with eight both reportAnalyzing 612 files...with byte-identical warning output. The repo has no submodules, so CI'ssubmodules: truecheckout adds nothing either.Also changed
content/docs/guide/ci-cd-pipeline.md— the## Lint (lint.yml)section enumerates that job's steps and states that it gates errors and not warnings. Adding a step without it would leave the page describing a job that no longer exists, which is the drift three separate suites in this repo already exist to prevent. The addition documents the new step and its errors-only split, and names #5127 as the owner of the warning arm. No count is quoted, for the reason the section's own--max-warningsparagraph gives.Generated by Claude Code