Add CLI flags to svc.sh (addr/host/port/data/dsn/auth/mock/passthrough) #47

Merged
weichen merged 4 commits from feature/svc-cli-args into main 2026-09-30 11:50:33 +00:00
4 Commits
Author SHA1 Message Date
weichen 604b12ab06 Record the sync checkpoint
ci / test (pull_request) Failing after 17m6s
2026-09-30 11:50:25 +00:00
weichen e3ba86aa16 Record the svc-cli-args task card results 2026-09-30 11:50:24 +00:00
weichen 8a494e87c7 Add CLI flags to svc.sh (addr/host/port/data/dsn/auth/mock/passthrough)
Why: the manager only took configuration from SVC_* environment
variables; binding a public interface or pointing at a database meant
exporting vars first, which is awkward for one-off deploys and
invisible in shell history review.

Evidence: live matrix on the worktree - --port (8801), --host 0.0.0.0
(bind verified via ss, health probe auto-maps to 127.0.0.1), --addr
whole-form, CLI-over-env precedence (--port beats SVC_DEV_ADDR),
--mock reaching the server cmdline, --dsn passthrough proven by the
postgres connect attempt in the log, -- passthrough (--artifacts), and
make svc ARGS passthrough. A set -e silent-exit trap in env_config was
caught by the first run and fixed (condition-as-last-statement).

Impact: scripts/svc.sh <env> [action] [--addr|--host|--port|--data|
--dsn|--auth|--mock|--plugins| -- <extra>]; precedence CLI > env vars >
defaults; help rewritten with examples; make svc gains ARGS; logs keeps
the positional line-count form. The real-world port guard held: a dev
instance started from the main checkout was refused with owner info,
untouched.

Refs: feature/svc-cli-args task card.
2026-09-30 11:50:24 +00:00
weichen 1ac864a0b5 Record the task card for feature-svc-cli-args 2026-09-30 11:47:03 +00:00