Resync hoist_failure.md to source a7aafd5b (recovers the 2026-08-05 sync failure) - #260
Conversation
The sync of source PR QuantEcon/lecture-python.myst#656 failed on 2026-08-05 with "Update mode requires oldEnglish, newEnglish, and currentTranslation", recorded as lecture-python.myst#1028 and never retried. The lecture has been one commit behind since. 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: forward reads source off the local filesystem, so it cannot carry a stale merge-time snapshot, and it anchors its parity check to current main. The diff is large because the source change was: #656 rewrote the English lecture by 567 insertions and 426 deletions, so the target is re-derived rather than patched. Verified against source: 46/46 directives, 23/23 code cells, 52/52 headings, 0 python syntax errors across all 23 cells (matching source), no captions or axis labels byte-identical to source, and the edition's i18n font block preserved byte-for-byte through the regeneration. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR resynchronizes the Chinese translation of lectures/hoist_failure.md to the updated upstream English source (a7aafd5b) after a previously failed sync, and updates translation state metadata accordingly.
Changes:
- Regenerates
lectures/hoist_failure.mdcontent and notebook structure to match the latest source lecture (headings, prose, code cells, and figures). - Updates translation state tracking to the new source SHA, sync date, mode, and tool version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lectures/hoist_failure.md | Whole-file regeneration of the lecture translation content and embedded notebook cells/figures. |
| .translate/state/hoist_failure.md.yml | Updates translation sync metadata (source SHA, timestamp, model, section count, tool version). |
Suppressed comments (2)
lectures/hoist_failure.md:748
- Quantile extraction currently indexes into
x, butcdfis defined oversystem_pmf(post-13 convolutions), so the index returned byfind_nearest(cdf, q)can exceedlen(x)and crash. Use the same extended grid as the CDF (x_system) when converting CDF indices to x-values.
# 查找分位数
quantiles = [0.01, 0.05, 0.10, 0.50, 0.665, 0.85, 0.90, 0.95, 0.99, 0.9978]
quantile_values = [x[find_nearest(cdf, q)] for q in quantiles]
lectures/hoist_failure.md:818
- In the exercise solution,
cdf_testis computed fromsystem_test(after many convolutions) but the median is read fromx_test, which only matches a single component grid. This can raise IndexError and gives the wrong median location. Create an extended grid forsystem_testand use it for the median lookup.
# 计算中位数
cdf_test = np.cumsum(system_test)
median = x_test[find_nearest(cdf_test, 0.5)]
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| jupytext: | ||
| text_representation: | ||
| extension: .md | ||
| format_name: myst | ||
| format_version: 0.13 | ||
| jupytext_version: 1.10.3 | ||
| kernelspec: | ||
| display_name: Python 3 | ||
| language: python | ||
| name: python3 | ||
| translation: | ||
| title: 故障树不确定性 | ||
| headings: | ||
| Overview: 概述 | ||
| The lognormal distribution: 对数正态分布 | ||
| The convolution theorem: 卷积定理 | ||
| Approximating continuous distributions: 近似连续分布 | ||
| Discretizing the lognormal distribution: 离散化对数正态分布 | ||
| Convolving probability mass functions: 概率质量函数的卷积 | ||
| Fault tree analysis: 故障树分析 | ||
| Failure rates unknown: 未知的故障率 | ||
| Application: waste hoist failure rate: 应用:废物提升机失效率 | ||
| Exercises: 练习 | ||
| --- |
| # 计算累积分布函数 | ||
| cdf = np.cumsum(system_pmf) | ||
|
|
||
| # 绘制累积分布函数 | ||
| Nx = 1400 | ||
| fig, ax = plt.subplots(figsize=(10, 6)) | ||
| ax.plot(x[:int(Nx / m)], cdf[:int(Nx / m)], 'b-', lw=2) |
|
Post-merge note: the build that was still in flight when this merged has since passed — run 32323568162, 1h06m, That is worth recording because this edition's
|
Brings
hoist_failure.mdup to sourcea7aafd5b. It has been one commit behind since 2026-08-05.Why it was behind
The sync of lecture-python.myst#656 failed with
Update mode requires oldEnglish, newEnglish, and currentTranslation, filed as lecture-python.myst#1028 — one of fifteentranslation-sync-failureissues that were open across the estate, none of them ever answered. This is the one whose error is not a structural-parity failure, which is why it was the best candidate to simply retry.How it was delivered
translate forward -f hoist_failure.mdat 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 currentmain.Why the diff is large
Because the source change was. #656 ("Clean up the code and correct minor errors") rewrote the English lecture by 567 insertions and 426 deletions — it restructured the imports, retitled sections and reworked most of the prose. So the target is re-derived rather than patched, and the 941-line target diff is proportionate to the 993-line source diff it is tracking.
Verification
The font block surviving is worth calling out:
forwardwarned that the target carried "content not in SOURCE" and named that block, so it was at risk of being dropped as a target-only addition. It came through intact, but it is the first thing to check on any future whole-file resync of this edition.Review note
This is a whole-file regeneration, so the prose is entirely re-translated rather than patched — worth a read for terminology drift against the rest of the edition, particularly around 对数正态 / 卷积 / 故障率.
State advances to
source-sha: a7aafd5b,mode: RESYNC,tool-version: 0.26.0.