Skip to content

fix: stop treating a blank line as a job boundary in contract lint - #164

Merged
EthanThatOneKid merged 1 commit into
mainfrom
contract-lint-blank-line
Oct 14, 2026
Merged

EthanThatOneKid merged 1 commit into
mainfrom
contract-lint-blank-line

Conversation

@EthanThatOneKid

Copy link
Copy Markdown
Contributor

scan_jobs() ended a job block at the first line indented less than two spaces,
and indent("") is 0 — so a blank line ended the block. Blank lines are ordinary
inside run: | bodies, so every rule violation after the first one in a job was
invisible.

Two fixtures that differ only by a blank line, run against the lint on main:
one reports 1 violation(s), the other reports 0. After the fix both report 1.

Closes #163.

What this surfaces downstream

Run over every workflow directory in the workspace, the fixed lint finds exactly
one failing file:

Repo File Violations
wazoo-console .github/workflows/ci.yml 3 — R1 + R5 on deploy-preview, R5 on cleanup-preview

Everything else is clean, wazoo-api and worlds-api included. The pinned lint
reports 2 for that file; the missing one is the cleanup-preview R5 finding,
which sat after a blank line.

Re-checked the closed conform branch from #121 under the fixed lint: still 0
violations, so that work does clear all three.

Merge order (three consumers pin this action)

wazoo-api, wazoo-console, and worlds-api all pin
wazootech/workspace-cli/skills/contract-lint@9841b8de3539b5350ec85b527018afb256480b16,
so nothing changes for them until the pin moves.

  1. This PR — no consumer effect.
  2. Pin bump in wazoo-api and worlds-api — both 0 violations under the fixed
    lint, so both stay green.
  3. Pin bump in wazoo-console — must not land before the conformance work in
    refactor: dissolve shared.ts grab-bag into focused modules #113.
    Its bump would be the first console PR to run the corrected lint, and
    the corrected lint fails the 3 findings above. That is refactor: dissolve shared.ts grab-bag into focused modules #113's subject; bumping
    early would just turn contract-lint red on every console PR.

Verification

  • deno task ci — 199 passed, 0 failed, 1 ignored.
  • bash skills/contract-lint/lint_test.sh — all 5 cases pass. Against the
    previous commit, 2 of the 5 fail (the blank-line cases), which is the point.

What I could not observe

The consumer pin bumps are separate PRs, not this one. I ran the fixed lint
locally against every workflow directory in the workspace; I did not run it
inside a consumer's CI, because that only happens once their pin moves.

Notes

The self-test is a CI step rather than part of deno task ci, because
deno task ci is documented to work on a bare Windows checkout and this test is
bash. The README says so, so it does not get "consolidated" later.

scan_jobs() ended a job block at the first line indented less than two
spaces, and indent("") is 0, so a blank line ended the block. Blank lines are
ordinary inside `run: |` bodies, so every rule violation after the first one
in a job was invisible. wazoo-console's cleanup-preview job lost its R5
finding exactly that way, and its deploy-preview job lost R1 and R5.

Add a credential-free bash self-test that pins the boundary, run it from CI,
and record why it is not part of `deno task ci`.

Closes #163
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.

bug: contract-lint ends a job block at a blank line, so violations after it are missed

1 participant