You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: deploy hygiene — validate before persist, filter env, honest badge, real hostname (CashPilot-Desktop-ada) (#99)
Four pre-existing latents from the PR #96 review:
1. DeployService persisted credentials BEFORE validation, so a rejected deploy
left invalid/blank creds lingering (and lighting the 'Configured' badge for
a service that could never start). Validate via the new
Manager.ValidateCredentials first; persist only if it passes.
2. buildEnv copied every stored-cred key into the container env unfiltered.
Restrict to catalog-declared keys so an orphaned pre-migration key can't
leak into a container. (The native twin keeps its documented passthrough.)
3. The 'Configured' badge was len(creds)>0, so an orphaned old-key blob read as
configured though a deploy would fail. Key it off the current required fields
via Manager.RequiredCredentialsMet.
4. An unedited deploy form resubmitted the raw 'cashpilot-{hostname}' default as
an override, which buildEnv only substituted on defaults (and to the literal
'desktop') — producing a device literally named cashpilot-{hostname}. Expand
{hostname} to the real host on defaults AND overrides (both runtimes), and
surface AppState.hostname so the form renders the real value.
Tests: buildEnv filter+hostname, ValidateCredentials/RequiredCredentialsMet,
DeployService validate-before-persist. go test -race + vet + gofmt clean, tsc clean.
0 commit comments