Datasets:
Make historical recovery support existing private GitHub references
Browse files
supplements/20261028_retired_506_research/MANIFEST.json
CHANGED
|
@@ -25,8 +25,8 @@
|
|
| 25 |
"sha256": "f26c0371542dfaebc9384cebddd8d5f35f02997ecf366d16722354dcd6c7f193"
|
| 26 |
},
|
| 27 |
"RECOVERY_GUIDE.txt": {
|
| 28 |
-
"bytes":
|
| 29 |
-
"sha256": "
|
| 30 |
},
|
| 31 |
"RESEARCH_CONTENT_INDEX.jsonl.gz": {
|
| 32 |
"bytes": 63213,
|
|
@@ -45,11 +45,12 @@
|
|
| 45 |
"sha256": "bc7e3d8f8bb93fc3094e58af19752b93ee085c59fb447d0a3cd79b8a2a65e2ae"
|
| 46 |
},
|
| 47 |
"restore_research.py": {
|
| 48 |
-
"bytes":
|
| 49 |
-
"sha256": "
|
| 50 |
}
|
| 51 |
},
|
| 52 |
"scope": "Historical research only; current BUV inputs, outputs, model and runtime untouched. Old environments, caches and model weights intentionally excluded.",
|
| 53 |
"recovery": "Use restore_research.py into a new empty directory; original files and archive-member provenance are in SOURCE_DISPOSITIONS.jsonl.gz.",
|
| 54 |
-
"created_at": "2026-10-28T06:51:24.624767+00:00"
|
|
|
|
| 55 |
}
|
|
|
|
| 25 |
"sha256": "f26c0371542dfaebc9384cebddd8d5f35f02997ecf366d16722354dcd6c7f193"
|
| 26 |
},
|
| 27 |
"RECOVERY_GUIDE.txt": {
|
| 28 |
+
"bytes": 3055,
|
| 29 |
+
"sha256": "cb8230bece65131ee06438d686cc89c892e6bac8b0ca63cbf976933f542d9a91"
|
| 30 |
},
|
| 31 |
"RESEARCH_CONTENT_INDEX.jsonl.gz": {
|
| 32 |
"bytes": 63213,
|
|
|
|
| 45 |
"sha256": "bc7e3d8f8bb93fc3094e58af19752b93ee085c59fb447d0a3cd79b8a2a65e2ae"
|
| 46 |
},
|
| 47 |
"restore_research.py": {
|
| 48 |
+
"bytes": 4480,
|
| 49 |
+
"sha256": "de6ba8cdc7529b96dcd3fe21ebf4118e5c1eabe1d0867bc1b6e0d0e9f0bae83e"
|
| 50 |
}
|
| 51 |
},
|
| 52 |
"scope": "Historical research only; current BUV inputs, outputs, model and runtime untouched. Old environments, caches and model weights intentionally excluded.",
|
| 53 |
"recovery": "Use restore_research.py into a new empty directory; original files and archive-member provenance are in SOURCE_DISPOSITIONS.jsonl.gz.",
|
| 54 |
+
"created_at": "2026-10-28T06:51:24.624767+00:00",
|
| 55 |
+
"recovery_auth": "Existing GitHub references require the owner's authenticated gh CLI; credentials are never archived."
|
| 56 |
}
|
supplements/20261028_retired_506_research/RECOVERY_GUIDE.txt
CHANGED
|
@@ -22,7 +22,9 @@ Symlink metadata is in SYMLINKS.json; restoration never follows old absolute sym
|
|
| 22 |
|
| 23 |
Recovery:
|
| 24 |
1. Download restore_research.py from this archive at its exact 40-character migration commit.
|
| 25 |
-
2. Install/use Python requests.
|
|
|
|
|
|
|
| 26 |
python restore_research.py --revision <migration_commit> --list
|
| 27 |
3. Restore selected paths into a NEW directory:
|
| 28 |
python restore_research.py --revision <migration_commit> --source <exact_original_path> --destination <new_directory>
|
|
|
|
| 22 |
|
| 23 |
Recovery:
|
| 24 |
1. Download restore_research.py from this archive at its exact 40-character migration commit.
|
| 25 |
+
2. Install/use Python requests. The 27 existing GitHub objects are in a private repository:
|
| 26 |
+
use the owner's normally authenticated GitHub CLI (gh). No token is included in this archive.
|
| 27 |
+
Use --list to list original research paths:
|
| 28 |
python restore_research.py --revision <migration_commit> --list
|
| 29 |
3. Restore selected paths into a NEW directory:
|
| 30 |
python restore_research.py --revision <migration_commit> --source <exact_original_path> --destination <new_directory>
|
supplements/20261028_retired_506_research/restore_research.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Requires requests. Pass the immutable archive revision from the migration receipt.
|
| 4 |
No archived code is executed. Environments, caches and weights were intentionally retired.
|
| 5 |
"""
|
| 6 |
-
import argparse, gzip, hashlib, io, json, tarfile, tempfile
|
| 7 |
from pathlib import Path
|
| 8 |
from urllib.parse import quote
|
| 9 |
import requests
|
|
@@ -13,6 +13,11 @@ PREFIX='supplements/20261028_retired_506_research'
|
|
| 13 |
def get(url):
|
| 14 |
r=requests.get(url,timeout=(20,120));r.raise_for_status();return r.content
|
| 15 |
def hf(repo,rev,path):return 'https://huggingface.co/datasets/'+repo+'/resolve/'+rev+'/'+quote(path,safe='/')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
def sha_file(p):
|
| 17 |
h=hashlib.sha256()
|
| 18 |
with p.open('rb') as f:
|
|
@@ -61,7 +66,7 @@ def main():
|
|
| 61 |
m=t.getmember(ref['member']);assert m.isfile()
|
| 62 |
with t.extractfile(m) as f:b=f.read()
|
| 63 |
elif ref['storage']=='existing_hf':b=get(hf(ref['repo'],ref['revision'],ref['path']))
|
| 64 |
-
elif ref['storage']=='existing_github':b=
|
| 65 |
else:raise ValueError(ref['storage'])
|
| 66 |
assert len(b)==r['bytes'] and hashlib.sha256(b).hexdigest()==h
|
| 67 |
p=Path(tmp)/h;p.write_bytes(b);cached[h]=p
|
|
|
|
| 3 |
Requires requests. Pass the immutable archive revision from the migration receipt.
|
| 4 |
No archived code is executed. Environments, caches and weights were intentionally retired.
|
| 5 |
"""
|
| 6 |
+
import argparse, gzip, hashlib, io, json, tarfile, tempfile, subprocess
|
| 7 |
from pathlib import Path
|
| 8 |
from urllib.parse import quote
|
| 9 |
import requests
|
|
|
|
| 13 |
def get(url):
|
| 14 |
r=requests.get(url,timeout=(20,120));r.raise_for_status();return r.content
|
| 15 |
def hf(repo,rev,path):return 'https://huggingface.co/datasets/'+repo+'/resolve/'+rev+'/'+quote(path,safe='/')
|
| 16 |
+
def github(ref):
|
| 17 |
+
# The existing marketing repository is private. Use the operator's normal
|
| 18 |
+
# authenticated GitHub CLI; credentials never enter this archive or output.
|
| 19 |
+
endpoint='repos/'+ref['repo']+'/contents/'+quote(ref['path'],safe='/')+'?ref='+ref['revision']
|
| 20 |
+
return subprocess.check_output(['gh','api','--method','GET',endpoint,'--header','Accept: application/vnd.github.raw+json'])
|
| 21 |
def sha_file(p):
|
| 22 |
h=hashlib.sha256()
|
| 23 |
with p.open('rb') as f:
|
|
|
|
| 66 |
m=t.getmember(ref['member']);assert m.isfile()
|
| 67 |
with t.extractfile(m) as f:b=f.read()
|
| 68 |
elif ref['storage']=='existing_hf':b=get(hf(ref['repo'],ref['revision'],ref['path']))
|
| 69 |
+
elif ref['storage']=='existing_github':b=github(ref)
|
| 70 |
else:raise ValueError(ref['storage'])
|
| 71 |
assert len(b)==r['bytes'] and hashlib.sha256(b).hexdigest()==h
|
| 72 |
p=Path(tmp)/h;p.write_bytes(b);cached[h]=p
|