Skip to content

Retain translation origins for terminal paragraph appends - #953

Merged
zlareb1 merged 3 commits into
mainfrom
feat/i18n-terminal-paragraph-origin
Nov 19, 2026
Merged

zlareb1 merged 3 commits into
mainfrom
feat/i18n-terminal-paragraph-origin

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Changelog category

  • Improvement

Changelog entry

Retain completed translation request origins when English appends ordinary paragraphs under the final heading.

Why

An appended paragraph can belong to the final original request while leaving every earlier request unchanged. The origin planner can prove that ownership from complete historical and current sources.

Scope and risk

Require both raw and prepared historical containers to be exact prefixes of their current containers. The final original request must own the last heading section and historical end of file. Accept only closed, unindented, brace-free paragraphs that leave existing parsed blocks intact. Refuse added headings, lists, tables, code, HTML, reference definitions and ambiguous site extensions.

Extend only the final original endpoint. Keep every earlier cut, separator, completion reference and byte bound. The enlarged request uses changed current input; completed current input retains its reuse priority. Tests cover the two-space ordered-list continuation and colonless or inline attributes that the site parser treats differently from CommonMark. Braces refuse even in literal added prose.

Compatibility, rollout and rollback

  • Wire and operator steps: none.
  • The maintained origin API computes the extension from authenticated sources; callers supply no asserted endpoint.
  • Existing incomplete-history, ambiguity, refusal and oversized-request checks still apply.
  • Reverting restores conservative refusal of terminal additions.

Tests

  • The baseline reproduces eight expected failures, with twenty-six refusal controls passing.
  • All 134 checks in the two directly related origin and completed-history modules pass for the unchanged planner and test source, including thirty-eight terminal-append cases.
  • Four brace controls cover colonless block attributes, both inline attribute forms and literal braces.
  • Ruff check, format-check, function-statement check, prose and whitespace checks pass.
  • Full suites run in GitHub CI.

AI assistance in the code

  • AI-generated: Codex implemented the source-origin proof, regression cases and documentation. Independent internal reviews run on each pushed head.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Small change-related local checks pass.
  • Commits are signed off.
  • Fresh technical and content reviews have no findings on the final pushed head.
  • Required GitHub CI passes on the current head.

Site attributes accept inline and colonless forms. Keep terminal origin proof within its documented conservative paragraph subset.

Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 93335b6 into main Nov 19, 2026
49 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 19, 2026
6 tasks done
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.

1 participant