Spaces:
Runtime error
Runtime error
Sync from GitHub: 05e8f513633908270b3ebf2a2849a364e4b9a955
Browse files
app.py
CHANGED
|
@@ -203,9 +203,21 @@ def _bootstrap_pinned_clean_slate():
|
|
| 203 |
resulting empty-state files directly to `pinned/clean-slate/`. The main
|
| 204 |
`organism` (already initialized above from live root state) is untouched.
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
"""
|
| 210 |
import tempfile
|
| 211 |
import shutil
|
|
|
|
| 203 |
resulting empty-state files directly to `pinned/clean-slate/`. The main
|
| 204 |
`organism` (already initialized above from live root state) is untouched.
|
| 205 |
|
| 206 |
+
Why only 2 of 4 files end up in pinned/clean-slate/ (sidecar + activations,
|
| 207 |
+
NOT tracts): canonical BTF v1 (Binary Tract Format) semantics treat
|
| 208 |
+
"empty tract = file does not exist" — first deposit creates the file
|
| 209 |
+
with the BTF magic header (0x4254). A fresh-init organism with no
|
| 210 |
+
deposits has no tract files on disk. The per-file `os.path.exists(local)`
|
| 211 |
+
check below silently skips them, which is correct: pinned/clean-slate/
|
| 212 |
+
represents the "no deposits ever" state and writing 0-byte placeholders
|
| 213 |
+
would create headerless files the BTF reader would reject as malformed.
|
| 214 |
+
|
| 215 |
+
Recovery procedure (2-step UI work, see MASTER-NuWave.md Operations):
|
| 216 |
+
1. In HF dataset UI, delete root's `experience.tract` + `outcomes.tract`
|
| 217 |
+
(clears prior deposit history — empty-state has none).
|
| 218 |
+
2. Download both files from `pinned/clean-slate/`, upload to root,
|
| 219 |
+
overwriting current sidecar + activations.
|
| 220 |
+
Folder is OUTSIDE `backups/`, so rotation never touches it.
|
| 221 |
"""
|
| 222 |
import tempfile
|
| 223 |
import shutil
|