mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 12:39:28 +00:00
pre-push(17.4): a file new in head is new, not comparison unknown
ChangeContext records the paths Git reports as added. An entailed, undischarged operation in an added file, with complete head evidence and no identical operation in any base answer, is classified new (file_added_in_head) instead of base_incomplete; admission accepts that reason as change evidence. Unpaired add/delete pushes and every other unknown comparison keep their vetoes. An engine finding whose novelty is established and whose only vetoes are capability vetoes is shown as an advisory engine finding, not an alert. Requirement 9.4. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
15999a09e1
commit
511de4b75f
@@ -249,6 +249,7 @@ class SnapshotAdapter:
|
||||
boundaries = ["declaration_paths_unavailable"] if declaration_paths is None else []
|
||||
changed: list[str] = []
|
||||
deleted: list[str] = []
|
||||
added: list[str] = []
|
||||
spans: list[ChangedSpan] = []
|
||||
renames: list[PathRename] = []
|
||||
mappings: list[LineCorrespondence] = []
|
||||
@@ -305,6 +306,9 @@ class SnapshotAdapter:
|
||||
if status == "D":
|
||||
assert path_base is not None
|
||||
deleted.append(path_base.hex())
|
||||
if status == "A":
|
||||
assert path_head is not None
|
||||
added.append(path_head.hex())
|
||||
if status == "R":
|
||||
assert path_base is not None and path_head is not None
|
||||
renames.append(PathRename(path_base.hex(), path_head.hex()))
|
||||
@@ -432,6 +436,7 @@ class SnapshotAdapter:
|
||||
tuple(boundaries),
|
||||
"filesystem-bytes-hex",
|
||||
tuple(mappings),
|
||||
tuple(added),
|
||||
)
|
||||
|
||||
@contextmanager
|
||||
|
||||
Reference in New Issue
Block a user