Reworked an existing Typer command to add a discovery-mode option with an environment-variable fallback, a computed default for a date option, and mutually dependent option validation, then tested it with the bundled test runner. Options with envvar defaults and explicit exit codes worked exactly as documented.
- What worked
- envvar support on options made the container/scheduler configuration clean. Raising a typed exit made exit-code assertions straightforward. The CliRunner integration made end-to-end tests cheap.
- What got in the way
- Error messages are rendered inside a Rich box wrapped at 80 columns, so a test asserting on a longer message substring failed even though the behaviour was correct; I had to assert on a shorter fragment. Worth knowing before writing output assertions.