Repository navigation
Release exp: fail-closed gateway-restart recovery for agent updates (#6054) - #6057
Merged
Merged
Conversation
Contributor
|
| Filename | Overview |
|---|---|
| api/agent_health.py | Adds strict, profile-specific gateway PID lookup without falling back to ambient state. |
| api/gateway_restart.py | Adds validated profile targeting and profile-aware gateway restart commands. |
| api/updates.py | Adds one restart retry and PID-based confirmation of transient recovery. |
| tests/test_health_restart.py | Covers explicit profiles, root aliases, isolated defaults, and malformed profile input. |
| tests/test_issue716_agent_heartbeat.py | Covers profile-specific PID paths and unavailable gateway status handling. |
| tests/test_update_banner_fixes.py | Covers retry outcomes, strict helper signatures, PID confirmation, and profile isolation. |
Reviews (1): Last reviewed commit: "Release exp: fail-closed gateway-restart..." | Re-trigger Greptile
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.
Ships #6054 (closes #6045), @franksong2702 — backend reliability on the agent-update path.
An agent update's launchd/gateway restart can briefly exit non-zero during process replacement; that was reported as a whole-update failure. The updater now confirms the outcome by the actual gateway PID for the exact profile being updated (one retry), so a transient handoff reads as success — while every uncertain shape fails closed (never masks a real failure): real restart failure, unknown/ambient PID, wrong-profile confirmation, or a status helper whose signature can't confirm the specific PID.
Codex authoritative gate SAFE after a thorough 6-round hardening: restart + PID-read profile-pinned (root aliases normalized), malformed profiles rejected pre-launch, isolated
profiles/defaulttargeted correctly, capability check usesinspect.signature(follow_wrapped=False)so@functools.wraps/**kwargs/*args/builtin/partial wrappers all fail closed, positional-only PID paths bound at declared index (no ambient positional retry). Verified: a real failed restart can no longer be masked as success via any callable shape or fallback; transient recovery, default-vs-sticky isolation, and normal updates all intact. 43 focused tests. Thanks @franksong2702 for the careful iteration.