utterplan 0.6.16__tar.gz → 0.6.18__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {utterplan-0.6.16 → utterplan-0.6.18}/PKG-INFO +1 -1
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/architecture.md +1 -1
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/changelog.md +16 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/consumer-guide.md +2 -2
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/format.md +1 -1
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_bundle_book_services.py +4 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_bundle_services.py +146 -2
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_renderplan_replan.py +68 -5
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_renderplan_v7_contract.py +528 -93
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/__init__.py +16 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/_version.py +3 -3
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/batch.py +15 -3
- utterplan-0.6.18/utterplan/bundle_inspection.py +687 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/config.py +14 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderplan_grouping.py +141 -5
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan.egg-info/PKG-INFO +1 -1
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan.egg-info/SOURCES.txt +1 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan.egg-info/scm_file_list.json +14 -0
- utterplan-0.6.18/utterplan.egg-info/scm_version.json +8 -0
- utterplan-0.6.16/utterplan.egg-info/scm_version.json +0 -8
- {utterplan-0.6.16 → utterplan-0.6.18}/.codecrate.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/.github/workflows/codecov.yml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/.github/workflows/pre-commit.yml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/.github/workflows/python-publish.yml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/.github/workflows/tests.yml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/.gitignore +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/.pre-commit-config.yaml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/AGENTS.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/LICENSE +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/MANIFEST.in +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/NOTICE +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/README.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/Makefile +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/bundles.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/cli.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/conf.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/coordinate-spaces.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/debugging.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/getting-started.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/index.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/make.bat +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/pause-timing-architecture.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/phase-a-completion.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/pykokoro-integration.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/python-api.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/docs/requirements.txt +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/examples/basic.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/examples/chapter.ssmd +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/examples/compile_file.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/examples/inspect_plan.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/examples/multilingual.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/examples/ssmd_example.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/pyproject.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/setup.cfg +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/spec/schemas/v1.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/spec/schemas/v2.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/spec/schemas/v3.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/spec/schemas/v4.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/spec/utterplan.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/__init__.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/compiler_helpers.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/fixtures/canonical_consumer_contract.expected.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/fixtures/canonical_consumer_contract.ssmd +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/fixtures/document-bundle-v1/story.ssmd-bundle/document.ssmd.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/fixtures/document-bundle-v1/story.ssmd-bundle/manifest.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/fixtures/ssmd_09_comprehensive.ssmd +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/golden/basic_en.utterplan.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/golden/directives.utterplan.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/golden/markers.utterplan.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/golden/multilingual.utterplan.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/golden/parenthetical.utterplan.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/golden/spokenform_offsets.utterplan.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/golden/ssmd_09_comprehensive.utterplan.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/golden/ssmd_breaks.utterplan.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/__init__.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/cases.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/fixtures/v4/basic_en.utterplan.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/fixtures/v4/directives.utterplan.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/fixtures/v4/markers.utterplan.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/fixtures/v4/multilingual.utterplan.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/fixtures/v4/parenthetical.utterplan.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/fixtures/v4/spokenform_offsets.utterplan.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/fixtures/v4/ssmd_09_comprehensive.utterplan.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/fixtures/v4/ssmd_breaks.utterplan.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/goldens/multilingual_preparation.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/goldens/spokenform_numbers.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/goldens/ssmd_break.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/goldens/ssmd_language_detection.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/goldens/ssmd_marker.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/goldens/ssmd_pronunciation.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/test_legacy_json_import.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/migration/test_semantic_migration_regressions.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/README.md +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v1/basic.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v1/directives.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v1/markers.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v1/multilingual.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v1/parenthetical.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v1/spokenform_offsets.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v1/ssmd_breaks.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v2/directives.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v3/multilingual.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v3/ssmd_09_comprehensive.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/schema_history/v5/canonical_consumer_contract.toml +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_atomic_io.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_batch.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_boundaries.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_bundle_book_replan.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_bundle_document_compile.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_bundle_document_render.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_bundle_replan.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_bundle_role_inventory.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_cli.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_cli_batch.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_cli_bundle_compile_book.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_cli_bundle_document.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_cli_bundle_render_book.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_cli_bundle_render_document.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_cli_bundle_replan_book.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_compiler.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_consumer_contract.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_consumer_readiness.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_coordinates.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_dependency_architecture.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_directives.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_explain.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_fake_renderer.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_flow_compilation.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_format.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_golden.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_identity_units.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_import_boundaries.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_language.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_linguistics.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_migration_framework.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_migration_v3_to_v4.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_migration_v4_to_v5.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_pauses.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_planner.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_preparation.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_prepared_semantics.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_preview.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_progress.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_public_identity.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_renderability.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_renderability_repair.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_renderplan_batch.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_renderplan_dependency_contract.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_renderplan_export.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_renderplan_pause_timing.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_replacement_provenance.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_role_coverage.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_schema_history.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_schema_registry.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_schema_strict.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_schema_v6_source.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_schema_v7.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_segment_topology.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_segmentation_adapter.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_segmentation_recovery.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_semantic_boundaries.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_sentence_topology.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_source_input.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_ssmd_09_parser.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_ssmd_bundle.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_ssmd_bundle_book.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_ssmd_bundle_document.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_ssmd_substitution_preparation.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_token_topology.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_toml_format.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_ttsready_preparation_adapter.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/tests/test_version.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/__main__.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/_book_replan.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/_book_service.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/_document_service.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/atomic_io.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/attempt_serialization.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/attempts.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/boundaries.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/bundle.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/bundle_replan.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/bundle_role_inventory.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/cli.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/codecs/__init__.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/codecs/v4_toml.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/codecs/v5_toml.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/codecs/v6_toml.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/codecs/v7_toml.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/compiler.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/diagnostics.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/directives.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/exceptions.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/explain.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/flow_projection.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/format.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/hashing.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/language.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/linguistics.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migration.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migrations/__init__.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migrations/registry.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migrations/v1_to_v2.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migrations/v2_to_v3.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migrations/v3_to_v4.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migrations/v4_to_v5.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migrations/v5_to_v6.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/migrations/v6_to_v7.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/model.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/parsers.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/pauses.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/planner.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/preparation.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/prepared_semantics.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/preview.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/progress.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/py.typed +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderability.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderplan_batch.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderplan_export.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderplan_pause_timing.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderplan_projection.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderplan_replan.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderplan_workspace.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/renderprofile_io.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/role_coverage.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/schema_registry.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/schemas/v1.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/schemas/v2.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/schemas/v3.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/schemas/v4.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/segmentation.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/serialization.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/source_input.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/spacy_models.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/spans.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/ssmd_bundle.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/__init__.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/document/__init__.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/document/plain.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/document/ssmd.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/preparation/__init__.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/preparation/identity.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/preparation/ssmd.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/preparation/ttsready.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/stages/protocols.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/token_topology.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/toml_codec.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/trace_codec.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/units.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/utterplan.schema.json +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/versioning.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan/workspace_paths.py +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan.egg-info/dependency_links.txt +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan.egg-info/entry_points.txt +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan.egg-info/requires.txt +0 -0
- {utterplan-0.6.16 → utterplan-0.6.18}/utterplan.egg-info/top_level.txt +0 -0
|
@@ -241,7 +241,7 @@ Supporting tactics:
|
|
|
241
241
|
|
|
242
242
|
After written-to-spoken preparation and before segmentation, UtterPlan inspects verified replacement records for the exact character-spelling transformation: an ASCII uppercase-letter/digit core of at least two characters becomes the same characters joined by single spaces, optionally retaining an identical `'s` or `’s` suffix. This derives a compiler-owned `say_as=characters` annotation over only the prepared character core. For example, `[ART]{sub=\"A R T\"}` keeps prepared text `A R T`; `[ART's]{sub=\"A R T's\"}` keeps `A R T's` and marks only `A R T`.
|
|
243
243
|
|
|
244
|
-
The derivation is portable executable intent, not a renderer-specific spelling rewrite. Prepared text never becomes `A- R- T`; a renderer adapter may choose that frontend form. Existing semantic-edge segmentation produces the exact controlled span, while default RenderPlan sentence grouping retains the full sentence as one normal speech request with a request-local control. An explicit manual `pauses.parenthetical`
|
|
244
|
+
The derivation is portable executable intent, not a renderer-specific spelling rewrite. Prepared text never becomes `A- R- T`; a renderer adapter may choose that frontend form. Existing semantic-edge segmentation produces the exact controlled span, while default RenderPlan sentence grouping retains the full sentence as one normal speech request with a request-local control. An explicit manual `pauses.parenthetical` key enables UtterPlan's selective parenthetical-entry policy: an oriented OPEN may split when both the accumulated host group and opening aside have at least four lexical tokens; CLOSE edges normally join resumed host syntax. Short asides remain joined. The projection uses stored token facts and a local bracket fallback, never a global punctuation reparse. `0ms` enables an eligible entry split without audible silence; an omitted key or `mode = "none"` disables the policy. Authored timed/named breaks remain authoritative at either edge, and authored `none` suppresses a pure automatic entry split. No schema change or FlowPlan mutation is required.
|
|
245
245
|
|
|
246
246
|
Authored `say-as` semantics take precedence, and the consumed SSMD `sub` annotation remains consumed. The derived directive uses existing schema-v7 `SayAsDirective` serialization and identity hashing; replacement records remain diagnostic provenance and are not synthesis input. No schema version or migration changes are required.
|
|
247
247
|
|
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.6.18] - 2026-11-05
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added read-only bundle freshness inspection with incremental selectors and profile/config drift diagnostics
|
|
12
|
+
|
|
13
|
+
<!-- generated by releaseledger -->
|
|
14
|
+
|
|
15
|
+
## [0.6.17] - 2026-11-04
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Fixed resumed host syntax in the same speech request across inline parenthetical asides
|
|
20
|
+
|
|
21
|
+
<!-- generated by releaseledger -->
|
|
22
|
+
|
|
7
23
|
## [v0.6.16] - 2026-10-31
|
|
8
24
|
|
|
9
25
|
### Fixed
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
UtterPlan ends at a semantic planning boundary. A renderer consumes the public `FlowPlan` and begins G2P after planning. It does not need a TOML round trip when planner and renderer run in the same process.
|
|
4
4
|
|
|
5
|
-
The schema-v7 plan is renderer-independent: `FlowUnit` grouping is fixed paragraph-local, while `FlowSegment` boundary arrays carry safe cut opportunities. Segments are not necessarily TTS calls, and UtterPlan's linguistic tokens are not model-token counts. Consumers choose sentence, paragraph, or engine-token-budget chunks and native, automatic, or manual pause realization without changing the saved plan. Optional RenderPlan projection
|
|
5
|
+
The schema-v7 plan is renderer-independent: `FlowUnit` grouping is fixed paragraph-local, while `FlowSegment` boundary arrays carry safe cut opportunities. Segments are not necessarily TTS calls, and UtterPlan's linguistic tokens are not model-token counts. Consumers choose sentence, paragraph, or engine-token-budget chunks and native, automatic, or manual pause realization without changing the saved plan. Optional RenderPlan projection may selectively split before a substantial oriented parenthetical OPEN when its manual profile explicitly includes `pauses.parenthetical`; closing edges normally remain joined to resumed host syntax. This projection does not change the FlowPlan.
|
|
6
6
|
|
|
7
7
|
For persistence across processes, save a current plan as `.utterplan.toml` and load it with `FlowPlan.load()`. `to_toml()` / `from_toml()` provide text round-tripping, and `plan_id` identifies executable semantics rather than TOML formatting. Batch reports and optional compiler traces are operational/provenance artifacts, not plans.
|
|
8
8
|
|
|
@@ -39,7 +39,7 @@ In Python, `PlannerConfig.document_format` defaults to `"plain"`; select `"ssmd"
|
|
|
39
39
|
- `directives`: typed voice, pronunciation, prosody, emphasis, say-as, substitution, audio, and extension data.
|
|
40
40
|
- `markers` and optional `heading` metadata already localized to the owning segment.
|
|
41
41
|
|
|
42
|
-
RenderPlan's parenthetical policy is independent of FlowPlan compilation.
|
|
42
|
+
RenderPlan's parenthetical policy is an UtterPlan projection decision, independent of FlowPlan compilation. A manual RenderProfile must explicitly include `pauses.parenthetical` to enable selective entry splitting. Only a substantial oriented OPEN edge is eligible (at least four lexical tokens in both the accumulated host request and opening aside); CLOSE edges normally join resumed host syntax, and short inline asides remain joined. Orientation comes from persisted token facts with a local bracket-surface fallback, not a global punctuation scan. `0ms` still enables an eligible request split without audible silence; omitting the key or using `mode = "none"` disables the policy. Authored timed/named breaks retain precedence at either edge, while authored `none` suppresses a pure automatic entry split. This projection does not alter FlowPlan or rewrite the original parentheses. Newly created VoiceRender profiles may seed `180ms`; existing profiles are not mutated.
|
|
43
43
|
Token offsets are half-open Python-character ranges into the owning `segment.text`. Do not use them to slice document text or add offsets from another segment. Consumers preserve stored segment order but decide downstream chunk boundaries; a segment is not necessarily one TTS call.
|
|
44
44
|
Token `pos`, `tag`, `lemma`, and `morph` describe that exact prepared text and are the authoritative linguistic context, not model-token IDs or counts. Consumers may pass them through without retokenizing or rerunning spaCy. Optional replacements are provenance only: their output spans are segment-local, source values are original spellings, and they do not alter hashes independently of the source digest and are not synthesis inputs.
|
|
45
45
|
|
|
@@ -42,7 +42,7 @@ Each ordered `flow` entry is a `FlowUnit` with a stable local `hash` and one or
|
|
|
42
42
|
|
|
43
43
|
`boundary_before` / `boundary_after` list unique safe opportunities from `clause`, `sentence`, `paragraph`, `parenthetical`, and `voice_change` in canonical order; a parenthetical or sentence opportunity is not a pause directive. Authored pause intents are kept separately, so a boundary and an authored `none`, strength, or timed break can coexist at one edge. A `FlowSegment` is a semantic plan segment, not necessarily a renderer call or final TTS chunk.
|
|
44
44
|
|
|
45
|
-
In optional RenderPlan projection, a RenderProfile with `pauses.
|
|
45
|
+
In optional RenderPlan projection, only a manual RenderProfile with an explicit `pauses.parenthetical` key enables UtterPlan's selective parenthetical-entry policy. An entry may split when the accumulated host group and opening aside each contain at least four lexical tokens; closing edges normally remain joined to resumed host syntax. UtterPlan classifies local persisted token facts (with a local bracket-surface fallback) and does not reparse punctuation globally. Short inline asides stay joined. The key's presence enables an eligible entry split even at `0ms`; omitting it or setting `mode = "none"` disables the automatic policy. Authored timed or named breaks still split at either edge, and authored `none` suppresses a pure automatic entry split. Text, source spans, and segment-local facts are unchanged; FlowPlan remains renderer-independent.
|
|
46
46
|
Consumers may project saved flow into `segment`, `clause`, `sentence`, or `paragraph` preview chunks without changing schema-v7 data. The public preview concatenates each selected chunk's stored `segment.text` exactly; token and replacement spans remain local to their original segments. Pause policies are projections only and do not persist renderer timing or activate boundaries in the plan.
|
|
47
47
|
|
|
48
48
|
Token `span` entries are half-open Python-character ranges local to their owning segment's `text`. `pos`, `tag`, `lemma`, and `morph` carry final prepared-text linguistic facts; dense columns align with spans and sparse columns use ascending `[token_index, value]` pairs. Absent lemma values derive from case-folded surface text; an explicit empty sparse lemma preserves an unknown value. These fields describe linguistic tokens, not engine token IDs or model-token counts; consumers may pass the context through without retokenizing or rerunning spaCy.
|
|
@@ -75,6 +75,10 @@ def test_package_root_exports_unified_bundle_services_not_split_services() -> No
|
|
|
75
75
|
assert callable(utterplan.compile_bundle)
|
|
76
76
|
assert callable(utterplan.render_bundle)
|
|
77
77
|
assert callable(utterplan.replan_bundle)
|
|
78
|
+
assert callable(utterplan.inspect_bundle_compile)
|
|
79
|
+
assert callable(utterplan.inspect_bundle_projection)
|
|
80
|
+
assert hasattr(utterplan, "BundleCompileInspection")
|
|
81
|
+
assert hasattr(utterplan, "BundleProjectionInspection")
|
|
78
82
|
for name in ("compile_book", "render_book", "replan_book"):
|
|
79
83
|
assert not hasattr(utterplan, name)
|
|
80
84
|
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import shutil
|
|
5
|
+
from dataclasses import replace
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
|
|
7
8
|
import pytest
|
|
@@ -10,6 +11,7 @@ from renderplan import codec as renderplan_codec
|
|
|
10
11
|
|
|
11
12
|
from utterplan._book_service import BookServiceError, compile_book, render_book
|
|
12
13
|
from utterplan.bundle import BundleServiceError, compile_bundle, render_bundle
|
|
14
|
+
from utterplan.bundle_inspection import inspect_bundle_compile, inspect_bundle_projection
|
|
13
15
|
from utterplan.bundle_role_inventory import load_bundle_role_inventory, sha256_file
|
|
14
16
|
from utterplan.config import LinguisticsConfig, PlannerConfig
|
|
15
17
|
from utterplan.model import FlowPlan
|
|
@@ -67,9 +69,11 @@ def _planner_config() -> PlannerConfig:
|
|
|
67
69
|
)
|
|
68
70
|
|
|
69
71
|
|
|
70
|
-
def _profile(path: Path) -> RenderProfile:
|
|
72
|
+
def _profile(path: Path, *, voice: str = "test") -> RenderProfile:
|
|
71
73
|
profile = RenderProfile(
|
|
72
|
-
roles={
|
|
74
|
+
roles={
|
|
75
|
+
"narrator": RoleProfile(language="en-US", binding={"engine": "test", "voice": voice})
|
|
76
|
+
},
|
|
73
77
|
default_role="narrator",
|
|
74
78
|
planning=PlanningPolicy(split="sentence", capacity_fallback=("token",)),
|
|
75
79
|
pauses=PausePolicy(mode="manual", durations_ms={"sentence": 250}),
|
|
@@ -243,3 +247,143 @@ def test_render_bundle_dispatches_book_and_document_with_uniform_outputs(
|
|
|
243
247
|
assert starts[0].kind == kind
|
|
244
248
|
assert starts[0].output_paths == result.outputs
|
|
245
249
|
assert starts[0].report_path == result.report_path
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def _tree_snapshot(root: Path) -> dict[str, bytes | None]:
|
|
253
|
+
return {
|
|
254
|
+
path.relative_to(root).as_posix(): None if path.is_dir() else path.read_bytes()
|
|
255
|
+
for path in sorted(root.rglob("*"))
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def test_compile_inspector_tracks_source_and_planner_config_without_writes(tmp_path: Path) -> None:
|
|
260
|
+
root = _book(tmp_path / "inspect.ssmd-bundle")
|
|
261
|
+
config = _planner_config()
|
|
262
|
+
before = _tree_snapshot(root)
|
|
263
|
+
fresh = inspect_bundle_compile(root, planner_config=config)
|
|
264
|
+
assert fresh.state == "not_started"
|
|
265
|
+
assert fresh.recommended_selector == "5-6"
|
|
266
|
+
assert _tree_snapshot(root) == before
|
|
267
|
+
|
|
268
|
+
compile_bundle(root, chapters="5", planner_config=config)
|
|
269
|
+
partial = inspect_bundle_compile(root, planner_config=config)
|
|
270
|
+
assert [item.state for item in partial.items] == ["complete", "not_started"]
|
|
271
|
+
assert partial.recommended_selector == "6"
|
|
272
|
+
assert not partial.force_required
|
|
273
|
+
assert partial.replacement_safe
|
|
274
|
+
|
|
275
|
+
source = root / "chapters/chapter-0005.ssmd.md"
|
|
276
|
+
source.write_text(
|
|
277
|
+
'---\nssmd_version: "0.9"\nlanguage: en-US\n---\nEdited chapter 5.\n',
|
|
278
|
+
encoding="utf-8",
|
|
279
|
+
)
|
|
280
|
+
stale = inspect_bundle_compile(root, planner_config=config)
|
|
281
|
+
assert [item.state for item in stale.items] == ["stale", "not_started"]
|
|
282
|
+
assert stale.recommended_selector == "5-6"
|
|
283
|
+
assert stale.force_required
|
|
284
|
+
assert stale.replacement_safe
|
|
285
|
+
|
|
286
|
+
compile_bundle(root, chapters="5", planner_config=config, force=True)
|
|
287
|
+
assert inspect_bundle_compile(root, chapters="5", planner_config=config).state == "complete"
|
|
288
|
+
changed_config = replace(config, overlap_mode="strict")
|
|
289
|
+
config_stale = inspect_bundle_compile(root, planner_config=changed_config)
|
|
290
|
+
assert config_stale.items[0].state == "stale"
|
|
291
|
+
assert config_stale.recommended_selector == "5-6"
|
|
292
|
+
assert config_stale.force_required
|
|
293
|
+
assert config_stale.replacement_safe
|
|
294
|
+
before = _tree_snapshot(root)
|
|
295
|
+
inspect_bundle_compile(root, planner_config=config)
|
|
296
|
+
assert _tree_snapshot(root) == before
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def test_projection_inspector_supports_incremental_extension_and_safe_rebuild(
|
|
300
|
+
tmp_path: Path,
|
|
301
|
+
) -> None:
|
|
302
|
+
root = _book(tmp_path / "projection.ssmd-bundle")
|
|
303
|
+
config = _planner_config()
|
|
304
|
+
compile_bundle(root, planner_config=config)
|
|
305
|
+
profile_path = root / "narration.renderprofile.toml"
|
|
306
|
+
profile = _profile(profile_path)
|
|
307
|
+
before = _tree_snapshot(root)
|
|
308
|
+
|
|
309
|
+
initial = inspect_bundle_projection(root, profile=profile_path)
|
|
310
|
+
assert initial.state == "not_started"
|
|
311
|
+
assert initial.profile_id == profile.computed_id()
|
|
312
|
+
assert initial.missing_chapters == ("chapter-0005", "chapter-0006")
|
|
313
|
+
assert initial.recommended_selector == "5-6"
|
|
314
|
+
assert not initial.force_required
|
|
315
|
+
assert initial.replacement_safe
|
|
316
|
+
assert _tree_snapshot(root) == before
|
|
317
|
+
|
|
318
|
+
render_bundle(root, profile=profile_path, chapters="5")
|
|
319
|
+
first = inspect_bundle_projection(root, profile=profile_path)
|
|
320
|
+
assert first.state == "partial"
|
|
321
|
+
assert first.chapters_in_set == ("chapter-0005",)
|
|
322
|
+
assert first.missing_chapters == ("chapter-0006",)
|
|
323
|
+
assert first.recommended_selector == "6"
|
|
324
|
+
assert not first.force_required
|
|
325
|
+
assert first.replacement_safe
|
|
326
|
+
first_projection_bytes = first.items[0].renderplan_path.read_bytes()
|
|
327
|
+
|
|
328
|
+
render_bundle(root, profile=profile_path, chapters="6")
|
|
329
|
+
complete = inspect_bundle_projection(root, profile=profile_path)
|
|
330
|
+
assert complete.state == "complete"
|
|
331
|
+
assert complete.items[0].renderplan_path.read_bytes() == first_projection_bytes
|
|
332
|
+
assert complete.recommended_selector is None
|
|
333
|
+
first_renderplan = complete.items[0].renderplan_path.read_bytes()
|
|
334
|
+
second_renderplan = complete.items[1].renderplan_path.read_bytes()
|
|
335
|
+
|
|
336
|
+
source = root / "chapters/chapter-0005.ssmd.md"
|
|
337
|
+
source.write_text(
|
|
338
|
+
'---\nssmd_version: "0.9"\nlanguage: en-US\n---\nEdited chapter 5.\n',
|
|
339
|
+
encoding="utf-8",
|
|
340
|
+
)
|
|
341
|
+
compile_bundle(root, chapters="5", planner_config=config, force=True)
|
|
342
|
+
stale = inspect_bundle_projection(root, profile=profile_path)
|
|
343
|
+
assert stale.stale_chapters == ("chapter-0005",)
|
|
344
|
+
assert stale.recommended_selector == "5"
|
|
345
|
+
assert stale.force_required
|
|
346
|
+
before = _tree_snapshot(root)
|
|
347
|
+
inspect_bundle_projection(root, profile=profile_path)
|
|
348
|
+
assert _tree_snapshot(root) == before
|
|
349
|
+
|
|
350
|
+
render_bundle(root, profile=profile_path, chapters="5", force=True)
|
|
351
|
+
rebuilt = inspect_bundle_projection(root, profile=profile_path)
|
|
352
|
+
assert rebuilt.state == "complete"
|
|
353
|
+
assert rebuilt.items[1].renderplan_path.read_bytes() == second_renderplan
|
|
354
|
+
assert rebuilt.items[0].renderplan_path.read_bytes() != first_renderplan
|
|
355
|
+
|
|
356
|
+
profile_b_path = root / "alternate.renderprofile.toml"
|
|
357
|
+
profile_b = _profile(profile_b_path, voice="sarah")
|
|
358
|
+
before_alternate_inspect = _tree_snapshot(root)
|
|
359
|
+
alternate = inspect_bundle_projection(root, profile=profile_b_path)
|
|
360
|
+
assert alternate.profile_id == profile_b.computed_id()
|
|
361
|
+
assert alternate.variant != complete.variant
|
|
362
|
+
assert alternate.state == "not_started"
|
|
363
|
+
assert _tree_snapshot(root) == before_alternate_inspect
|
|
364
|
+
shutil.copyfile(profile_b_path, complete.items[0].renderplan_path.parent / "renderprofile.toml")
|
|
365
|
+
mismatch = inspect_bundle_projection(root, profile=profile_path)
|
|
366
|
+
assert profile_b.computed_id() != profile.computed_id()
|
|
367
|
+
assert mismatch.profile_snapshot_mismatch
|
|
368
|
+
assert mismatch.state == "profile_mismatch"
|
|
369
|
+
assert mismatch.recommended_selector is None
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
def test_document_bundle_inspectors_report_single_item_convergence(tmp_path: Path) -> None:
|
|
373
|
+
root = _document(tmp_path / "story.ssmd-bundle")
|
|
374
|
+
config = _planner_config()
|
|
375
|
+
compile_bundle(root, planner_config=config)
|
|
376
|
+
compiled = inspect_bundle_compile(root, planner_config=config)
|
|
377
|
+
assert compiled.state == "complete"
|
|
378
|
+
assert compiled.recommended_selector is None
|
|
379
|
+
|
|
380
|
+
profile_path = root / "document.renderprofile.toml"
|
|
381
|
+
_profile(profile_path)
|
|
382
|
+
missing = inspect_bundle_projection(root, profile=profile_path)
|
|
383
|
+
assert missing.state == "not_started"
|
|
384
|
+
assert missing.recommended_selector == "all"
|
|
385
|
+
render_bundle(root, profile=profile_path)
|
|
386
|
+
projected = inspect_bundle_projection(root, profile=profile_path)
|
|
387
|
+
assert projected.state == "complete"
|
|
388
|
+
assert projected.recommended_selector is None
|
|
389
|
+
assert projected.items[0].render_plan_id is not None
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import re
|
|
3
4
|
from dataclasses import replace
|
|
4
5
|
|
|
5
6
|
import pytest
|
|
@@ -184,11 +185,14 @@ def test_replan_replaces_only_failed_occurrence_and_preserves_later_id() -> None
|
|
|
184
185
|
|
|
185
186
|
|
|
186
187
|
def test_replan_preserves_parenthetical_semantic_end_on_last_clause_child() -> None:
|
|
188
|
+
head = "The preceding host has enough words "
|
|
189
|
+
tail = "before the aside begins "
|
|
190
|
+
aside = "(this aside includes enough words)"
|
|
187
191
|
plan = _plan(
|
|
188
|
-
FlowSegment(
|
|
189
|
-
FlowSegment(
|
|
192
|
+
FlowSegment(head, "en-US", boundary_after=("clause",)),
|
|
193
|
+
FlowSegment(tail, "en-US", boundary_after=("parenthetical",)),
|
|
190
194
|
FlowSegment(
|
|
191
|
-
|
|
195
|
+
aside,
|
|
192
196
|
"en-US",
|
|
193
197
|
boundary_before=("parenthetical",),
|
|
194
198
|
boundary_after=("sentence",),
|
|
@@ -204,13 +208,13 @@ def test_replan_preserves_parenthetical_semantic_end_on_last_clause_child() -> N
|
|
|
204
208
|
)
|
|
205
209
|
index, profile, previous = _build_previous(plan, profile)
|
|
206
210
|
failed = previous.speech[0]
|
|
207
|
-
assert failed.text ==
|
|
211
|
+
assert failed.text == head + tail
|
|
208
212
|
assert failed.semantic_end == "parenthetical"
|
|
209
213
|
|
|
210
214
|
flow = replan_flow(index, profile, previous, _preflight(previous, profile, (failed,)))
|
|
211
215
|
speech = _speech_text(flow)
|
|
212
216
|
|
|
213
|
-
assert [item.text for item in speech] == [
|
|
217
|
+
assert [item.text for item in speech] == [head, tail, aside]
|
|
214
218
|
assert [item.semantic_end for item in speech] == ["clause", "parenthetical", "sentence"]
|
|
215
219
|
assert [item.reason for item in flow if isinstance(item, PauseItem)] == [
|
|
216
220
|
"capacity",
|
|
@@ -436,3 +440,62 @@ def test_stale_preflight_wrong_previous_and_stale_source_are_rejected() -> None:
|
|
|
436
440
|
with pytest.raises(RenderPlanProjectionError) as stale_source:
|
|
437
441
|
replan_flow(index, profile, stale_previous, stale_request)
|
|
438
442
|
assert stale_source.value.code == "renderplan.replan.source_stale"
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
def _space_tokens(text: str) -> tuple[TokenView, ...]:
|
|
446
|
+
return tuple(TokenView(match.start(), match.end()) for match in re.finditer(r"\S+", text))
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
def test_failed_parenthetical_request_replans_without_closing_parenthetical_pause() -> None:
|
|
450
|
+
host = "The host group already contains enough words "
|
|
451
|
+
aside = "(this aside contains enough lexical words)"
|
|
452
|
+
continuation = " and this continuation has many words for a safe token split."
|
|
453
|
+
plan = _plan(
|
|
454
|
+
FlowSegment(
|
|
455
|
+
host,
|
|
456
|
+
"en-US",
|
|
457
|
+
tokens=_space_tokens(host),
|
|
458
|
+
boundary_after=("parenthetical",),
|
|
459
|
+
),
|
|
460
|
+
FlowSegment(
|
|
461
|
+
aside,
|
|
462
|
+
"en-US",
|
|
463
|
+
tokens=_space_tokens(aside),
|
|
464
|
+
boundary_before=("parenthetical",),
|
|
465
|
+
boundary_after=("parenthetical",),
|
|
466
|
+
),
|
|
467
|
+
FlowSegment(
|
|
468
|
+
continuation,
|
|
469
|
+
"en-US",
|
|
470
|
+
tokens=_space_tokens(continuation),
|
|
471
|
+
boundary_before=("parenthetical",),
|
|
472
|
+
boundary_after=("sentence",),
|
|
473
|
+
),
|
|
474
|
+
)
|
|
475
|
+
profile = replace(
|
|
476
|
+
_profile(fallback=("token",)),
|
|
477
|
+
pauses=PausePolicy(
|
|
478
|
+
mode="manual",
|
|
479
|
+
durations_ms={"clause": 180, "parenthetical": 180, "sentence": 500},
|
|
480
|
+
),
|
|
481
|
+
profile_id=None,
|
|
482
|
+
)
|
|
483
|
+
index, profile, previous = _build_previous(plan, profile)
|
|
484
|
+
assert [item.text for item in previous.speech] == [host, aside + continuation]
|
|
485
|
+
failed = previous.speech[1]
|
|
486
|
+
|
|
487
|
+
flow = replan_flow(index, profile, previous, _preflight(previous, profile, (failed,)))
|
|
488
|
+
rebuilt = RenderPlan(
|
|
489
|
+
source_plan_id=previous.source_plan_id,
|
|
490
|
+
render_profile_id=previous.render_profile_id,
|
|
491
|
+
flow=flow,
|
|
492
|
+
).with_identity()
|
|
493
|
+
rebuilt.validate_against_profile(profile)
|
|
494
|
+
|
|
495
|
+
assert len(_speech_text(flow)) > len(previous.speech)
|
|
496
|
+
assert [item.reason for item in flow if isinstance(item, PauseItem)] == [
|
|
497
|
+
"parenthetical",
|
|
498
|
+
"capacity",
|
|
499
|
+
"sentence",
|
|
500
|
+
]
|
|
501
|
+
assert sum(item.reason == "parenthetical" for item in flow if isinstance(item, PauseItem)) == 1
|