Skip to content

ci(cabling,#14615): wire MyIA.AI.Shared.Tests into dedicated dotnet workflow (family 1/6) - #14668

Merged
myia-ai-01 merged 2 commits into
mainfrom
fix/dotnet-shared-tests-cabling-14615
Sep 5, 2026
Merged

myia-ai-01 merged 2 commits into
mainfrom
fix/dotnet-shared-tests-cabling-14615

Conversation

@jsboige

@jsboige jsboige commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

Grain: MED/test -- lane myia-po-2026:CoursIA -- prev: MED/guard #14601

Quoi

Famille 1/6 de #14615 (tranche 2-7 de #13746) : câblage de MyIA.AI.Shared.Tests — 8 fichiers .cs xunit jamais exécutés en CI — dans un workflow dédié .github/workflows/dotnet-Shared.Tests.yml.

Mesures firsthand (G.2 — baseline AVANT câblage)

  • dotnet test MyIA.AI.Shared.Tests/...csproj local (SDK 9.0.317, installé pour ce grain — la machine ne portait que 3.1/6.0/10.0) : 56 tests, 0 échec, 482 ms. Floor du garde = 56.
  • Dépendances : xunit 2.9.2 + Test.Sdk 17.12.0 + ProjectReference ../MyIA.AI.Shared — zéro service externe, exécutable sur runner éphémère.
  • Écart au texte de l'issue constaté et documenté : le projet est déjà référencé dans les deux .sln (MyIA.AI.Shared.sln + MyIA.CoursIA.sln, grep 1 occurrence chacun) — l'« adaptation des .sln » attendue par Durcir l'advisory '.NET execution_count' : exiger la preuve d'exécution firsthand (outputs non vides) pour les PRs notebook .NET #5214 est déjà en place ; rien à faire de ce côté.

Floor-guard locale-proof

dotnet test --list-tests émet un en-tête localisé (« Les tests suivants sont disponibles » constaté firsthand sur poste FR — le pattern d'ict/gametheory-tests sur l'en-tête anglais aurait rendu 0 partout hors runners EN). Le garde compte les lignes ^ [A-Za-z_] (FQN indentés 4 espaces ; ni restore ni build ne matchent) — vérifié sur machine française : COUNT=56, + DOTNET_CLI_UI_LANGUAGE=en en ceinture. Signaux distincts : liste vide = panne de collecte, compte < 56 = régression de couverture, exit 1 chacun.

Périmètre

1 fichier : .github/workflows/dotnet-Shared.Tests.yml (+107). Familles 2-6 de #14615 hors PR (G.4 strict, PR séparée par famille). Zéro modification de scripts-tests.yml (la famille est .NET, pas pytest).

Tranche partielle (1/6 familles) — le tracker reste ouvert :

See #14615
See #13746

…orkflow (family 1/6)

8 .cs xunit tests never run in CI (advisory .NET #5214) get a dedicated
workflow: matrix ubuntu+windows per dispatch, setup-dotnet 9.0.x with
nuget cache, collection floor-guard 56 (locale-proof extraction -- the
--list-tests header is localized, FR constated firsthand).

Baseline measured locally before wiring: 56/56 pass, 482 ms, SDK 9.0.317.
Shared.Tests already referenced in both .sln -- no sln adaptation needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the variation-genre-run >= 2 grains consecutifs du meme genre LIGHT pour la lane (#10020, advisory) label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

G-VAR-2/3 GENRE signals (advisory, non bloquant, #10020).
La lane `myia-po-2026:CoursIA` voit ces signaux actifs sur les mergees du jour (UTC 2026-09-04) :

  • GENRE-RUN : run consecutif d'un genre LIGHT (voir signals.runs dans le log du job)

G-VAR-2 plafonne a max(1, grains_mergees_du_jour // 3) LIGHT par lane et par jour, toutes categories LIGHT confondues -- un RATIO, pas un plafond plat ; le cap calcule du jour est dans le tally ci-dessus. G-VAR-3 interdit deux genres LIGHT consecutifs. Les signaux ci-dessus rendent le fait VISIBLE (labels variation-tier-inflation, `variation-genre-run`, `variation-genre-cap-exceeded`, `variation-genre-mismatch`, `variation-genre-unknown`) -- la decision de merge reste au coordinateur.

…MIC_RUNS_ON)

First push raised DYNAMIC_RUNS_ON at the #13363 isolation-policy guard:
runs-on: \${{ matrix.os }} is not statically auditable (only the pr-gate
hybrid form is). Two static jobs (ubuntu-latest + windows-latest) keep
the dispatch's Linux+Windows requirement with auditable labels. Guard
verified locally pre-push: check_self_hosted_runner_policy OK, pytest
suite 57 passed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NanoClaw] structural review — PR 1 fichier (+143, workflow CI unique), lu en entier via contents.

FAVORABLE — câblage propre, chaque claim du body recoupé firsthand :

  1. Le workflow tourne réellement et est vert des deux côtés : run 33912579187 au head 2f20a28, jobs ubuntu-latest et windows-latest completed/success — les 56 tests xunit s'exécutent sur les 2 OS dès ce PR, c'est l'artefact qui prouve le câblage (pas juste un YAML plausible).
  2. Claim « 8 fichiers .cs » exact : listing MyIA.AI.Shared.Tests/ = 8 .cs + le csproj ciblé par dotnet test.
  3. Garde d'isolation #13363 respecté et vérifié : 2 jobs statiques (pas de matrix runs-on dynamique), check self-hosted-runner-policy success au head — la correction post-premier-push documentée dans le body est cohérente avec l'historique de runs.
  4. Hygiène workflow au niveau : permissions: contents: read, timeout-minutes: 15 sur les 2 jobs, concurrency avec cancel limité aux PR, actions officielles v4, workflow_dispatch présent, zéro secret, pas de pull_request_target, aucune injection ${{ }} dans un run: (la seule expression est dans concurrency/cancel-in-progress, usage légitime).
  5. Floor-guard 56 bien conçu : distingue liste vide (panne de collecte) et compte sous-plancher (régression de couverture) avec deux messages distincts ; l'argument locale-proof (^ [A-Za-z_] sans ancre d'en-tête + DOTNET_CLI_UI_LANGUAGE: en) est documenté firsthand et tient techniquement (le pattern ne demande pas de fin de ligne → CRLF-tolerant aussi).

Mineurs (non bloquants) :

  • SHARED_TESTS_DOTNET_FLOOR: 56 est dupliqué dans les 2 jobs — un env: au niveau workflow éviterait une divergence le jour où le plancher bouge (la règle « ajuster dans la même PR » exige alors 2 édits cohérents).
  • Le floor-guard réexécute un dotnet test --list-tests complet (2ᵉ restore/build) — coût runtime mineur, couvert par le timeout 15 min.

Sécurité : néant (Gitleaks success, aucun secret, aucune entrée externe).

myia-ai-01 pushed a commit that referenced this pull request Sep 5, 2026
…-- removable forecasts applied (#14672)

* ci(cabling,#14615): recable scripts/audit/tests into scripts-tests.yml (family 2/6)

The CI-EXCLUDED line (4 env-dependent failures, DALLE-3 key, measured
2026-08-14) was stale: #12837 (2026-08-28) hermetized the tests and the
exclusion was never lifted. Measured firsthand on origin/main 3881b76:
455/455 green in 36-43s, identical with the OpenAI key unset (env -u
re-run), urlopen monkeypatched, no real network or gh subprocess, zero
dep delta vs the Scripts Tests (CPU) job (pillow arrives transitively
with matplotlib). The @pytest.mark.env marker proposed by the dispatch
is moot: nothing left to separate.

- add scripts/audit/tests to the pytest run list (suite was already in
  root pytest.ini testpaths)
- replace the audit CI-EXCLUDED line with a removal tombstone pointing
  at the hermeticity proof
- add a collection floor-guard step (AUDIT_TESTS_FLOOR=455), same
  two-signal semantics as #14614 / #14668 floors

Combined invocation collects 11860 tests with no collection error;
check_self_hosted_runner_policy OK; 57 policy pytest passed locally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* ci(cabling,#14615): register audit suite in coverage guard + skipif gh-auth on 3 integration tests

First CI run of the recabled suite caught two real gaps (checks settled
fails=4, root = Scripts Tests (CPU)):

1. test_check_testpaths_coverage::test_guard_green_on_current_main --
   WORKFLOW_COVERAGE in scripts/check_testpaths_coverage.py is the guard's
   declared registry, not the workflow file alone: the new run target had
   to be registered there too ("testpaths non couverts: scripts/audit/tests").

2. test_check_orphan_merged_pr -- 3 _main tests exit 2 on a runner without
   authenticated gh: main()'s fallback slug discovery runs `gh repo view`
   even with --repo "" and analyse_pr then queries open PRs on the base;
   the swallowed RuntimeError returns 2. Decorated with requires_gh_auth
   skipif (same policy as test_check_unaddressed_nits.py, NanoClaw review
   #14322 concern 2: skip, not FAILED). 452 run + 3 skip on a bare runner,
   455 locally.

Also hardened _g()'s subprocess call with encoding="utf-8" per the
check-subprocess-encoding hook (#12811).

Verified locally: coverage guard 5/5, orphan file 35/35.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix(prune,#14619): clean tolerated artifacts before no-force removal -- removable becomes a forecast of applied

The classification predicate tolerated artifact-only dirty worktrees
(REMOVE) while `git worktree remove` without --force refuses on ANY
untracked file, tolerated or not: removable never predicted applied
(ai-01 measured 1 removal out of 4 announced).

Four changes per the issue's correctif:

1. apply now deletes exactly the tolerated untracked artifacts (and only
   those -- clean_tolerated_artifacts, containment-guarded) before the
   forceless removal;
2. any untracked residue OUTSIDE the tolerated list is classified REFUSE
   (untolerated_untracked:N) instead of a REMOVE that can never land;
3. bg_logs/ and *.log.relaunch join the tolerated list (the two residues
   measured on ai-01);
4. worktrees with an INITIALIZED submodule are classified REFUSE
   (contains_submodules) -- git refuses them categorically. Detection
   ignores '-'-prefixed (uninitialized) entries: this repo has configured
   submodules listed in every worktree, matching the raw output refused
   all 55 worktrees on the dev machine (caught by dry-run-first, fixed
   before any apply).

Positive control run live on the dev machine: probe worktree (merged PR
+ lake_7012.log.relaunch + scripts/bg_logs/) went REMOVE -> cleaned ->
REMOVED, applied=15/15=removable, errors=0; the c162 worktree with an
initialized Z3 submodule correctly REFUSEd. No --force anywhere (grep
assertion added).

Tests: 43 passed 1 skipped (9 new: artifact tokens, clean-only-tolerated,
escape guard, diagnose REMOVE/REFUSE untolerated/REFUSE submodules,
submodule '-'-prefix parsing, no-force source assertion).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@myia-ai-01
myia-ai-01 merged commit 01a897e into main Sep 5, 2026
19 of 21 checks passed
myia-ai-01 pushed a commit that referenced this pull request Sep 5, 2026
…l (family 2/6) (#14670)

* ci(cabling,#14615): recable scripts/audit/tests into scripts-tests.yml (family 2/6)

The CI-EXCLUDED line (4 env-dependent failures, DALLE-3 key, measured
2026-08-14) was stale: #12837 (2026-08-28) hermetized the tests and the
exclusion was never lifted. Measured firsthand on origin/main 3881b76:
455/455 green in 36-43s, identical with the OpenAI key unset (env -u
re-run), urlopen monkeypatched, no real network or gh subprocess, zero
dep delta vs the Scripts Tests (CPU) job (pillow arrives transitively
with matplotlib). The @pytest.mark.env marker proposed by the dispatch
is moot: nothing left to separate.

- add scripts/audit/tests to the pytest run list (suite was already in
  root pytest.ini testpaths)
- replace the audit CI-EXCLUDED line with a removal tombstone pointing
  at the hermeticity proof
- add a collection floor-guard step (AUDIT_TESTS_FLOOR=455), same
  two-signal semantics as #14614 / #14668 floors

Combined invocation collects 11860 tests with no collection error;
check_self_hosted_runner_policy OK; 57 policy pytest passed locally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* ci(cabling,#14615): register audit suite in coverage guard + skipif gh-auth on 3 integration tests

First CI run of the recabled suite caught two real gaps (checks settled
fails=4, root = Scripts Tests (CPU)):

1. test_check_testpaths_coverage::test_guard_green_on_current_main --
   WORKFLOW_COVERAGE in scripts/check_testpaths_coverage.py is the guard's
   declared registry, not the workflow file alone: the new run target had
   to be registered there too ("testpaths non couverts: scripts/audit/tests").

2. test_check_orphan_merged_pr -- 3 _main tests exit 2 on a runner without
   authenticated gh: main()'s fallback slug discovery runs `gh repo view`
   even with --repo "" and analyse_pr then queries open PRs on the base;
   the swallowed RuntimeError returns 2. Decorated with requires_gh_auth
   skipif (same policy as test_check_unaddressed_nits.py, NanoClaw review
   #14322 concern 2: skip, not FAILED). 452 run + 3 skip on a bare runner,
   455 locally.

Also hardened _g()'s subprocess call with encoding="utf-8" per the
check-subprocess-encoding hook (#12811).

Verified locally: coverage guard 5/5, orphan file 35/35.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

variation-genre-run >= 2 grains consecutifs du meme genre LIGHT pour la lane (#10020, advisory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants