Skip to content

Seed learning_approximation and restore its four local references (blocked on action-translation#118) #210

Description

@mmcky

learning_approximation is the one lecture in the bounded-rationality suite this edition does not have. Four references to it currently point at the English edition via intersphinx (#209); once it is translated here they should become plain local {doc} references and the lecture should join _toc.yml.

How it got this way

The sync run behind #207 named learning_approximation in _toc.yml but never wrote the file. It failed the structural parity check — the engine refusing to commit corrupt output, which is the guard working — and the run committed the ToC entry anyway (action-translation#156). The same drop happened silently in #208, which wrote no ToC entry, so nothing dangled and nothing reported it.

The parity failure is deterministic and reproduces on demand:

directive count differs: source has 36, output has 35
directive #1 name changed: source line 15 has {raw}, output line 42 has {index}
target anchors diverge — missing from output: (learning_approximation)=

That is action-translation#118 — the {raw} jupyter header block and document anchor dropped from above the title.

Why it is blocked, and on what

A measurement on 2026-07-27 identified the cause: the localisation rules. Holding model (claude-sonnet-5), engine (v0.24.0) and glossary fixed and varying only --localize, the structural pass rate is 5/15 with the rules against 14/15 without (Fisher exact p = 0.002), with every failure carrying the signature above. So seeding this lecture today with default settings is roughly a one-in-three proposition, and each failed attempt is a silent no-op.

Details on action-translation#118 and action-translation#225.

What to do, once #118 is fixed

  1. Seed the lecture — translate init -f learning_approximation.md, on the released engine, with the localisation rules on (so it matches the rest of the edition: font config, localised figure labels and code comments).
  2. Add it to lectures/_toc.yml in the Bounded Rationality in Macroeconomics block, between olg_adaptive_money and exchange_rate_learning, matching the source order.
  3. Revert the four intersphinx references from Point the learning_approximation references at the English edition #209 to plain local {doc} links and drop the (英文版)markers:
File Line
lectures/bounded_rationality.md 151
lectures/genetic_classifier.md 49, 580, 590
  1. Native review — it will be unreviewed machine output, like the other seeds in this edition.

Worth knowing

This lecture is the estate's cheapest deterministic reproducer for #118, so it has value beyond the coverage gap: it is the natural acceptance test for any fix, and is named as day-one corpus in the engine benchmark plan (PROJECT-PLAN-ENGINE-BENCHMARK.md in QuantEcon/project-translation, tracked at action-translation#227). Do not seed it opportunistically before the fix lands — a successful roll would remove the reproducer without fixing anything.

Activity

  1. mmcky commented on Aug 6, 2026

    @mmcky
    ContributorAuthor

    Folding in #235, which was filed 2026-08-05 during a planning-register prune without finding this issue — it tracks the same reinstatement and is being closed as a duplicate. Two things it adds are worth keeping here:

    • The parity failure reproduced deterministically on two consecutive lecture-adding syncs: lecture-python.myst#1004 (source PR #1001) and lecture-python.myst#1007 (source PR #1006), both carrying the action-translation#118 fence-wrap signature.
    • This lecture is the cheapest deterministic reproducer the estate has for action-translation#118 — use it as the validation case when that fix is attempted. An alternative unblock short of the engine fix: hand-seeded init -f with manual wrapper repair, as was done for the tenth Phillips lecture.

    Status note: #209 merged 2026-08-06, so the four cross-references now point at the English edition — the state this issue's opening paragraph describes is live (though unpublished, like everything since 2025-11-06, pending project-translation#25).

  2. mmcky commented on Aug 7, 2026

    @mmcky
    ContributorAuthor

    New data point (2026-08-07): the sync behind #230 re-introduced the dangling learning_approximation ToC entry that the 2026-07-27 #207 repair removed — the sync mirrors the source ToC wholesale, so every lecture-adding sync will re-dangle this entry (and fail the strict preview) until the lecture is actually seeded. Removed again on the #230 branch (6244cbc). This turns the reinstatement from a nice-to-have into a recurring CI cost: each full-ToC sync now needs the same hand edit. Raises the value of the interim hand-seed path (init -f + manual wrapper repair) if action-translation#118 stays unfixed much longer.

  3. mmcky commented on Aug 7, 2026

    @mmcky
    ContributorAuthor

    Tally closing out 2026-08-07: the ToC entry was reintroduced four times in one day across three PRs — by #230's sync run, twice on #231 (once by the sync, once by the rebase automation overwriting the hand trim within minutes of #230's merge), and by the automation again on #242's branch. Every reintroduction costs a hand trim plus a 20–60 minute preview cycle, and the automation races repairs after every merge to main. That is the recurring cost curve this issue predicted, now measured rather than projected. The cheapest exits remain action-translation#118's fix, or the interim hand-seed (init -f + manual wrapper repair).

  4. mmcky commented on Aug 20, 2026

    @mmcky
    ContributorAuthor

    Done and closing — both halves of this issue.

    The lecture is seeded. learning_approximation.md is on main as of #261 (merged 2026-08-20), delivered with translate init -f at engine v0.26.0 against source a4fbd865. Coverage moves to 144/145; only mccall_risk remains (#258).

    The four local references are restored. They had been rewritten as {doc}`intermediate:learning_approximation`(英文版) — intersphinx links to the English site with an "English version" annotation, because the lecture did not exist here. All four now resolve locally as {doc}`learning_approximation`: one in bounded_rationality.md, three in genetic_classifier.md. Verified on main: zero intersphinx references to it remain, four local ones present.

    On the blocker

    This issue was titled "blocked on action-translation#118", and that framing needs qualifying rather than simply lifting. The parity failure is real and it reproduces on the init path, so it is not sync-specific. But it is not deterministic: across six attempts the run refused four times and succeeded twice, always with the same signature — the output drops the leading ```{raw} header block, so directive #1 shifts {raw} → {index} and the count lands one short. The guard is fail-closed and wrote nothing on any refusal.

    So the lecture landed on a run that happened to pass, verified after the fact rather than trusted: 36/36 directives, 17/17 code cells, 15/15 headings, 0 python syntax errors across all 17 cells, 4/4 captions localised with none byte-identical to source, i18n font block present.

    action-translation#118 stays open, and the dropped-leading-raw-block signature is recorded there as a narrower target than "wholesale mismatch".

    One caveat for anyone re-running init on this edition: it reverted all 19 localised _toc.yml part captions to English and added a dangling - file: mccall_risk entry for a lecture that does not exist here, which would have broken the build. Both were reverted before merge; the ToC carries one added line. That is the action-translation#254 class, on a path that issue did not previously cover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions