Release: gateway approval_id fallback (#6168) + update-check guard (#6180) + state-dir test isolation (#6305)#6332
Merged
Merged
Conversation
nesquena-hermes
enabled auto-merge (squash)
July 19, 2026 17:37
Contributor
|
| Filename | Overview |
|---|---|
| api/gateway_chat.py | Adds uuid import and a 3-line fallback that synthesizes a uuid4().hex approval_id when both approval_id and legacy id are absent from a gateway approval.request payload. Logic is correct; downstream respond path resolves by run_id independently so the synthetic id is harmless. |
| api/routes.py | Wraps check_for_updates() in a try/except that logs with logger.exception and returns a clean 500 via bad(). Adds info-level logging before and after the call. Success path is unchanged; the guard is purely defensive. |
| tests/test_issue4449_state_dir_contract.py | Pins HOME/USERPROFILE/LOCALAPPDATA to fixture-owned paths in every subprocess probe and clears additional redirect vars; adds a new mutation-guard test that verifies the probe cannot reconcile pytest defaults into the real user settings.json. Test-only change with solid isolation logic. |
| CHANGELOG.md | Prepends three release entries for #6168, #6180, and #6305 to the Fixed section; documentation-only change authored as part of the release process. |
Sequence Diagram
%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant GW as Gateway
participant WU as WebUI (gateway_chat.py)
participant UI as Browser UI
GW->>WU: approval.request event
Note over WU: Extract approval_id or legacy id
alt approval_id present
WU->>WU: use provided id verbatim
else both absent (new fallback)
WU->>WU: "approval_id = uuid4().hex"
end
WU->>UI: approval card (with non-empty approval_id)
UI->>WU: POST /api/gateway/approval/respond
Note over WU: Resolves by run_id (independent of approval_id)
WU->>GW: approval response routed
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant GW as Gateway
participant WU as WebUI (gateway_chat.py)
participant UI as Browser UI
GW->>WU: approval.request event
Note over WU: Extract approval_id or legacy id
alt approval_id present
WU->>WU: use provided id verbatim
else both absent (new fallback)
WU->>WU: "approval_id = uuid4().hex"
end
WU->>UI: approval card (with non-empty approval_id)
UI->>WU: POST /api/gateway/approval/respond
Note over WU: Resolves by run_id (independent of approval_id)
WU->>GW: approval response routed
Reviews (1): Last reviewed commit: "docs(changelog): stamp #6168 approval_id..." | 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.
Release batch (experimental channel) — 3 no-intervention fixes
Batched low-risk backend/test-only fixes. Full gate clean (see below). Tags
exp-v0.52.117.Included PRs
uuid4().hexapproval_idwhen a gatewayapproval.requestomits bothapproval_idand legacyid(#6008)api/gateway_chat.py(+3) — already gate-certified at this exact headcheck_for_updates()inPOST /api/updates/checkin try/except returning a clean 500 (does NOT claim to fix #6086)api/routes.py(+11/-1)HOME/USERPROFILE/LOCALAPPDATAto fixture paths so import-only STATE_DIR probes can't reconcile pytest defaults into real usersettings.jsontests/test_issue4449_state_dir_contract.py(test-only)Gate results
-p no:xdist): 13443 passed, 10 skipped, 0 failed.test_static_asset_resolverfailure appeared in one earlier run and was root-caused as an operator-timing artifact (git HEAD moved mid-run because the CHANGELOG commit landed while the suite was executing;WEBUI_VERSIONreload picked up the new sha). Disproved as a code regression by (a) clean-master detached full suite = 13442 passed / 0 failed, and (b) stage re-run with frozen HEAD = 13443 passed / 0 failed.VERDICT: SAFE TO SHIP— "No regression risk found. Core flows intact." (enumerated the full diff, ran focused probes on gateway approval routing, update-check success path, and probe env inheritance).static/*) change → browser-smoke gate not applicable.Attribution
Credit preserved via
--no-ffmerge commits + Co-authored-by. Thanks @webtecnica and @pxxD1998.