Pin DPO preference file in the bundle manifest (attested, secret-scanned) - #56
Merged
Conversation
…scanned) Follow-up to the correctness preference-pair exporter (#52): make the preference file part of the verifiable bundle instead of an out-of-band jsonl. - sparkproof-triton-generate --export-preferences: builds correctness pairs from the run's adjudication, secret-scans each pair (release-gate patterns) so a leaked key/host path never ships, writes preferences.jsonl into the bundle, and sha256-pins it in the manifest (preferences_sha256). - manifest.py: optional preferences_sha256 on both DatasetManifest (v1) and BlackwellDatasetManifest (v2) + build_manifest/build_manifest_v2 params; the pin is carried through the Blackwell re-seal (pipeline/blackwell.py). - verify.py: tamper-evident check — when a bundle pins preferences_sha256, the file must exist and match (mirrors the prompts.jsonl guard). Optional, so existing bundles are unaffected. - publish/hf_dataset.py: ship preferences.jsonl in proof/ when present. - dpo_export.write_preferences_into_bundle helper + tests. Deliberate follow-up: fold preferences_sha256 into the GPU/TDX attestation nonce so the rejected side is attestation-bound, not just sha-referenced. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #52 (correctness preference-pair exporter). Makes the preference file part of the verifiable bundle instead of an out-of-band jsonl, so the SparkDistill DPO track can trust it the same way it trusts the SFT dataset.
What
sparkproof-triton-generate --export-preferences:preferences.jsonlinto the bundle, andpreferences_sha256), carried through the Blackwell re-seal.verifythen re-checks it tamper-evidently, exactly likeprompts.jsonl, and it ships inproof/.Changes
manifest.py: optionalpreferences_sha256on bothDatasetManifest(v1) andBlackwellDatasetManifest(v2) +build_manifest/build_manifest_v2params.pipeline/blackwell.py: carry the pin through the v1→v2 re-seal (one line, mirrorsprompts_sha256/sampling).verify.py: when a bundle pinspreferences_sha256,preferences.jsonlmust exist and match. Optional — existing bundles are unaffected; the check only runs when the pin is present.publish/hf_dataset.py:preferences.jsonlinPROOF_ARTIFACTS(uploaded only when present).dpo_export.write_preferences_into_bundlehelper (secret-scan + sha via the samesha256_fileverify uses).Verification
uv run pytest— 385 passed, 9 skipped ·ruffclean ·pyright0 errors on changed modulesDeliberate follow-up (not in this PR)
Fold
preferences_sha256into the GPU/TDX attestation nonce (hashing.dataset_attestation_nonce+verify_gpu_attestation) so the rejected side is attestation-bound, not just sha-referenced. Thechosenside is already a Merkle-committed verified winner; this MVP keeps the change to the offline-verifiable sha-pin, as flagged in the #52 review.