Repository navigation
Honor GitHub CLI config directory overrides - #1517
Conversation
Architecture-Review: unchanged; the existing subprocess allowlist passes two operator profile selectors while explicit and App token precedence and publisher gates stay the same. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 79c0af527318d5360955e7b1b070a4fc2cbb8737, 32.8s: approve (0 critical, 0 important, 1 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| argv: list[str], calls: str, scenario: str, cwd: str, token: str | None, | ||
| ) -> tuple[int, str, str]: | ||
| record = {"argv": argv, "token": token} | ||
| record = dict(argv=argv, token=token, config=[os.getenv(k) for k in ("GH_CONFIG_DIR", "XDG_CONFIG_HOME")]) |
There was a problem hiding this comment.
suggestion: In-process replay records the host's config variables, not the allowlisted ones
replay gets config by calling os.getenv in whatever process runs it. The subprocess fake (tests/test_github.py:50-55) runs as a child of run(..., env_allowlist=GH_ENV), so there the value reflects GH_ENV correctly, and that is the path test_app_identity_selection_and_cache checks. The in-process replay_gh fixture (tests/test_cli.py:160-172) is different: it works out GH_TOKEN from build_env(env_allowlist, extra_env) but calls replay inside the pytest process. Its recorded config therefore shows the test host's environment even when the allowlist would drop those variables. Nothing asserts on it today, but a later test that checks config under replay_gh would pass even if the allowlist were wrong. Smallest fix: pass the environment into replay the same way the token is passed, e.g. an env mapping (the build_env(...) result in-process, os.environ in the script), and read both selectors from that mapping instead of the global environment.
Architecture-Review: unchanged; GitHub CLI profile selection still uses the existing subprocess boundary and token precedence. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on d9b3234c73c7eb3dae6dc248308d60d87e36ccdd, 9.2s: approve (0 critical, 0 important, 0 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Honor GitHub CLI config directory overrides
Context and goal
Closes #1501
Acceptance
Base
Base: a68ef3b
Notes
The operator already controls these variables and the HOME passed to gh. Passing the two profile selectors to the GitHub CLI restores the intended fallback identity. Token selection remains unchanged, and the values are never emitted by production code. The existing architecture account still holds because token precedence, review publisher checks, and the subprocess allowlist remain intact.
Validation
(no
loopzero checkrun recorded)Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review