Handle --sandbox and --env conflicts with precedence warning#90
Merged
Conversation
Three error-path fixes found by exploratory QA:
- `assembly transcribe ""` no longer batch-transcribes the working
directory: Path("") is Path("."), so an empty source (e.g. an unset
shell variable) fell into the directory branch and uploaded every
audio file under cwd. It now fails like a missing source.
- `--sandbox` combined with a contradictory `--env` now warns instead
of being silently ignored; --env still wins. Credentials are
environment-bound, so the conflict must not resolve invisibly.
- `assembly speak` in production now suggests the working command
('assembly --sandbox speak …'); the old hint and the epilog examples
put --sandbox after the subcommand, where it fails with
"No such option" (it's a root-only flag).
https://claude.ai/code/session_01CjW9fAmrMbxMs4QhXSwVVR
alexkroman
pushed a commit
that referenced
this pull request
Jun 12, 2026
…into the QA-fix branch Main's #90 fixed two of the same QA findings differently: adopt its --sandbox/--env conflict warning (--env wins, surfaced as {"warning": …} in JSON mode) over this branch's hard usage error, and keep this branch's fuller speak sandbox-hint suggestion which subsumes main's. https://claude.ai/code/session_01LkB3yQbPDG7Ex4mNL3Wtb6
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.
Summary
Add conflict detection and user-friendly warnings when
--sandboxand--envflags are passed together with conflicting values. Since credentials are environment-bound,--envtakes precedence and--sandboxis ignored, but users need to know this happened.Key Changes
_sandbox_conflict_warninginmain.py): Detects when--sandboxand a non-sandbox--envare both specified, returning a warning message that names the ignored flag--quietis set), supporting both human-readable and JSON output modes--sandbox --env sandbox000) produce no warning--quietsuppresses the warning{"warning": "…"}for machine-readable pipelinesspeakcommand help text and examples to clarify that--sandboxis a root-level flag (goes before the subcommand), not a subcommand optiontranscribe_batch.expand_sourcesto reject empty string sources (e.g., from unset shell variables) instead of treating them as the current directoryImplementation Details
main()before environment resolution, then emitted alongside the existingenv_override_warningin a unified loop--quietflag andjson_modesetting for consistent behaviorspeakcommand examples and error messages to use the correct syntax:assembly --sandbox speak …rather thanassembly speak … --sandboxnot sourceinstead ofsource is Noneto catch both cases, preventing accidental batch-transcription of the working directoryhttps://claude.ai/code/session_01CjW9fAmrMbxMs4QhXSwVVR