Close #16: stop source_labels=False from delegating to wrong archetype formatter - #169
Merged
Conversation
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.
What changed
Removed the two early-exit delegations in
_format_document_archiveand_format_mixed_mediathat re-routedsource_labels=Falseto wrong archetype formatters. Now both functions always use their own classification paths and only suppressSOURCE_LABEL_OPEN/SOURCE_LABEL_CLOSEblocks when the toggle is off.Files
vo_format/formatter.py- Removed delegatingreturn _format_single_narrator(...)at L803-804 andreturn _format_multi_voice_drama(...)at L1076-1077; guarded allSOURCE_LABEL_OPEN/SOURCE_LABEL_CLOSEappends withif toggles.source_labels:tests/test_formatter.py- Added two regression tests asserting(block_type, text)sequence equality between on-run (labels stripped) and off-run for bothdocument_archive_sample.mdandmixed_media_sample.mdAssumptions made
in_source_blocktracking is preserved for indentation purposes even when labels are suppressedRE_DOC_REFmatching and document_section/narrative_label handling proceed unchanged - only the label container blocks are conditionalUncertainties
None
Test
./.venv/Scripts/python.exe -m pytest tests/ -q- 461 passed, 2 skipped