fix(pre-push-safety-net): apply the exclusion distinction inside comparison too

The NodeGoat rerun after 10.4-10.6 showed both target questions completing, which
is what those tasks were for, but the comparison still reported
head_context_incomplete. Two checks inside comparison had not been updated with
the same distinction: any degradation blocked, and any scope boundary blocked.

A declared exclusion and a correspondence ambiguity both reached those checks. The
first is a scope choice rather than a failure to read the graph, and the second is
decided per operation since 10.3, so neither should block a claim. Both remain in
aggregate coverage. Integrity degradations, unknown ownership and every other
boundary still block, and bounded reachability is still filtered separately
because it blocks only claims resting on a flow not having been traced.

1,368 tests passed, nine skipped. Rollout stays NO-GO.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
Marius Ciepluch
2026-09-16 17:51:49 +02:00
co-authored by Claude Opus 5
parent c1cc332bc1
commit bc68000e93
3 changed files with 50 additions and 6 deletions
+24
View File
@@ -525,3 +525,27 @@ def test_a_non_reachability_base_gap_still_blocks_an_enumerated_absence():
def test_a_present_operation_still_refuses_novelty_under_bounded_reachability():
candidate = delta(scan(), bounded_base("exec(cmd)"), changed_line_context())
assert candidate.reason == "operation_present_in_base_without_traced_flow"
def degraded(result, *reasons):
return replace(result, degradations=tuple({"stage": "cpg", "reason": r} for r in reasons))
def test_a_declared_exclusion_does_not_block_a_comparison_on_either_side():
"""M1b 10.6 in comparison: the exclusion is a scope choice, not a failed read."""
head = degraded(scan(), "vendor_semantics_unresolved")
base = degraded(scan(rows=inventory_rows(), findings=False), "vendor_semantics_unresolved")
assert delta(head, base, changed_line_context()).novelty == "new"
def test_an_integrity_degradation_still_blocks_a_comparison():
head = degraded(scan(), "vendor_semantics_unresolved", "cpg_empty")
base = scan(rows=inventory_rows(), findings=False)
assert delta(head, base, changed_line_context()).reason == "head_context_incomplete"
assert delta(scan(), degraded(base, "cpg_empty"), changed_line_context()).novelty == "unknown"
def test_a_declared_exclusion_boundary_does_not_block_either():
base = scan(rows=inventory_rows(), findings=False)
base = replace(base, scope=replace(base.scope, unresolved_boundaries=("vendor_semantics_unresolved",)))
assert delta(scan(), base, changed_line_context()).novelty == "new"