Pulse/internal/relay
rcourtman 93c62e691a
Some checks failed
Build and Test / Secret Scan (push) Has been cancelled
Build and Test / Frontend & Backend (push) Has been cancelled
Aggregate simplify-review cleanups (no behavior change)
Six small refactors aggregated from a simplify-review pass over this
session's commits:

1. internal/config/persistence_relay.go — LoadRelayConfig had two
   ApplyEnvOverrides call sites (one inside the not-exist branch, one
   on the happy path) and a redundant cfg = DefaultConfig() reassignment.
   Collapse to a single ApplyEnvOverrides call after the load attempt;
   the file-absent branch already has the default cfg from line 1.

2. internal/relay/config_env.go — swap two strings.TrimSpace(os.Getenv(...))
   calls for utils.GetenvTrim, matching the 30+ existing call sites in
   internal/config/config.go. Trim narrating comments back to the
   product-behavior sentences that aren't obvious from the code.

3. internal/relay/config_env_test.go — collapse seven near-identical
   ApplyEnvOverrides scenarios into a single table-driven test
   (TestApplyEnvOverridesTable). Reduces ~85 lines to ~60 and gives each
   subcase a named t.Run for clearer failure output. Keeps the
   nil-config-safe and parseEnvBool tests separate since they exercise
   different surfaces.

4. .github/workflows/install-sh-smoke.yml — replace the /api/health
   bash for-loop (sleep 2; curl; loop 30x) with a single
   curl --retry 30 --retry-delay 2 --retry-connrefused --retry-all-errors
   invocation. Curl already implements the same polling behaviour
   natively; the bash loop was 13 lines of redundant scaffolding.

5. scripts/installtests/build_release_assets_test.go — extract the
   repeated "read file, iterate required substrings, fail on first
   miss" boilerplate into assertFileContainsAll(t, path, required...).
   Migrate the four tests I added in this session; existing tests in
   the file follow the same shape and can adopt the helper
   incrementally without churning unrelated code in this commit. Also
   updated the pinned curl string for the /api/health retry change.

Contract-neutral: every change preserves identical user-visible
behavior. PULSE_ALLOW_CONTRACT_NEUTRAL_COMMIT applied for the
canonical-shape-guard bypass; sensitivity, gitleaks, governance-stage,
control-plane, status, registry, contract, and pre-commit hooks still
run.

Verified locally:
- go test ./internal/relay/ ./internal/config/ → all pass
- go test ./scripts/installtests/ → all pass
- ruby -ryaml install-sh-smoke.yml → parses clean
2026-05-12 17:32:11 +01:00
..
client.go Fix RC3 backend release blockers 2026-05-01 21:36:28 +01:00
client_abrupt_disconnect_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
client_additional_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
client_backoff_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
client_close_race_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
client_drain_inflight_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
client_e2e_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
client_handshake_error_test.go Fix RC3 backend release blockers 2026-05-01 21:36:28 +01:00
client_license_lifecycle_test.go Fix RC3 backend release blockers 2026-05-01 21:36:28 +01:00
client_managed_runtime_test.go Stabilize backend race tests for v6 RC publish 2026-04-11 22:46:34 +01:00
client_session_resume_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
client_shutdown_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
client_test.go Fix RC3 backend release blockers 2026-05-01 21:36:28 +01:00
config.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
config_env.go Aggregate simplify-review cleanups (no behavior change) 2026-05-12 17:32:11 +01:00
config_env_test.go Aggregate simplify-review cleanups (no behavior change) 2026-05-12 17:32:11 +01:00
config_validation.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
config_validation_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
encryption.go Domain-separate relay channel HKDF derivation 2026-04-22 15:04:09 +01:00
encryption_test.go Fix hosted mobile approval proof runtime setup 2026-04-24 17:14:47 +01:00
identity.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
identity_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
protocol.go fix(relay): bind push notifications to instance id 2026-03-25 01:06:13 +00:00
protocol_external_contract_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
protocol_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
proxy.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
proxy_additional_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
proxy_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
push.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
push_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00