Repository navigation
Document how to produce a readiness receipt when checks run remotely #1291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2991,6 +2991,28 @@ def change_policy(_seconds): | |
| assert run(capsys, *args, "check")[0] == 1 | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("worker", ["legacy", "different-path", "matching"]) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Overlaps existing receipt-rejection tests The legacy branch repeats the existing |
||
| 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 == "different-path": | ||
| worker_env.setenv("PATH", str(tmp_path / "worker-bin"), prepend=":") | ||
| assert run(capsys, "check")[0] == 0 | ||
|
|
||
| receipt = wt / ".loopzero/checks.json" | ||
| payload = json.loads(receipt.read_bytes()) | ||
| if worker == "legacy": | ||
| # Older producers serialize these results without a settings fingerprint. | ||
| del payload["settings_sha256"] | ||
| # Whole-job transport preserves the producer's fields. | ||
| receipt.write_text(json.dumps(payload)) | ||
| assert run(capsys, "ready")[0] == (0 if worker == "matching" else 1) | ||
|
|
||
| if worker != "matching": | ||
| assert run(capsys, "check")[0] == 0 | ||
| assert run(capsys, "ready")[0] == 0 | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("base_sensitive", [False, True]) | ||
| def test_wait_snapshot_handles_trusted_base_advance(wt, repo, base_sensitive): | ||
| if base_sensitive: | ||
|
|
||
There was a problem hiding this comment.
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…".