Skip to content

ci: a change that touches Markdown runs the Linux Build & Test leg - #888

Merged
Blind-Striker merged 4 commits into
masterfrom
ci/882-docs-linux-leg
Nov 15, 2026
Merged

Blind-Striker merged 4 commits into
masterfrom
ci/882-docs-linux-leg

Conversation

@Blind-Striker

Copy link
Copy Markdown
Collaborator

Closes #882

Problem

A Markdown-only change skipped every repository gate that reads Markdown (ConsumerPinGuard, SnippetCompileGuard, PlaygroundGuard, ReadmeGuideTableTests, the description-canon tests, CommentResidue, PackedReadmeTests). On pull requests and merge groups the changes job set code=false, so Build & Test was skipped. On master the push trigger's paths-ignore: ["**.md", LICENSE] started no run at all. #878 broke CanonDescriptionSourceTests that way, and the next code PR (#880) found it.

Change (.github/workflows/ci.yml)

  • changes job: new outputs docs (some changed path is *.md) and matrix (the Build & Test legs as JSON: all three when code=true, the Linux leg otherwise). Benchmark path selection is unchanged, so a spec/*.md change still selects the benchmark jobs, as it did before.
  • master pushes stay full runs (lead decision, option A). GitHub cancels a run that is pending in a concurrency group when a newer one is queued, so a classified docs-only push could replace a pending code push and hide its code from Lint, Windows, macOS and the benchmarks. A push therefore keeps today's full outputs (plus docs=false and the three-leg matrix), and "**.md" leaves the push paths-ignore (only LICENSE stays), so a docs-only merge triggers that full run instead of none. The design note is on CI: a Markdown-only change skips the repository gates that read Markdown, on PRs and on master #882.
  • build-and-test: runs when code or docs is true; strategy.matrix.include comes from fromJSON(needs.changes.outputs.matrix); the legs keep their os, name and test-modules values.
  • ci-result: a new branch for a change with Markdown and no code requires Build & Test success and Lint skipped; a LICENSE-only change now also requires docs=false. The reuse and benchmark branches are unchanged.
  • Comments updated where they described the old behaviour (trigger, concurrency, changes, ci-result, publish-nightly; publish-nuget.yml's header).

Gate: RepositoryGates/CiDocumentationRunTests.cs

Three text gates on ci.yml, in the shape of CiBenchmarkGuardTests:

  1. Ci_Should_Classify_Markdown_As_Docs_And_Run_Every_Push_In_Full: push paths-ignore is exactly LICENSE; the docs/matrix outputs; the push block exactly; the contiguous block from the git diff ... HEAD line through the classification case.
  2. Ci_Should_Select_Only_The_Linux_Leg_For_A_Docs_Only_Change: the build-and-test if: and matrix expression; the three-leg JSON; the contiguous block from the loop's end through the last echo (Linux-only matrix chosen before it is written).
  3. Ci_Should_Require_The_Linux_Leg_For_A_Docs_Only_Result: the DOCS env, the echo line and the whole CODE/DOCS branch.

All three fail on the base ci.yml. Mutants each fails (worker run on the first version, re-derived by review after the option-A pass): code-only if:; a docs branch accepting a skipped Build & Test; "**.md" back in paths-ignore; three legs for a docs-only change; docs=false moved after the loop; the Linux matrix assigned after its echo; HEAD replaced with "$base" in the diff.

Canon

  • docs/engineering/workflow.md (owner): every merge but a LICENSE-only one triggers the full run on master; in a pull request or queue entry a Markdown change without code runs the Linux leg; why pushes are never classified.
  • docs/engineering/documentation.md: the ConsumerPinGuard bullet no longer records the gap as accepted.
  • docs/engineering/quality-gates.md: the no-local-check line relays that CI runs the Markdown-reading gates; the reuse paragraph says "path-selected" CI.
  • docs/architecture/platform-and-packaging.md: nightlies publish on every merge that changes more than LICENSE.

Verification

  • Local check on 985ecbff (under the machine's gate lock): slopwatch, Release build, both format passes, clone gate, OpenCode.Sdk.Tools.Tests 2,795/2,795.
  • Reviews: Sol contradiction scan of the brief; Opus review of the implementation (one major held for the lead and resolved as option A, six minors fixed); Sol second read of the coordinator fix-ups (one major gate gap and two minors fixed).
  • This PR touches .github/, so its merge group runs in full under reuse rule 5.
  • Live proof after the merge: the first Markdown-only PR must show Build & Test (Linux) running and the other two legs absent.

Closes #882.

Classify Markdown and code on pull requests, merge groups and pushes; check out every event and read the push before SHA through the environment. Keep LICENSE as the only push trigger exclusion. Emit the dynamic Build & Test matrix and require the Linux leg for docs-only changes in CI result, leaving Lint code-only and benchmark path selectors unchanged.

Fail closed to the full three-leg run and both benchmarks when a push before SHA is empty or zero, its fetch fails, or the diff fails. Code pushes still force both benchmark guards so nightly publication remains possible; classified pushes without code publish nothing.

Add CiDocumentationRunTests to pin classification, Linux-only selection and aggregate acceptance. Its base and M1-M4 controls cover code-only scheduling, accepting a skipped docs build, ignoring Markdown pushes, and selecting all three docs legs. Update the workflow, documentation and quality-gates canon without adding a local docs-check requirement.
The lead chose option A for #882: a queued push replaces a pending one, so a
classified docs-only push could hide an earlier code push. Push runs keep the
full outputs (plus docs=false and the three-leg matrix); pull requests and merge
groups keep the docs -> Linux leg selection. The gate pins the push block, the
contiguous init and output blocks, and the canon and comments say so.
@Blind-Striker Blind-Striker added this to the Next milestone Nov 15, 2026
@Blind-Striker
Blind-Striker added this pull request to the merge queue Nov 15, 2026
Merged via the queue into master with commit 85cf65f Nov 15, 2026
17 checks passed
@Blind-Striker
Blind-Striker deleted the ci/882-docs-linux-leg branch November 15, 2026 06:33
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.

CI: a Markdown-only change skips the repository gates that read Markdown, on PRs and on master

1 participant