Repository navigation
Closed
Labels
Description
Translation sync failure
Source PR: #1001
Target repo: QuantEcon/lecture-python.zh-cn
Target language: zh-cn
Errors
- Error processing lectures/learning_approximation.md: Error: structural parity check failed for lectures/learning_approximation.md:
- directive count differs: source has 35, output has 34 — a wholesale mismatch usually means the document was re-fenced or truncated
- directive add ci builds #1 name changed: source line 15 has {raw}, output line 42 has {index}
- directive Migrate to use jupyter-book for building #2 name changed: source line 25 has {index}, output line 45 has {contents}
- directive [wald_friedman] Add lecture once
jupytextissue sorted out #3 name changed: source line 28 has {contents}, output line 94 has {code-cell} - directive "Contents" does not work #4 name changed: source line 89 has {code-cell}, output line 125 has {math}
- directive The list number does not work #6 name changed: source line 141 has {math}, output line 159 has {code-cell}
- directive [migration] Tasks Required for Migration #13 name changed: source line 369 has {code-cell}, output line 366 has {note}
- directive [execution] Current Sphinx execution warnings #14 name changed: source line 387 has {note}, output line 386 has {math}
- directive [lecture_comparison]view_source_file_bottom_directs_to_wrong_site #15 name changed: source line 413 has {math}, output line 401 has {code-cell}
- directive [lecture_comparison]_missing_links_to_previous/next_lectures_at_the_bottom #19 name changed: source line 590 has {code-cell}, output line 591 has {exercise-start}
- directive [lecture_comparison] Issues in footnote notations #20 name changed: source line 658 has {exercise-start}, output line 605 has {exercise-end}
- directive [lecture_comparison]_uncentering_generating/inserted_plots/figures_in_myst #21 name changed: source line 677 has {exercise-end}, output line 608 has {solution-start}
- directive [lecture_comparison]_no_labels_
In&Out_for_code_cells&its_outputs_in_myst #22 name changed: source line 680 has {solution-start}, output line 612 has {code-cell} - directive [lecture_comparison] Many code cells are not compiled or are looking strange #23 name changed: source line 684 has {code-cell}, output line 636 has {solution-end}
- directive [lecture_comparison][multivariate_normal] A whole section is missing #24 name changed: source line 713 has {solution-end}, output line 639 has {exercise-start}
- directive [lecture_comparison] Broken internal reference #25 name changed: source line 716 has {exercise-start}, output line 653 has {exercise-end}
- directive [lecture_comparison] Images need review for size on Jupyter Book #26 name changed: source line 733 has {exercise-end}, output line 656 has {solution-start}
- directive [lecture_comparison] Numba Deprecation Warnings #27 name changed: source line 736 has {solution-start}, output line 660 has {code-cell}
- directive [lecture_comparison] An issue for both MyST and RST Versions #28 name changed: source line 740 has {code-cell}, output line 697 has {solution-end}
- directive [lecture_comparison][harrison_kreps] Markdown Tables are Broken in MyST #29 name changed: source line 782 has {solution-end}, output line 700 has {exercise-start}
- directive [harrison_kreps] Fix tables #30 name changed: source line 785 has {exercise-start}, output line 712 has {exercise-end}
- directive [lecture_comparison][rational_expectations] \argmax Issue #31 name changed: source line 799 has {exercise-end}, output line 715 has {solution-start}
- directive Update lecture-python sources with latest updates #32 name changed: source line 802 has {solution-start}, output line 719 has {code-cell}
- directive [ifp] fix broken link #34 name changed: source line 819 has {code-cell}, output line 757 has {solution-end}
- target anchors diverge — missing from output: (learning_approximation)=
Recovery
Once the issue is resolved, comment \translate-resync on PR #1001 to retry.
Activity
mmcky commentedon Aug 20, 2026
Route corrected — this one is not a resync case
Per the 2026-08-20 ruling on action-translation#276,
\translate-resyncis no longer the documented recovery for a failed sync, and it would not have worked here in any case: this is a structural-parity failure, and a retry reproduces those byte-for-byte (verified on the frnumpy.mdpair, where the original run's issue and the resync retry's issue have identical bodies at two different engine versions).Status.
lectures/learning_approximation.mdis absent from lecture-python.zh-cn — no target file and no.translate/stateentry — against a source last touched ata4fbd865. The edition reads 143/145.Route.
translate init -f learning_approximationfrom a source clone pulled toorigin/main.initreads the source document off the local filesystem and never consults a merge SHA, so it cannot exhibit the #276 stale-snapshot defect, and its parity check is anchored to current main.Blocker unchanged. action-translation#118 still gates this — and the primary evidence for that block is this issue and its sibling, whose bodies carry the failing run verbatim (
directive count differs: source has 35, output has 34). Until #118's underlying generation defect is addressed,initwill refuse to write rather than produce a corrupt file, which is the v0.24.0 parity guard behaving correctly.Tracked target-side at lecture-python.zh-cn#210.
mmcky commentedon Aug 20, 2026
Recovered and closing.
learning_approximation.mdis onlecture-python.zh-cn@mainas of zh-cn#261 (merged 2026-08-20). That edition's coverage is now 144/145.Delivered with
translate init -fat engine v0.26.0, not\translate-resync, per the ruling on action-translation#276.Two things worth recording for action-translation#118, which is still open:
The parity failure reproduces on the
initpath, so it is not sync-specific — all three write paths hit it.But it is not deterministic. Across six attempts the run refused four times and succeeded twice, always with the signature in this issue's body: the output drops the leading
```{raw}header block, so directive #1 shifts{raw}→{index}and the count lands one short (36 vs 35). The guard is fail-closed and wrote nothing on any refusal. That is a narrower and more diagnosable target than "wholesale mismatch", and it means a retry genuinely can succeed on this path — unlike the sync path, where the recorded retry reproduced its failure byte-for-byte.The merged output was verified after the fact rather than trusted: 36/36 directives, 17/17 code cells, 15/15 headings, 0 python syntax errors across all cells, 4/4 figure captions localised with none byte-identical to source.