Skip to content

Generate the missing heading map for autodiff.md#142

Merged
mmcky merged 1 commit into
mainfrom
fix/autodiff-heading-map
Jul 23, 2026
Merged

Generate the missing heading map for autodiff.md#142
mmcky merged 1 commit into
mainfrom
fix/autodiff-heading-map

Conversation

@mmcky

@mmcky mmcky commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

lectures/autodiff.md had no heading map in its frontmatter. It was the only such file in the entire five-edition estate — 248 of the 249 files with sections carry one.

Edition Files with sections With heading map Missing
lecture-python.zh-cn 118 118 0
lecture-intro.zh-cn 46 46 0
lecture-python-programming.zh-cn 24 24 0
lecture-python-programming.fr 24 24 0
lecture-python-programming.fa 24 23 1 ← this file

Why it matters

The heading map bridges English heading IDs to translated headings — ## Overviewoverview on the English side, ## مرور کلی → a different ID on this side. Sync uses it to locate the existing translation of each section. Without it, the next sync of this lecture has nothing to match against, so section-level updating degrades.

How it was found

While auditing whether a new deterministic headingMapCorrect check would false-gate production PRs (action-translation#148). The check is being introduced precisely because the old one was a model-asserted boolean that could be confidently wrong; the audit was to confirm the deterministic replacement wouldn't newly gate healthy files. It flagged exactly one file across the estate, and that file turned out to be a genuine gap rather than a false positive.

What was done

Generated with translate headingmap, which compares source and target sections by position and makes no LLM calls — it is local, free and deterministic. Result: 5 top-level sections, 16 total entries, all matched cleanly (5 matched, 5s/5t).

A full-edition dry run reports the other 25 files unchanged, so the scope is exactly this one file — no incidental rewrites.

The .translate/state/autodiff.md.yml tool-version stamp moves 0.13.10.22.0 as a side effect of the state write. That field records the CLI that last wrote the state (see the 2026-07-23 finding on project-translation#4), so the bump is accurate rather than incidental drift.

Verification

Frontmatter YAML parses; 16 heading entries and the translated title read back correctly. Re-running the estate audit against this branch reports 0 files with sections and no heading map for the fa edition.

No content is touched — the diff is frontmatter plus the state stamp.

🤖 Generated with Claude Code

autodiff.md was the only file in the whole five-edition estate with
sections but no heading map in its frontmatter — 248 of 249 carry one.
Found while auditing whether a new deterministic headingMapCorrect check
would false-gate production PRs (QuantEcon/action-translation#148); it
turned out to be a genuine gap rather than a false positive.

The heading map bridges English heading IDs to translated headings, and
sync uses it to locate existing translations section by section. Without
it, the next sync of this lecture has nothing to match against.

Generated with `translate headingmap`, which compares source and target
sections by position and makes no LLM calls — 5 top-level sections, 16
entries, all matched cleanly (5s/5t). A full-edition dry run reports the
other 25 files unchanged, so this is exactly one file.

The state file's tool-version stamp moves 0.13.1 -> 0.22.0 as a side
effect of the write; that field records the CLI that last wrote the
state, so the bump is accurate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 07:14
@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit 7234006
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/6a61bf469dd0860008a27e8c
😎 Deploy Preview https://deploy-preview-142--majestic-griffin-10b166.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
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds the missing translation.headings map to lectures/autodiff.md so section syncing can reliably match English section IDs to the Persian headings, bringing the fa edition in line with the rest of the estate.

Changes:

  • Added translation.title and a 16-entry translation.headings map to lectures/autodiff.md frontmatter.
  • Updated the recorded translation tool stamp in .translate/state/autodiff.md.yml (tool-version: 0.13.10.22.0).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lectures/autodiff.md Adds the missing frontmatter heading map used for deterministic section matching during sync.
.translate/state/autodiff.md.yml Updates the state metadata to reflect the tool version that last wrote the state.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mmcky
mmcky merged commit b78aefa into main Jul 23, 2026
7 checks passed
@mmcky
mmcky deleted the fix/autodiff-heading-map branch July 23, 2026 07:16
@github-actions

Copy link
Copy Markdown

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