Spaces:
Runtime error
Runtime error
chore: diagnostics (scripts/bootstrap_assets.py)
Browse files
scripts/bootstrap_assets.py
CHANGED
|
@@ -66,6 +66,13 @@ def _invalid_assets() -> list[str]:
|
|
| 66 |
|
| 67 |
|
| 68 |
def main() -> None:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
bad = _invalid_assets()
|
| 70 |
if not bad:
|
| 71 |
print("[bootstrap] all required assets valid; nothing to do", flush=True)
|
|
|
|
| 66 |
|
| 67 |
|
| 68 |
def main() -> None:
|
| 69 |
+
# Code fingerprints: lets the logs prove which build is actually running.
|
| 70 |
+
import hashlib
|
| 71 |
+
|
| 72 |
+
for code_file in ("app/ml/imaging/real.py", "scripts/seed.py"):
|
| 73 |
+
digest = hashlib.sha256(Path(code_file).read_bytes()).hexdigest()[:12]
|
| 74 |
+
print(f"[bootstrap] code {code_file} sha={digest}", flush=True)
|
| 75 |
+
|
| 76 |
bad = _invalid_assets()
|
| 77 |
if not bad:
|
| 78 |
print("[bootstrap] all required assets valid; nothing to do", flush=True)
|