Skip to content

[DO NOT MERGE] test(#15835): positive control — a PR breaking a deck must go red - #15847

Closed
jsboige wants to merge 2 commits into
mainfrom
test/15835-positive-control-broken-deck
Closed

jsboige wants to merge 2 commits into
mainfrom
test/15835-positive-control-broken-deck

Conversation

@jsboige

@jsboige jsboige commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Grain: LIGHT/test — lane myia-po-2026:CoursIA — prev: LIGHT/notebook-python #15680

CONTROLE POSITIF JETABLE — NE PAS MERGER. Ferme et branche supprimee une fois le verdict observe.

Acceptation 1 de #15835 : « Une PR qui casse volontairement un deck produit un check-run rouge attribue a cette PR. » Un gate qu'on n'a jamais vu rougir n'est pas un gate mesure, c'est un gate suppose.

Cette PR porte exactement deux choses :

  1. la PR ci(slides,#15835): run slidev build on the PR that touches a deck #15846 (le cablage du gate) cherry-pickee, pour que le workflow sous test soit bien celui livre ;
  2. slides/99-positive-control/slides.md, un deck NEUF et volontairement casse — deux defauts fatals independants (frontmatter YAML invalide + erreur de syntaxe JavaScript dans script setup).

Le deck est additif : aucun deck de cours n'est touche. Attendu : le check-run du job Slidev build (PR blocking, nocturne advisory) conclut failure, et la sortie nomme 99-positive-control/slides.md.

🤖 Generated with Claude Code

jsboige and others added 2 commits September 12, 2026 23:22
Nothing in CI built the slides on a pull request. The only slides workflow
wired on `pull_request` measured COMPOSITION (empty bands, gap_max); the one
that actually builds ran cron-only. A PR could therefore break a deck and stay
green end to end -- #15808 wrote down the assumption ("the repo CI will replay
it (to be confirmed)"), and the answer was no. That is the one job a CI exists
to make unnecessary.

The wiring, following the issue's own four points:

- a `pull_request` leg filtered on `paths: ['slides/**']` on the EXISTING build
  workflow -- one build path, not a second implementation that will drift from
  the first (point 4);
- it builds only the decks of the diff, and all of them when shared slides
  infra moved (point 1);
- it BLOCKS: exit 1 on a build failure, so the check-run goes red on the PR that
  introduced it (point 2). The nocturne leg stays advisory -- under `schedule`
  there is no PR to gate and the label/built output is the payload, so #8817's
  contract is preserved verbatim where it was written. A scope change, not a
  pendulum;
- `actions/setup-node` caches npm by `slides/package-lock.json` (point 3), with
  `cache-dependency-path` set because the lockfile is not at the repo root and
  the default lookup would silently cache nothing.

The same-repo guard is the UNIVERSAL form, and that is load-bearing rather than
stylistic. The direct form (`head.repo.full_name == github.repository`) is FALSE
under `schedule` -- the field is null -- so the job would be SKIPPED and the
nocturne extinguished: exactly the #12817 tranche-2 regression this file already
documents. Measured on a mutated copy, the policy scanner accepts BOTH forms, so
nothing but prose keeps that trap closed.

Second, unplanned find: the discovery was ALREADY red on main. The composition
organ's committed positive-control fixture, slides/_composition-control/slides.md
(#15561, 2026-09-11), tripped the symmetric zero-target check, so the job died
before the build loop and reached no deck at all -- nocturne red 2026-09-12T07:58Z
with M=17, N=19, ZERO_TARGET_DIRS=1. Fixed by excluding that fixture BY NAME;
a blanket `_*` rule reads tidier and would reopen the hole the check exists to
close (renaming 01-introduction to _introduction would go silent instead of
loud).

Verification:
- scripts/ci/check_self_hosted_runner_policy.py --check: 159 workflows OK
- scripts/tests/test_check_self_hosted_runner_policy.py: 58/58
- scripts/ci/check_unique_check_run_names.py --check: no duplicates
- guard negative control on a copy: removing `if:` -> VIOLATION SAME_REPO_GUARD
  rc=1; the direct form -> OK rc=0 (the blind spot above)
- the extracted step replayed locally on three simulated diffs: broken deck ->
  ::error:: + exit 1; sound deck -> "build cleanly" + exit 0; no deck touched ->
  exit 0

Closes #15835

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the slides-build-failed A Slidev deck impacted by this PR does not construct (#8807) label Sep 12, 2026
@jsboige

jsboige commented Sep 12, 2026

Copy link
Copy Markdown
Owner Author

Controle positif #15835 : verdict OBTENU (run 34719821219, completed/failure, '1 deck(s) touched by this PR failed to build'). La preuve et l'extrait de log sont consignes dans le body de #15846. PR jetable [DO NOT MERGE] -> fermeture avec sa branche.

@jsboige jsboige closed this Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Path-collision (organ #13359/#13615)

Cette PR #15847 ([DO NOT MERGE] test(#15835): positive control — a PR breaking a deck must go red) touche au moins un chemin de fichier aussi modifie par d'autres PRs ouvertes. Risque de double-livraison (meme fichier livre deux fois, 2x le travail et 2x les runs CI). Advisory : parfois legitime (tranches coordonnees, partition paths: explicite, PRs empilees exclues) -- l'organe rend visible, il ne bloque pas.

@jsboige
jsboige deleted the test/15835-positive-control-broken-deck branch September 12, 2026 21:37
@github-actions github-actions Bot added pr-overlap Advisory: another open PR touches the same files (organ #13615) variation-light-cap-reached Lane ayant deja merge une LIGHT aujourd'hui (cap G-VAR-2 atteint) labels Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

G-VAR-2 light cap reached (advisory, non bloquant).
La lane myia-po-2026:CoursIA a deja consomme son budget LIGHT du jour (#15618 (merge a 2026-09-12T00:58:34Z)).
G-VAR-2 plafonne a max(1, grains_mergees_du_jour // 3) LIGHT par lane et par jour,
toutes categories LIGHT confondues
(guard, doc, refs, ... partagent un seul budget) :
c'est un RATIO, pas un plafond plat. La decision de merge reste au coordinateur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-overlap Advisory: another open PR touches the same files (organ #13615) slides-build-failed A Slidev deck impacted by this PR does not construct (#8807) variation-light-cap-reached Lane ayant deja merge une LIGHT aujourd'hui (cap G-VAR-2 atteint)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant