Repository navigation
Age GitHub App tokens with suspend-aware elapsed time - #1373
Conversation
Architecture-Review: unchanged; GitHub identities and credential sources stay the same while cache expiry uses elapsed boot time. Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 279dbbd8f69e1f1130c15e683af984375271fa4f, 24.7s: 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.
| return "" | ||
| _app_token_cache = (result.stdout.strip(), minted) | ||
| token = result.stdout.strip() | ||
| if minted is None: |
There was a problem hiding this comment.
suggestion: No test covers the path where the host has no suspend-aware clock
The task says hosts without a suspend-aware clock skip cache reuse. In the code, _app_token_clock() returns None when CLOCK_BOOTTIME is missing or clock_gettime raises OSError. app_token() then returns the token for that call only, and _cached_app_token() never reports a cache hit. None of the changed tests exercise this. Each one either patches _app_token_clock to return a number or sets CLOCK_BOOTTIME. If someone later changes the None handling (for example, back to caching with a wall-clock fallback), no test would fail. Suggested fix: add a short test that runs monkeypatch.delattr(github.time, "CLOCK_BOOTTIME", raising=False) and checks that two app_token() calls run the helper twice and leave _app_token_cache empty. A second case could patch clock_gettime to raise OSError and check the same thing.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Age GitHub App tokens with suspend-aware elapsed time
Context and goal
Closes #1157
Acceptance
Notes
Supersedes Age GitHub App tokens with suspend-aware elapsed time #1209. Carries the approved production diff, merges main and folds the same fake-clock rollback into the existing cache test. Owner Decisions cleared this expiry behavior on Age GitHub App tokens with suspend-aware elapsed time #1209.
The cache stores installation credentials and may outlive clock adjustments. Keep the existing identity selection, expiry margin and helper behavior. Hosts without a suspend-aware clock skip cache reuse.
The rollback replay reused token 1 on the pre-fix code and minted token 2 after the fix. Existing cache-hit and suspend replays also passed.
Base
main @ a4fa169
Validation
Recorded for
279dbbd8f69euv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review