Skip to content

⬆️ Bump QuantEcon/action-translation from 0.16.1 to 0.17.0#577

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/QuantEcon/action-translation-0.17.0
Open

⬆️ Bump QuantEcon/action-translation from 0.16.1 to 0.17.0#577
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/QuantEcon/action-translation-0.17.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 16, 2026

Copy link
Copy Markdown
Contributor

Bumps QuantEcon/action-translation from 0.16.1 to 0.17.0.

Release notes

Sourced from QuantEcon/action-translation's releases.

v0.17.0 — deterministic typography on every write path; typography-insensitive heading matching

Bug-fix release closing the French typography erosion (#97) and hardening heading matching against the divergence class it exposed. Every write path now typesets deterministically, and matching no longer depends on byte equality.

Fixed — sync typography (#99, closes #97): applyTypography() ran only in the translate init seed path, so every sync stripped the non-breaking spaces the seed inserted — one merged sync took numba.md from 27 to 14 × U+00A0, invisibly (the diff renders as unchanged text). Both sync entry points now typeset, with the heading map derived from the same typeset strings that land in the body (typesetting only the body would desync map from body, silently dropping sections on later syncs). Sync PRs on French repos may now carry whitespace-only changes on lines the source PR did not touch — that is drift self-repairing. Existing editions want a one-off scripts/typography/apply.mjs --lang fr; lecture-python-programming.fr got it in .fr#9.

Fixed — typography-insensitive heading matching (#100): matching a heading-map value to its body heading was an exact string compare, and typography legitimately makes the sides diverge (role spans are masked by the transform but stripped in map values; apply.mjs typesets map values independently; human edits touch one side). Comparisons now canonicalize both sides — strip #/MyST roles, fold NBSP/narrow-NBSP, collapse runs, drop spaces before ; : ! ? — with exact-match-first and normalized matches accepted only when unambiguous, so raw-distinct headings keep their positional pairing. Verified over all 401 headings of the French edition. Also fixed by the same audit: the body side of the compare never stripped MyST roles (role-wrapped headings could never match by map); role-stripped key lookups in the CLI validator and subsection merge; the subsection-merge fallback writing a translated heading into the map but not the body; translate forward resync writing raw untypeset model output; translate headingmap ping-ponging with apply.mjs forever on typeset values.

Fixed — concurrent review runs (#98): postReviewComment was check-then-act, so racing runs each posted a "Translation Quality Review" comment (observed on .fr#6). Comments now carry a hidden marker and each run deletes older marked comments after writing its own — exactly one survives any interleaving; pre-marker duplicates are cleaned on the next review.

Changed: review comments are identified by an anchored marker, not prose matching (a human comment quoting a review can no longer be overwritten); the review workflow templates gained a per-PR concurrency group, permissions: pull-requests: write, and (connect-existing) a label filter — copy these into existing target repos or a single sync bills several reviews of the same diff.

Docs/record: restored the [0.16.1] CHANGELOG release header PR #98 accidentally deleted.

Upgrade: bump workflow pins to @v0.17.0 (or use @v0, which now tracks this release). After upgrading a French target repo, run the apply.mjs backfill once if syncs merged while on ≤ v0.16.1.

Changelog

Sourced from QuantEcon/action-translation's changelog.

[0.17.0] - 2026-07-16

Fixed

  • Heading matching tolerates typography drift instead of relying on byte equality (#97 follow-up): matching a frontmatter heading-map value to its body heading was an exact string compare, and typography makes the two sides legitimately diverge — applyTypography masks role spans while stripMystRoles exposes their display text (so a map value can carry an NBSP its body heading structurally cannot), apply.mjs typesets map values independently, and human edits touch one side only. On a mismatch the sync drops unchanged sections from the output or retranslates modified ones from English, discarding human edits. Comparisons now canonicalize both sides: strip # markers and MyST roles, fold NBSP/narrow-NBSP, collapse whitespace runs, and drop spaces before ; : ! ? — every shape the French transform produces, including the zero-gap case where Quoi?! gains an NBSP from nothing. Exact matches are tried first and a normalized match is accepted only when unique, so raw-distinct headings that canonicalize identically keep their old positional pairing instead of first-match landing on the wrong section. Written map values stay exactly as typeset — only comparisons normalize. Verified over the full French edition: all 401 real headings now match under every typography variant (one diverged before). Also closes a pre-existing hole the audit surfaced: the body side of the compare never stripped MyST roles while map values always did, so the corpus's role-wrapped headings (## {index} + backticked text) could never match by heading map and survived on the positional fallback alone.
  • Role-stripped keys are used everywhere heading-map keys are looked up: the CLI validator (section-matcher.ts) and subsection merging (mergeSubsectionsWithTargetTranslations) built lookup keys from raw source headings while keys are stored role-stripped, so role-wrapped headings silently skipped validation or missed their subsection map entries.
  • translate forward resync output is typeset before it is written: the whole-file resync path wrote raw model output, the one remaining write path without deterministic typography — on a French repo every resync stripped the NBSP the seed inserted, exactly the sync-path bug fixed for mode: sync below.
  • translate headingmap no longer ping-pongs with apply.mjs: its change detection compared the existing (typeset) map against freshly body-derived (plain, where roles masked typography) values byte-for-byte, so it reported updated forever and each tool rewrote the other's output. Equality is now typography-insensitive and the existing typeset values are kept.
  • Sync now applies deterministic typography, closing the gap v0.16.0 left open (#97): applyTypography() ran only in the translate init seed path, so every sync stripped the non-breaking spaces the seed inserted, leaving the sync path relying on the very prompt instruction #79 was opened to replace, since the model does not follow it. One merged sync of lecture-python-programming.fr#6 took numba.md from 27 × U+00A0 to 14 — invisible in review, since the diff renders as unchanged text. Both sync entry points are now typeset: processFull before the heading map is derived (mirroring init), and processSectionBased on the reconstructed document before the map is injected. Document-scoped rather than section-scoped, so drift in sections the source PR did not touch is repaired on the next sync of that file; sync PRs may therefore carry whitespace-only changes on lines the source change did not touch. Existing editions still want a one-off scripts/typography/apply.mjs --lang fr to reset files that will not be synced soon.
  • The heading map is typeset with the body, never after it: applyTypography skips frontmatter by design, so applying it to already-injected content — the obvious fix, and the one the issue's "shape of the fix" implies — would have left map values plain-spaced while body headings gained non-breaking spaces. Heading lookup was, at the time, an exact string compare with no whitespace normalisation (made typography-insensitive in the follow-up entry above), and the positional fallback is unavailable whenever the section count changes, so that mismatch silently drops unchanged sections and retranslates modified ones from English, discarding human edits. Body, map, and title are now typeset together, as scripts/typography/apply.mjs already did. Tests pin the invariant against both the missing transform and the body-only variant.
  • Concurrent review runs no longer post duplicate review comments: postReviewComment listed comments, looked for its own, then created one if absent — a check-then-act with nothing making it atomic, so every concurrent run saw "no comment yet" and created one. Observed on lecture-python-programming.fr#6, which carried two "Translation Quality Review" comments a second apart, each subsequently overwritten by a different run, leaving scores that matched no single review. Review comments now carry a hidden <!-- action-translation-review --> marker, and each run deletes any older marked comment after writing its own. Because ids increase with creation time and every run lists after it writes, the run holding the highest id always sees and removes the rest: exactly one comment survives any interleaving. Pre-existing duplicates (from v0.16.1 and earlier, which have no marker) are cleaned up on the next review of that PR.

Changed

  • Review comments are identified by marker, not prose: the old predicate matched any comment containing both "Translation Quality Review" and "action-translation" anywhere in its body — it could match, and overwrite, a human comment quoting a review. Matching is now anchored at the start of the body, so quoted or reposted reviews are never touched.
  • Review workflow templates gained a concurrency group (docs): the action-side fix converges the comment, but each racing run still pays for a full review. A per-PR concurrency group with cancel-in-progress collapses the opened and labeled events a single sync produces into one review. The connect-existing template additionally ignores labeled events for labels other than action-translation — it triggers on labeled (necessary, since labels are applied after the PR is opened), and a sync applying two labels was starting a full review per label. Templates now also declare permissions explicitly (pull-requests: write, required to remove duplicate comments). Existing target repos should copy these guards; without them a sync bills several reviews of the same diff.
Commits
  • b5dad0d chore: release v0.17.0 (#101)
  • c329cd2 fix(matching): normalize heading comparisons; close remaining typography gaps...
  • c906d91 fix(sync): apply typography in the sync path, typeset heading map with body (...
  • bb170b3 fix(review): keep exactly one review comment under concurrent runs (#98)
  • ed47e9c chore(dev): track review follow-ups; estate on v0.16.1; distil STATE (#93)
  • 079a0e6 chore(dev): record the Sonnet 5 validation; refresh STATE (#88)
  • bb38478 chore(harness): commit the v0.16.1 baselines; un-ignore their directory (#87)
  • 9f317e5 test(harness): pin e2e workflow templates to v0.16.1 (#86)
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [QuantEcon/action-translation](https://github.com/quantecon/action-translation) from 0.16.1 to 0.17.0.
- [Release notes](https://github.com/quantecon/action-translation/releases)
- [Changelog](https://github.com/QuantEcon/action-translation/blob/main/CHANGELOG.md)
- [Commits](QuantEcon/action-translation@v0.16.1...v0.17.0)

---
updated-dependencies:
- dependency-name: QuantEcon/action-translation
  dependency-version: 0.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants