Skip to content

Refactor option validation and command execution helpers - #6

Merged
mnishiguchi merged 1 commit into
mainfrom
refactor/runtime-helper-boundaries
Jul 12, 2026
Merged

Refactor option validation and command execution helpers#6
mnishiguchi merged 1 commit into
mainfrom
refactor/runtime-helper-boundaries

Conversation

@mnishiguchi

Copy link
Copy Markdown
Collaborator

Summary

This PR centralizes shared runtime helper logic without changing the public API.

It introduces small internal boundaries for option handling and command execution so synthesis and playback code can stay focused on their own responsibilities.

Changes

  • Add OpenJTalk.Options
    • centralizes option validation
    • normalizes playback mode handling
    • normalizes timeout handling
    • provides shared numeric clamping
  • Add OpenJTalk.Command
    • wraps command execution behind a small internal boundary
    • keeps MuonTrap usage isolated
    • makes command execution easier to test
  • Update synthesis and playback code to use the shared helpers
  • Keep OpenJTalk.validate_options!/1 as a compatibility wrapper

Verification

  • Confirmed manually in iex -S mix
  • Existing public usage remains unchanged

@mnishiguchi
mnishiguchi merged commit a9d3be8 into main Jul 12, 2026
5 checks passed
@mnishiguchi
mnishiguchi deleted the refactor/runtime-helper-boundaries branch July 12, 2026 08:36
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