THROWAWAY: probe that the checks run and can fail #74

Closed
yuris wants to merge 2 commits from tmp/ci-probe into main
Owner

Throwaway. Measures whether the new checks workflow fires on a pull request, whether each check can be made to fail on purpose, and whether Forgejo resolves a local reusable workflow (workflow_call) so the deploy workflows can gate on it.

Carries deliberate failures: a failing assertion, a type error, and a lint/format error. Will be closed unmerged.

Throwaway. Measures whether the new checks workflow fires on a pull request, whether each check can be made to fail on purpose, and whether Forgejo resolves a local reusable workflow (`workflow_call`) so the deploy workflows can gate on it. Carries deliberate failures: a failing assertion, a type error, and a lint/format error. Will be closed unmerged.
ci: run tests, typecheck and lint on pull requests and pushes to main
All checks were successful
Checks / test @garage/catalog (pull_request) Successful in 1m14s
Checks / test garage (pull_request) Successful in 1m20s
Checks / test garage-store (pull_request) Successful in 1m14s
Checks / typecheck apps/management (pull_request) Successful in 1m39s
Checks / typecheck apps/store (pull_request) Successful in 1m19s
Checks / lint (biome) (pull_request) Successful in 11s
45cf89901c
No workflow in this repository ran a single test on any trigger. The two
existing workflows fire on push to main and they deploy: a green tick meant
"the container built" or "wrangler accepted the upload", never "a test
passed". Around 353 tests across three packages executed nowhere but on a
developer's machine.

Adds .forgejo/workflows/checks.yml running on pull_request, push to main and
workflow_dispatch, plus workflow_call so the deploy workflows can gate on it:

- test, one job per package (garage-store, garage, @garage/catalog) rather
  than the root turbo aggregate, so a red check names the package.
- typecheck, per app directory. Never from the repository root, where
  `pnpm exec tsc --noEmit` fails with `Command "tsc" not found` because
  typescript is a devDependency of the apps, not the workspace root. That
  error reads exactly like a build break and is not one. packages/catalog is
  excluded deliberately: no tsconfig.json and no typescript dependency.
- lint, via .forgejo/scripts/biome-gate.sh.

The lint step is a script because every one-line spelling of it has already
produced a permanently green lint here. Measured, not guessed:

- `npx biome` installs an unrelated registry package named `biome` (0.3.3,
  "a simple way to manage environment variables on a per-project basis"). On
  a scratch directory of deliberately malformed JS it printed no output and
  exited 0, while the real binary reported 2 errors on the same directory.
  The real package is @biomejs/biome and it is not a dependency here.
- biome's exit code tracks formatting and fixability, not findings.
- `cmd | tail` reports tail's status, hiding the failure being quoted.

So the gate pins @biomejs/biome by name and version and asserts on output:
`Checked N files` must be present, N must clear a floor, and error/warning/
info counts must not exceed a recorded baseline.

The repository is not lint-clean and the gate says so rather than implying
otherwise: 34 errors, 12 warnings, 3 infos at d0b5825. Baselined rather than
fixed because nearly every finding is in apps/management or in generated
drizzle snapshots that must not be reformatted. Two of them are load-bearing
(the !important holding .product-type above the #57 cascade class). Recorded
blind spot: biome cannot parse apps/management/app/globals.css, so it lints
nothing in that file and a green lint says nothing about management's CSS.

Two false-green instruments were found while writing this and are guarded
rather than described: `pnpm --filter does-not-exist test` prints "No
projects matched the filters" and exits 0, so the matrix asserts its filter
selected a package; and a tsconfig matching no files would let
`tsc --noEmit` exit 0 having checked nothing, so each app asserts tsc
resolved a plausible file count first.

Refs #73
test(ci): THROWAWAY probe — deliberate test/type/lint failures + workflow_call probe
Some checks failed
Checks / test @garage/catalog (pull_request) Successful in 1m15s
Checks / test garage (pull_request) Successful in 1m23s
Checks / typecheck apps/store (pull_request) Failing after 56s
Checks / lint (biome) (pull_request) Failing after 12s
Probe workflow_call / test @garage/catalog (pull_request) Successful in 1m18s
Probe workflow_call / test garage (pull_request) Successful in 1m18s
Probe workflow_call / typecheck apps/management (pull_request) Successful in 1m37s
Checks / test garage-store (pull_request) Failing after 51s
Checks / typecheck apps/management (pull_request) Successful in 1m42s
Probe workflow_call / test garage-store (pull_request) Failing after 57s
Probe workflow_call / lint (biome) (pull_request) Failing after 12s
Probe workflow_call / typecheck apps/store (pull_request) Failing after 1m2s
Probe workflow_call / probe (pull_request) Failing after 0s
f8e4183351
yuris closed this pull request 2026-09-02 19:28:24 +00:00
Author
Owner

Closing: this branch existed only to prove the checks in #80 fire on a pull request and that each one can fail independently. It did its job — runs 988-1000 show three deliberate failures (test garage-store, typecheck apps/store, lint (biome)) against three passing controls, with each failure attributable to the single file it sabotaged, and probe-call.yml proved Forgejo resolves a local reusable workflow via workflow_call and propagates the callee failure to the caller.

#80 is merged, so the real thing now runs on every PR and push to main. The branch is deleted.

Closing: this branch existed only to prove the checks in #80 fire on a pull request and that each one can fail independently. It did its job — runs 988-1000 show three deliberate failures (`test garage-store`, `typecheck apps/store`, `lint (biome)`) against three passing controls, with each failure attributable to the single file it sabotaged, and `probe-call.yml` proved Forgejo resolves a local reusable workflow via `workflow_call` **and** propagates the callee failure to the caller. #80 is merged, so the real thing now runs on every PR and push to main. The branch is deleted.
Some checks failed
Checks / test @garage/catalog (pull_request) Successful in 1m15s
Checks / test garage (pull_request) Successful in 1m23s
Checks / typecheck apps/store (pull_request) Failing after 56s
Checks / lint (biome) (pull_request) Failing after 12s
Probe workflow_call / test @garage/catalog (pull_request) Successful in 1m18s
Probe workflow_call / test garage (pull_request) Successful in 1m18s
Probe workflow_call / typecheck apps/management (pull_request) Successful in 1m37s
Checks / test garage-store (pull_request) Failing after 51s
Checks / typecheck apps/management (pull_request) Successful in 1m42s
Probe workflow_call / test garage-store (pull_request) Failing after 57s
Probe workflow_call / lint (biome) (pull_request) Failing after 12s
Probe workflow_call / typecheck apps/store (pull_request) Failing after 1m2s
Probe workflow_call / probe (pull_request) Failing after 0s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/garage!74
No description provided.