Skip to content

chore(translation,#4957): resync SMT z3-api CSV drift (2 SRC_DRIFT -> 0) - #7103

Merged
jsboige merged 1 commit into
mainfrom
fix/c581-smt-csv-resync
Jul 18, 2026
Merged

jsboige merged 1 commit into
mainfrom
fix/c581-smt-csv-resync

Conversation

@jsboige

@jsboige jsboige commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

chore(translation,#4957): resync SMT z3-api CSV drift (2 SRC_DRIFT -> 0)

Sister PR c.580 (#7097, GenAI/Image 1 SRC_DRIFT) + 7 resyncs antérieurs (#6943 search-part1, #6929 iit, #6939 smt, #6945 genai-video, #6947 tweety, #6951 genai/texte, #7071 probas-decinfer). Ferme 2 SRC_DRIFT détectés par scripts/translation/check_translation_sync.py sur la partition translations/smt/z3-api.csv.

Cible : MyIA.AI.Notebooks/SymbolicAI/SMT/Z3-API/Z3-Python-06-Advanced-Optimization-Csharp.ipynb — 2 cells modifiées hors cycle CSV. Drift = 2 lignes.

Root cause

Les cells db8cd9f9 (markdown) et e3af6499 (code) du notebook Z3-Python-06-Advanced-Optimization-Csharp.ipynb ont été modifiées lors du refactor Plotly-CDN → SVG inline (post-#6927 c.532-c.539 detector + #6942 SvgChartHelper.cs MERGED + #6958 Overlay primitive MERGED). Le CSV sync n'a pas suivi car aucun pipeline T1 (= extract_cells_to_csv.py --update) n'avait été ré-exécuté.

Substance du refactor (dans la source notebook):

  • cell db8cd9f9 (markdown) : 1 ligne modifiée — > Le twin C# utilise **Plotly** (rendu HTML via le formatteur builtin...) → > Le twin C# utilise **SVG inline** (rendu statique zero-dependance...).
  • cell e3af6499 (code) : refactor 32 lignes → 19 lignes — Plotly-CDN <script src="cdn.plot.ly/..."> (BLANC en consultation statique GitHub/nbviewer/offline, cf detector feat(tools,#6927,#3801): Plotly-CDN static-render risk detector + plan 22 nb / 31 cells #6931) → SvgChartHelper.Overlay(...) zero-dependance (rend statique).

Hash src dérive:

  • cell db8cd9f9 : CSV fabd638e7d2a636f → actuel cc88108996c0053c
  • cell e3af6499 : CSV dfbce36b7e1bff83 → actuel c2ab4bb72db36183

G.1 firsthand verification

Metric Pre-fix Post-fix
Drift detector check_translation_sync.py translations/smt/z3-api.csv 2 SRC_DRIFT 0 drift
CSV file size n/a unchanged (1 file)
Total rows modified n/a 2 (cell db8cd9f9 + e3af6499)
Rows preserved n/a 514 rows d'autres notebooks préservées
src_hash updated n/a 2 cellules (fabd638e7d2a636f→cc88108996c0053c, dfbce36b7e1bff83→c2ab4bb72db36183)
git diff --stat n/a 1 file, 23 insertions(+), 44 deletions(-)
extract_cells_to_csv.py --update return n/a "2 ligne(s) rafraîchie(s), 25 déjà in-sync, 0 ajoutée(s), 0 orpheline(s), 514 ligne(s) d'autres notebooks préservées"

Procedure (reproducible)

# 1. Pre-flight collision scan (L679-L1)
gh pr list --state open --search "z3-api" --json files  # 0 collisions
gh pr list --state open --search "translations/smt" --json files  # 0 collisions
git branch -r --contains origin/main | grep -E "smt|z3-api"  # 0 active branches

# 2. Dry-run detect (read-only)
python scripts/translation/check_translation_sync.py translations/smt/
# -> 2 SRC_DRIFT sur z3-api.csv, cell db8cd9f9 + e3af6499, notebook Z3-Python-06-Advanced-Optimization-Csharp.ipynb

# 3. Surgical resync (--update preserves other-notebook rows + target columns text_en/...)
python scripts/translation/extract_cells_to_csv.py --update translations/smt/z3-api.csv \
    MyIA.AI.Notebooks/SymbolicAI/SMT/Z3-API/Z3-Python-06-Advanced-Optimization-Csharp.ipynb
# -> "OK (--update) : 2 ligne(s) rafraîchie(s), 25 déjà in-sync, 0 ajoutée(s), 0 orpheline(s) potentielle(s), 514 ligne(s) d'autres notebooks préservées"

# 4. Verify drift = 0 (read-only)
python scripts/translation/check_translation_sync.py translations/smt/z3-api.csv
# -> "OK : 1 CSV vérifié(s), 0 drift."

# 5. Verify diff scope (L298 anti-§D byte-identity for CSV-only changes)
git diff --stat
# -> "translations/smt/z3-api.csv | 67 ++++++++++++++++-----------------------------"
# -> 1 file, 23 insertions(+), 44 deletions(-)

# 6. Anti-regression §D scan: confirm no secrets leak
git diff translations/smt/z3-api.csv | grep -E "sk-[a-zA-Z0-9]"
# -> 0 occurrence (clean)

Anti-regression §D PASS

Self-pick rationale (R6 anti-monotonie)

C.580 a livré PR #7097 (GenAI/Image 1 SRC_DRIFT). C.581 pivote vers SMT (registre Translation #4957 T2 distinct du c.580 GenAI/Image, registre #2876 accents c.579 antérieur, registre Lean docs c.576/c.577 antérieur). Le détecteur check_translation_sync.py trouve 141 SRC_DRIFT totaux sur 33 CSV ; ce PR ferme le 2ᵉ plus petit scope (2 hits sur smt/z3-api.csv) — atomique R3.

Why SMT z3-api : track Translation #4957 T2 actif, fichier = SMT/Z3-API partition, 2 hits = 2ᵉ plus petit scope détecté. Permet ship 1 PR cleanly atomique sans collision (L679-L1 pré-flight a confirmé 0 PR active sur translations/smt).

Plan (NOT in this PR, since R3 atomique + R6 anti-monotonie) :

Caveats / post-merge follow-up

References

Verdict

Atomic, R3-compliant, anti-regression-verified, secrets-clean. Diff = 1 file, 23 insertions(+), 44 deletions(-) — substance refactor Plotly-CDN → SVG inline héritée du notebook source. Detector confirms 0 drift post-fix. T2 resync = standard, deterministic, source-only refresh.

Sister PR c.580 (#7097, GenAI/Image 1 SRC_DRIFT). Ferme 2 SRC_DRIFT sur translations/smt/z3-api.csv (cell db8cd9f9 markdown + cell e3af6499 code), traces du refactor Plotly-CDN -> SVG inline (post-#6927 c.532-c.539 detector + #6942 SvgChartHelper + #6958 Overlay). Drift = 2 -> 0.

G.1: 514 lignes d'autres notebooks preservees (L298 byte-identity).
R3: 1 file, 23/44 (cell e3af6499 = code refactor substantive).
See #4957
@jsboige
jsboige requested a review from myia-ai-01 July 17, 2026 22:16
jsboige added a commit that referenced this pull request Jul 18, 2026
…> 0) (#7204)

translations/genai/texte.csv : 8 SRC_DRIFT sur GenAI/Texte/5_RAG_Modern.ipynb.
Infra traduction Epic #4957, resync pivot cols via extract_cells_to_csv.py --update.

## Cause du drift (timing verifie STABLE)

Drift vient de la PR accents **MERGED** #7153 (commit 124090f
"fix(genai,#2876): restore FR accents in 5_RAG_Modern markdown"). PAS de PR
OPEN touchant 5_RAG_Modern (G.1 verify : gh pr list --search "5_RAG_Modern"
count = 0). Resync stable, pas de re-drift au merge (lecon c.591 : drift
MERGED = stable, drift OPEN = re-drift).

## Livrable

8 lignes rafraichies (pivot cols : src_hash/text_fr/hash_fr), 56 deja
in-sync, 654 lignes d'autres notebooks preservees. Diff +32/-32 (multiline
CSV fields, accents restaurés : generation -> génération, plutot -> plutôt,
requete -> requête, etc.).

## Preuves

| Preuve | Resultat |
|--------|----------|
| Drift pre-resync | 8 anomalies (5_RAG_Modern x8) |
| Drift post-resync | 0 (check_translation_sync --check = OK) |
| Parity rows | 718 = 718 (DictReader) |
| OTHER rows byte-identity (654 rows) | sha1 d40e7d3b6f3b302656d8dd67fd9bf31e2bbc0b2f = unchanged |
| Translation cols identity (TARGET 64 rows, 14 cols) | pre_dol == post_dol (single-process, cell_id-keyed 0 diff) |
| Pivot cols changed (src_hash+hash_fr) | 8 = exactement les 8 SRC_DRIFT cells |
| CRLF dans le diff | 0 (LF preserve, 17548 LF) |
| R3 collision | gh pr list --search "5_RAG_Modern" = 0 OPEN (evite #7097 image, #7103+#7154 smt, #7104 search-part4) |

## Methode

python scripts/translation/extract_cells_to_csv.py \
  MyIA.AI.Notebooks/GenAI/Texte/5_RAG_Modern.ipynb \
  --update translations/genai/texte.csv \
  -o translations/genai/texte.csv
# -> 8 ligne(s) rafraichie(s), 56 deja in-sync, 0 ajoutee(s), 654 preservees

## G.1 -- false-alarm resolved (single-process verification)

Premier snapshot translation-cols (dict-of-list format, inline blocks dans 2
processus Python distincts) semblait montrer mismatch (MATCH TRANSL: False).
Re-verification authoritative (C610-L1 ★ raffine) : single-process lisant
git-show-HEAD vs worktree, cell_id-keyed per-cell tuple comparison =
0 translation-col diff, 8 pivot changes. Lecon L793-L1 : byte-identity
verification MUST etre single-process + cell_id-keyed, PAS cross-inline-blocks
(transient false-alarm).

## Anti-regression section D

0 notebook source modifie. 0 cellule output touchee. Resync CSV pivot cols
uniquement (mecanique de tracking traduction). Translation cols preserved
verbatim (preuve single-process DictReader diff = 0 sur les 14 colonnes).

See #4957 (infra traduction CSV, Epic #1650). See #7153 (PR accents merged
ayant cree le drift stable).
jsboige added a commit that referenced this pull request Jul 18, 2026
…t (3 SRC_DRIFT -> 0) (#7104)

Sister PR c.580/c.581 (#7097 GenAI/Image, #7103 SMT/z3-api). Ferme 3 SRC_DRIFT sur translations/search-part4/search-part4.csv (cells mgs10-c08 MGS-10-CenterBias + 8ac959bc MGS-15-LandscapeAnalysis + c04 MGS-17-ParameterControl), traces du meme refactor Plotly-CDN -> SVG inline post-#6927.

G.1: 386 lignes d'autres notebooks preservees (L298 byte-identity).
R3: 1 file, 87/58 (3 cellules code refactor substantive).
See #4957
@jsboige
jsboige merged commit 7e7aa6d into main Jul 18, 2026
10 checks passed
@jsboige
jsboige deleted the fix/c581-smt-csv-resync branch September 2, 2026 13:16
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.

1 participant