Skip to content

fix(lint): lockfiles, merge_group, and every default-branch name - #58

Merged
bryanfawcett merged 3 commits into
mainfrom
ci/caller-default-branches
Sep 11, 2026
Merged

fix(lint): lockfiles, merge_group, and every default-branch name#58
bryanfawcett merged 3 commits into
mainfrom
ci/caller-default-branches

Conversation

@bryanfawcett

Copy link
Copy Markdown
Contributor

Re-lands two commits that PR #57 silently dropped, plus one new fix.

What happened to #57

Auto-merge fired on #57 as soon as its first commit went green, and rebase-merged only that commit. The two commits I pushed afterwards — the yamllint lockfile exemption and merge_group: — never landed, even though I had already told two agents they were unblocked by them. They are cherry-picked here. Lesson recorded: do not push to a branch that has auto-merge armed.

1. yamllint was linting generated lockfiles (re-land)

.yamllint.yaml ignored only node_modules/, so the 140-char rule fired on pnpm-lock.yaml. Two agents hit this independently — zti-app (a 185-char npm deprecation notice) and mzizi-registry (a 259-char glob@7 deprecation string). Both are text pnpm copied verbatim from the registry; no developer wrote them and they cannot be rewrapped without invalidating the lockfile. .prettierignore has exempted lockfiles all along under "Lockfiles, generated output"; yamllint not doing the same was an oversight hidden only because this repo has no lockfile.

2. merge_group: in the canonical caller (re-land)

nhimbe's ruleset requires a merge queue. Required checks must report on the gh-readonly-queue/** ref and only merge_group produces that; without it a queued PR stalls for the full 60-minute check_response_timeout and nothing can land. Inert where there is no queue.

3. Every default-branch name (new)

The push trigger was branches: [main], but shamwari-core/-gateway/-web default to scaffold and siafudb-kuzu to master. Merging there fired nothing, so the five contexts never reached the default-branch head — the shamwari agent had to dispatch the workflow by hand to get evidence.

That signal matters: bundu-labs/.github sat with lint / prettier red since 2026-05-02 unnoticed. Now branches: [main, master, scaffold] — a list rather than a bare push:, which would run the gate on every feature-branch push across 74 repos and bill it twice per PR.

4. MDX-in-.md trap documented

Mintlify parses AGENTS.md as MDX (HTML comments are a parse error); markdownlint and Prettier read it as Markdown (the asterisks are emphasis). No spelling satisfies both, and --fix pairs asterisks across adjacent comment lines producing {/*Add product-specific terms and preferred usage _/}.

Verified locally with the pinned toolchain: clean.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

bryanfawcett and others added 3 commits September 12, 2026 02:58
…to the caller

Two defects found by rolling this gate out across seven orgs. Both are
the same shape as the JSONC one: the check was wrong, not the repo.

yamllint was reading pnpm-lock.yaml. The canonical .yamllint.yaml
ignored only node_modules/, so the 140-char line-length rule fired on
generated lockfiles - zti-app's pnpm-lock.yaml:5210 is an npm
deprecation notice pnpm copied verbatim from the registry. No developer
wrote it, and it cannot be rewrapped without invalidating the lockfile.
.prettierignore has exempted lockfiles all along under "Lockfiles,
generated output"; yamllint not doing the same was an oversight that
stayed hidden only because this repo has no lockfile. Every pnpm repo in
the estate would have hit it, and the only local fixes available were
editing a generated file or diverging from the canonical config - which
is how the drift starts.

The caller now includes merge_group. A repo whose ruleset uses a merge
queue needs required checks to report on the gh-readonly-queue/** ref,
and only merge_group produces that; without it a queued PR stalls for the
full check_response_timeout and nothing can ever land. nhimbe needed
exactly this and had to deviate from the canonical caller by one line to
land at all. The point of this file is that no repo has to do that, so
the trigger belongs here. It is harmless where there is no queue.

ADOPTING-LINT.md now records both, plus why pull_request must NOT carry
a branches: filter - that filter matches the PR's BASE branch, so adding
one silently stops the gate emitting in shamwari-core, shamwari-gateway,
shamwari-web (default branch `scaffold`) and siafudb-kuzu (`master`).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
prettier 3.9.4's mdx parser rewrites a multi-line {/* ... */} comment
into {/_ ... _/} - it reads the * as markdown emphasis and emits invalid
MDX, so `prettier --write` actively breaks the file. The check is right
and the formatter has the bug, so the gate is unchanged; what is needed
is that the next person mid-adoption, reaching for --write, knows to
diff the result.

And markdownlint-cli2 --fix cannot fix MD036, because emphasis-as-heading
needs a judgement call: a bold line introducing a subsection should
become a real heading, while an italic sign-off is not a heading at all
and should become a blockquote. Converting the second kind into a heading
gives you a happy linter and a wrong document.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The caller's push trigger was `branches: [main]`, but three repos default
to `scaffold` (shamwari-core, shamwari-gateway, shamwari-web) and one to
`master` (siafudb-kuzu). Merging into those repos' default branch fired
nothing, so the five contexts never appeared on the default-branch head.
The shamwari agent had to run `gh workflow run lint.yml --ref scaffold`
by hand to get evidence, and future merges there would have gone
unwatched.

That matters beyond bookkeeping: a push-triggered run on the default
branch is what makes a broken main visible. bundu-labs/.github sat with
`lint / prettier` red from 2026-05-02 and nobody noticed, because nothing
required the contexts there. Losing the signal entirely in four repos is
worse.

Now `branches: [main, master, scaffold]` - a list rather than a bare
`push:`, because unfiltered push would run the gate on every
feature-branch push across 74 repos and bill it twice for every PR.

Also records the MDX-in-.md trap in ADOPTING-LINT.md. A Mintlify starter
leaves `{/* ... */}` in AGENTS.md; Mintlify parses that file as MDX where
an HTML comment is a parse error, while markdownlint and Prettier read it
as Markdown where the asterisks are emphasis. No spelling satisfies both,
and `markdownlint-cli2 --fix` pairs asterisks across adjacent comment
lines to produce something that is neither valid MDX nor intended.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bryanfawcett
bryanfawcett merged commit d9d887d into main Sep 11, 2026
7 checks passed
@bryanfawcett
bryanfawcett deleted the ci/caller-default-branches branch September 11, 2026 19:00
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