Repository navigation
Conversation
Architecture-Review: unchanged; remains fail-closed while trusted evidence is unavailable, with the same status context and publisher. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; remains fail-closed while trusted evidence is unavailable, with the same status context and publisher. Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
…recover-eligibility-dispatch
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; evidence and publication failures remain distinguishable within the existing hosted trust boundary. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; transient fetch diagnostics remain inside the existing isolated checkout. Co-Authored-By: Codex <noreply@openai.com>
…e-observation-retry # Conflicts: # src/loopzero/github.py # src/loopzero/hosted.py # tests/test_hosted.py
Architecture-Review: unchanged; only run display metadata and GitHub read-back change, with the same authenticated trigger, inputs and enforcement. Co-Authored-By: Codex <noreply@openai.com>
…recover-eligibility-dispatch
Architecture-Review: unchanged; hosted eligibility still requires verified Git objects before accepting inherited evidence. Co-Authored-By: Codex <noreply@openai.com>
…e-observation-retry
…recover-eligibility-dispatch
Architecture-Review: unchanged; remains fail-closed while trusted evidence is unavailable, with the same status context and publisher. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; evidence and publication failures remain distinguishable within the existing hosted trust boundary. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; transient fetch diagnostics remain inside the existing isolated checkout. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; hosted eligibility still requires verified Git objects before accepting inherited evidence. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; the evidence outcome changes while the existing retry and wait behavior remains in force until #1502. Co-Authored-By: Codex <noreply@openai.com>
…safe-observation-retry # Conflicts: # src/loopzero/github.py # src/loopzero/hosted.py # tests/test_hosted.py
…recover-eligibility-dispatch
…ervation-retry # Conflicts: # src/loopzero/github.py # tests/test_hosted.py
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; scoped deadlines are still applied only to reads, and non-idempotent writes keep their original outcomes. Co-Authored-By: Codex <noreply@openai.com>
…recover-eligibility-dispatch # Conflicts: # src/loopzero/cli.py
…eligibility-dispatch
There was a problem hiding this comment.
loopzero primary review by claude on 97aafaa115bca5685593f1f08bc11133613659dd, 54.0s: 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 refresh_eligibility(repo: str, pr: PR, branch: str, base: str, publishers: tuple[str, ...]) -> None: | ||
| args = eligibility_dispatch_args(repo, pr.number, base) | ||
| since = datetime.fromtimestamp(time.time(), UTC).isoformat(timespec="seconds") |
There was a problem hiding this comment.
suggestion: An empty run list after one 5 s wait still allows a duplicate dispatch
since comes from the local clock, and _eligibility_dispatched returns False whenever the filtered list is empty. That can be wrong in two cases: (a) the local clock runs ahead of GitHub's, so a run that was accepted has created_at < since and is filtered out; (b) GitHub creates the run asynchronously after the dispatch is accepted, and it can take longer than RETRY_DELAY during the same incident that caused the 5xx or timeout. Either way the code dispatches a second time. The run uses a non-cancelling concurrency group, so the duplicate is mostly harmless. Still, the acceptance asks that observations which cannot rule out an accepted refresh do not authorize another one. Smallest fix: move since back by a small skew margin (e.g. 30–60 s). Any extra runs this picks up are refreshes of the same PR, which count as success anyway. Also state in a comment that an empty list is treated as best-effort evidence.
| try: | ||
| _gh(*args) | ||
| except (GhUnavailable, ProcTimeout) as exc: | ||
| if isinstance(exc, GhUnavailable) and not _transient_error(exc.tail, False): |
There was a problem hiding this comment.
suggestion: Second transient check repeats _gh classification
_gh raises GhUnavailable only for a transient failure or a rate limit. Running _transient_error(exc.tail, False) again re-parses the tail text to tell those apart, and it ignores the HTTP status that _gh used. If a 5xx response has stderr without an HTTP 5xx line, it gets misclassified as non-transient. This also means two copies of the classification can drift apart. Prefer one signal: for example, have _gh raise a distinct rate-limit subclass, or check for rate limiting here directly, rather than re-deriving transience from the text.
| gh.respond("api -X", {"stdout": "", "exit": 1, "stderr": "HTTP 503" if transient else "HTTP 403"} if transient or outcome == "denied" else "", "") | ||
| monkeypatch.setattr(github, "_retry_sleep", backoffs.append) | ||
| runs = [] if outcome == "retry" else [{"display_title": "Refresh eligibility for PR #7" if outcome == "applied" else "unknown"}] | ||
| monkeypatch.setattr(github.time, "time", lambda: 1795640554) |
There was a problem hiding this comment.
suggestion: Test patches the global time.time
monkeypatch.setattr(github.time, "time", ...) replaces time.time on the shared time module, not just in github. Every caller during the test sees the frozen value, including app-token aging, _rate_limit_delay and _graphql_reset. monkeypatch restores it afterwards, but this can hide clock-dependent behaviour inside the test. Freezing a module-level clock seam in github (like _retry_sleep) would keep the effect scoped.
Context and goal
After resolving a finding, look for a matching Actions run before retrying an ambiguous eligibility dispatch. Check the PR branch, head, and remaining findings before retrying.
Closes #1509. This draft depends on #1560.
Validation
Recorded for
97aafaa115bcuv 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 0Focused resolve replays passed. Live workflow-run visibility remains unverified. Source +32 lines, tests +0.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review