fix(stargate): back off discovery and report registration failures - #1823
Draft
barrygreengus wants to merge 5 commits into
Draft
barrygreengus wants to merge 5 commits into
barrygreengus wants to merge 5 commits into
Conversation
barrygreengus
added this pull request to stack #1821
September 11, 2026 21:33
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
This was referenced Sep 11, 2026
barrygreengus
force-pushed
the
codex/stargate-maintenance/registration
branch
from
September 11, 2026 22:10
28e4124 to
b4c0176
Compare
Contributor
🛡️ CodeQL Analysis🚨 Found 5 issue(s) Severity Breakdown:
📋 Top Issues🔗 View full details in Security tab 🕐 Last updated: 2026-09-11 22:27:59 UTC | Commit: b4c0176 |
barrygreengus
force-pushed
the
codex/stargate-maintenance/registration
branch
3 times, most recently
from
September 14, 2026 21:22
0323ed7 to
7f6f441
Compare
barrygreengus
removed this pull request from stack #1821
September 15, 2026 16:28
barrygreengus
force-pushed
the
codex/stargate-maintenance/registration
branch
from
September 15, 2026 16:29
7f6f441 to
826b775
Compare
barrygreengus
changed the base branch from
codex/stargate-maintenance/pylon
to
codex/stargate-maintenance/proxy
September 15, 2026 16:29
barrygreengus
added this pull request to stack #1906
September 15, 2026 16:29
barrygreengus
force-pushed
the
codex/stargate-maintenance/registration
branch
from
September 15, 2026 21:00
826b775 to
9701e87
Compare
barrygreengus
force-pushed
the
codex/stargate-maintenance/registration
branch
3 times, most recently
from
September 16, 2026 04:52
d01c822 to
1b86fc6
Compare
Apply kube watcher backoff, report non-TLS registration and stream failures with bounded repetition, and keep secret-file excerpts out of diagnostics. Enable the existing Tokio test-util feature for deterministic watcher testing; no dependency version changes. Refs: #1817
Keep the source error chain during token resolution and redact parser excerpts and sensitive HTTP URLs when logging. Verify file and transport causes through recorded diagnostics. Refs: #1817
Remove generic error suppression so persistent failures remain visible on every retry. Preserve TLS-specific suppression and secret redaction. Relates to #1817
Emit registration and discovery warnings at the failure sites. Remove logging dispatch wrappers and the custom connection-log macro. Keep safe endpoint and error formatting separate from event emission. Preserve certificate ERROR diagnostics and their existing suppression. Log each failed retry at WARN and report closed streams directly. Relates to #1817
barrygreengus
force-pushed
the
codex/stargate-maintenance/registration
branch
from
September 16, 2026 05:17
1b86fc6 to
0c7eb21
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Persistent Kubernetes API errors were retried immediately. Pylon registration and discovery logged certificate failures but discarded other connection, authentication, configuration, and stream errors, obscuring recovery failures.
Examples
A missing token file now retains the operating system's not-found cause instead of logging only "failed to read". HTTP token-issuer failures retain their transport causes without printing credentials or sensitive query strings from the issuer URL. Redaction happens when logging, so callers retain the original error chain.
What changed
Customer Release Notes
Stargate discovery backs off during Kubernetes API failures. Pylon reports actionable registration failures on every failed attempt without exposing token-file contents.
Plan Summary
Not applicable.
Usage
Registration warnings include the failed operation, a sanitized endpoint, the cause, and the cluster ID when available. Certificate-specific ERROR diagnostics retain their existing categories, corrective guidance, and duplicate suppression. Retry warnings remain visible during persistent failures.
Testing
All 515 pylon-lib unit tests and both public API tests passed with Cargo in a fresh isolated worktree. Clippy passed for all pylon-lib targets with warnings denied. The retry regression runs the registration loop against a refused connection and verifies repeated warnings, the cause, cluster context, and endpoint redaction. Tests also cover token-file excerpts, sensitive HTTP URLs, gRPC metadata and binary details, and existing certificate diagnostics. Formatting, whitespace, and skill-fanout checks passed.
Full workspace and Bazel suites were not rerun for this internal logging change; no build declarations or dependencies changed. No live cluster was used.
Notes
Layer 3 of the Stargate maintenance stack. Repeated warnings are intentional and follow the existing retry cadence. Connection DEBUG events and new WARN events use a sanitized endpoint field; the existing certificate ERROR fields remain unchanged. No new metrics or configuration controls.
Issues
Relates to #1817
References
Kube watcher backoff
Related Pull Requests
Depends on #1820. Next layer: #1826.
Dependencies
No added or upgraded dependency versions. Enabled the existing Tokio test-util feature for deterministic watcher tests and refreshed Bazel metadata. No license or NOTICE changes.