Skip to content

Resync prob_dist.md to source ebff90fd (recovers four sync failures) - #300

Merged
mmcky merged 1 commit into
mainfrom
recover/prob-dist
Aug 20, 2026
Merged

mmcky merged 1 commit into
mainfrom
recover/prob-dist

Conversation

@mmcky

@mmcky mmcky commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Brings prob_dist.md up to source ebff90fd. It has been stuck at the 2026-07-18 bootstrap sha since the sync started failing on it.

Why it was behind

The sync failed on this lecture four times in a row, once per source PR, and nobody ever answered any of them:

Failure issue Source PR What did not land
lecture-python-intro#812 #811 the Observed Distributions split (−287/+157)
#818 #816 the figure captions (+98)
#820 #819 sequence linking
#822 #821 the Japan data read

All four are structural-parity failures. Only the last one's content reached this edition, applied by hand in #298 — which is why the state file looked merely stale while the lecture was genuinely 216 lines short and carrying 3 captions against source's 19.

How it was delivered

translate forward -f prob_dist.md at engine v0.26.0, not \translate-resync. Per the 2026-08-20 ruling on action-translation#276 the CLI is the documented recovery route: it reads source off the local filesystem, so it cannot carry a stale merge-time snapshot, and its parity check is anchored to current main.

Verification

Check Result
directives 55 / 55 vs source
code cells 49 / 49
headings 14 / 14
python syntax across all 49 cells 0 errors — matching source
figure captions 19 / 19 landed, 19 / 19 localised, 0 byte-identical to source
axis labels byte-identical to source CDF, PDF, PMF, S, x — acronyms and symbols, correctly unchanged
i18n font block preserved
hand fixes from #298 both data-lectures reads survived the regeneration

A finding worth carrying to #255

I expected this recovery to walk straight into the untranslated-caption class, since it delivers 16 new captions. It did not: all 19 came through localised. The same engine at the same version left all four of mobility.md's captions in English when run through init (#299), and the class is what led #296 to be closed unmerged on the sync path.

So the caption defect looks path-specific — forward handles captions, init and sync do not. Retracted — see the comment below. That generalisation was wrong and rested partly on a hand-fix rather than engine output. Measured across all four lectures regenerated that day: prob_dist 19/19 localised, hoist_failure 7/7, learning_approximation 4/4 — but mobility 0/4, same session and engine version. So init is inconsistent run-to-run, not uniformly broken. The sharper claim, now recorded on action-translation#255, is that caption localisation is unreliable rather than absent — a harder defect to design against, because each individual run looks fine.

Review note

This is a whole-file regeneration, so the prose is re-translated rather than patched. The Observed Distributions split means a large part of the lecture is genuinely new here, and the 19 captions were written by the model — both worth a native read.

The sync of this lecture failed four times in a row — lecture-python-intro
#812, #818, #820 and #822, one per source PR, all structural-parity failures,
all filed 2026-08-03 and never answered. The target has been stuck at the
2026-07-18 bootstrap sha ever since, missing three of the four source changes:
the Observed Distributions split (#811), the figure captions (#816) and the
sequence linking (#819). Only the data-lectures reads (#821) reached it, by
hand in #298.

Recovered with `translate forward -f` at engine v0.26.0 rather than
\translate-resync, per the 2026-08-20 ruling on
QuantEcon/action-translation#276.

Verified against source: 55/55 directives, 49/49 code cells, 14/14 headings,
0 python syntax errors across all 49 cells (matching source), and the i18n
font block preserved.

Two things worth recording. All 19 figure captions landed and all 19 are
localised, none byte-identical to source — so the caption class tracked in
QuantEcon/action-translation#255 does not reproduce on the forward path, only
on sync and init. And the hand-applied data-lectures reads from #298 survived
the whole-file regeneration intact.

The five axis labels that match source are CDF, PDF, PMF, S and x — acronyms
and symbols, correctly left alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 20, 2026 02:15
@netlify

netlify Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for playful-platypus-17d3bb ready!

Name Link
🔨 Latest commit eacffa0
🔍 Latest deploy log https://app.netlify.com/projects/playful-platypus-17d3bb/deploys/6a8663297088c500081338d9
😎 Deploy Preview https://deploy-preview-300--playful-platypus-17d3bb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request regenerates lectures/prob_dist.md to resync the translated lecture with the upstream source commit ebff90fd, and updates the corresponding translation state metadata to reflect the new sync point and tool version.

Changes:

  • Restructures/expands the probability distributions lecture content (e.g., moments/quantiles discussion) and updates section organization.
  • Adds/updates mystnb figure captions and labels across the lecture’s plots.
  • Updates .translate/state/prob_dist.md.yml with the new source-sha, synced-at, and tool-version.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lectures/prob_dist.md Whole-file resync of the translated lecture content and figure metadata to match upstream structure/captions.
.translate/state/prob_dist.md.yml Advances the recorded source SHA/date and updates the translation tool version metadata.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lectures/prob_dist.md
@@ -430,6 +531,12 @@ u.mean(), u.var()
这里是部分PMF:
@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request August 20, 2026 02:20 Inactive
@mmcky

mmcky commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Correction to the "#255 finding" above

I claimed the caption defect looks path-specific — that forward handles captions and init does not. That is overstated, and the evidence for it was partly my own hand-fix rather than engine output.

The accurate picture, across the four lectures regenerated on 2026-08-20 at engine v0.26.0:

Lecture Path Captions emitted by the engine
prob_dist (this PR) forward 19 / 19 localised
hoist_failure (lecture-python.zh-cn#260) forward 7 / 7 localised
learning_approximation (lecture-python.zh-cn#261) init 4 / 4 localised
mobility (#299) init 0 / 4 localised — all four byte-identical to English

So init produced correct captions on one lecture and untranslated captions on another, in the same session at the same engine version. That is inconsistency run-to-run, not a path property. It sits alongside the other non-determinism seen the same day: learning_approximation refused its structural parity check on four of six attempts and passed on two, and hoist_failure refused once then passed.

Nothing in this PR changes — its 19 captions came through localised from the engine and were not touched by hand. But the generalisation was wrong, and the sharper claim is that caption localisation is unreliable rather than absent, which is a different thing to design a check against: a deterministic assertion is still needed, because you cannot tell from a given run whether it happened to work.

Recorded on action-translation#255.

This branch was previously deployed

1 inactive deployment
pull request — eacffa07 Deployed Aug 20, 2026 by github-actions[bot]
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.

2 participants