Convert USFM versification before updating from rows - #390
claude[bot] wants to merge 2 commits into
Conversation
|
@claude The CI failed for this PR. Fix it. |
The job only ran when the issue or PR author was an owner, member or collaborator. The bot's association is NONE, so a member's @claude comment on a PR Claude opened was skipped, as on #390. PRs authored by claude[bot] now pass that check. The commenter must still be a member. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The job only ran when the issue or PR author was an owner, member or collaborator. The bot's association is NONE, so a member's @claude comment on a PR Claude opened was skipped, as on #390. PRs authored by claude[bot] now pass that check. The commenter must still be a member. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
@claude The CI build failed for this PR. Fix it. |
|
Claude finished @ddaspit's task in 2m 16s —— View job CI fix pushedThe I changed the base signature to Verification
The CI run was cancelled after the pyright failure, so I haven't seen the other CI jobs finish. Please check the new run. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #390 +/- ##
==========================================
+ Coverage 92.07% 92.16% +0.09%
==========================================
Files 394 396 +2
Lines 24896 25202 +306
==========================================
+ Hits 22922 23228 +306
Misses 1974 1974 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A push by the @claude workflow makes claude[bot] the actor, and claude-code-action rejects a bot actor unless it is listed in allowed_bots. The review of #390 failed this way. The review never pushes, so allowing Claude cannot make it retrigger itself. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
515e732 to
7bc8382
Compare
This comment has been minimized.
This comment has been minimized.
|
@claude Address all of the review comments, except those that would result in the PR diverging from the original C# code. |
|
Claude finished @ddaspit's task in 17s —— View job No code changes madeI made no changes and pushed no commits. Every review comment falls under your exception, because a fix would make the Python port differ from the C# code.
Not verified: I could not read the C# source in this session, because the Suggested follow-up: F1–F3 look like real defects. If you want them fixed, they could go upstream in sillsdev/machine first, and then be ported here. Tell me if you would rather fix them here and accept the divergence. |
port-pr reads the C# code from a sibling clone at ../machine, which the @claude workflow never created, so Claude could not check C# behavior on #390. The workflow now clones sillsdev/machine with full history. Claude can read it and run git show, cat-file, log and blame there. port-pr reads each C# file as of the source PR's merge commit. It checks that the commit exists first and fetches when a local clone is stale. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Port sillsdev/machine#472 and the follow-up fixes from sillsdev/machine#521. ParatextProjectTextUpdaterBase.update_usfm now converts the source USFM to the rows' versification when it differs from the project's, using the new ConvertUsfmVersificationHandler. The test project settings now default to English versification, matching ScriptureRef, so existing update tests do not trigger a conversion. Closes #369 Closes #382 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Damien Daspit <3261883+ddaspit@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Damien Daspit <3261883+ddaspit@users.noreply.github.com>
7bc8382 to
aa0d660
Compare
|
@claude You should now be able to read the C# source. |
|
Claude finished @ddaspit's task in 18s —— View job No code changes madeI read the C# source (
F1-F3 look like real defects in the C# original. I'd fix them upstream in |
| pub_number: Optional[str], | ||
| ) -> None: | ||
| super().chapter(state, number, marker, alt_number, pub_number) | ||
| self._process_tokens(state) |
There was a problem hiding this comment.
FYI: F5. A merged chapter leaves its \ca/\cp behind as stray markers: the parser treats them as special tokens, but _verse_boundary stops at the \c, so the next _process_tokens copies them. English to Original MAL \c 4 \ca 5\ca* \p \v 1 a creates no \c 4, yet \ca 5\ca* lands between 3:18 and 3:19. Unverified hand trace; C# ProcessTokens is identical, so this is parity.
API surface: Findings: F1 accepted, unverified. F2 accepted, unverified. F3 accepted, unverified. F4 accepted. F5 new, unverified. Reviewed at aa0d660 |
|
@claude Fix F5 if it doesn't diverge from the C# source. |
|
Claude finished @ddaspit's task in 21s —— View job No code changes made for F5I left F5 alone because fixing it would make the Python port differ from the C# code. I pushed no commits.
I read the C# source and compared it by hand. I did not run the Python on the F5 input. F5 looks like a real defect in C#. I'd fix it upstream in |
Quick summary
ParatextProjectTextUpdaterBase.update_usfmnow converts the source USFM to the rows' versification before applying the update, so rows in one versification update a project in another. The conversion runs only when the two differ, so same-versification updates behave as before. Nothing inmachine/jobsis touched.Where to look
tests/corpora/test_convert_usfm_versification_handler.py.test_update_usfm_converts_to_rows_versification.DefaultParatextProjectSettingsin the test utils now defaults to English, not Original, matchingScriptureRef. With the old default, 8 existing update tests started converting and failed.ConvertUsfmVersificationHandleris a new export ofmachine.corpora.get_rows_versificationis a new module-level function inupdate_usfm_parser_handler.py.Validation
./local_check.sh --agent-strict-- 873 passed, 3 skipped (local run, not CI-equivalent)Issue / porting context
Closes #369
Closes #382
Ports sillsdev/machine#472 and sillsdev/machine#521.
🤖 Generated with Claude Code
This change is