Why
Recent review cycles showed recurring breakpoints in local deploy ergonomics and shell safety.
Evidence
Scope
- Refactor livereload-port assignment to a guarded branch (
if LIVERELOAD_PORT=$(...)), not bare command substitution.
- Add explicit argument validation for
-p|--port and --host (missing argument, flag-as-value, non-numeric port).
- Normalize URL rendering for IPv6 hosts by adding brackets when needed.
- Add a lightweight shell smoke-test script for these branches.
Acceptance Criteria
scripts/deploy.sh continues running when no livereload port is available and disables livereload cleanly.
- Invalid
--port and missing --host/--port args fail with clear messages and non-zero exit.
- IPv6 host URLs are emitted in valid bracketed form.
- Smoke test(s) cover the above paths and pass in CI/local.