Skip to content

Confirm ambiguous hosted eligibility publications - #1335

Merged
mergify[bot] merged 4 commits into
mainfrom
lean178/1324-eligibility-publication
Nov 26, 2026
Merged

mergify[bot] merged 4 commits into
mainfrom
lean178/1324-eligibility-publication

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confirm ambiguous hosted eligibility publications

Context and goal

A hosted eligibility refresh could overwrite a verdict GitHub accepted when the reply to the write was lost. Verify the latest status for that SHA and context before returning the evaluated result.

Closes #1324

Acceptance

  • A lost reply after an accepted success or failure preserves the verdict and returns its normal exit code.
  • Missing, mismatched or unreadable evidence reports a publication error. Evaluation errors still publish the existing refresh failure.

Notes

  • The hosted publisher fake reproduced the failure after accepting the final POST. The read-back verifies the Actions publisher, state and exact published description on the latest status for the context.

Base

Base: b69efec


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, 77f82b4, approve

eowca and others added 2 commits November 26, 2026 02:44
Architecture-Review: unchanged; hosted eligibility still publishes the same SHA-scoped status with the trusted Actions credential.
Co-Authored-By: Codex <noreply@openai.com>
@eowca
eowca marked this pull request as draft November 26, 2026 01:44
Co-Authored-By: Codex <noreply@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero primary review by claude on 77f82b45853f482c8269b5cc71bb9301abac8c9a, 39.1s: 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)

Findings without a file location:

  • suggestion: Two status-publication paths for the same context — The publish closure (which does the message[:140] truncation and is used for the pending and refresh-failed writes) and _publish_verdict (which truncates at the call site) each wrap github.commit_status for eligibility.CONTEXT. If the description limit or the context changes later, one path could be updated without the other. Consider having the closure call _publish_verdict, or a shared helper with a confirm flag, so truncation and context stay in one place.

Native Claude output is retained in the restricted local review receipt.

Comment thread src/loopzero/hosted.py
except Exception as exc:
_mark_refresh_failed(publish, exc)
raise
_publish_verdict(cfg.repo, head, state, message[:140])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: A failed verdict write that is definitely not accepted now leaves the stale 'Refreshing…' pending status

Before this change, any failed final write (e.g. HTTP 422 invalid description, 403, 5xx) went through _mark_refresh_failed, so the context ended as failure: Eligibility refresh failed. Now _publish_verdict runs outside the try block. When the read-back shows the verdict is not the latest status, it raises LoopZeroError without writing anything. The commit is left at pending: Refreshing live source review evidence (the updated publication test now expects ["pending", "pending"]). This is fail-closed, so it is not unsafe. However, the status claims a refresh is still running when the job has already failed. A read-back that proves the latest status is not our verdict is a safe point to write the refresh-failed marker, because there is no accepted verdict to overwrite. Smallest fix: have status_matches tell 'confirmed absent' apart from 'unreadable', and on 'confirmed absent' call _mark_refresh_failed before raising. Alternatively, record in the task or a comment that a stale pending is the intended outcome.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Owner queue route: the full sandboxed check passed on d2b4d718 after a clean merge from main, and both required hosted checks are green. The slot receipt is missing the settings fingerprint, so the local receipt guard rejects it. Mergify will verify the integration candidate.

@eowca
eowca marked this pull request as ready for review November 26, 2026 02:33
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as 629126d at 02:44 UTC

11 min in the queue, 5 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 02:33 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1413
  • ✅ Merged 02:44 · 629126d · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued label Nov 26, 2026
@mergify
mergify Bot merged commit 629126d into main Nov 26, 2026
9 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1324-eligibility-publication branch November 26, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep an accepted eligibility verdict when its POST response is lost

1 participant