Skip to content

Document how to produce a readiness receipt when checks run remotely - #1291

Closed
eowca wants to merge 3 commits into
mainfrom
lean178/1280-remote-receipt-guidance
Closed

eowca wants to merge 3 commits into
mainfrom
lean178/1280-remote-receipt-guidance

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Document how to produce a readiness receipt when checks run remotely

Context and goal

  • Goal: Operators can produce a receipt that local ready accepts while delegating check execution.
  • Problem: A whole-job remote worker can pass its checks and deliver a receipt that ready rejects because the fingerprint is absent or incompatible.
  • Context: The worker produces the receipt. The local receiver preserves its fields. Ready validates the receipt against effective coordinator settings.

Closes #1280

Acceptance

  • Document the local coordinator, trusted stage runner, and local slot fallback including the exact miki command.
  • Explain when whole-job receipts can transfer, and link the existing owner queue conditions without treating required CI as a replacement receipt.
  • Exercise a legacy receipt, a current receipt with a different inherited PATH, and a matching receipt offline without changing the trust boundary.

Notes

The reported worker revision was unavailable. An older producer explains a missing field and current producers can still differ by effective PATH.

Offline probe with the actual 9f74958 producer and the host receiver preserved the missing field. Current producer receipts transferred by the same receiver were rejected with a different PATH and accepted with matching PATH. The portable CLI tests exercise these three cases without the host adapter.

Base

Base: fa78ebb

Validation

(no loopzero check run recorded)


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

Review

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 9a9d619750116b6fa4ee663d87292eda8e05050d, 28.4s: 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.

Comment thread tests/test_cli.py Outdated
def test_ready_checks_transferred_whole_job_receipt(wt, gh, capsys, head, tmp_path, monkeypatch, worker):
arm_approved_ready_pr(gh, head, wt, readiness={"local_exit": None}, isDraft=False)
with monkeypatch.context() as worker_env:
if worker != "matching":

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: Legacy case also changes PATH, so it tests two causes at once

For worker == "legacy", the test changes the worker's PATH (worker != "matching") and also deletes settings_sha256. The result is that this case can't separate "rejected because the fingerprint is missing" from "rejected because PATH differs". It still passes today because cli.py:356 rejects any receipt with settings_sha256 is None. Still, the case documents a different scenario than its name says, and a real older producer would have the same PATH as the receiver. Smallest fix: prepend to PATH only when worker == "different-path". Then the legacy case covers only the missing field and the different-path case covers only the PATH mismatch.

Comment thread tests/test_cli.py
assert run(capsys, *args, "check")[0] == 1


@pytest.mark.parametrize("worker", ["legacy", "different-path", "matching"])

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: Overlaps existing receipt-rejection tests

The legacy branch repeats the existing "legacy" condition at tests/test_cli.py:2947-2948, which also deletes settings_sha256 and asserts that ready rejects it. The different-path branch largely repeats test_ready_matches_effective_inherited_check_environment. The acceptance asks for these three cases to be exercised, so the overlap is defensible. If you want less duplication, fold the different-path and matching cases into the existing inherited-environment test and keep legacy only in the existing condition test. Also, the receipt.write_text(json.dumps(payload)) round-trip for the non-legacy cases only re-serializes the file. Its comment about "transport" is the only thing tying the test to the whole-job scenario.

Comment thread docs/ARCHITECTURE.md
For delegated checks, both the receipt and the stage key bind the runner's launch
path, resolved executable path and executable bytes. Unavailable runner identity
prevents receipt reuse.
A worker running the entire check is itself the coordinator and writes a

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: New paragraph has no blank line before it, so it merges into the delegated-runner paragraph

The added text starts right after "Unavailable runner identity prevents receipt reuse." with no blank line. Markdown therefore renders the whole-job note as part of the stage-runner receipt-binding paragraph, which mixes the two routes this change tries to separate. Add a blank line before "A worker running the entire check…".

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 delta review by claude on cb879abde5acf3dc6c8a716fb76621585db27376, 6.4s: 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.

…eceipt-guidance

# Conflicts:
#	tests/test_cli.py
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1382, which carries the remote receipt guidance and regression tests onto current main with fresh review and passing local checks.

@eowca eowca closed this Nov 26, 2026
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.

Document the readiness route for whole-job remote checks

1 participant