Repository navigation
v0.34.0 carries the 2026-11-25 overnight stack (#471–#476), the #477 change (#487) and an ml repair rule (#468): sync, rebase and review fail where they used to guess, editors' state-file keys survive every write, and the French typography no longer touches CSS, table delimiter rows or cell breaks.
What changes for an edition on @v0:
- A lecture whose state file cannot be read is held back. On sync, a changed or renamed lecture whose own state file answers anything but a 404 is not written, and is listed in the failure issue before any model call; on rebase, that PR's rebase fails, with advice to re-run. Before, such a lecture was synced and its state file rewritten from scratch.
- State files keep the keys the engine does not own (#290), such as an editor's sign-off, carried as written after the engine's fields. A rebase keeps the default branch's keys, so a key that exists only on a sync PR's branch is not carried; a sign-off belongs in its own PR to the default branch. A state file that is not a YAML mapping is overwritten with a warning, and the sync PR body names it under "State Files Overwritten".
- Only a 404 means a lecture is absent (#466): any other read error fails the file instead of translating it from scratch over a reviewed one.
- Rebase stops on a lecture
maingot first that the PR's own source change adds too (#467), with a comment asking a person to choose which copy wins. A renamed lecture is outside the stop, and its rebase still fails with a missing-title error (#478). - Review mode fails on a source read error (#261), and on a file over 1 MB, instead of reviewing less than the PR, and degrades instead of dying when the diff evaluation never returns a usable verdict (#284). A degraded review is a new kind of verdict record: detect it by the phrase
diff evaluation returned no parseable verdictinrecommendationReasons, not by its findings. A diff check the model reports as failed now always routes the review toeditor(#477), by the reasonmodel-asserted check failed: <check>. Shadow-mode data also shifts with #283 (the Changed Sections list on headings that share an id) and #223 (a finding filed under the wrong lecture moves to the one it quotes). - French typography (#325, #324): no non-breaking spaces in
<style>,<script>,<pre>and<textarea>blocks,+++cell breaks or table delimiter rows, and an elision apostrophe before inline markup is U+2019. lecture-python-programming.fr's apostrophes were healed in one edition PR, QuantEcon/lecture-python-programming.fr#118, before this release reached@v0. The<style>block an earlier version damaged in fr'sgetting_started.mdis repaired by hand in an edition PR after this release reaches@v0, since the older engine would re-damage it. - Deployed source workflows still filter on a bare
_toc.yml. Add<docs-folder>/_toc.ymlto theirpaths:by hand (#382);setupwrites it for new editions only.
The CLI changes (status compares content, --resume-from resolves exactly, one usage total, refused output kept under .translate/refused/) are in the sections below.
Added
initandforwardkeep what the parity guard refused, in.translate/refused/(#364, #430). When the structural parity guard refused a translation, the model's output was discarded, so a refusal could be read only through the guard's message, which describes the symptom (a whole-document code fence reads as a renamed directive). The bytes the guard checked are now written to<target>/.translate/refused/<lecture>, the lecture's path under the docs folder, and the lecture still fails. The failure names the file (TRANSLATION-REPORT.md's Failures entry,init -f's stderr,forward's log and bulk summary, andrefusedOutputin--report-json), and the console and the Failures entry show the output's first and last three lines: the first three after the front matterinitandforwardadd, so a code fence that opens the reply shows first, each line with control characters shown as�and cut at 200 characters. The folder carries a.gitignoreof*, checked before every write and replaced when it has no*line, so it is never committed, in existing editions too, andsetupadds.translate/refused/to the.gitignoreit writes;status,doctor --require-stateand sync do not see it. A later translation of the lecture removes its refused output. Nothing is written through a symbolic link, the folder's.gitignoreincluded, and no lecture named.gitignoreis kept: the failure then says why the output was not kept. Withdocs-folder: .the folder is inside the docs folder, so a localjupyter-book buildwould read it; the CLI reference says how to exclude it.--report-jsonnow keeps a parity failure's message whole, every violation listed, where it cut every message at 500 characters; other failures are still cut. Sincerate-check.shuses each draw's directory asinit's target, a refused draw's output is kept in the run directory with no change to the script.
Changed
ml_repair.pycapitalises a lowercase English word that opens a Malayalam paragraph (round 6, lecture-python-programming.ml#58). The capitals rule is in the prompt, yet all six archived round-6introdrafts opened line 18 with a lowercaseeconomics-ലുംoreconomics-ഉം, and the editor capitalised it. A seventh repair now capitalises it (economics-ലും→Economics-ലും) at exactly the siteslowercase_initialflags, through one shared test,ml_metrics.lowercase_opener, so the lint and the repair cannot disagree. List items and MyST role link text are left to the lint: the editor keeps a bullet that opens with a technical term as it is (ml#25), and his own suggestion atfunctions290 keeps{doc}`previous lecture …`lowercase. On the editor's six reviewed pages it changes nothing. On the 286 archived drafts it capitalises 654 openers: at 561 the reviewed page opens a paragraph with the capitalised word, at none with the lowercase one, and the other 92 he reworded. The lint's output is unchanged on every archived draft.over_translation_watchgains ശ്രദ്ധ കേന്ദ്രീകരി: the editor restored focus in English at ml#58 18, its only reviewed site so far, and the next ispython_essentials25. Fixture tests 42 → 46. Experiment tooling only; nothing insrc/or the action bundle changes.- Under
sync-scope: all, a sync that passes without opening a PR closes the earlier failure issue (#387). A failed sync's "Translation sync failed for PR #N (lang)" issue was closed underallonly by a later run that opened its translation PR, so a rerun that passed with nothing to deliver (a PR that only removes a lecture the edition no longer has, or changes only files outside the lecture set) left it open after the problem was gone. Such a run now closes it, as async-scope: existingrun already did, with a comment that links the run and names no scope. Test-mode runs and failed runs still close nothing. Nothing in the edition changes.
Fixed
- A diff check the model reports as failed now always routes the review to
editor(#477). A model-asserted check (scopeCorrect,positionCorrect) that came backfalsegated only through oneminordiff-checkfinding, andfindings[]keeps the worst 20: when 20 findings sorted ahead of it (20minortranslation findings, say, or 15 beside 5 diff-quality issues), that finding was cut, and the verdict readauto-merge(in shadow mode,wouldAutoMerge: true) beside a publishedscopeCorrect: false. Nothing merged, since review modes are onlyoffandshadow, but it put false points into the shadow-mode calibration data. The failure now also gates by arecommendationReasonsentry of its own,model-asserted check failed: <check>, worded apart from a deterministic check'sdiff check failed: <check>so calibration can still tell model opinion from measured fact. During the shadow window some verdicts move fromauto-mergetoeditor; earlier verdicts that readauto-mergewith a model check atfalseshould be counted aseditor. - The source sync workflow filters on
<docs-folder>/_toc.yml, so a PR that changes only the table of contents starts a sync (#382).translate setup --source-workflowand the sync workflows in the quickstart, README, action reference,examples/README.mdand the fresh-setup and add-language tutorials listed a bare_toc.yml(or none) inpaths, which matches only a file at the repository root; the action syncs the one underdocs-folder. A bare_toc.ymlstays only fordocs-folder: '.'. Workflows already deployed are unaffected by this change: addlectures/_toc.yml(your docs folder's_toc.yml) to the workflow'spathsby hand, sincesetupwrites the workflow only when it creates a new edition. - Sync no longer translates a lecture from scratch when the edition read fails (#466). Under
sync-scope: all, sync took any failed read of a changed lecture, or of a renamed lecture's old path, from the edition (a 5xx, a 403, a rate limit) to mean the edition did not have it: a changed lecture was translated from scratch over its reviewed translation, and a rename left the old file in the edition beside a fresh translation, and the run passed. Only a 404 now means the edition lacks the lecture, as for the ToC and removal reads. Any other status is aFetch failed (markdown)orFetch failed (renamed)error for that lecture: it is not translated, the run fails and opens its failure issue, and the PR's other files still sync. - A PR GitHub created while answering with an error is adopted, not reported as a failed run (#92). GitHub can create the translation PR and still time out returning it, so the run failed with "Failed to create PR" over a complete, correct PR, and a retry would have opened a second one. When
pulls.createfails, sync now looks the PR up by its branch, which is unique to the run (up to three lookups, two seconds apart). If it is there, the run adopts it with a warning and applies its labels and reviewers as usual; if not, the run fails with the original error. translate statusandbackwardno longer read a lecture synced from a merge-commit or rebase merge as changed (#391). Sync records the source PR's merge commit assource-sha, which after a merge commit, or a rebase merge whose last commit did not touch the lecture, is not the lecture's last commit.statuscompared the two commits, so it reported the freshly synced lectureOUTDATED(and bulkforwardresynced it), andbackwardanalysed it instead of skipping it. When the commits differ, both now compare the English file's content at the recorded commit with its content now, and an unchanged file reads as in sync. A recorded commit that is not in the local source clone, or an id that names something other than a commit (such as a tree), still reads as changed. Sync still records the merge commit; recording the commit that last touched each lecture, the issue's second part, remains open.translate init --resume-fromrefuses a name it cannot resolve, instead of translating the whole series (#384). It took the first ToC entry that contained the name, and a name that matched nothing printed one line and started again from the first lecture, paying for every lecture already translated. It now names the lecture as-fdoes (the path, else a unique file name, else a unique part of the path) and stops before any translation or write when the name matches no lecture or more than one, naming them. An empty name (--resume-from "$NEXT"withNEXTunset, or-f "") is refused the same way rather than read as no name.--dry-runwith--resume-fromnow lists only the lectures the run would translate.--resume-fromwith-fis refused at the start, since it applies to a bulk run.- A whole-document translation that ends with the incomplete-document marker is no longer reported as truncated (#428). When the model stopped and printed the marker,
init,forwardand sync said "Document exceeded token limits and was truncated" and advised section-by-section translation, though a response that reaches its output limit is refused earlier as truncated and never reaches that check. The message now reads "The model stopped and printed the incomplete-document marker after N output tokens, short of its limit of M: the response was not truncated." The run report'sincompleteclass now matches that message through one shared constant, andrate-check-summary.mjsaccepts both wordings, so a control run at an older tag still scores the old one. The prompt still offers the model the marker; whether to remove it, the issue's third point, changes what each request sends and needs a billed check, so it remains open. initandforwardcount the tokens of every response, the failed files' included (#356).init's console summary andTRANSLATION-REPORT.mdprintedTokens:/Total Tokens Used:as the sum of the successful lectures' final responses, so a lecture the parity guard refused, though paid for, counted 0;forwardcounted only a successful resync and never its triage. Both now print one line from the translator's own count, in the shape the Action logs:API usage: <calls> call(s), <input> input + <output> output tokens, cache: <read> read + <written> written.initprints it in its summary and writes it toTRANSLATION-REPORT.mdasAPI Usage;forwardprints it per file with-fand in the bulk summary, counting triage and resync on every path, a refused triage included, and with-falso when the file then fails with an error.--report-jsonalready counted every response and is unchanged.runInit's returned stats carryusagein place oftotalTokens.- French typography no longer writes non-breaking spaces into CSS, table delimiter rows or cell-break metadata (#325). The
frtypography pass treated three kinds of line as prose. In a raw<style>block it wrotewidth : 70% ;with U+00A0, which is not CSS whitespace, so the browser dropped the declarations (the fr edition'sgetting_startedfigures render full-width). In a table delimiter row it wrote| :- : |, which no longer parses as one, so the table renders as a paragraph of pipes (the fr edition'spandas.md). In a+++ {"user_expressions": []}cell break it made the JSON unparsable. The pass now leaves raw<style>,<script>,<pre>and<textarea>blocks alone (multi-line or on one line, also inside a note), and+++lines and delimiter rows too, and still typesets the prose around them. A raw block left unclosed runs to the end of the file, as in CommonMark, but one opened inside a directive ends at the directive's closing fence, as MyST reads it. A line that starts with one of those tags opens a raw block even when it is a sentence (<pre> est une balise…), as it does for a Markdown renderer: write the tag in backticks to mention it in prose. A delimiter row an earlier version damaged is repaired, so the frpandas.mdtable heals on the next sync of that file. A damaged<style>block is not repaired: after this release reaches@v0, the fr edition needs its one-off PR removing the U+00A0 fromgetting_started.md's<style>block (and, if the sync has not already healed it, frompandas.md's delimiter row). Before that release, a hand repair would be re-damaged by the next sync. - A French elision apostrophe before inline markup no longer renders as a closing quote (#324). In
de l'[Exercice 1](x),d'*arguments*,d'{ref}`appels`ord'« apprendre », docutils smartquotes cannot tell that the straight'is an elision, and for French renders it as ”: "de l”Exercice 1" (24 places on 13 pages of the fr edition). Thefrtypography pass now writes U+2019 there, for a closed list of elision prefixes at a word start, and leaves in-word apostrophes (aujourd'hui) and everything outside prose alone. Heading matching treats’and'as the same character, so a heading that gains the curly apostrophe still matches its recorded heading-map entry.scripts/typography/apply.mjsaccepts the change and reports the count beside the non-breaking spaces. Before this release reaches@v0, heal the fr edition with the patchedscripts/typography/apply.mjsin one fr PR. That run also repairspandas.md's delimiter row (#325), so the PR carries that line beside the apostrophes, and a sync ofpandas.mdby the old engine before@v0moves would damage the row again. Otherwise the first sync of each affected fr file carries apostrophe changes in sections its English change did not touch. - A failed read of one source file now fails the review run instead of silently narrowing it (#261). Review mode read each file's English source with any error taken as "the file is absent", so a rate limit or a 5xx on one file of a multi-file PR dropped that file from the review, and the PR could PASS and record
auto-merge(orwouldAutoMerge: truein shadow mode) having reviewed less than the PR. Only a 404 now means a source file is absent; any other failure on a source read fails the run before any model call, with an error naming the file, so a rerun reviews the whole PR. This holds for sync PRs and for CLI resync PRs. A reviewed file whose source is genuinely absent (a 404) while the others were compared routes the PR toeditor, with the file named in the recommendation reasons and the comment. A file the contents API returns without its content (GitHub does this for a file over 1 MB) was read as an empty document and could likewise slip through; it now fails the run as a failed read, naming the file and its size, on the source side and on the translation side. A genuinely empty file is still reviewed as empty. A failure to read the source PR itself is unchanged: the review fails as having no source content. - A diff evaluation that never parses no longer kills the review (#284). About 2% of the time the diff evaluation's three attempts end on a reply that is not valid JSON, and the review run failed with no verdict posted, discarding the translation evaluation it had already paid for. The three attempts stay. When the last of them does not parse, the review now posts its verdict with
scopeCorrectandpositionCorrectrecorded asfalse, and the PR routes toeditorby a recommendation reason carrying the fixed phrasediff evaluation returned no parseable verdict;diff-checkfindings carry the same phrase, but the reason gates on its own, so twenty findings of the model's own cannot crowd it out. The verdict schema is unchanged. The run ends green with a warning, the deterministic diff checks run and report as usual, and the failed attempts count in the token usage. In calibration data, adiff-checkfinding with that phrase means the model gave no answer, not that it judged the check failed, and the injected-defect scorer (tool-review-injection) scores such a review as a failed run, as it did before, detecting it from the recommendation reason alone. A reply that is valid JSON but not an object ([1,2],null) now counts as a parse failure too: it is retried, and in the diff evaluation it degrades the review in the same way, where it used to fail the run after one call. Only a reply that came back and does not parse counts: an API error, any error the transport raises (aSyntaxErrorincluded), a refusal or a truncated reply in the diff evaluation still fails the run, and so does a translation evaluation that never parses. - Within one lecture, review mode no longer reports an unchanged section as changed when two headings share their text (#283). Review matched a PR's sections before and after by heading text alone, dropping the level, so
### Applications in Economicsand#### Applications in Economics, or a heading repeated in one lecture (## Exercisestwice), collided: an unchanged section was reported as modified on every PR touching the lecture, and a deleted duplicate could go unreported. Such headings are now matched by level and text, the nth to the nth. A heading of such a pair whose level changed is usually reported as one modified section, as a unique heading's is, but not always: when a duplicate is inserted before or deleted from in front of another, or a unique heading is demoted while a new one of the same text is added, the nth-to-nth pairing can still name the wrong one of the duplicates, though it reports no more entries than before. The "Changed Sections" list given to the reviewer changes on lectures with such headings (about 7% of English lectures, per the issue): it drops the spurious entries and gains the missed ones. It also changes on multi-file PRs whose files share a heading (## Overview,## Exercises), because review matches the files' concatenation as one document, so headings collide across files. That is mostly better (two files, one## Overviewedited: threemodifiedentries before, the one right entry now), but one case is new and wrong: a new file that sorts before an existing modified file shifts the pairing by one file, so the new file's sections readmodifiedand the existing file's readadded, its unchanged sections included. Pairing per file is a follow-up. The reviewer's prompt text is unchanged, but shadow-mode data from such lectures and PRs shifts from this release. A single lecture whose headings are all distinct, and a multi-file PR whose files share no heading, get exactly the same list as before. The harness evaluator's copy of the function (tool-test-action-on-github/evaluate) is fixed in step. - Rebase mode stops with a comment that names the lecture, instead of a missing-title error, when a PR merged since added a lecture this PR's source change adds too (#467). Two translation PRs can add the same lecture: the sync of a source PR and a
\translate-resyncof it, or a sync and a copy pushed with the CLI. (Two source PRs that both add a lecture do not reach the stop: by the time the second is synced, its source commit's parent has the lecture, and its rebase is the stacked update below.) Once one merged, rebase mode rebuilt the other as an update ofmain's copy, with no earlier English to diff against, and failed with a missing-title error from the section parser that named neither PR (before any model call, with the branch as it was). Whenmainhas a lecture, rebase now also reads it at the PR's baseline; when the baseline lacks it and the English before the PR's source commit does too, it reads the PR's branch, and a branch that has the lecture stops the rebase of that PR before anything is translated or pushed. The failure comment names the lecture, asks a person to decide which copy wins, and says a later rebase of the PR stops there again until the PR merges or closes; it offers notranslate forwardor resync for it, which would make a third translation. A lecturemaingot since the PR opened that the PR's source change only edits, as when a second source PR edits a lecture before the edition merges the first one's sync, is still rebased as an update ofmain's copy, with one model call per edited section. A failed read of the baseline, the source parent or the branch, other than a 404, fails the rebase of that PR only where it decides the outcome, and the comment then advises re-running the rebase workflow once the file reads again, also when the same rebase stops on a lecture deleted or added onmainsince the PR opened, which no longer brings in the advice to regenerate withtranslate forward: a failed baseline read beside a source change that edits the lecture costs the rebase cache only, as before. A rename is outside the stop: its English before the source commit is read at its old path for this test, so a rename whose old pathmaingot since the PR opened is rebased as before (and still fails with the missing-title error, #478). An ordinary update makes the same reads as before (the rebase cache reuses the new baseline read); a lecture the PR never delivered thatmainhas, and a renamed lecturemainstill has under its old path, each cost one read more. - A lecture's state file keeps the keys the engine does not own (#290). Every writer rebuilt
.translate/state/<file>.ymlfrom its six fields, so any other key, such as the editor sign-off block (reviewed:) an edition-side workflow is to record, was erased by the next sync,init,forward(on disk and with--github),status --write-stateor rebase. Each writer now reads the existing file and keeps every top-level key it does not own after the engine's keys, which keep their order and formatting: a state file with no other key is written byte for byte as before, so sync PRs carry no new state-file churn. A kept key is carried as the text it was, with the lines under it and the comment lines above it (line endings made LF), sotarget-sha: 0123456keeps its leading zero and a comment beside a sign-off stays; comments among the engine's own keys are lost. Where the text cannot be carried as written (a byte-order mark, a tab, a...marker or%YAMLdirective, several YAML documents, indented top-level keys, CR-only line endings, a flow mapping or complex key at the top, a kept key aliasing an anchor in an engine key, or a value that would not load back the same), the kept keys are written out again from their values, with a warning that quoting, comments and layout may have changed; no value is rewritten, since each plain scalar is written back as its own text (1234e56,0x1fand0123456stay so, where re-serialising them would give1.234e+59,31and123456), and a quoted one stays quoted. A mapping key that reads as a number (0x1f:) keeps its text the same way; only a file that writes one key both plain and quoted (0x1f:and"0x1f":) falls back to re-serialised values, with a warning that says so. A renamed lecture's state file moves with its other keys unless the new path already has one; a removed lecture's state file is still deleted. An existing state file that is not a YAML mapping, one that repeats a key or uses an explicit YAML tag (!!timestamp,!!binary, a custom!tag; state files do not support tags) included, is overwritten with a warning naming it and saying why, and the sync PR's body lists it under "State Files Overwritten" with the reason (status --write-statestill refuses one without--force); an empty or comment-only one is overwritten with a warning that it held no keys. The sync Action and rebase mode reuse the state-file reads they already made, so they make no extra read; a lecture whose own state file the edition answers with anything but a 404 is now held back instead of being written over: sync lists it in the failure issue, which advises a\translate-resynconce the file reads again (under the usual condition), and rebase fails that PR's rebase with the branch untouched and a comment that advises re-running the workflow. Rebase mode rebuilds a lecture's state file from the copy on the edition's default branch at the commit it rebases onto: a key added there since the PR opened is kept, and a key that exists only in the state file on the PR's branch is not, except for a lecture the PR adds, whose state file is carried from the branch unchanged. Exercised before release on thetest-translation-synclanes: release step 4a's harness reset now lays down a state file carrying a sign-off block, andcheck-state-keys.mjs --expect-fullconfirmed every translation PR kept it (state keys kept: 42 across 84 PRs — PASSat the tag). - A review finding that quotes another lecture of the PR is filed under that lecture (#223). The reviewer sometimes names one file while its description quotes another file of the same PR (lecture-python.zh-cn#208: an accuracy finding on
kesten_processes.md's Gibrat section quotingolg_adaptive_money.md), so an editor sent there found nothing to act on. On a PR that reviews more than one file, review mode now checks the text each reviewer finding quotes in its description (in backticks or quotation marks, 6 characters or more; never the suggestion, which proposes text) against every reviewed file's English and translation, before and after the PR. The comparison folds whitespace, compatibility forms (full-width against half-width), emphasis markers, backticks, MyST role prefixes, apostrophes and case, and compares a quote with CJK characters with all whitespace removed. The finding is moved, with its location cleared, only when the named file has both texts and holds none of the quotes (also searched with all whitespace removed), every quote found is in one and the same other file, there are two such quotes or one of 20 characters or more, and no quote is found nowhere except one beside two found (the reviewer's own proposed wording, as in the #208 finding). Otherwise, as when a quote is common to several lectures, is a glossary term or a short phrase, or is the named file's own text in a form the comparison misses, it is left as the reviewer wrote it. A single quote of 20 characters or more that only another file holds can still move a finding that merely cites that file. Severity, category and text never change, no finding is dropped, and routing is unchanged; each move is logged in the run. The verdict schema is unchanged, but verdict records may now attribute such a finding to a different file than before, which matters for per-file shadow data across this release. A finding left where it is keeps its file and location as before.
Documentation
- The setup tutorials match the CLI (#383).
connect-existing.mdno longer showsforward --dry-run, whichforwardrejects, and acts onCONTENT_CHANGES, the verdictstatus --check-syncprints, instead ofCONTENT_STALE; its two cross-references to the heading-map and verification steps point at Steps 5 and 7.fresh-setup.mdlists the filestranslate setupwrites (the review and rebase workflows, nottranslation-sync.yml), says the source repo's sync workflow is written only with--source-workflow, and puts heading-maps inside the translate phase ofinit's phase table.fresh-setup.mdandadd-language.mdno longer ask the reader to create the review workflowsetupalready committed. - Removing an orphaned translation removes its state file, and a renamed lecture has a recipe (#399, the documentation half).
resync-drifted.mdnowgit rms.translate/state/<file>.ymlwith the lecture and the_toc.ymlentry, and moves the translation and its state file when the source renamed the lecture, including a rename made in a merge or with heavy edits, whichgit showlists as a deletion beside an addition. The weekly status workflow inautomated-maintenance.mdprints "All N files are aligned" only when every file isALIGNED, and otherwise gives the counts.translate statusandtranslate doctorstill do not tell an orphan from an edition-only file (#399).