Repository navigation
Closed
Labels
Description
Translation sync failure
Source PR: #1006
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 36, output has 35 — 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 51 has {code-cell} - directive Indentation does not work #5 name changed: source line 97 has {code-cell}, output line 133 has {math}
- directive Reference inside of lists does not work #7 name changed: source line 149 has {math}, output line 167 has {code-cell}
- directive [execution] Current Sphinx execution warnings #14 name changed: source line 377 has {code-cell}, output line 374 has {note}
- directive [lecture_comparison]view_source_file_bottom_directs_to_wrong_site #15 name changed: source line 395 has {note}, output line 394 has {math}
- directive ENH: Fix for bringing code in from a file #16 name changed: source line 421 has {math}, output line 409 has {code-cell}
- directive [lecture_comparison] Issues in footnote notations #20 name changed: source line 598 has {code-cell}, output line 599 has {exercise-start}
- directive [lecture_comparison]_uncentering_generating/inserted_plots/figures_in_myst #21 name changed: source line 666 has {exercise-start}, output line 613 has {exercise-end}
- directive [lecture_comparison]_no_labels_
In&Out_for_code_cells&its_outputs_in_myst #22 name changed: source line 685 has {exercise-end}, output line 616 has {solution-start} - directive [lecture_comparison] Many code cells are not compiled or are looking strange #23 name changed: source line 688 has {solution-start}, output line 620 has {code-cell}
- directive [lecture_comparison][multivariate_normal] A whole section is missing #24 name changed: source line 692 has {code-cell}, output line 644 has {solution-end}
- directive [lecture_comparison] Broken internal reference #25 name changed: source line 721 has {solution-end}, output line 647 has {exercise-start}
- directive [lecture_comparison] Images need review for size on Jupyter Book #26 name changed: source line 724 has {exercise-start}, output line 661 has {exercise-end}
- directive [lecture_comparison] Numba Deprecation Warnings #27 name changed: source line 741 has {exercise-end}, output line 664 has {solution-start}
- directive [lecture_comparison] An issue for both MyST and RST Versions #28 name changed: source line 744 has {solution-start}, output line 668 has {code-cell}
- directive [lecture_comparison][harrison_kreps] Markdown Tables are Broken in MyST #29 name changed: source line 748 has {code-cell}, output line 705 has {solution-end}
- directive [harrison_kreps] Fix tables #30 name changed: source line 790 has {solution-end}, output line 708 has {exercise-start}
- directive [lecture_comparison][rational_expectations] \argmax Issue #31 name changed: source line 793 has {exercise-start}, output line 720 has {exercise-end}
- directive Update lecture-python sources with latest updates #32 name changed: source line 807 has {exercise-end}, output line 723 has {solution-start}
- directive [optgrowth_fast] fix broken links #33 name changed: source line 810 has {solution-start}, output line 727 has {code-cell}
- directive add Macro syntax for argmax and argmin #35 name changed: source line 827 has {code-cell}, output line 765 has {solution-end}
- target anchors diverge — missing from output: (learning_approximation)=
Recovery
Once the issue is resolved, comment \translate-resync on PR #1006 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.