Skip to content

fix(service): require stable numeric health sentinel endpoints - #7027

Closed
luvs01 wants to merge 1 commit into
lidge-jun:devfrom
luvs01:codex/upstream-sentinel-endpoint-20261013
Closed

luvs01 wants to merge 1 commit into
lidge-jun:devfrom
luvs01:codex/upstream-sentinel-endpoint-20261013

Conversation

@luvs01

@luvs01 luvs01 commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Require a numeric, stable address and port before the opt-in health sentinel can use failed probes to authorize recovery. Default, localhost and wildcard binds normalize to numeric loopback; other DNS bind names make the sentinel stand down.
  • Pin the normalized endpoint across observations, recheck it under the ownership lease and immediately before termination, and perform the final runtime read before freshness and target-exit checks.
  • Preserve parent-process identity, history caps and shutdown semantics. Update configuration references in all existing translations.

Verification

  • Candidate 9cb9f4d5cfb43991f09ecc1564e0dcbbfe533846 on current dev 6da2774369aa32552e318e333902499683d053bc; all 12 changed files match reviewed source 8d57b33770c6ea9991e47f1374f97d74642a09b8 byte for byte.
  • Windows, pinned Bun 1.4.3: bun test --isolate --parallel=1 --timeout 60000 tests/service/service-health-sentinel-runner.test.ts tests/service/service-health-sentinel-policy.test.ts — 54 pass, 0 fail, 333 assertions.
  • Independent focused check passed the three new final-read regressions: forward clock jump, clock rollback and target exit during the read. Existing tests cover numeric address normalization, endpoint drift and refusing malformed destinations.
  • bun run typecheck, bun run structure:check, bun run privacy:scan, and git diff --check passed. Privacy coverage is the materialized sparse checkout, including all changed files.
  • Source exact-head hosted CI completed successfully, including Linux, Windows and macOS test shards. This evidence is for the unchanged source content, not a claim that the new commit's CI has completed.
  • Full local repository tests and live service termination were not run; focused dependency-injected regressions and source CI were used to avoid disrupting active work. The new-head CI and maintainer review remain pending; open in Draft. No running service or machine configuration was changed.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Pin the normalized address and port across probes and ownership checks. Include the final runtime read before freshness and target-exit checks.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 13, 2026
lidge-jun added a commit that referenced this pull request Oct 13, 2026
Based on #7027 by @luvs01. The opt-in health sentinel (#6671) now probes only numeric endpoints (loopback for default, localhost and every wildcard spelling the server accepts), pins that endpoint for its lifetime, and re-reads the runtime record before termination, so a DNS bind name or a changed record cannot turn unrelated timeouts into a kill of a healthy proxy.

Co-authored-by: Epinephrine <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@lidge-jun

Copy link
Copy Markdown
Owner

Thank you, @luvs01! This is a good catch. A DNS bind name that resolves somewhere unreachable would have made the sentinel read timeouts as a hung proxy and kill a healthy one. The endpoint pinning and the reordered final read close the two remaining stale-evidence gaps.

The contributor draft gate kept this PR in draft because the body has no four-box readiness checklist, so I carried your commit unchanged, with your authorship, onto current dev in #7031. It credits you with a Co-authored-by trailer. I'm closing this in favor of that PR. Thanks again for the careful work on #6671.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants