guards: skip a commit the sync hasn't fetched yet, quietly (race, not error)
The bridge reads PR/default heads from GitHub after the sync's fetch; a push in between isn't in the clone until the next cycle. Both guards logged a CalledProcessError for it (windy-pro main 40 s after the fetch). Now None = nothing posted this cycle; the next one scans it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -182,3 +182,12 @@ def test_code_with_a_trailing_comment_still_counts():
|
||||
def test_windy_pro_desktop_is_byok_but_the_account_server_is_not():
|
||||
assert cg.allowed("windy-pro", "src/client/desktop/main.js", ALLOW)
|
||||
assert not cg.allowed("windy-pro", "account-server/src/routes/translations.ts", ALLOW)
|
||||
|
||||
|
||||
def test_a_commit_not_fetched_yet_is_skipped_not_an_error(tmp_path, monkeypatch):
|
||||
bare, sha = _repo(tmp_path, {"app/llm.py": "import anthropic\n"})
|
||||
monkeypatch.setattr(cg, "WORK", tmp_path)
|
||||
monkeypatch.setattr(cg, "CACHE", tmp_path / "cache.json")
|
||||
(tmp_path / "windy-chat.git").symlink_to(bare)
|
||||
assert cg.check("windy-chat", "f" * 40, "main", True) is None # pushed after the fetch
|
||||
assert [f.kind for f in cg.check("windy-chat", sha, "main", True)] == ["provider SDK"]
|
||||
|
||||
Reference in New Issue
Block a user