Repository navigation
Conversation
Architecture-Review: unchanged; freshness still governs waiting while the existing checks and eligible review govern readiness. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; the conflict resolution combines imports for review reservation and timestamp parsing. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 3ca6df47b2adfacf0cc7969f380aeacbab10c195, 42.5s: approve (0 critical, 0 important, 3 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.
| def api_get(endpoint: str) -> object: | ||
| def api_get(endpoint: str, *, response_headers: dict[str, str] | None = None) -> object: | ||
| """`gh api <endpoint>` parsed as JSON (None on an empty body).""" | ||
| if response_headers is not None: |
There was a problem hiding this comment.
suggestion: api_get duplicates the _gh_json call just to avoid passing response_headers=None
api_get has two branches that differ only in whether response_headers is forwarded. _gh already ignores None through _capture_headers. The branch seems to exist only so test doubles of _gh_json that don't accept keyword arguments (e.g. tests/test_cli.py:3681) keep working. That ties production code to test mocks. Smallest fix: always call _gh_json("api", endpoint, response_headers=response_headers) and update the mock's signature to accept **kwargs.
|
|
||
|
|
||
| def _rest_rows(endpoint: str, what: str) -> list[dict]: | ||
| def _rest_rows(endpoint: str, what: str, **kwargs) -> list[dict]: |
There was a problem hiding this comment.
**suggestion: Untyped kwargs on _rest_rows, _pr_reviews and _gh_json hides the only option they forward
_rest_rows, _pr_reviews (cli.py:234) and _gh_json (github.py:442) now take **kwargs just to pass response_headers through. This drops type checking, so a typo such as response_header= reaches _gh and only fails at runtime there. Smallest fix: declare an explicit keyword-only parameter response_headers: dict[str, str] | None = None on each of these functions.
| headers: dict[str, str] = {} | ||
| if reviews is None: | ||
| reviews = _pr_reviews(config.repo, pr.number) | ||
| reviews = _pr_reviews(config.repo, pr.number, response_headers=headers if workflow_wait else None) |
There was a problem hiding this comment.
suggestion: Server Date comes from the last reviews page, and only on the wait path
Headers are captured only when workflow_wait is true, and each page overwrites the previous one, so the Date used is from the last page fetched. That is the right instant for computing age. However, review_grace on the non-wait path (ready without --wait, and cli.py:1681 where reviews are passed in) still uses local time.time(). A host clock that is behind can still make review_age negative there and withhold review_grace. If this is intended (the task scopes server time to the wait decision), a short comment at _readiness would make it explicit. Otherwise, always capture headers when reviews is None.
Architecture-Review: unchanged; the same response headers are captured during waits. Co-Authored-By: Codex <noreply@openai.com>
f863f84 to
159b375
Compare
There was a problem hiding this comment.
loopzero delta review by claude on 159b375905b48dcac5bdc4c632c63ee6191d45ef, 9.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.
| wt: Path, config: Config, pr: github.PR, head: str, reviews: list[dict] | None = None, | ||
| *, workflow_wait: bool = False, announce_receipt: bool = False, | ||
| ) -> github.Readiness: | ||
| if reviews is None: |
There was a problem hiding this comment.
suggestion: Refactor duplicates the headers initialisation without changing behaviour
Behaviour is the same before and after this change. In both versions headers starts as an empty dict and is filled only when _pr_reviews runs with workflow_wait. When the caller passes reviews, _review_age(review_at, headers) still receives an empty dict, so it falls back to local time as before. The only change is that headers = {} is now written in two branches, one in the if and one in the new else. That adds a line and an extra branch without making anything clearer. Smallest fix: go back to a single headers: dict[str, str] = {} before the if, or drop the commit. If the aim is to show that caller-supplied reviews have no server Date, a short comment would say that without the extra branch.
|
Superseded by #1265, which carries the approved changes and the resolution of the conflicts with main. |
Compare readiness using GitHub timestamps
Context and goal
Closes #1158
Closes #1159
Acceptance
Notes
GitHub server time affects the wait decision only. The existing review criteria, check requirements, grace durations and monotonic wait budget remain in place.
Base
main @ 5137bf0
Validation
Recorded for
3a241dc2c18e(not current head)uv 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