From f78bb0e2c1cb4f7ae5bdd5a97204d6527d04174e Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 24 Jul 2026 20:56:51 -0700 Subject: [PATCH 1/2] Word the behind finding for deletions too The behind bucket also holds a path main deleted that develop still carries, where "develop lacks " misreads - develop has that path, main removed it. Say "develop is behind on" instead, which is accurate whether main's change was an addition, a modification, or a deletion. Co-Authored-By: Claude Opus 4.8 --- spec/audit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/audit.py b/spec/audit.py index 190c174d..cf4222a5 100644 --- a/spec/audit.py +++ b/spec/audit.py @@ -529,7 +529,7 @@ def audit_repo(entry, spec): behind, diverged = classify_branch_drift(objs["base"], objs["main"], objs["develop"]) if behind: shown = ", ".join(behind[:8]) + (" ..." if len(behind) > 8 else "") - findings.append(("DRIFT", f"branch: {len(behind)} main-side path change(s) develop lacks (forward-sync needed): {shown}")) + findings.append(("DRIFT", f"branch: {len(behind)} main-side change(s) develop is behind on (forward-sync needed): {shown}")) if diverged: shown = ", ".join(diverged[:8]) + (" ..." if len(diverged) > 8 else "") findings.append(("DRIFT", f"branch: {len(diverged)} path(s) changed on both main and develop since the merge-base - reconcile before promoting (develop may already supersede main): {shown}")) From d9c44d616705427a7460b61c8af69950e451fa4a Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 24 Jul 2026 20:59:50 -0700 Subject: [PATCH 2/2] Restore "path" and align the fallback wording Keep "path change(s)" in the precise message (the payload is a list of paths), and reword the truncated-tree fallback from "develop lacks" to "develop is behind on" too, so both branch findings read consistently and neither misreads a main-side deletion. Co-Authored-By: Claude Opus 4.8 --- spec/audit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/audit.py b/spec/audit.py index cf4222a5..2525d71c 100644 --- a/spec/audit.py +++ b/spec/audit.py @@ -520,7 +520,7 @@ def audit_repo(entry, spec): "main": gh(f"repos/{slug}/git/trees/{branch_main['commit']['commit']['tree']['sha']}?recursive=1"), } if not all(isinstance(t, dict) for t in trees.values()) or any(t.get("truncated") for t in trees.values()): - findings.append(("DRIFT", f"branch: {len(cmp['files'])}+ main-side path change(s) develop lacks (forward-sync needed; tree unavailable or too large to filter cherry-pick noise)")) + findings.append(("DRIFT", f"branch: {len(cmp['files'])}+ main-side path change(s) develop is behind on (forward-sync needed; tree unavailable or too large to filter cherry-pick noise)")) else: objs = {name: {e["path"]: e["sha"] for e in t["tree"] if e["type"] in ("blob", "commit")} for name, t in trees.items()} # Split main-side drift by direction, never flagging every difference as a develop deficit. @@ -529,7 +529,7 @@ def audit_repo(entry, spec): behind, diverged = classify_branch_drift(objs["base"], objs["main"], objs["develop"]) if behind: shown = ", ".join(behind[:8]) + (" ..." if len(behind) > 8 else "") - findings.append(("DRIFT", f"branch: {len(behind)} main-side change(s) develop is behind on (forward-sync needed): {shown}")) + findings.append(("DRIFT", f"branch: {len(behind)} main-side path change(s) develop is behind on (forward-sync needed): {shown}")) if diverged: shown = ", ".join(diverged[:8]) + (" ..." if len(diverged) > 8 else "") findings.append(("DRIFT", f"branch: {len(diverged)} path(s) changed on both main and develop since the merge-base - reconcile before promoting (develop may already supersede main): {shown}"))