Repository navigation
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>
There was a problem hiding this comment.
loopzero primary review by claude on 5a35ab212b1c105e6f5d2525f49cae6edb321d27, 25.0s: approve (0 critical, 0 important, 2 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 for hosts without a suspend-aware clock
When _app_token_clock() returns None (no time.CLOCK_BOOTTIME, or clock_gettime raises OSError), app_token() now returns the minted token without caching it. Every later call then runs the helper again. That includes _refresh_publisher_token (cli.py:862), which will always see a different token and call login again. This matches the task notes, but no test pins it down. A later change could start caching (token, None) or comparing against None without any test failing. Smallest fix: add a test that deletes CLOCK_BOOTTIME with monkeypatch.delattr(github.time, 'CLOCK_BOOTTIME', raising=False), then checks that two calls run the helper twice and that _app_token_cache stays empty.
| fake.assert_complete() | ||
|
|
||
|
|
||
| def test_app_token_expires_after_wall_clock_rollback(tmp_path, monkeypatch): |
There was a problem hiding this comment.
suggestion: Rollback regression test is in the gh contract suite instead of next to the other app-token tests
test_gh_contract.py holds strict-fake contract tests. The other app-token cache tests are in tests/test_github.py (test_app_identity_selection_and_cache, test_app_token_age_counts_suspend_during_mint_and_retry). The new test also drops the type hints the neighbouring tests use (tmp_path: Path, monkeypatch: pytest.MonkeyPatch). It also sets CLOCK_BOOTTIME and clock_gettime directly, while the edited tests patch _app_token_clock. Keeping it in the contract file is reasonable, because it exercises the real _app_token_clock lookup. Moving it next to its siblings would make it easier to find and keep the files consistent.
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on e0558633dcae7ac61da5323913a01dcf1d32cc47, 9.0s: 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.
|
OD (auth, reserved class): cleared at head e055863. Read the diff ( |
|
@Mergifyio queue |
❌ Left the queue ·
|
|
No description provided. |
|
Superseded by #1373. The replacement carries the cleared token-cache change and the same rollback replay within the current test-size budget. |
Age GitHub App tokens with suspend-aware elapsed time
Context and goal
Closes #1157
Acceptance
Notes
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.
Base
main @ a4fa169
Validation
Recorded for
db8afa5a17ceuv 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