Extract the generic FAVA tunnel lifecycle currently duplicated by WisdomHelm #16. This is required by WisdomHelm #9.
Acceptance criteria
fava-trails-tunnel run and start support default-off --sync-on-start, reuse _sync_data_repo, run one initial sync, and treat every result other than status=ok (including blocked, conflict, error, or timeout) as a failure before HTTP or tunnel exposure.
--sync-on-start --sync-interval-seconds 0 starts no recurring worker. A positive interval starts its recurring worker only after that initial sync succeeds. Detached start forwards the flag and includes the sync timeout in its startup budget.
- Add
fava-trails-tunnel preflight: start only the private loopback HTTP runtime, wait for strengthened /healthz, optionally run tunnel-client doctor, never start the external tunnel, always clean up the runtime, and return nonzero for readiness, process, or doctor failure.
- Cover successful and blocked/conflict/error/timeout paths, exactly-once behavior, zero-interval behavior, detached forwarding, preflight cleanup, and no external exposure through CLI/module-observable tests.
- Document a small generic non-canonical Docker Compose example demonstrating preflight,
--sync-on-start, interval zero, and /healthz. It must use placeholders and contain no MachineWisdom repository, username, scope, secret, tunnel ID, volume name, or host-path assumption. State that credentials and volume initialization are deployment concerns.
- Do not add a container-image publishing pipeline unless one already exists.
This upstream PR will be merged before WisdomHelm #16 is approved.
Extract the generic FAVA tunnel lifecycle currently duplicated by WisdomHelm #16. This is required by WisdomHelm #9.
Acceptance criteria
fava-trails-tunnel runandstartsupport default-off--sync-on-start, reuse_sync_data_repo, run one initial sync, and treat every result other thanstatus=ok(including blocked, conflict, error, or timeout) as a failure before HTTP or tunnel exposure.--sync-on-start --sync-interval-seconds 0starts no recurring worker. A positive interval starts its recurring worker only after that initial sync succeeds. Detachedstartforwards the flag and includes the sync timeout in its startup budget.fava-trails-tunnel preflight: start only the private loopback HTTP runtime, wait for strengthened/healthz, optionally run tunnel-client doctor, never start the external tunnel, always clean up the runtime, and return nonzero for readiness, process, or doctor failure.--sync-on-start, interval zero, and/healthz. It must use placeholders and contain no MachineWisdom repository, username, scope, secret, tunnel ID, volume name, or host-path assumption. State that credentials and volume initialization are deployment concerns.This upstream PR will be merged before WisdomHelm #16 is approved.