Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ symlinked skill directory and resolve its relative links from the real files, so
the contract and references stay reachable. Do not also keep copies of these
skills in a repository: both would load.

Before resuming automated PR check refreshes or explicit PR resyncs after an

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: Upgrade steps say to resume writes that were never paused

The upgrade paragraph begins "Before resuming automated PR check refreshes or explicit PR resyncs after an upgrade". Nothing earlier in the upgrade steps says to pause them. Only the rollback sentence says to pause writes. An operator could leave a mix of old and new writers running, and an old one would still remove the unverified warning. Smallest fix: open with "Pause automated PR check refreshes and explicit PR resyncs, advance every PR-body writer to …, then resume". This makes the upgrade order match the rollback order.

upgrade, advance every PR-body writer to the selected CLI revision. For
unverified receipt warnings, use a revision containing
[3ff80bd9 (#1160)](https://github.com/feder-positronics/loop-zero/commit/3ff80bd91c92f12d557cead31776df40d4328097).
Once the writers are updated, run `loopzero check` for the current head to
replace old receipts. If you roll back across that fix, pause those writes before
switching the CLI and resume them once the writers support the warning again.

If you roll back across [#732](https://github.com/feder-positronics/loop-zero/pull/732)
after GitHub may have accepted a Claude review, run `loopzero review --repost`
with the publishing CLI revision or a newer compatible revision. The rollback
Expand Down
19 changes: 14 additions & 5 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4744,19 +4744,28 @@ def test_generated_pr_body_limit(wt, gh, capsys, monkeypatch, create, extra):
assert json.loads(writes[0]["--input"])["body"] == prose + suffix


def test_pr_marks_legacy_same_head_check_unverified(wt, gh, capsys):
@pytest.mark.parametrize("refresh", ["resync", "automatic"])
def test_pr_marks_legacy_same_head_check_unverified(wt, gh, capsys, refresh):
head = head_of(wt)
live = "# PR\n\n## Validation\nManual validation evidence.\n"
config = cli._load_config(SimpleNamespace(command="check", config=None), wt, pin_checks=True)
live = ("# PR\n\n## Validation\nManual validation evidence.\n\n"
"<!-- loopzero:checks:start -->\n"
f"Recorded for `{head[:12]}`\n- `echo ok`: exit 0\n"
"<!-- loopzero:checks:end -->\n")
gh.respond_pr_list([pr_json(headRefOid=head, body=live)])
gh.respond(f"api repos/{REPO}/pulls/7 --method PATCH", {})
cli._save_report(wt, CheckReport(head, False, (CheckResult("echo ok", 0, 0.0, ""),)))
stages = tuple(CheckResult(command, 0, 0.0, "") for command in config.checks)
cli._save_report(wt, CheckReport(head, False, stages))
git(wt, "push", "-q", "-u", "origin", "lz/t1")

assert run(capsys, "pr")[0] == 0
if refresh == "resync":
assert run(capsys, "pr")[0] == 0
else:
cli._refresh_pr_checks(wt, config)
draft = json.loads(gh.calls[-1]["--input"])["body"]
assert "unverified" in draft and "run `loopzero check`" in draft
assert "Manual validation evidence." in draft

git(wt, "push", "-q", "-u", "origin", "lz/t1")
gh.respond_pr_list([pr_json(headRefOid=head, body=draft)])
assert run(capsys, "check")[0] == 0
draft = json.loads(gh.calls[-1]["--input"])["body"]
Expand Down
Loading