test: explicitly repin validation to reviewed channel source
This commit is contained in:
1 parent
fa5d0c22a9
commit
cd3a657f9d
10 files changed
+160
-22
No files matched your search
@@ -0,0 +1,15 @@
|
||||
"""Record runtime checkout identity separately from the reviewed source origin."""
|
||||
|
||||
import subprocess
|
||||
|
||||
|
||||
def checkout_provenance(repo):
|
||||
"""Require a Git checkout; never label changed-source runs as historical evidence."""
|
||||
revision = subprocess.check_output(
|
||||
["git", "-C", str(repo), "rev-parse", "HEAD"], text=True
|
||||
).strip()
|
||||
dirty = subprocess.check_output(
|
||||
["git", "-C", str(repo), "status", "--porcelain", "--untracked-files=normal"],
|
||||
text=True,
|
||||
)
|
||||
return dict(checkout_revision=revision, checkout_dirty=bool(dirty))
|
||||
Reference in new issue
Block a user