Skip to content

Fix(tests,#1650): bump EXPECTED_PAIR_COUNT 13->14 -- paire ANALYSE-07_en (PR #19943) sans enregistrement - #21383

Merged
myia-ai-01 merged 1 commit into
mainfrom
fix/parity-count-14
Oct 19, 2026
Merged

myia-ai-01 merged 1 commit into
mainfrom
fix/parity-count-14

Conversation

@jsboige

@jsboige jsboige commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Grain: LIGHT/guard -- lane myia-po-2025:CoursIA -- prev: MED/notebook-python #21382

Repair main — un des deux rouges Scripts Tests (CPU)

Diagnostic (mesuré sur main pur f52f029, corroboré par po-2027 au dashboard 2026-10-19T06:10Z) : test_check_translation_parity.py::test_full_repo_state_passes_parity échoue avec found 14, declared 13. L'organe check_translation_parity.py rend « OK : 14 paires, 0 violation » — seul le compte déclaré (EXPECTED_PAIR_COUNT = 13, l.731) est périmé.

Cause racine : la 14e paire — SymbolicAI/Lean/ANALYSE/ANALYSE-07-Percolation-Critique_en — est arrivée sur main le 2026-10-19 (commit c91ad98, PR #19943, pli 3 Origami #19898) sans mise à jour de la déclaration. Même classe que les précédents #19996/#20392 : la paire arrive avec son carnet, la déclaration ne bouge pas dans la même PR.

Fix : bump EXPECTED_PAIR_COUNT = 13 → 14 + entrée d'historique au patron établi (7 insertions, 1 fichier).

Validation

  • python -m pytest scripts/translation/tests/test_check_translation_parity.py : 35 passed (dont test_full_repo_state_passes_parity).
  • python scripts/translation/check_translation_parity.py : OK, 14 paires, 0 violation.

Périmètre et résiduel

See #1650 (famille translation, sans clôture).

🤖 Generated with Claude Code

…_en arrivee sans enregistrement (PR #19943)

La 14e paire detectee par discover_pairs() est
SymbolicAI/Lean/ANALYSE/ANALYSE-07-Percolation-Critique_en, mergee le
2026-10-19 (c91ad98) sans mise a jour de la declaration -- le test
test_full_repo_state_passes_parity est rouge sur main pur (found 14,
declared 13, diagnostic po-2027 dashboard 2026-10-19T06:10Z) et gele
toute PR path-filtree scripts/**.

Bump + entree d'historique au patron des precedents (#19996/#20392).
Validation locale : 35 passed (pytest scripts/translation/tests/).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the trivial-diff-advisory Diff trivial : grain META mecanique sans fournee ni exception ecrite (#15740) label Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Trivial-diff advisory (#15740, non bloquant).
genre guard dans la famille META (docs/guard/ledger/readme/test) + diff de 8 lignes changees (<= 100) + aucune exception ecrite dans le body : le litmus de la trivialite (une douzaine d'instances scannees a la suite) est credible. Le verdict est ADVISORY -- fournir une fournée ou citer une exception de la forme #15719 l'eteint.
La demande : une fournee (le geste pourrait comprendre ~10x plus d'instances), OU une exception ecrite dans le body de la forme « exception seulement residu final mesure » (#15719). Editer le body re-deroule cet organe et retire le label.

@github-actions

Copy link
Copy Markdown
Contributor

No organ-duplication: no added def/class collides with another series organ API (scripts/audit/organ_api_index.yaml).

Detector: python scripts/audit/detect_organ_duplication.py --base <merge-base> --body-file <pr body>
Rationale: #16776 / #13564 (rule merged in #16778).

@myia-ai-01 myia-ai-01 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.

Approuvé à la tête c543f57086, réparation de main (périmètre CI, ai-01).

  • Scope : 1 fichier, 7 insertions et 1 suppression. Le diff enregistre la 14e paire et rien d'autre.
  • Cause vérifiée de mon côté : git log --diff-filter=A attribue l'ajout de ANALYSE-07-Percolation-Critique_en.ipynb à c91ad98 (#19943). Le job Scripts Tests (CPU) de #21365 rend found 14, declared 13 sur le runner myia-ai-01-wsl-3 à 07:35Z.
  • Second rouge cité au body : il est levé. #21366 est sur main (901825f), et test_detect_code_in_markdown_cells.py passe en local sur main 9ed2c39 (13 passed).
  • Note pour l'instrument : en local, sur un clone qui porte un .tmp/ ignoré, discover_pairs compte 15 paires (un fort-boyard-python_en.ipynb égaré sous .tmp/). La CI ne voit pas ce dossier et compte 14. Ce n'est pas un défaut de la PR, je le note pour quiconque re-mesure en local.
  • Suites : #21296 et #20711 déclarent aussi un passage 13 -> 14. Après ce merge, chacune devra passer à 15, puis 16, dans l'ordre où elles arrivent.

@myia-ai-01
myia-ai-01 merged commit 63e4d0b into main Oct 19, 2026
22 of 23 checks passed
jsboige added a commit that referenced this pull request Oct 19, 2026
…PAIR_COUNT 14 -> 15

Conflit de registre : les deux lignees ajoutait chacune une entree
« 13 + 1 = 14 » pour un 14e paire distinct (branche : research_archive_en
T4 ; main : ANALYSE-07_en via #19943, enregistree par #21383). Resolution :
les deux entrees conservees + entree de resolution, EXPECTED_PAIR_COUNT = 15
(main 14 + research_archive_en). Preuve : pytest
test_check_translation_parity.py 35/35 passed sur l arbre fusionne
(test_full_repo_state_passes_parity trouve 15 paires).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
myia-ai-01 pushed a commit that referenced this pull request Oct 20, 2026
* Add(ci,#21391): EXPECTED_PAIR_COUNT guard at PR time

`main` has now turned red for the fourth time because a notebook PR
adds a new `*_<lang>.ipynb` pair without bumping the constant
`EXPECTED_PAIR_COUNT` in `scripts/translation/tests/test_check_translation_parity.py`.
History of the four rouges: #19996, #20392, #20453, #19943
(constant updated in each by a follow-up PR). The test that compares
the count (`test_full_repo_state_passes_parity`) lives in
`Scripts Tests (CPU)`, filtered on `scripts/**`, so a notebook PR
that doesn't touch `scripts/` doesn't even trigger it.
`translation-parity.yml` runs only nightly.

The invariant "pair added/removed/renamed => constant bumped in the
same PR" has no carrier at PR time. This guard is the carrier.

Pipeline (pure git, no clone, no kernel):
  1. `git diff --name-status -M50% base..head -- 'MyIA.AI.Notebooks/...'`
     lists notebook A/D/R status (M is ignored).
  2. For each A/D/R translation file `*_<lang>.ipynb`, the guard reads
     the corresponding FR source at head via `git show head:path`
     (no disk walk). Files that pair are recorded.
  3. If the diff adds or destroys at least one pair AND
     `EXPECTED_PAIR_COUNT` was not modified in the same diff: ROUGE,
     with the exact line to edit, the new value expected, and the
     5-line history-entry pattern already in use by the file.
  4. If the diff modified the constant, the new value is compared to
     `discover_pairs(repo_root, langs)` (the disk walk, only on this
     branch). ROUGE if the values disagree.

Acceptance (re-run on the SHAs cited in the issue):
  1. POSITIVE on #19943 (c91ad98^..c91ad98): ROUGE, names
     `ANALYSE-07-Percolation-Critique_en`, expected bump 13 -> 14.
  2. NEGATIVE on #21383 (origin/main..pr-21383): GREEN (no pair diff).
  3. M-only diff (existing _en.ipynb modified): GREEN, A/D/R set
     excludes M by design.
  4. .tmp/ orphan on local disk: the guard reads git diff, not disk;
     the orphan is invisible to it.
  5. Cost: 0.35s (no disk count) / 0.35s (with disk count) on this
     machine; no blob:none clone of 2 GB.

25/25 pytest tests PASSED.

Out of scope: the workflow integration lives in
`.github/workflows/always-on-guards.yml` -- ai-01 does the merge
(claim `paths: scripts/translation/**` only; workflow file excluded).

Refs: #21391, #1650, #19943, #21383, NAMING c.12811 (encoding),
NAMING c.530 strict (base-inherited), NAMING c.971 strict (0 re-ping).

Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>

* fix(translation,#21391): test_check_pair_count_declared setup_class path Windows hardcode -> dynamique

Le setup_class TestAcceptance utilisait Path(r"D:\CoursIA-2") qui est un
chemin Windows hardcode. Sur un runner CI Linux, ce chemin n'existe pas
(Errno 2 FileNotFoundError PosixPath('D:\CoursIA-2')).

Fix : Path(__file__).resolve().parents[3] pour remonter du fichier test
au repo root (scripts/translation/tests -> 3 niveaux de parents).

NAMING c.91 / c.17071 strict : encage les tokens bloquants.
NAMING c.16866 ★★ OK : pre-commit OK (encoding='utf-8' sur subprocess).
NAMING c.11064 strict : paths: scripts/translation/** only.

Tests : 25/25 PASSED localement (acceptance + integration + helpers).

Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>

* fix(translation,#21391): derive constant line in ROUGE msg, address Hermes F1/F2

F2 -- _rouge_message no longer hardcodes :731 (the constant has already
drifted to :737). _constant_line_number_in_head resolves the current line
from the head text; on failure it prints the search pattern instead of a
stale number. New witness asserts the resolved line == the live line and
!= the stale 731.

F1 -- wiring stays the dispatcher's decision (unchanged); the body
reformulation is delivered in a follow-up comment on the PR.

Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trivial-diff-advisory Diff trivial : grain META mecanique sans fournee ni exception ecrite (#15740)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants