Finalize release documentation and native loader verification
Browse files- README.md +6 -6
- code/README.md +3 -4
- code/docs/demo-hosting.md +3 -2
- code/docs/tutorials/06-release.md +25 -1
- code/release/dataset-card.md +3 -4
- code/release/model-card.md +6 -6
- code/reports/final-study.md +2 -1
- code/scripts/build_release.py +2 -1
- code/scripts/verify_release.py +45 -9
- code/source-manifest.json +10 -10
- code/tests/test_verify_release.py +90 -2
- release-files.json +21 -21
README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: Cloudflare/clef-flash
|
| 4 |
base_model_relation: adapter
|
| 5 |
-
library_name:
|
| 6 |
language:
|
| 7 |
- en
|
| 8 |
tags:
|
|
@@ -30,10 +30,9 @@ in one forward pass, with no generated text or command parsing.
|
|
| 30 |
Related releases: [source and tutorials](https://github.com/kkarimi/stackcraft),
|
| 31 |
[model](https://huggingface.co/nima1/stackcraft-clef-flash-lora),
|
| 32 |
[dataset](https://huggingface.co/datasets/nima1/stackcraft-data), and
|
| 33 |
-
[
|
| 34 |
-
The hosted
|
| 35 |
-
|
| 36 |
-
work without that subscription.
|
| 37 |
|
| 38 |
## Intended use
|
| 39 |
|
|
@@ -125,7 +124,8 @@ uncertainty does not capture variation across training seeds.
|
|
| 125 |
|
| 126 |
## Loading
|
| 127 |
|
| 128 |
-
Use the released Stackcraft source and locked ML dependencies.
|
|
|
|
| 129 |
`AutoModel` or adapter-only loading omits the custom decision head and is incorrect.
|
| 130 |
From the downloaded model repository's `code/` directory, install the locked ML
|
| 131 |
environment with `uv sync --locked --extra ml` and cache the pinned upstream
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: Cloudflare/clef-flash
|
| 4 |
base_model_relation: adapter
|
| 5 |
+
library_name: stackcraft
|
| 6 |
language:
|
| 7 |
- en
|
| 8 |
tags:
|
|
|
|
| 30 |
Related releases: [source and tutorials](https://github.com/kkarimi/stackcraft),
|
| 31 |
[model](https://huggingface.co/nima1/stackcraft-clef-flash-lora),
|
| 32 |
[dataset](https://huggingface.co/datasets/nima1/stackcraft-data), and
|
| 33 |
+
[local playable demo](https://github.com/kkarimi/stackcraft/blob/main/docs/demo-hosting.md).
|
| 34 |
+
The owner deferred hosted deployment. The game and Docker image need no GPU
|
| 35 |
+
or Hugging Face subscription when run locally.
|
|
|
|
| 36 |
|
| 37 |
## Intended use
|
| 38 |
|
|
|
|
| 124 |
|
| 125 |
## Loading
|
| 126 |
|
| 127 |
+
Use the released Stackcraft source and locked ML dependencies. Stackcraft uses
|
| 128 |
+
PEFT internally but requires its custom native-head loader. Generic
|
| 129 |
`AutoModel` or adapter-only loading omits the custom decision head and is incorrect.
|
| 130 |
From the downloaded model repository's `code/` directory, install the locked ML
|
| 131 |
environment with `uv sync --locked --extra ml` and cache the pinned upstream
|
code/README.md
CHANGED
|
@@ -8,15 +8,14 @@ for milestones and acceptance criteria.
|
|
| 8 |
|
| 9 |
## Releases
|
| 10 |
|
| 11 |
-
- [
|
| 12 |
- [Model adapter and decision head](https://huggingface.co/nima1/stackcraft-clef-flash-lora)
|
| 13 |
- [Synthetic dataset](https://huggingface.co/datasets/nima1/stackcraft-data)
|
| 14 |
- [Source and release verification](https://github.com/kkarimi/stackcraft)
|
| 15 |
|
| 16 |
The demo replays actual model decisions alongside live human play. It needs no
|
| 17 |
-
GPU hosting.
|
| 18 |
-
|
| 19 |
-
demo works, and hosted publication awaits that account requirement.
|
| 20 |
|
| 21 |
## What the experiment found
|
| 22 |
|
|
|
|
| 8 |
|
| 9 |
## Releases
|
| 10 |
|
| 11 |
+
- [Run the playable demo locally](docs/demo-hosting.md)
|
| 12 |
- [Model adapter and decision head](https://huggingface.co/nima1/stackcraft-clef-flash-lora)
|
| 13 |
- [Synthetic dataset](https://huggingface.co/datasets/nima1/stackcraft-data)
|
| 14 |
- [Source and release verification](https://github.com/kkarimi/stackcraft)
|
| 15 |
|
| 16 |
The demo replays actual model decisions alongside live human play. It needs no
|
| 17 |
+
GPU hosting. GitHub, the model and dataset are public. Hosted deployment was
|
| 18 |
+
deferred by the owner; the game and Docker demo remain runnable locally.
|
|
|
|
| 19 |
|
| 20 |
## What the experiment found
|
| 21 |
|
code/docs/demo-hosting.md
CHANGED
|
@@ -93,8 +93,9 @@ hourly charge, but it is not subscription-free hosting. Static Spaces have diffe
|
|
| 93 |
requirements and cannot run this Python HTTP service unchanged. See the
|
| 94 |
[official Spaces overview](https://huggingface.co/docs/hub/spaces-overview).
|
| 95 |
The initial `nima1/stackcraft` creation returned HTTP 402; no subscription or paid
|
| 96 |
-
hardware was purchased.
|
| 97 |
-
|
|
|
|
| 98 |
|
| 99 |
Once publication is authorized, the Space repository needs the Dockerfile,
|
| 100 |
`.dockerignore`, `pyproject.toml`, `uv.lock`, `src/` including the reviewed replay
|
|
|
|
| 93 |
requirements and cannot run this Python HTTP service unchanged. See the
|
| 94 |
[official Spaces overview](https://huggingface.co/docs/hub/spaces-overview).
|
| 95 |
The initial `nima1/stackcraft` creation returned HTTP 402; no subscription or paid
|
| 96 |
+
hardware was purchased. The owner then deferred hosted deployment on 2026-10-06.
|
| 97 |
+
The following Space steps are a future option, not an existing hosted release.
|
| 98 |
+
The local Docker procedure above is complete and verified.
|
| 99 |
|
| 100 |
Once publication is authorized, the Space repository needs the Dockerfile,
|
| 101 |
`.dockerignore`, `pyproject.toml`, `uv.lock`, `src/` including the reviewed replay
|
code/docs/tutorials/06-release.md
CHANGED
|
@@ -33,7 +33,13 @@ The owner approved all four destinations as public on 2026-10-06: `kkarimi/stack
|
|
| 33 |
`nima1/stackcraft-clef-flash-lora`, `nima1/stackcraft-data`, and Space
|
| 34 |
`nima1/stackcraft` on Hugging Face. This approval explicitly includes the source
|
| 35 |
inside the public model and Space repositories. The final release report in GitHub
|
| 36 |
-
records immutable revisions and actual download
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
## Preserve evidence while preparing checkpoint metadata
|
| 39 |
|
|
@@ -232,3 +238,21 @@ in a browser. Verify model/dataset links and any private GitHub access expectati
|
|
| 232 |
Record failures and correct the actual published bundle before declaring release
|
| 233 |
complete. Then update the plan's M6 status and final outcomes with verified links,
|
| 234 |
revisions, hashes, measured limitations and fresh-download evidence.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
`nima1/stackcraft-clef-flash-lora`, `nima1/stackcraft-data`, and Space
|
| 34 |
`nima1/stackcraft` on Hugging Face. This approval explicitly includes the source
|
| 35 |
inside the public model and Space repositories. The final release report in GitHub
|
| 36 |
+
records immutable revisions and actual download verification.
|
| 37 |
+
|
| 38 |
+
The owner subsequently deferred hosted CPU deployment on 2026-10-06 after the
|
| 39 |
+
Docker subscription prerequisite was discovered. The delivered release therefore
|
| 40 |
+
contains public GitHub/model/dataset artifacts and a verified local Docker demo;
|
| 41 |
+
Space creation and hosted-browser checks below are future steps, not completion
|
| 42 |
+
claims for this release.
|
| 43 |
|
| 44 |
## Preserve evidence while preparing checkpoint metadata
|
| 45 |
|
|
|
|
| 238 |
Record failures and correct the actual published bundle before declaring release
|
| 239 |
complete. Then update the plan's M6 status and final outcomes with verified links,
|
| 240 |
revisions, hashes, measured limitations and fresh-download evidence.
|
| 241 |
+
|
| 242 |
+
## Verification when hosting is deferred
|
| 243 |
+
|
| 244 |
+
For this release, explicitly skip the unhosted demo while retaining all model,
|
| 245 |
+
dataset and checkpoint-byte checks:
|
| 246 |
+
|
| 247 |
+
```bash
|
| 248 |
+
uv run --locked --extra ml python scripts/verify_release.py \
|
| 249 |
+
--trusted-manifest LOCAL_RELEASE/release-manifest.json \
|
| 250 |
+
--model DOWNLOADED_MODEL --dataset DOWNLOADED_DATASET \
|
| 251 |
+
--skip-demo --output runs/released-files-verification.json
|
| 252 |
+
```
|
| 253 |
+
|
| 254 |
+
The report names the skipped bundle; it makes no claim about a downloaded Space.
|
| 255 |
+
The publication report records the two actual download origins and immutable
|
| 256 |
+
revisions. A local Docker smoke check does not count as a fresh Space download.
|
| 257 |
+
The full three-repository CLI above applies only after all three HF repositories
|
| 258 |
+
exist. The downloaded checkpoint must still pass the GPU parity check above.
|
code/release/dataset-card.md
CHANGED
|
@@ -36,10 +36,9 @@ only the visible observation. Read the dataset schema and tutorial03 before use.
|
|
| 36 |
Related releases: [source and tutorials](https://github.com/kkarimi/stackcraft),
|
| 37 |
[model](https://huggingface.co/nima1/stackcraft-clef-flash-lora),
|
| 38 |
[dataset](https://huggingface.co/datasets/nima1/stackcraft-data), and
|
| 39 |
-
[
|
| 40 |
-
The hosted
|
| 41 |
-
|
| 42 |
-
work without that subscription.
|
| 43 |
|
| 44 |
## Generation
|
| 45 |
|
|
|
|
| 36 |
Related releases: [source and tutorials](https://github.com/kkarimi/stackcraft),
|
| 37 |
[model](https://huggingface.co/nima1/stackcraft-clef-flash-lora),
|
| 38 |
[dataset](https://huggingface.co/datasets/nima1/stackcraft-data), and
|
| 39 |
+
[local playable demo](https://github.com/kkarimi/stackcraft/blob/main/docs/demo-hosting.md).
|
| 40 |
+
The owner deferred hosted deployment. The game and Docker image need no GPU
|
| 41 |
+
or Hugging Face subscription when run locally.
|
|
|
|
| 42 |
|
| 43 |
## Generation
|
| 44 |
|
code/release/model-card.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: Cloudflare/clef-flash
|
| 4 |
base_model_relation: adapter
|
| 5 |
-
library_name:
|
| 6 |
language:
|
| 7 |
- en
|
| 8 |
tags:
|
|
@@ -30,10 +30,9 @@ in one forward pass, with no generated text or command parsing.
|
|
| 30 |
Related releases: [source and tutorials](https://github.com/kkarimi/stackcraft),
|
| 31 |
[model](https://huggingface.co/nima1/stackcraft-clef-flash-lora),
|
| 32 |
[dataset](https://huggingface.co/datasets/nima1/stackcraft-data), and
|
| 33 |
-
[
|
| 34 |
-
The hosted
|
| 35 |
-
|
| 36 |
-
work without that subscription.
|
| 37 |
|
| 38 |
## Intended use
|
| 39 |
|
|
@@ -96,7 +95,8 @@ uncertainty does not capture variation across training seeds.
|
|
| 96 |
|
| 97 |
## Loading
|
| 98 |
|
| 99 |
-
Use the released Stackcraft source and locked ML dependencies.
|
|
|
|
| 100 |
`AutoModel` or adapter-only loading omits the custom decision head and is incorrect.
|
| 101 |
From the downloaded model repository's `code/` directory, install the locked ML
|
| 102 |
environment with `uv sync --locked --extra ml` and cache the pinned upstream
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: Cloudflare/clef-flash
|
| 4 |
base_model_relation: adapter
|
| 5 |
+
library_name: stackcraft
|
| 6 |
language:
|
| 7 |
- en
|
| 8 |
tags:
|
|
|
|
| 30 |
Related releases: [source and tutorials](https://github.com/kkarimi/stackcraft),
|
| 31 |
[model](https://huggingface.co/nima1/stackcraft-clef-flash-lora),
|
| 32 |
[dataset](https://huggingface.co/datasets/nima1/stackcraft-data), and
|
| 33 |
+
[local playable demo](https://github.com/kkarimi/stackcraft/blob/main/docs/demo-hosting.md).
|
| 34 |
+
The owner deferred hosted deployment. The game and Docker image need no GPU
|
| 35 |
+
or Hugging Face subscription when run locally.
|
|
|
|
| 36 |
|
| 37 |
## Intended use
|
| 38 |
|
|
|
|
| 95 |
|
| 96 |
## Loading
|
| 97 |
|
| 98 |
+
Use the released Stackcraft source and locked ML dependencies. Stackcraft uses
|
| 99 |
+
PEFT internally but requires its custom native-head loader. Generic
|
| 100 |
`AutoModel` or adapter-only loading omits the custom decision head and is incorrect.
|
| 101 |
From the downloaded model repository's `code/` directory, install the locked ML
|
| 102 |
environment with `uv sync --locked --extra ml` and cache the pinned upstream
|
code/reports/final-study.md
CHANGED
|
@@ -216,7 +216,8 @@ records their unchanged uncompressed hashes and sizes. These portable paths
|
|
| 216 |
are relative to the model repository root and do not require access to private Git
|
| 217 |
history. See the [model release](https://huggingface.co/nima1/stackcraft-clef-flash-lora),
|
| 218 |
[dataset](https://huggingface.co/datasets/nima1/stackcraft-data), and
|
| 219 |
-
[
|
|
|
|
| 220 |
[Tutorial 05](../docs/tutorials/05-evaluation.md) gives the reproduction procedure.
|
| 221 |
|
| 222 |
The principal limitations are one training seed, a small synthetic dataset, an
|
|
|
|
| 216 |
are relative to the model repository root and do not require access to private Git
|
| 217 |
history. See the [model release](https://huggingface.co/nima1/stackcraft-clef-flash-lora),
|
| 218 |
[dataset](https://huggingface.co/datasets/nima1/stackcraft-data), and
|
| 219 |
+
[local demo instructions](https://github.com/kkarimi/stackcraft/blob/main/docs/demo-hosting.md).
|
| 220 |
+
The owner deferred hosted deployment; no live Space is claimed.
|
| 221 |
[Tutorial 05](../docs/tutorials/05-evaluation.md) gives the reproduction procedure.
|
| 222 |
|
| 223 |
The principal limitations are one training seed, a small synthetic dataset, an
|
code/scripts/build_release.py
CHANGED
|
@@ -388,7 +388,8 @@ def render_model_card(template: str, report: dict[str, Any], selection: dict[str
|
|
| 388 |
"`checkpoint/` preserves the selected checkpoint bytes. `code/` contains the source, "
|
| 389 |
"locked environment, tests, scripts and milestone tutorials. `evidence.zip` losslessly "
|
| 390 |
"compresses the frozen selection, both validation candidates and complete final "
|
| 391 |
-
"evaluation. From the model repository root, run `python -m zipfile -e evidence.zip .`
|
|
|
|
| 392 |
"`evidence/` and all original relative paths. `evidence-files.json` records each raw "
|
| 393 |
"file's byte count and SHA256; extraction preserves the original evidence hashes. "
|
| 394 |
"From `code/`, run `uv sync --locked --extra ml`; load `../checkpoint` using the "
|
|
|
|
| 388 |
"`checkpoint/` preserves the selected checkpoint bytes. `code/` contains the source, "
|
| 389 |
"locked environment, tests, scripts and milestone tutorials. `evidence.zip` losslessly "
|
| 390 |
"compresses the frozen selection, both validation candidates and complete final "
|
| 391 |
+
"evaluation. From the model repository root, run `python -m zipfile -e evidence.zip .` "
|
| 392 |
+
"after download verification to restore "
|
| 393 |
"`evidence/` and all original relative paths. `evidence-files.json` records each raw "
|
| 394 |
"file's byte count and SHA256; extraction preserves the original evidence hashes. "
|
| 395 |
"From `code/`, run `uv sync --locked --extra ml`; load `../checkpoint` using the "
|
code/scripts/verify_release.py
CHANGED
|
@@ -1,8 +1,10 @@
|
|
| 1 |
-
"""CPU-only verification of
|
| 2 |
|
| 3 |
The trust anchor must come from independently retained local release preparation,
|
| 4 |
not from the same unverified download. This checks integrity against that anchor,
|
| 5 |
not publisher authenticity, model output parity, or whether a download was fresh.
|
|
|
|
|
|
|
| 6 |
|
| 7 |
Only these unlisted Hugging Face bookkeeping files are tolerated: root
|
| 8 |
.gitattributes; .cache/huggingface/{.gitignore,.gitignore.lock,CACHEDIR.TAG}; and
|
|
@@ -295,12 +297,25 @@ def verify_bundle(
|
|
| 295 |
}
|
| 296 |
|
| 297 |
|
| 298 |
-
def verify_release(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
if output.exists() or output.is_symlink():
|
| 300 |
raise FileExistsError("verification output already exists; choose a new file")
|
| 301 |
trusted_manifest = regular_input(trusted_manifest)
|
| 302 |
-
if
|
| 303 |
-
raise ValueError("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
roots = {name: regular_input(path, directory=True) for name, path in roots.items()}
|
| 305 |
for name, root in roots.items():
|
| 306 |
if any(
|
|
@@ -339,7 +354,7 @@ def verify_release(trusted_manifest: Path, roots: dict[str, Path], output: Path)
|
|
| 339 |
bundle: verify_bundle(
|
| 340 |
roots[bundle], expected[bundle], checkpoint if bundle == "model" else None
|
| 341 |
)
|
| 342 |
-
for bundle in
|
| 343 |
}
|
| 344 |
dataset = roots["dataset"]
|
| 345 |
if sha256(dataset / "manifest.json") != manifest.get("dataset_manifest_sha256"):
|
|
@@ -353,7 +368,14 @@ def verify_release(trusted_manifest: Path, roots: dict[str, Path], output: Path)
|
|
| 353 |
result = {
|
| 354 |
"schema_version": 1,
|
| 355 |
"status": "verified",
|
| 356 |
-
"scope":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
"trusted_manifest_sha256": sha256(trusted_manifest),
|
| 358 |
"bundles": verified,
|
| 359 |
"dataset_counts": counts,
|
|
@@ -371,21 +393,35 @@ def verify_release(trusted_manifest: Path, roots: dict[str, Path], output: Path)
|
|
| 371 |
def main(argv: list[str] | None = None) -> int:
|
| 372 |
parser = argparse.ArgumentParser(description=__doc__)
|
| 373 |
parser.add_argument("--trusted-manifest", type=Path, required=True)
|
| 374 |
-
for bundle in BUNDLES:
|
| 375 |
parser.add_argument(f"--{bundle}", type=Path, required=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
parser.add_argument("--output", type=Path, required=True)
|
| 377 |
args = parser.parse_args(argv)
|
| 378 |
try:
|
| 379 |
report = verify_release(
|
| 380 |
args.trusted_manifest,
|
| 381 |
-
{
|
|
|
|
|
|
|
|
|
|
| 382 |
args.output,
|
|
|
|
| 383 |
)
|
| 384 |
except (OSError, ValueError, KeyError, TypeError) as error:
|
| 385 |
parser.error(str(error))
|
| 386 |
print(
|
| 387 |
json.dumps(
|
| 388 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 389 |
)
|
| 390 |
)
|
| 391 |
return 0
|
|
|
|
| 1 |
+
"""CPU-only verification of downloaded repositories against a trusted local manifest.
|
| 2 |
|
| 3 |
The trust anchor must come from independently retained local release preparation,
|
| 4 |
not from the same unverified download. This checks integrity against that anchor,
|
| 5 |
not publisher authenticity, model output parity, or whether a download was fresh.
|
| 6 |
+
Model and dataset are always required. Demo verification requires its directory,
|
| 7 |
+
unless the caller explicitly selects --skip-demo; skipped scope is recorded.
|
| 8 |
|
| 9 |
Only these unlisted Hugging Face bookkeeping files are tolerated: root
|
| 10 |
.gitattributes; .cache/huggingface/{.gitignore,.gitignore.lock,CACHEDIR.TAG}; and
|
|
|
|
| 297 |
}
|
| 298 |
|
| 299 |
|
| 300 |
+
def verify_release(
|
| 301 |
+
trusted_manifest: Path,
|
| 302 |
+
roots: dict[str, Path],
|
| 303 |
+
output: Path,
|
| 304 |
+
*,
|
| 305 |
+
skip_demo: bool = False,
|
| 306 |
+
) -> dict[str, Any]:
|
| 307 |
if output.exists() or output.is_symlink():
|
| 308 |
raise FileExistsError("verification output already exists; choose a new file")
|
| 309 |
trusted_manifest = regular_input(trusted_manifest)
|
| 310 |
+
if type(skip_demo) is not bool:
|
| 311 |
+
raise ValueError("skip_demo must be an explicit boolean")
|
| 312 |
+
bundles = BUNDLES[:2] if skip_demo else BUNDLES
|
| 313 |
+
if set(roots) != set(bundles):
|
| 314 |
+
raise ValueError(
|
| 315 |
+
"skip-demo verification needs only model and dataset directories"
|
| 316 |
+
if skip_demo
|
| 317 |
+
else "verification needs model, dataset and demo directories"
|
| 318 |
+
)
|
| 319 |
roots = {name: regular_input(path, directory=True) for name, path in roots.items()}
|
| 320 |
for name, root in roots.items():
|
| 321 |
if any(
|
|
|
|
| 354 |
bundle: verify_bundle(
|
| 355 |
roots[bundle], expected[bundle], checkpoint if bundle == "model" else None
|
| 356 |
)
|
| 357 |
+
for bundle in bundles
|
| 358 |
}
|
| 359 |
dataset = roots["dataset"]
|
| 360 |
if sha256(dataset / "manifest.json") != manifest.get("dataset_manifest_sha256"):
|
|
|
|
| 368 |
result = {
|
| 369 |
"schema_version": 1,
|
| 370 |
"status": "verified",
|
| 371 |
+
"scope": (
|
| 372 |
+
"CPU model/dataset payload integrity and dataset audit against caller-supplied "
|
| 373 |
+
"trust anchor; demo explicitly skipped and not checked"
|
| 374 |
+
if skip_demo
|
| 375 |
+
else "CPU model/dataset/demo payload integrity and dataset audit against "
|
| 376 |
+
"caller-supplied trust anchor"
|
| 377 |
+
),
|
| 378 |
+
"skipped_bundles": ["demo"] if skip_demo else [],
|
| 379 |
"trusted_manifest_sha256": sha256(trusted_manifest),
|
| 380 |
"bundles": verified,
|
| 381 |
"dataset_counts": counts,
|
|
|
|
| 393 |
def main(argv: list[str] | None = None) -> int:
|
| 394 |
parser = argparse.ArgumentParser(description=__doc__)
|
| 395 |
parser.add_argument("--trusted-manifest", type=Path, required=True)
|
| 396 |
+
for bundle in BUNDLES[:2]:
|
| 397 |
parser.add_argument(f"--{bundle}", type=Path, required=True)
|
| 398 |
+
demo = parser.add_mutually_exclusive_group(required=True)
|
| 399 |
+
demo.add_argument("--demo", type=Path, help="Downloaded demo directory to verify")
|
| 400 |
+
demo.add_argument(
|
| 401 |
+
"--skip-demo", action="store_true", help="Explicitly verify only model and dataset"
|
| 402 |
+
)
|
| 403 |
parser.add_argument("--output", type=Path, required=True)
|
| 404 |
args = parser.parse_args(argv)
|
| 405 |
try:
|
| 406 |
report = verify_release(
|
| 407 |
args.trusted_manifest,
|
| 408 |
+
{
|
| 409 |
+
bundle: getattr(args, bundle)
|
| 410 |
+
for bundle in (BUNDLES[:2] if args.skip_demo else BUNDLES)
|
| 411 |
+
},
|
| 412 |
args.output,
|
| 413 |
+
skip_demo=args.skip_demo,
|
| 414 |
)
|
| 415 |
except (OSError, ValueError, KeyError, TypeError) as error:
|
| 416 |
parser.error(str(error))
|
| 417 |
print(
|
| 418 |
json.dumps(
|
| 419 |
+
{
|
| 420 |
+
"status": report["status"],
|
| 421 |
+
"output": str(args.output),
|
| 422 |
+
"gpu_parity_checked": False,
|
| 423 |
+
"skipped_bundles": report["skipped_bundles"],
|
| 424 |
+
}
|
| 425 |
)
|
| 426 |
)
|
| 427 |
return 0
|
code/source-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"source_commit": "
|
| 4 |
"source_dirty": false,
|
| 5 |
"source_hashes": {
|
| 6 |
".dockerignore": "90efb589411778c4ad94cd0029a42424db48516a65411e8a5c23e003de814556",
|
|
@@ -8,9 +8,9 @@
|
|
| 8 |
"Dockerfile": "c3658f6f62f249a59442baa8558af939e0734f097db8114846606c87ef76f1a1",
|
| 9 |
"LICENSE": "50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32",
|
| 10 |
"NOTICE": "d829a8058a59c861a083171807d76097d5420c6b4c88fcdb72d7566d7139d06e",
|
| 11 |
-
"README.md": "
|
| 12 |
"docs/clef.md": "99db0517a7c8899425f0223302adf811e0d304d7d5c84a2180c581b158e9c134",
|
| 13 |
-
"docs/demo-hosting.md": "
|
| 14 |
"docs/evaluation-protocol.md": "d708dd4a36727772f9077d4bbdcbd56a8c8a33d775a0c4d31479e3689c6d9474",
|
| 15 |
"docs/interfaces.md": "3f2d5a9f8f8009e74fbe5e00dc7e3a93a7e7047df51d216f2a3214ccf11e8201",
|
| 16 |
"docs/rules.md": "9664eaacf5a5f735e4aa276cf43ec1a2dbe600258b33c933f35cfe321ea13aa1",
|
|
@@ -20,16 +20,16 @@
|
|
| 20 |
"docs/tutorials/03-data.md": "951cb3d0840ab9f6f2d7446dbecffccb7a264087eb8c1c1779216aa26b392567",
|
| 21 |
"docs/tutorials/04-gpu-feasibility.md": "6e80c0421b4d1dd65d232a57718665b7cff377d737ad6d92499ab193301e71d0",
|
| 22 |
"docs/tutorials/05-evaluation.md": "f38988dcd808b5770762c9fbb5504102c3a46c8ec674b39147d17d0ff3c10ada",
|
| 23 |
-
"docs/tutorials/06-release.md": "
|
| 24 |
"pyproject.toml": "bb33447551da3478ecd779f670c2209bf9fff6ca55b927a211263a0f11347349",
|
| 25 |
-
"release/dataset-card.md": "
|
| 26 |
-
"release/model-card.md": "
|
| 27 |
"reports/clef-development.json": "833e3215e3dcdf50e731ed9238e823db30a7d2102fac151ec098bcb507e91c1c",
|
| 28 |
"reports/dataset-manifest.json": "f591ec4c4b853942bd0a89331280b8c3491b3eb87f0b2a69ae4821b9623bd936",
|
| 29 |
"reports/evaluation-hardware.json": "cea05c0d6f208dbeae498be743d131f645cebe88a5054a8af5a884714582085b",
|
| 30 |
"reports/final-audit-source.md": "61db8b121130ffd2eeb0a9c667f53f0c21647e865e93d44fbb9967e71d870020",
|
| 31 |
"reports/final-audit.json": "4766d0224a8bddc8c6e6fe0e86e75937f65abdb261667d5d59bd3d482c8adb89",
|
| 32 |
-
"reports/final-study.md": "
|
| 33 |
"reports/final-summary.json": "63cdd8c6f3a51a943041714d255cbd9c3d6711f25e028dc6cfd7042ff08ff066",
|
| 34 |
"reports/gpu-feasibility.json": "446dae96c8db6e0741640e14cccd53753f4f28a6b25cb5a6f80741fa10fde0e5",
|
| 35 |
"reports/selected-checkpoint-reload.json": "57489d34b22627c0fd0e3dc42f7f11231a901c059db7a4ea8cbab0aba2c37cdd",
|
|
@@ -39,7 +39,7 @@
|
|
| 39 |
"reports/training-source-supplement.json": "5d5e151f3aefb7d2ef2510485a20ad0b2959f27ebe1b4a30bf0eec664a785fde",
|
| 40 |
"reports/validation-summary.json": "2fd17daeeb12dfecf739c2dcd885e80ca3dc4547acaa3d22722ac9a4d747122a",
|
| 41 |
"scripts/benchmark_clef.py": "f3283b5b238b324bb1b906cadcaba036d6972d0c5218fea8265111467d65eefc",
|
| 42 |
-
"scripts/build_release.py": "
|
| 43 |
"scripts/evaluate_clef.py": "70a47e9314ec9d7351a939bae32f07f14bd08f6106b60ce6155687c0540b92dd",
|
| 44 |
"scripts/export_demo.py": "6b0a3d20f4feff4f7072ce3c15bbd2675c176a4948e9d2a95a35599a8dfe645a",
|
| 45 |
"scripts/gpu_session.py": "09b751463febded51a32eb1f329025596efc97be8c3e4c8107627a3a05937b73",
|
|
@@ -47,7 +47,7 @@
|
|
| 47 |
"scripts/probe_clef_training.py": "75041b4d83f520726196e54877f8ae27b12c1d78bd7b188367d769816293079f",
|
| 48 |
"scripts/select_checkpoint.py": "9ad6eaa21e8bb65ba076ad85a33556a1e4a22ff378d5007ab1e91d44cf48c79f",
|
| 49 |
"scripts/train_clef.py": "b951fe76490485ec420729d33af9c097827a241b7551b58293aa6f44b21111e2",
|
| 50 |
-
"scripts/verify_release.py": "
|
| 51 |
"src/stackcraft/__init__.py": "4e2c0519bcffbabcab9f4ddab19c8f1709d13ecc47f608e57f07876668b0f2d4",
|
| 52 |
"src/stackcraft/clef.py": "c505f35d27121ba9ec9db3c663927ac8b28304f4ed864765be61ce96c8c86e13",
|
| 53 |
"src/stackcraft/cli.py": "775c57241654bb861817423106e265082f6f2579f20f680440603e579a55197f",
|
|
@@ -87,7 +87,7 @@
|
|
| 87 |
"tests/test_tournament.py": "59a1f1d6fbde5dde5633c55961170b2b784817b9113804c779cb65408dfa9fe0",
|
| 88 |
"tests/test_train_cli.py": "d235cb8395aa5e48c537d4f84a377d2c24cf5cc28d345f613e073bc89c059626",
|
| 89 |
"tests/test_training.py": "afbf2dc34c6956b61263bbb7d2ff8f021a52f136d4c91d8f3b98bac120814a56",
|
| 90 |
-
"tests/test_verify_release.py": "
|
| 91 |
"uv.lock": "bc7fae476529578be003856b5f19e09c8cc96e0020ab999e20e1f8210696f9c8"
|
| 92 |
}
|
| 93 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"source_commit": "82a8854258f228a214f0964bbbd3d2b52e2be1e5",
|
| 4 |
"source_dirty": false,
|
| 5 |
"source_hashes": {
|
| 6 |
".dockerignore": "90efb589411778c4ad94cd0029a42424db48516a65411e8a5c23e003de814556",
|
|
|
|
| 8 |
"Dockerfile": "c3658f6f62f249a59442baa8558af939e0734f097db8114846606c87ef76f1a1",
|
| 9 |
"LICENSE": "50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32",
|
| 10 |
"NOTICE": "d829a8058a59c861a083171807d76097d5420c6b4c88fcdb72d7566d7139d06e",
|
| 11 |
+
"README.md": "730575eb0fe32306df5f17e6bbb67208d09cab3c1395bdc0dc30f77eb32baf45",
|
| 12 |
"docs/clef.md": "99db0517a7c8899425f0223302adf811e0d304d7d5c84a2180c581b158e9c134",
|
| 13 |
+
"docs/demo-hosting.md": "f7ecf2c9169e8e783da8231c8b97d798726fcabf29cb9e534f9020fc54540f2c",
|
| 14 |
"docs/evaluation-protocol.md": "d708dd4a36727772f9077d4bbdcbd56a8c8a33d775a0c4d31479e3689c6d9474",
|
| 15 |
"docs/interfaces.md": "3f2d5a9f8f8009e74fbe5e00dc7e3a93a7e7047df51d216f2a3214ccf11e8201",
|
| 16 |
"docs/rules.md": "9664eaacf5a5f735e4aa276cf43ec1a2dbe600258b33c933f35cfe321ea13aa1",
|
|
|
|
| 20 |
"docs/tutorials/03-data.md": "951cb3d0840ab9f6f2d7446dbecffccb7a264087eb8c1c1779216aa26b392567",
|
| 21 |
"docs/tutorials/04-gpu-feasibility.md": "6e80c0421b4d1dd65d232a57718665b7cff377d737ad6d92499ab193301e71d0",
|
| 22 |
"docs/tutorials/05-evaluation.md": "f38988dcd808b5770762c9fbb5504102c3a46c8ec674b39147d17d0ff3c10ada",
|
| 23 |
+
"docs/tutorials/06-release.md": "2aa0f1d8370eb0a4b92b6e43b2ffc36045b2503c41798bc478bd789f6b4156c6",
|
| 24 |
"pyproject.toml": "bb33447551da3478ecd779f670c2209bf9fff6ca55b927a211263a0f11347349",
|
| 25 |
+
"release/dataset-card.md": "0608688d7ef979fa9e559012cef9316f49f70ce3482b357b3657631d489666c4",
|
| 26 |
+
"release/model-card.md": "916e38607f501f2efdb5bf0cad41741932f8d27c86b92a5aed47e9900e60fdfc",
|
| 27 |
"reports/clef-development.json": "833e3215e3dcdf50e731ed9238e823db30a7d2102fac151ec098bcb507e91c1c",
|
| 28 |
"reports/dataset-manifest.json": "f591ec4c4b853942bd0a89331280b8c3491b3eb87f0b2a69ae4821b9623bd936",
|
| 29 |
"reports/evaluation-hardware.json": "cea05c0d6f208dbeae498be743d131f645cebe88a5054a8af5a884714582085b",
|
| 30 |
"reports/final-audit-source.md": "61db8b121130ffd2eeb0a9c667f53f0c21647e865e93d44fbb9967e71d870020",
|
| 31 |
"reports/final-audit.json": "4766d0224a8bddc8c6e6fe0e86e75937f65abdb261667d5d59bd3d482c8adb89",
|
| 32 |
+
"reports/final-study.md": "1f9e85304aa00c57e0410ed099cc609037d010c2291778c6788d2f1b14f9d834",
|
| 33 |
"reports/final-summary.json": "63cdd8c6f3a51a943041714d255cbd9c3d6711f25e028dc6cfd7042ff08ff066",
|
| 34 |
"reports/gpu-feasibility.json": "446dae96c8db6e0741640e14cccd53753f4f28a6b25cb5a6f80741fa10fde0e5",
|
| 35 |
"reports/selected-checkpoint-reload.json": "57489d34b22627c0fd0e3dc42f7f11231a901c059db7a4ea8cbab0aba2c37cdd",
|
|
|
|
| 39 |
"reports/training-source-supplement.json": "5d5e151f3aefb7d2ef2510485a20ad0b2959f27ebe1b4a30bf0eec664a785fde",
|
| 40 |
"reports/validation-summary.json": "2fd17daeeb12dfecf739c2dcd885e80ca3dc4547acaa3d22722ac9a4d747122a",
|
| 41 |
"scripts/benchmark_clef.py": "f3283b5b238b324bb1b906cadcaba036d6972d0c5218fea8265111467d65eefc",
|
| 42 |
+
"scripts/build_release.py": "d0a728096319f7b4e631bbea755a209b8d93e38a981dcf7bbcd69fb70559723c",
|
| 43 |
"scripts/evaluate_clef.py": "70a47e9314ec9d7351a939bae32f07f14bd08f6106b60ce6155687c0540b92dd",
|
| 44 |
"scripts/export_demo.py": "6b0a3d20f4feff4f7072ce3c15bbd2675c176a4948e9d2a95a35599a8dfe645a",
|
| 45 |
"scripts/gpu_session.py": "09b751463febded51a32eb1f329025596efc97be8c3e4c8107627a3a05937b73",
|
|
|
|
| 47 |
"scripts/probe_clef_training.py": "75041b4d83f520726196e54877f8ae27b12c1d78bd7b188367d769816293079f",
|
| 48 |
"scripts/select_checkpoint.py": "9ad6eaa21e8bb65ba076ad85a33556a1e4a22ff378d5007ab1e91d44cf48c79f",
|
| 49 |
"scripts/train_clef.py": "b951fe76490485ec420729d33af9c097827a241b7551b58293aa6f44b21111e2",
|
| 50 |
+
"scripts/verify_release.py": "84ed60da7f66d053a5acb250b745f318aaf46ab05554d586c83e85a2d806e4c4",
|
| 51 |
"src/stackcraft/__init__.py": "4e2c0519bcffbabcab9f4ddab19c8f1709d13ecc47f608e57f07876668b0f2d4",
|
| 52 |
"src/stackcraft/clef.py": "c505f35d27121ba9ec9db3c663927ac8b28304f4ed864765be61ce96c8c86e13",
|
| 53 |
"src/stackcraft/cli.py": "775c57241654bb861817423106e265082f6f2579f20f680440603e579a55197f",
|
|
|
|
| 87 |
"tests/test_tournament.py": "59a1f1d6fbde5dde5633c55961170b2b784817b9113804c779cb65408dfa9fe0",
|
| 88 |
"tests/test_train_cli.py": "d235cb8395aa5e48c537d4f84a377d2c24cf5cc28d345f613e073bc89c059626",
|
| 89 |
"tests/test_training.py": "afbf2dc34c6956b61263bbb7d2ff8f021a52f136d4c91d8f3b98bac120814a56",
|
| 90 |
+
"tests/test_verify_release.py": "e3c1cf0b2d0bf48a949ed7cf0ec42283188edb645a34e5f89ff1473b16dce765",
|
| 91 |
"uv.lock": "bc7fae476529578be003856b5f19e09c8cc96e0020ab999e20e1f8210696f9c8"
|
| 92 |
}
|
| 93 |
}
|
code/tests/test_verify_release.py
CHANGED
|
@@ -84,6 +84,7 @@ def test_success_checks_separate_roots_and_uploaded_manifests(release, tmp_path)
|
|
| 84 |
assert report["gpu_parity_checked"] is False
|
| 85 |
assert report["publisher_authenticity_checked"] is False
|
| 86 |
assert report["download_freshness_checked"] is False
|
|
|
|
| 87 |
for bundle in CLI.BUNDLES:
|
| 88 |
assert report["bundles"][bundle]["verified_files"] >= 2
|
| 89 |
assert report["bundles"][bundle]["release_files_sha256"] == CLI.sha256(
|
|
@@ -219,7 +220,10 @@ def test_arbitrary_cache_payloads_are_not_ignored(release, tmp_path, name, conte
|
|
| 219 |
CLI.verify_release(trusted, roots, tmp_path / "verification.json")
|
| 220 |
|
| 221 |
|
| 222 |
-
|
|
|
|
|
|
|
|
|
|
| 223 |
trusted, roots, _ = release
|
| 224 |
dataset = roots["dataset"]
|
| 225 |
rows = [json.loads(line) for line in (dataset / "train.jsonl").read_text().splitlines()]
|
|
@@ -239,8 +243,10 @@ def test_dataset_schema_audited_even_when_corruption_is_rehashed_consistently(re
|
|
| 239 |
trusted_json["files"][f"dataset/{name}"] = entry(dataset / name)
|
| 240 |
trusted_json["dataset_manifest_sha256"] = CLI.sha256(dataset / "manifest.json")
|
| 241 |
trusted.write_text(json.dumps(trusted_json))
|
|
|
|
|
|
|
| 242 |
with pytest.raises(ValueError, match="teacher label"):
|
| 243 |
-
CLI.verify_release(trusted, roots, tmp_path / "verification.json")
|
| 244 |
|
| 245 |
|
| 246 |
def test_output_cannot_modify_a_verified_download(release):
|
|
@@ -384,3 +390,85 @@ def test_actual_downloaded_dataset_tree_cache_integration():
|
|
| 384 |
report = CLI.verify_bundle(root, expected, None)
|
| 385 |
assert report["verified_files"] == len(expected)
|
| 386 |
assert any("/trees/" in name for name in report["ignored_huggingface_metadata"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
assert report["gpu_parity_checked"] is False
|
| 85 |
assert report["publisher_authenticity_checked"] is False
|
| 86 |
assert report["download_freshness_checked"] is False
|
| 87 |
+
assert report["skipped_bundles"] == []
|
| 88 |
for bundle in CLI.BUNDLES:
|
| 89 |
assert report["bundles"][bundle]["verified_files"] >= 2
|
| 90 |
assert report["bundles"][bundle]["release_files_sha256"] == CLI.sha256(
|
|
|
|
| 220 |
CLI.verify_release(trusted, roots, tmp_path / "verification.json")
|
| 221 |
|
| 222 |
|
| 223 |
+
@pytest.mark.parametrize("skip_demo", [False, True])
|
| 224 |
+
def test_dataset_schema_audited_even_when_corruption_is_rehashed_consistently(
|
| 225 |
+
release, tmp_path, skip_demo
|
| 226 |
+
):
|
| 227 |
trusted, roots, _ = release
|
| 228 |
dataset = roots["dataset"]
|
| 229 |
rows = [json.loads(line) for line in (dataset / "train.jsonl").read_text().splitlines()]
|
|
|
|
| 243 |
trusted_json["files"][f"dataset/{name}"] = entry(dataset / name)
|
| 244 |
trusted_json["dataset_manifest_sha256"] = CLI.sha256(dataset / "manifest.json")
|
| 245 |
trusted.write_text(json.dumps(trusted_json))
|
| 246 |
+
if skip_demo:
|
| 247 |
+
roots = {name: root for name, root in roots.items() if name != "demo"}
|
| 248 |
with pytest.raises(ValueError, match="teacher label"):
|
| 249 |
+
CLI.verify_release(trusted, roots, tmp_path / "verification.json", skip_demo=skip_demo)
|
| 250 |
|
| 251 |
|
| 252 |
def test_output_cannot_modify_a_verified_download(release):
|
|
|
|
| 390 |
report = CLI.verify_bundle(root, expected, None)
|
| 391 |
assert report["verified_files"] == len(expected)
|
| 392 |
assert any("/trees/" in name for name in report["ignored_huggingface_metadata"])
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
def test_explicit_skip_demo_verifies_only_model_and_dataset(release, tmp_path):
|
| 396 |
+
trusted, roots, counts = release
|
| 397 |
+
# A bad demo is deliberately outside this explicitly selected scope.
|
| 398 |
+
(roots["demo"] / "README.md").write_text("not verified")
|
| 399 |
+
selected = {name: roots[name] for name in ("model", "dataset")}
|
| 400 |
+
report = CLI.verify_release(trusted, selected, tmp_path / "verified.json", skip_demo=True)
|
| 401 |
+
assert report["status"] == "verified"
|
| 402 |
+
assert set(report["bundles"]) == {"model", "dataset"}
|
| 403 |
+
assert report["skipped_bundles"] == ["demo"]
|
| 404 |
+
assert "demo explicitly skipped and not checked" in report["scope"]
|
| 405 |
+
assert report["dataset_counts"] == counts
|
| 406 |
+
for name in selected:
|
| 407 |
+
assert report["bundles"][name]["release_files_sha256"] == CLI.sha256(
|
| 408 |
+
selected[name] / "release-files.json"
|
| 409 |
+
)
|
| 410 |
+
|
| 411 |
+
|
| 412 |
+
@pytest.mark.parametrize("bundle", ["model", "dataset"])
|
| 413 |
+
def test_skip_demo_keeps_payload_integrity_checks(release, tmp_path, bundle):
|
| 414 |
+
trusted, roots, _ = release
|
| 415 |
+
path = roots[bundle] / "README.md"
|
| 416 |
+
path.write_bytes(b"X" * path.stat().st_size)
|
| 417 |
+
selected = {name: roots[name] for name in ("model", "dataset")}
|
| 418 |
+
with pytest.raises(ValueError, match="SHA256 mismatch"):
|
| 419 |
+
CLI.verify_release(trusted, selected, tmp_path / "verified.json", skip_demo=True)
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
@pytest.mark.parametrize(
|
| 423 |
+
"names,skip_demo",
|
| 424 |
+
[(("model", "dataset"), False), (("model", "dataset", "demo"), True), (("model",), True)],
|
| 425 |
+
)
|
| 426 |
+
def test_roots_must_match_explicit_verification_scope(release, tmp_path, names, skip_demo):
|
| 427 |
+
trusted, roots, _ = release
|
| 428 |
+
selected = {name: roots[name] for name in names}
|
| 429 |
+
with pytest.raises(ValueError, match="verification needs"):
|
| 430 |
+
CLI.verify_release(trusted, selected, tmp_path / "verified.json", skip_demo=skip_demo)
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
@pytest.mark.parametrize("flags", [[], ["--skip-demo", "--demo", "unused"]])
|
| 434 |
+
def test_cli_requires_exactly_one_demo_mode(release, tmp_path, flags):
|
| 435 |
+
trusted, roots, _ = release
|
| 436 |
+
with pytest.raises(SystemExit) as error:
|
| 437 |
+
CLI.main(
|
| 438 |
+
[
|
| 439 |
+
"--trusted-manifest",
|
| 440 |
+
str(trusted),
|
| 441 |
+
"--model",
|
| 442 |
+
str(roots["model"]),
|
| 443 |
+
"--dataset",
|
| 444 |
+
str(roots["dataset"]),
|
| 445 |
+
"--output",
|
| 446 |
+
str(tmp_path / "verified.json"),
|
| 447 |
+
*flags,
|
| 448 |
+
]
|
| 449 |
+
)
|
| 450 |
+
assert error.value.code == 2
|
| 451 |
+
assert not (tmp_path / "verified.json").exists()
|
| 452 |
+
|
| 453 |
+
|
| 454 |
+
def test_cli_skip_demo_records_scope(release, tmp_path, capsys):
|
| 455 |
+
trusted, roots, _ = release
|
| 456 |
+
output = tmp_path / "verified.json"
|
| 457 |
+
assert (
|
| 458 |
+
CLI.main(
|
| 459 |
+
[
|
| 460 |
+
"--trusted-manifest",
|
| 461 |
+
str(trusted),
|
| 462 |
+
"--model",
|
| 463 |
+
str(roots["model"]),
|
| 464 |
+
"--dataset",
|
| 465 |
+
str(roots["dataset"]),
|
| 466 |
+
"--skip-demo",
|
| 467 |
+
"--output",
|
| 468 |
+
str(output),
|
| 469 |
+
]
|
| 470 |
+
)
|
| 471 |
+
== 0
|
| 472 |
+
)
|
| 473 |
+
assert json.loads(output.read_text())["skipped_bundles"] == ["demo"]
|
| 474 |
+
assert json.loads(capsys.readouterr().out)["skipped_bundles"] == ["demo"]
|
release-files.json
CHANGED
|
@@ -17,8 +17,8 @@
|
|
| 17 |
"sha256": "d829a8058a59c861a083171807d76097d5420c6b4c88fcdb72d7566d7139d06e"
|
| 18 |
},
|
| 19 |
"README.md": {
|
| 20 |
-
"bytes":
|
| 21 |
-
"sha256": "
|
| 22 |
},
|
| 23 |
"checkpoint/adapter/README.md": {
|
| 24 |
"bytes": 1076,
|
|
@@ -65,16 +65,16 @@
|
|
| 65 |
"sha256": "d829a8058a59c861a083171807d76097d5420c6b4c88fcdb72d7566d7139d06e"
|
| 66 |
},
|
| 67 |
"code/README.md": {
|
| 68 |
-
"bytes":
|
| 69 |
-
"sha256": "
|
| 70 |
},
|
| 71 |
"code/docs/clef.md": {
|
| 72 |
"bytes": 6241,
|
| 73 |
"sha256": "99db0517a7c8899425f0223302adf811e0d304d7d5c84a2180c581b158e9c134"
|
| 74 |
},
|
| 75 |
"code/docs/demo-hosting.md": {
|
| 76 |
-
"bytes":
|
| 77 |
-
"sha256": "
|
| 78 |
},
|
| 79 |
"code/docs/evaluation-protocol.md": {
|
| 80 |
"bytes": 10075,
|
|
@@ -113,20 +113,20 @@
|
|
| 113 |
"sha256": "f38988dcd808b5770762c9fbb5504102c3a46c8ec674b39147d17d0ff3c10ada"
|
| 114 |
},
|
| 115 |
"code/docs/tutorials/06-release.md": {
|
| 116 |
-
"bytes":
|
| 117 |
-
"sha256": "
|
| 118 |
},
|
| 119 |
"code/pyproject.toml": {
|
| 120 |
"bytes": 1210,
|
| 121 |
"sha256": "bb33447551da3478ecd779f670c2209bf9fff6ca55b927a211263a0f11347349"
|
| 122 |
},
|
| 123 |
"code/release/dataset-card.md": {
|
| 124 |
-
"bytes":
|
| 125 |
-
"sha256": "
|
| 126 |
},
|
| 127 |
"code/release/model-card.md": {
|
| 128 |
-
"bytes":
|
| 129 |
-
"sha256": "
|
| 130 |
},
|
| 131 |
"code/reports/clef-development.json": {
|
| 132 |
"bytes": 1709,
|
|
@@ -149,8 +149,8 @@
|
|
| 149 |
"sha256": "4766d0224a8bddc8c6e6fe0e86e75937f65abdb261667d5d59bd3d482c8adb89"
|
| 150 |
},
|
| 151 |
"code/reports/final-study.md": {
|
| 152 |
-
"bytes":
|
| 153 |
-
"sha256": "
|
| 154 |
},
|
| 155 |
"code/reports/final-summary.json": {
|
| 156 |
"bytes": 41711,
|
|
@@ -189,8 +189,8 @@
|
|
| 189 |
"sha256": "f3283b5b238b324bb1b906cadcaba036d6972d0c5218fea8265111467d65eefc"
|
| 190 |
},
|
| 191 |
"code/scripts/build_release.py": {
|
| 192 |
-
"bytes":
|
| 193 |
-
"sha256": "
|
| 194 |
},
|
| 195 |
"code/scripts/evaluate_clef.py": {
|
| 196 |
"bytes": 26503,
|
|
@@ -221,12 +221,12 @@
|
|
| 221 |
"sha256": "b951fe76490485ec420729d33af9c097827a241b7551b58293aa6f44b21111e2"
|
| 222 |
},
|
| 223 |
"code/scripts/verify_release.py": {
|
| 224 |
-
"bytes":
|
| 225 |
-
"sha256": "
|
| 226 |
},
|
| 227 |
"code/source-manifest.json": {
|
| 228 |
"bytes": 8751,
|
| 229 |
-
"sha256": "
|
| 230 |
},
|
| 231 |
"code/src/stackcraft/__init__.py": {
|
| 232 |
"bytes": 82,
|
|
@@ -385,8 +385,8 @@
|
|
| 385 |
"sha256": "afbf2dc34c6956b61263bbb7d2ff8f021a52f136d4c91d8f3b98bac120814a56"
|
| 386 |
},
|
| 387 |
"code/tests/test_verify_release.py": {
|
| 388 |
-
"bytes":
|
| 389 |
-
"sha256": "
|
| 390 |
},
|
| 391 |
"code/uv.lock": {
|
| 392 |
"bytes": 116814,
|
|
|
|
| 17 |
"sha256": "d829a8058a59c861a083171807d76097d5420c6b4c88fcdb72d7566d7139d06e"
|
| 18 |
},
|
| 19 |
"README.md": {
|
| 20 |
+
"bytes": 8931,
|
| 21 |
+
"sha256": "2ac4c9504249d15b67e7627ac69f872456f02a510b99fc7df077c9e1d5ae583f"
|
| 22 |
},
|
| 23 |
"checkpoint/adapter/README.md": {
|
| 24 |
"bytes": 1076,
|
|
|
|
| 65 |
"sha256": "d829a8058a59c861a083171807d76097d5420c6b4c88fcdb72d7566d7139d06e"
|
| 66 |
},
|
| 67 |
"code/README.md": {
|
| 68 |
+
"bytes": 7440,
|
| 69 |
+
"sha256": "730575eb0fe32306df5f17e6bbb67208d09cab3c1395bdc0dc30f77eb32baf45"
|
| 70 |
},
|
| 71 |
"code/docs/clef.md": {
|
| 72 |
"bytes": 6241,
|
| 73 |
"sha256": "99db0517a7c8899425f0223302adf811e0d304d7d5c84a2180c581b158e9c134"
|
| 74 |
},
|
| 75 |
"code/docs/demo-hosting.md": {
|
| 76 |
+
"bytes": 8291,
|
| 77 |
+
"sha256": "f7ecf2c9169e8e783da8231c8b97d798726fcabf29cb9e534f9020fc54540f2c"
|
| 78 |
},
|
| 79 |
"code/docs/evaluation-protocol.md": {
|
| 80 |
"bytes": 10075,
|
|
|
|
| 113 |
"sha256": "f38988dcd808b5770762c9fbb5504102c3a46c8ec674b39147d17d0ff3c10ada"
|
| 114 |
},
|
| 115 |
"code/docs/tutorials/06-release.md": {
|
| 116 |
+
"bytes": 13983,
|
| 117 |
+
"sha256": "2aa0f1d8370eb0a4b92b6e43b2ffc36045b2503c41798bc478bd789f6b4156c6"
|
| 118 |
},
|
| 119 |
"code/pyproject.toml": {
|
| 120 |
"bytes": 1210,
|
| 121 |
"sha256": "bb33447551da3478ecd779f670c2209bf9fff6ca55b927a211263a0f11347349"
|
| 122 |
},
|
| 123 |
"code/release/dataset-card.md": {
|
| 124 |
+
"bytes": 4058,
|
| 125 |
+
"sha256": "0608688d7ef979fa9e559012cef9316f49f70ce3482b357b3657631d489666c4"
|
| 126 |
},
|
| 127 |
"code/release/model-card.md": {
|
| 128 |
+
"bytes": 6472,
|
| 129 |
+
"sha256": "916e38607f501f2efdb5bf0cad41741932f8d27c86b92a5aed47e9900e60fdfc"
|
| 130 |
},
|
| 131 |
"code/reports/clef-development.json": {
|
| 132 |
"bytes": 1709,
|
|
|
|
| 149 |
"sha256": "4766d0224a8bddc8c6e6fe0e86e75937f65abdb261667d5d59bd3d482c8adb89"
|
| 150 |
},
|
| 151 |
"code/reports/final-study.md": {
|
| 152 |
+
"bytes": 13778,
|
| 153 |
+
"sha256": "1f9e85304aa00c57e0410ed099cc609037d010c2291778c6788d2f1b14f9d834"
|
| 154 |
},
|
| 155 |
"code/reports/final-summary.json": {
|
| 156 |
"bytes": 41711,
|
|
|
|
| 189 |
"sha256": "f3283b5b238b324bb1b906cadcaba036d6972d0c5218fea8265111467d65eefc"
|
| 190 |
},
|
| 191 |
"code/scripts/build_release.py": {
|
| 192 |
+
"bytes": 29040,
|
| 193 |
+
"sha256": "d0a728096319f7b4e631bbea755a209b8d93e38a981dcf7bbcd69fb70559723c"
|
| 194 |
},
|
| 195 |
"code/scripts/evaluate_clef.py": {
|
| 196 |
"bytes": 26503,
|
|
|
|
| 221 |
"sha256": "b951fe76490485ec420729d33af9c097827a241b7551b58293aa6f44b21111e2"
|
| 222 |
},
|
| 223 |
"code/scripts/verify_release.py": {
|
| 224 |
+
"bytes": 18202,
|
| 225 |
+
"sha256": "84ed60da7f66d053a5acb250b745f318aaf46ab05554d586c83e85a2d806e4c4"
|
| 226 |
},
|
| 227 |
"code/source-manifest.json": {
|
| 228 |
"bytes": 8751,
|
| 229 |
+
"sha256": "1523dc586bf0e67e3b31b8f0bd35d85fabf2f3e44ae1ab41cd07a6f00653426b"
|
| 230 |
},
|
| 231 |
"code/src/stackcraft/__init__.py": {
|
| 232 |
"bytes": 82,
|
|
|
|
| 385 |
"sha256": "afbf2dc34c6956b61263bbb7d2ff8f021a52f136d4c91d8f3b98bac120814a56"
|
| 386 |
},
|
| 387 |
"code/tests/test_verify_release.py": {
|
| 388 |
+
"bytes": 19041,
|
| 389 |
+
"sha256": "e3c1cf0b2d0bf48a949ed7cf0ec42283188edb645a34e5f89ff1473b16dce765"
|
| 390 |
},
|
| 391 |
"code/uv.lock": {
|
| 392 |
"bytes": 116814,
|