mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-20 17:48:47 +00:00
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 |
||
|---|---|---|
| .. | ||
| dev | ||
| eval | ||
| installtests | ||
| lib | ||
| lint-fixer | ||
| release_control | ||
| systemd | ||
| tests | ||
| .go-version | ||
| audit-private-boundary.sh | ||
| backfill-release-assets.sh | ||
| build-release.sh | ||
| bundle.manifest | ||
| bundle.sh | ||
| check-bench-regression.sh | ||
| check-workflow-dispatch-inputs.py | ||
| clean-mock-alerts.sh | ||
| cleanup.sh | ||
| cloud-backup.sh | ||
| com.pulse.hot-dev.plist.template | ||
| conformance-smoke.sh | ||
| demo_public_browser_smoke.cjs | ||
| dev-check.sh | ||
| dev-deploy-agent.sh | ||
| dev-launchd-setup.sh | ||
| dev-launchd-wrapper.sh | ||
| docker-build.sh | ||
| ensure_test_assets.sh | ||
| exclusive-lock.mjs | ||
| generate-release-notes.sh | ||
| generate-self-hosted-feature-catalog.go | ||
| generate-types.go | ||
| hot-dev-bg.sh | ||
| hot-dev.sh | ||
| install-container-agent.sh | ||
| install-docker.sh | ||
| install-go-toolchain.sh | ||
| install-mcp.ps1 | ||
| install-mcp.sh | ||
| install.ps1 | ||
| install.sh | ||
| package-helm-chart.sh | ||
| patrol_e2e_matrix.sh | ||
| pulse-auto-update.sh | ||
| release_asset_common.sh | ||
| release_ldflags.sh | ||
| release_update_key.go | ||
| remerge-parallel.sh | ||
| render_installers.go | ||
| repo-boundary-paid-surface.allowlist | ||
| run_cloud_public_signup_smoke.sh | ||
| run_demo_public_browser_smoke.sh | ||
| run_hosted_staging_smoke.sh | ||
| session-handoff.sh | ||
| standalone.manifest | ||
| sync-production-config.sh | ||
| sync_chart_release_metadata.py | ||
| telemetry_adoption_report.py | ||
| test-vm-disk.sh | ||
| toggle-mock.sh | ||
| trigger-release-dry-run.sh | ||
| trigger-release.sh | ||
| validate-published-release.sh | ||
| validate-release.sh | ||