mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
feat(pre-push-safety-net): bind the reachability boundary to what it limits (M1b 10.5)
dynamic_external_or_depth_context_unresolved was applied as though it invalidated everything about a question. It does not. Bounded reachability can hide further flows; it cannot invalidate a flow that was traced, and it cannot remove a call from a structurally scoped enumeration. At scan level the boundary is now recorded against its owning question without demoting that question's answer. An unavailable context projection, an empty context scope and an unreadable method extent are unknown ownership and still demote. In comparison it no longer blocks the head's own claim, since the finding rests on a path that was actually traced, and no longer blocks an absence read off the enumerated inventory. It still blocks every claim that rests on a flow not having been traced, including the anchored source-connection branch, which now reports base_reachability_bounded rather than silently passing. The query declares the basis of its enumeration. A file- or nesting-scoped question walks calls structurally, so an unresolved destination cannot remove one from scope. Following the call graph makes the reachable set the scope, so the same unresolved destination can shrink what was enumerated; that inventory cannot establish absence while reachability is bounded, and says so. One prior control asserted a question's own reachability gap blocks its own claim. It is updated with its reason and split, so an own projection gap is still proven to block while an own reachability gap no longer does. 1,362 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:
co-authored by
Claude Opus 5
parent
c73efd2bde
commit
b202aabd8b
@@ -197,3 +197,37 @@ def test_any_other_inherited_transaction_gap_still_marks_questions_incomplete(tm
|
||||
)
|
||||
assert result.question_outcomes[0].status == "unresolved"
|
||||
assert result.question_outcomes[0].reason == "change_context_incomplete"
|
||||
|
||||
|
||||
def boundary(reason):
|
||||
return {"kind": "context_boundary", "reason": reason}
|
||||
|
||||
|
||||
def test_bounded_reachability_is_recorded_without_demoting_an_answered_question(tmp_path):
|
||||
"""M1b 10.5: the boundary limits which further flows could be seen, not this answer."""
|
||||
(tmp_path / "source.php").write_text("readable\n")
|
||||
bounded = boundary("dynamic_external_or_depth_context_unresolved:contributor-scan")
|
||||
rows = vector() + [row("source.php"), {"kind": "context_summary"}, bounded]
|
||||
result = scan_repository(
|
||||
tmp_path,
|
||||
[region("source.php", "php")],
|
||||
backend=Backend({"source.php": rows}),
|
||||
change_context=context(),
|
||||
)
|
||||
assert result.question_outcomes[0].status == "completed"
|
||||
# Still reported, bound to the question that owns it, so comparison can consult it.
|
||||
owned = [g for g in result.scope.unresolved_boundaries if g.startswith("dynamic_external_or_depth_context_unresolved")]
|
||||
assert owned and owned[0].endswith(result.question_outcomes[0].identity.question_id)
|
||||
|
||||
|
||||
def test_an_unresolved_context_projection_still_demotes_the_question(tmp_path):
|
||||
(tmp_path / "source.php").write_text("readable\n")
|
||||
rows = vector() + [row("source.php"), {"kind": "context_summary"}, boundary("context_location_unavailable")]
|
||||
result = scan_repository(
|
||||
tmp_path,
|
||||
[region("source.php", "php")],
|
||||
backend=Backend({"source.php": rows}),
|
||||
change_context=context(),
|
||||
)
|
||||
assert result.question_outcomes[0].status == "unresolved"
|
||||
assert result.question_outcomes[0].reason == "change_context_incomplete"
|
||||
|
||||
Reference in New Issue
Block a user