Skip to content

Restore exercise blocks to byte-identical English per the editor's ruling on #12 - #14

Open
mmcky wants to merge 1 commit into
mainfrom
restore-exercise-blocks-english
Open

Restore exercise blocks to byte-identical English per the editor's ruling on #12#14
mmcky wants to merge 1 commit into
mainfrom
restore-exercise-blocks-english

Conversation

@mmcky

@mmcky mmcky commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Follows @adisankarmt's ruling on #12: until each exercise is ruled on individually, every exercise-related block (exercise statement, hint, solution) stays in English, byte-for-byte identical to the source. This PR brings the two merged lectures into line; matplotlib (#13) is already compliant.

Lecture Blocks restored What changed
functions.md 4 of 10 exercises 1 and 2 (the hybrid English/Malayalam sentences), exercise 3 (one Malayalam line), exercise 5 (whole statement); plus the line-159 typo ചെയ്തചെയ്ത് confirmed on #12
python_by_example.md 7 of 10 all five exercise statements, and the prose lines inside solutions 2 and 4

Every solution block in functions.md was already identical to the source. Blocks are copied verbatim from lecture-python-programming@4980d62; the source's exercise regions have not changed since either seed's provenance commit, so this introduces no new English content — it only removes Malayalam from exercise blocks.

For the reviewer (@adisankarmt): nothing here needs line-by-line reading unless you want to start the per-exercise decisions you mentioned — this branch is a fine place to do that whenever you get to it. An approval is all that is needed otherwise.

The same rule is being encoded in the translation engine as a mechanical copy step (QuantEcon/action-translation#296 carries the details), so future lectures arrive this way without review effort.

🤖 Generated with Claude Code

…ling on #12

Adisankar's answer on #12 (2026-09-01): until each exercise is ruled on individually, every exercise-related block stays in English, byte-for-byte identical to the source. This replaces the narrower 2026-09-01 scope rule (mathematical statements English, programming statements Malayalam).

- functions.md: 4 of 10 directive blocks restored (exercises 1, 2, 3, 5; all five solutions were already identical); the line-159 typo `call ചെയ്ത നോക്കാം` corrected to `call ചെയ്ത് നോക്കാം` as confirmed on #12.
- python_by_example.md: 7 of 10 blocks restored (all five exercise statements; prose lines in solutions 2 and 4).

Blocks are copied from lecture-python-programming@4980d62; the source's exercise regions are unchanged since both seeds' provenance commits, so nothing new is introduced.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mmcky
mmcky requested review from adisankarmt and a lite review from Copilot September 3, 2026 01:17

This comment was marked as off-topic.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📖 HTML build - view preview (f34ef68)

Translated pages in this PR:

mmcky added a commit to QuantEcon/action-translation that referenced this pull request Sep 3, 2026
…n code; encode the ml#12 answers (glossary v0.5.0, rules 24 → 23, E2E scenario 28) (#303)

* feat(ml): keep every exercise-family block byte-identical to the source, enforced in code; encode the ml#12 answers

The editor of record answered QuantEcon/lecture-python-programming.ml#12 (2026-09-01): until he has ruled on each exercise individually, every exercise-related block stays in English, byte-for-byte identical to the source. That reverses the 09-01 scope ruling shipped in v0.27.0 (whose rule text told the model pure-programming exercises MUST NOT be left in English) and, being a rule with no judgement boundary, belongs in code rather than the prompt.

- src/verbatim-directives.ts (new): nesting-aware fence walk (backtick, tilde, colon; literal bodies opaque via typography's PROSE_DIRECTIVES, now exported) locating {exercise}, {exercise-start}…{exercise-end}, {hint}, {solution}, {solution-start}…{solution-end} as outermost regions; applyVerbatimDirectives restores them from the source for policy languages (ml), pairing by position and refusing to guess on a differing block sequence; findVerbatimViolations reports divergence.
- Wired into sync-orchestrator (both seams), translate init and translate forward, each immediately before checkStructuralParity so parity checks the bytes written.
- diff-checks: checkVerbatimDirectives + optional targetLanguage on runDeterministicDiffChecks; reviewer surfaces failures as blocker findings in the gating diff-check category — additive, verdict schema unchanged.
- ml rules 24 → 23: the 09-01 and 08-17 scope rules replaced by one verbatim statement; "For example," joins the English-retained connectives (not ഉദാഹരണത്തിന്); the light-verb rule names the refer calque (never സൂചിപ്പിക്കുന്നു); headings byte-identical including possessives (the Matplotlib-യുടെ miss on ml#13).
- glossary/ml.json v0.5.0: already, example, examples, name (noun; naming stays പേര്), work (light-verb form).
- E2E scenario 28 (28-add-exercise-lecture): the suite's first exercise-family directives; README and prefix message updated.
- Decision record D-2026-09-03-ml-all-exercise-content-stays-english; supersession note atop D-2026-09-01. The ex5 "over-read" logged on #296 is withdrawn.

Suite 1553 green; lint, format and dev-ref checks clean; dist and dist-action rebuilt.

Refs: #296, #189, #260, QuantEcon/lecture-python-programming.ml#12, QuantEcon/lecture-python-programming.ml#14

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Address Copilot review on #303: guarantee the detail cap, forward-compatible deterministic findings, reattach the processMarkdownFile JSDoc

- diff-checks: checkVerbatimDirectives breaks the outer loop once MAX_DETAILS is reached and slices the return, so the cap is a guarantee rather than an inner-loop courtesy.
- reviewer: minor/structure findings are derived from every deterministic result except verbatimDirectives (which gates on its own as a blocker), so a check added later surfaces without editing this list.
- sync-orchestrator: the processMarkdownFile JSDoc sits above processMarkdownFile again; restoreVerbatimDirectives carries only its own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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