|
8 | 8 | pytestmark = pytest.mark.integration |
9 | 9 |
|
10 | 10 |
|
11 | | -def test_execute_run_closed_issue_comment_cleanup_persists_removed_review_entry(monkeypatch): |
| 11 | +def test_execute_run_closed_issue_comment_safe_noop_keeps_lifecycle_cleanup_owner(monkeypatch): |
12 | 12 | harness = AppHarness(monkeypatch) |
13 | 13 | harness.set_event( |
14 | 14 | EVENT_NAME="issue_comment", |
@@ -52,9 +52,9 @@ def fake_load_state(*, fail_on_unavailable=False): |
52 | 52 | result = harness.run_execute() |
53 | 53 |
|
54 | 54 | assert result.exit_code == 0 |
55 | | - assert save_calls == [False] |
| 55 | + assert save_calls == [] |
56 | 56 | assert len(sync_calls) == 1 |
57 | | - assert sync_calls[0][0] is reloaded_state |
| 57 | + assert sync_calls[0][0] is initial_state |
58 | 58 | assert sync_calls[0][1] == [42] |
59 | 59 |
|
60 | 60 | def test_execute_run_closed_issue_comment_without_entry_skips_save(monkeypatch): |
@@ -94,7 +94,7 @@ def test_execute_run_closed_issue_comment_without_entry_skips_save(monkeypatch): |
94 | 94 | assert sync_calls == [[42]] |
95 | 95 |
|
96 | 96 |
|
97 | | -def test_execute_run_late_workflow_run_reconcile_does_not_recreate_removed_review_entry(monkeypatch): |
| 97 | +def test_execute_run_late_workflow_run_reconcile_missing_row_safe_noop(monkeypatch): |
98 | 98 | harness = AppHarness(monkeypatch) |
99 | 99 | harness.set_workflow_run_name("Reviewer Bot PR Comment Router") |
100 | 100 | harness.set_event( |
@@ -135,7 +135,7 @@ def test_execute_run_late_workflow_run_reconcile_does_not_recreate_removed_revie |
135 | 135 |
|
136 | 136 | result = harness.run_execute() |
137 | 137 |
|
138 | | - assert result.exit_code == 1 |
| 138 | + assert result.exit_code == 0 |
139 | 139 | assert state["active_reviews"] == {} |
140 | 140 | assert save_called["value"] is False |
141 | 141 | assert sync_calls == [] |
0 commit comments