HEL-892: apply user exclusion to the 155-workflow delivery scope
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -25,7 +25,9 @@ def test_actual_review_partition_and_evidence_match_original_sources():
|
||||
assert report["full_documents_completed"] == report["real_executions"] == 0
|
||||
|
||||
|
||||
async def test_all_140_reviews_refresh_but_user_modified_row_is_preserved(tmp_path, monkeypatch):
|
||||
async def test_current_scope_reviews_refresh_but_user_modified_row_is_preserved(
|
||||
tmp_path, monkeypatch
|
||||
):
|
||||
current = json.loads(Path(source_reviews.__file__).with_suffix(".json").read_text())
|
||||
previous = copy.deepcopy(current)
|
||||
revised = {path for path, review in current.items() if review.get("semantic_review")}
|
||||
@@ -37,7 +39,10 @@ async def test_all_140_reviews_refresh_but_user_modified_row_is_preserved(tmp_pa
|
||||
await migrate_db(tmp_path / "catalogue.db")
|
||||
conn = get_db(tmp_path / "catalogue.db")
|
||||
try:
|
||||
assert import_library(conn, ROOT, source_commit="fixture")["counts"] == {"imported": 156}
|
||||
assert import_library(conn, ROOT, source_commit="fixture")["counts"] == {
|
||||
"imported": 155,
|
||||
"user_excluded": 1,
|
||||
}
|
||||
prior = {
|
||||
row["source_repo_path"]: dict(row)
|
||||
for row in conn.execute("SELECT * FROM workflows")
|
||||
@@ -56,9 +61,15 @@ async def test_all_140_reviews_refresh_but_user_modified_row_is_preserved(tmp_pa
|
||||
)
|
||||
monkeypatch.setattr(source_reviews, "_reviews", lambda: current)
|
||||
result = import_library(conn, ROOT, source_commit="fixture")
|
||||
assert result["counts"] == {"updated": 139, "skipped": 16, "conflict": 1}
|
||||
assert result["counts"] == {
|
||||
"updated": 138,
|
||||
"skipped": 16,
|
||||
"conflict": 1,
|
||||
"user_excluded": 1,
|
||||
}
|
||||
assert import_library(conn, ROOT, source_commit="fixture")["counts"] == {
|
||||
"skipped": 155,
|
||||
"skipped": 154,
|
||||
"user_excluded": 1,
|
||||
"conflict": 1,
|
||||
}
|
||||
for row in conn.execute("SELECT * FROM workflows"):
|
||||
|
||||
Reference in New Issue
Block a user