Repository navigation
ci: a change that touches Markdown runs the Linux Build & Test leg - #888
Merged
Merged
Conversation
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.
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 free
to 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.
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 thechangesjob setcode=false, soBuild & Testwas skipped. Onmasterthe push trigger'spaths-ignore: ["**.md", LICENSE]started no run at all. #878 brokeCanonDescriptionSourceTeststhat way, and the next code PR (#880) found it.Change (
.github/workflows/ci.yml)changesjob: new outputsdocs(some changed path is*.md) andmatrix(theBuild & Testlegs as JSON: all three whencode=true, the Linux leg otherwise). Benchmark path selection is unchanged, so aspec/*.mdchange still selects the benchmark jobs, as it did before.masterpushes 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 (plusdocs=falseand the three-leg matrix), and"**.md"leaves the pushpaths-ignore(onlyLICENSEstays), 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 whencodeordocsis true;strategy.matrix.includecomes fromfromJSON(needs.changes.outputs.matrix); the legs keep theiros,nameandtest-modulesvalues.ci-result: a new branch for a change with Markdown and no code requiresBuild & Testsuccess andLintskipped; a LICENSE-only change now also requiresdocs=false. The reuse and benchmark branches are unchanged.changes,ci-result,publish-nightly;publish-nuget.yml's header).Gate:
RepositoryGates/CiDocumentationRunTests.csThree text gates on
ci.yml, in the shape ofCiBenchmarkGuardTests:Ci_Should_Classify_Markdown_As_Docs_And_Run_Every_Push_In_Full: pushpaths-ignoreis exactlyLICENSE; thedocs/matrixoutputs; the push block exactly; the contiguous block from thegit diff ... HEADline through the classificationcase.Ci_Should_Select_Only_The_Linux_Leg_For_A_Docs_Only_Change: thebuild-and-testif:and matrix expression; the three-leg JSON; the contiguous block from the loop's end through the lastecho(Linux-only matrix chosen before it is written).Ci_Should_Require_The_Linux_Leg_For_A_Docs_Only_Result: theDOCSenv, the echo line and the wholeCODE/DOCSbranch.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-onlyif:; a docs branch accepting a skippedBuild & Test;"**.md"back inpaths-ignore; three legs for a docs-only change;docs=falsemoved after the loop; the Linux matrix assigned after itsecho;HEADreplaced with"$base"in the diff.Canon
docs/engineering/workflow.md(owner): every merge but a LICENSE-only one triggers the full run onmaster; 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: theConsumerPinGuardbullet 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 thanLICENSE.Verification
985ecbff(under the machine's gate lock): slopwatch, Release build, both format passes, clone gate,OpenCode.Sdk.Tools.Tests2,795/2,795..github/, so its merge group runs in full under reuse rule 5.Build & Test (Linux)running and the other two legs absent.