Repository navigation
Conversation
Index normalized table rows while preserving first-match offsets and unmatched row order. Use prefix maximum ends for protected-line lookups. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Parse each anchored destination once per validation or repair pass. Check fragmentless destinations without reading their bodies. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
9 tasks
Member
Author
|
Superseded by #833. The merged implementation reuses parsed bodies while rechecking source bytes for each link and preserving parser errors for links without fragments. The branch and its validation evidence are preserved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #834, #786
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Translation link validation parses each English destination once per pass. Links without fragments check file existence without parsing the destination body.
Why
Several translated pages can link to the same English page or to different anchors on it. Rebuilding that page's request layout for each link repeats the same work. Both validation and fallback repair share this repeated lookup.
Scope and risk
Each validation or repair call owns a dictionary of parsed English destination bodies. Anchored links reuse a destination's body within that call; the dictionary ends with the call, so later calls observe source edits. Inventory and regular-file checks still precede every lookup. Fragment decoding, missing-anchor diagnostics and fallback replacement remain unchanged.
The inherited parser indexes are described in the related prerequisite pull request. They preserve request boundaries, table labels and source offsets. This change adds no process-wide cache or validation exemption.
Compatibility, rollout and rollback
No wire, schema, dependency, configuration or provider change. Operators need no migration or configuration step. Rollback restores repeated parsing within each validation pass.
Tests
Three regressions first fail on repeated parsing and fragmentless body reads; an existing neighbouring case passes. All four selected cases pass after the repair. They cover distinct and URL-decoded anchors, ordered missing-anchor diagnostics, source edits between calls, missing and nonregular files, fragmentless links, and repair that preserves every other byte. Ruff and format checks pass for the two changed files.
A small temporary fixture compares the complete old and new diagnostic lists and repaired output: diagnostics are equal, all 709 repaired bytes are equal, and pending bytes remain unchanged. No full local checker, suite or provider call runs. A fresh whole-change source review reports no findings or nits. Full final-head GitHub CI must pass before merge; unit part 4 currently fails the TypeScript numbered-source cost regression and is under investigation.
Reproduce the selected cases with
pytest tests/unit/test_i18n_lifecycle.py -q -k 'english_fallbacks_reuse_body or fragmentless_fallback_checks or fallback_repair_reuses_body or fallback_validation_checks_english_fragments'.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff).
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.