Skip to content

ml: encode the editor's round-3 answers — rules 27 → 28, glossary v0.7.0 (two shipped guesses corrected) - #315

Merged
mmcky merged 4 commits into
mainfrom
ml-round3-answers-ml22
Sep 21, 2026
Merged

mmcky merged 4 commits into
mainfrom
ml-round3-answers-ml22

Conversation

@mmcky

@mmcky mmcky commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Encodes Adisankar's answers to the round-3 questions (lecture-python-programming.ml#22, answered 2026-09-19). Small payload: ml rules 27 → 28, glossary v0.6.0 → v0.7.0, one decision record, two lints and one mechanical repair. Two of his answers overturn a guess — one of which v0.29.0 had already shipped.

What he said, and what changes

Item His answer Change here
Comma between -ഉം items Always — phrases and single words, "for reading clarity" The clause-boundary rule, part (c), said phrases only: corrected, with single-word examples. The suffix rule's own example (a green border-ഉം a blinking cursor-ഉം) contradicted it: corrected too
draw വരയ്ക്കാം is natural Malayalam and worked better in that lecture Nothing encoded, on purpose. He also changed വരയ്ക്കുന്ന to draw ചെയ്യുക in the same lecture, so both forms are his. A test pins that draw is not in the light-verb list
Plural of a retained noun English plural + Malayalam suffix; agrees -ുകൾ after a hyphen renders badly Its own short rule (objects, function calls-ൽ, never object-ുകൾ) rather than another clause in the longest rule of the set, plus a lint
prefer Keep in English Glossary pin, light-verb form
provide Both acceptable; നൽകുന്നു read better Glossary provideനൽകുക, superseding the v0.4.0 pin; the context note says the other form is never an error in reviewed text
Which ordinary words stay English "Would a Kerala student say this word in everyday conversation?" is "a fair test" Not in this PR — see below
Further Reading Intentional: reference material pointing outside the lecture D-2026-09-21-ml-further-reading-boundary-is-the-reference-section; the prompt rule's wording already matched. Moving it into code is now unblocked under #260

Measured, not assumed

Three draws of numpy on this branch beside the three archived v0.29.0 draws — same source commit, model and command; numpy is held out (no rule quotes it). Arm: experiments/ml-benchmark/arms/2026-09-21-round3-answers-numpy/.

v0.29.0 (3 draws) this branch (3 draws)
provide ചെയ്യ… 5 / 5 / 6 0 / 0 / 0
hyphenated -ഉം pairs carrying the comma 0 of 4 2 of 6
Malayalam plural on an English noun 0 1 (functionality-കൾ — a mass noun)

The glossary change is deterministic. The corrected comma rule lands about a third of the time, missing the same two lines in both draws that had them — the terminal-punctuation finding again: a rule he states as "always" does not come reliably from the prompt. So ml_repair.py (the #260 prototype) gains the comma as its third mechanical repair. The one plural is on a noun with no natural English plural, the same case as logic-ുകളെ on the reviewed functions page; that is a question to him (asked on lecture-python-programming.ml#24), not yet a rule.

Harness

Local dist-action bundle on the .ml lane: test-translation-sync.ml#191 from fixture PR test-translation-sync#890. Delivered; 87-term glossary loaded; the plural rule fired on the fixture's own concepts-കൾconcepts; the hortative held. It also missed the comma on its one -ഉം pair and opened a sentence with lowercase modern — the second harness run in a row to do that. Both are lintable misses of rules already present, which is the case for the lint-and-repair step (#260, #301) over more prompt.

Deliberately not here: the rule-2 rewrite

He accepts the everyday-speech test, which unblocks the rewrite the round-3 report proposed (the principle in the prompt, the word lists in the glossary). It is held for a held-out run of the blind pairwise judge: rule 2 is the rule behind the ordinary-word pendulum of rounds 2 and 3, the confirmation was mild and to a leading question, and draw — which we had listed under "stays English" — shows the test is not sharp.

Round 4 is regenerated after this releases

Decided 2026-09-21, reversing the first call of the day. lecture-python-programming.ml#23 (numpy, v0.29.0 draw 3) has had no human activity, and the arm above changed the arithmetic: branch draw 1 is cleaner than the draft he was sent on every lint (bare endings 0 vs 3, comma-less -ഉം pairs 0 vs 2, provide ചെയ്യ… 0 vs 6, banned 2 vs 3). His review time is the scarce resource, so he should read the engine's best current output. He has been asked to hold off, on ml#22 and on ml#23. No branch draw goes to him — every round has been generated at a published @v0 — so the sequence is the round-3 one: merge this → v0.29.1 with its §4a gate → three draws at @v0, best by lint, ml_repair.py applied and disclosed → force-update ml#23 and retitle it. If he says he has already started, ml#23 stays as it is and the known flags (the comma-less pairs, any provide flip) are excluded from the convergence residue.

Checks

Suite 1588 green; lint, format:check and check-dev-refs clean; dist/ and dist-action/ rebuilt. A patch release is enough — nothing here is a feature.

🤖 Generated with Claude Code

mmcky and others added 2 commits September 21, 2026 17:01
Adisankar answered the round-3 questions on
QuantEcon/lecture-python-programming.ml#22 (2026-09-19). Two answers
overturn a guess:

- the comma between -ഉം items is ALWAYS there, single words included;
  v0.29.0 shipped "phrases only", and the suffix rule's own example
  contradicted the comma rule — both corrected
- draw is not forced into the light-verb pattern: he calls വരയ്ക്കാം
  natural and chose draw ചെയ്യുക elsewhere in the same lecture, so it
  stays unencoded either way

Confirmed and encoded: the plural of a retained English noun is the
English plural plus the Malayalam suffix (own short rule + a lint);
prefer stays English; provide moves to നൽകുക, superseding the v0.4.0
pin, with both forms acceptable in reviewed text.

The Further Reading boundary is the outside-pointing reference section
(D-2026-09-21-ml-further-reading-boundary-is-the-reference-section),
which unblocks moving that rule into code under #260.

Not in this change: the rule-2 rewrite around his everyday-speech test.
It is held for a held-out run of the blind pairwise judge.

ml_metrics.py gains two lints (Malayalam plural on a Latin singular;
comma-less hyphenated -ഉം pair), calibrated on the three reviewed
lectures and the round-4 draft with no false positives.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…comes a mechanical repair

Three draws of numpy on this branch beside the archived v0.29.0 draws:
the glossary change is deterministic (provide ചെയ്യ… 16 → 0), the corrected
comma rule lands 2 of 6 (was 0 of 4), so ml_repair.py inserts it. Harness
delivery on the .ml lane recorded in the log (test-translation-sync.ml#191).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 21, 2026 07:10

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.

Copilot review overview

🟢 Approval recommended

The changes are consistent, tested, and scoped to rule/glossary encoding plus lint/repair tooling, with only minor wording nits noted.

Review effort: Lite
Findings: 2 Low severity

Open (2)
What changed in this PR

This PR updates the Malayalam (ml) localization configuration to encode the editor’s round-3 answers (issue lecture-python-programming.ml#22), including a ruleset bump (27 → 28) and a glossary bump (v0.6.0 → v0.7.0). It also extends the benchmark tooling with new lints and a deterministic repair to address a comma rule that remains unreliable when enforced purely via prompting.

Changes:

  • Update ml prompt rules to reflect the editor’s clarified comma usage for -ഉം … -ഉം coordination and add a new short plural rule for retained Latin-script nouns.
  • Update the Malayalam glossary to v0.7.0 (notably provideനൽകുക, and pin prefer in English).
  • Extend ml_metrics.py with two new lints and ml_repair.py with a third deterministic repair for missing comma insertion between adjacent hyphen-suffixed -ഉം items.
File Description
src/​language-config.ts Encodes editor answers: comma rule strengthened; adds new plural rule; updates commentary for ml#22 decisions.
src/​__tests__/​language-config.test.ts Updates glossary/rules expectations and adds assertions covering the new ml#22 encodings.
glossary/​ml.json Bumps glossary to v0.7.0 and updates term pins (e.g., provideനൽകുക, add prefer).
experiments/​ml-benchmark/​scripts/​ml_repair.py Adds deterministic comma insertion repair for adjacent -ഉം pairs without commas.
experiments/​ml-benchmark/​scripts/​ml_metrics.py Adds lints for Malayalam plural suffix on Latin-script nouns and missing commas between adjacent -ഉം pairs.
experiments/​ml-benchmark/​arms/​2026-09-21-round3-answers-numpy/​README.md Documents measured impact of the rule/glossary changes on held-out numpy draws.
experiments/​ml-benchmark/​arms/​2026-09-21-round3-answers-numpy/​numpy-ml22-draw1.md Adds benchmark artifact for draw 1.
experiments/​ml-benchmark/​arms/​2026-09-21-round3-answers-numpy/​numpy-ml22-draw3.md Adds benchmark artifact for draw 3.
dist-action/​index.js Rebuilt action bundle reflecting updated language config and glossary behavior.
CHANGELOG.md Adds [Unreleased] entries describing the ml rules/glossary bump and new lint/repair behavior.
.dev/​STATE.md Updates in-flight status for the ml#22 encoding work.
.dev/​log/​2026-09-21-ml-round3-answers.md Adds a dev log entry capturing the editor answers, decisions, and measurement summary.
.dev/​decisions/​D-2026-09-21-ml-further-reading-boundary-is-the-reference-section.md Records the clarified boundary decision for “Further Reading” scope.
.dev/​decisions/​D-2026-09-18-ml-further-reading-lists-stay-english.md Adds a pointer note to the new boundary decision record (without editing the original decision text).

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

Comment thread glossary/ml.json Outdated
Comment thread src/__tests__/language-config.test.ts Outdated
mmcky and others added 2 commits September 21, 2026 20:37
… arm note

Reverses the morning's call. The arm's branch draw 1 is cleaner than the draft
the editor was sent on every lint, he has not started, and he has been asked to
hold off (lecture-python-programming.ml#22, #23). Generation waits for the
release: no branch draw goes to him.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…itle states the current rule count

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mmcky
mmcky merged commit cd41558 into main Sep 21, 2026
1 check passed
@mmcky mmcky mentioned this pull request Sep 21, 2026
7 tasks
mmcky added a commit that referenced this pull request Sep 21, 2026
* chore: release v0.29.1

Patch: the Malayalam editor's round-3 answers (#315) — ml rules 27 → 28,
glossary v0.7.0; corrects the -ഉം comma rule v0.29.0 shipped. No source
change in this commit; dist-action/ rebuilds byte-identical.

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

* dev: STATE.md verified 2026-09-21 — downstream workflow PRs merged, #289 refreshed, draft #314 noted

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Sep 21, 2026
Patch: the ml exercise-rule scope sentence (#317) that v0.29.1's failed gate
called for, carrying the editor's round-3 answers (#315) that v0.29.1 never
delivered. No source change in this commit; dist-action/ rebuilds
byte-identical.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Sep 23, 2026
The ml glossary reached v0.7.0 / 87 terms across #303, #311 and #315,
which updated glossary/ml.json but not the docs. Raised by Copilot
review on #328.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Sep 23, 2026
…he second editor round (#328)

* glossary(fr): v1.2 — Namespace, Heads, standard-normal context from the second editor round

Encodes the terminology rulings from the French editor's second review
round (QuantEcon/lecture-python-programming.fr#77 and #80, merged
2026-09-23) that meet the glossary bar — an explicit native ruling plus
measured variation:

- Namespace → Espace de nommage. The official French Python docs use
  « espace de nommage »; fresh init draws at v0.29.2 wrote « espace de
  noms » 206/206. A NEW section brought « noms » back 3/3 without the
  pin, 0/3 with it.
- Heads (coin toss) → Face. The coin side was wrong in 6/12 fresh draws
  of the exercise without the pin, 0/12 with it. Tails → Pile is not
  pinned: no source occurrence, and it would sit beside four « queue »
  entries.
- Standard normal keeps « Loi normale centrée réduite »; its context now
  steers draws and random variables to « variable normale centrée
  réduite » (« lois » for draws 8/32 → 0/28; distribution sense 16/16).

Held for measurement: Garbage collection, Return (a value). Held for an
editor ruling: Built-in function. 367 → 369 terms; docs counts updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs: ml glossary count 61/77 -> 87 (v0.7.0)

The ml glossary reached v0.7.0 / 87 terms across #303, #311 and #315,
which updated glossary/ml.json but not the docs. Raised by Copilot
review on #328.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Sep 23, 2026
Directory-rename detection moved the six .dev/ files main added since the
branch point (two decision records, three log entries, the #319 arm
references) into .qe/dev/. Conflicts resolved:

- .qe/dev/STATE.md: main's re-verified page (#330), with its one .dev/
  path mention updated and the #314 In-flight bullet replaced by a
  Recently-landed entry for the move itself.
- src/language-config.ts: main's ml rules (#315/#317) with the four
  decision-record path comments pointed at .qe/dev/decisions/.
- dist-action/index.js: rebuilt; differs from main only by those comments.

Also carried through: rate-check.sh (#323, merged after this branch) wrote
its logs to .dev/scratch/rate-check/, which would recreate an in-tree
scratch folder that is no longer git-ignored. Logs now go to
${TMPDIR:-/tmp}/action-translation-rate-check/<stamp>/ per
D-2026-09-21-no-scratch-in-tree; its README line updated to match.

npm test 1590/1590, lint and format:check clean, check-dev-refs: 168 .qe/
references resolve.

Co-Authored-By: Claude Opus 5.5 (1M context) <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