Repository navigation
Return verification v3: split-sealed data, one-time test opening, reload tolerance, fusion recompute - #39
Merged
Conversation
…per-language counts
…rations Encoder registrations now use advisory-encoder-registration-v2: they record the installed torch, transformers, tokenizers and safetensors versions from package metadata (no torch import), refuse to register without them, refuse to load or describe under different versions, and publish kind, dataset and weights_stage. v1 registrations serve no new advice; feedback recorded before stays readable.
checkpoint.json v3 states variant (pack, pair, pair_aggregate), mean pooling, evidence_threshold and max_tokens, and model_revision hashes them with the weights. Registration checks head array names and shapes, the encoder config and the tokenizer capacity, and returns encoder_architecture_unsupported for structures outside the specification. The pretrained_untrained_heads stage registers only as synthetic_fixture with an honest outer manifest. Legacy fixture v2 era checkpoints keep registering with the fixed 0.5 threshold. pair_aggregate's deterministic aggregation follows the specification examples.
…n and a ledger record
HuggingFaceCandidate gains pair_aggregate, the declared evidence threshold, the pretrained_untrained_heads stage (mark_untrained_heads) and writes the v3 layout with canonical JSON and byte-reproducible heads.npz; fixture v2 era checkpoints still load with the fixed 0.5 threshold. The standalone reference export script writes the same layout from a producer's encoder directory and head state, and seals the outer manifest. Optional checks prove the script and save_checkpoint register the same model for all three variants.
…time test opening
encoder-return.md states the layout, checkpoint.json fields, head arrays, the encoder input text, the three variants and the pair_aggregate rule, after_weights, model_revision, weights stages, registration and the runtime pin, the reference script and every refusal code. The reference script also gives the exact encoder input strings and refuses mismatched deliveries.
…rn's artifact roles
validate_return_identity checks only the fixture v2 outer-manifest fields that every return kind shares, so linear returns that reuse it are accepted. The encoder path checks artifact_kind and artifact_protocol itself (is_encoder_return), encoder_registry.handles_return names the manifests it claims, and the encoder protocol does not claim linear or fusion registrations.
…t metadata before the opening
…eads registrations
… untrained-heads declaration
validate_return_identity, which linear returns reuse, again requires a completed, trained delivery and refuses any other weights_stage. Encoder returns go through validate_encoder_return_identity, which admits the honest pretrained-untrained-heads declaration only after the manifest is known to be an encoder return and only for a synthetic_fixture registration. SEAM-03 covers linear manifests carrying it.
…e half A pair counts as support only when its support is at or over the threshold and above its unrelated probability, and pair_aggregate thresholds below 0.5 are refused at registration, in the candidate and in the reference script, so an unrelated-leaning pair never becomes support. The specification examples add the tie and most-likely-unrelated cases and two refused low thresholds.
checkpoint.json tasks other than relation now fail as model_return_task_or_labels_invalid, every file in the return directory must be listed in checkpoint_files with an allowed suffix, pair_label_order is refused on pack and pair, and heads must be float32. The specification lists every registration and load refusal code and says registration does not prove loading.
…pening and name the remaining refusals
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.
Return verification line of the model-reception wave (task book 143, line 147). The data/model owner returns dev predictions, a single pass of test predictions after freeze, a fusion selection record, and a G2v dataset release. Until now
verify-returnaccepted only dev, refused anything containing test, andvalidate-handoffread every partition. This line lets us verify all of these returns independently with offline CLIs, in three new v3 formats. Test stays sealed until a freeze record and an approved TestCampaign exist, and then opens exactly once. Per the 2026-10-12 decision, the user confirms each test opening in chat and the CLI has no bypass flag. Learners never see test, and there is no UI change.What changes
rolecraft-dataset-split-sealed-v1(specdocs/data/return-v3/dataset-split-sealed-v1.md):layout,test_sealedandlabel_orders.data/<s>.inputs.jsonl,data/<s>.labels.jsonlandaudit/<s>/{annotations,metadata}.jsonl, sha256-bound insplits.<s>.files.dataset_symlink_forbidden; byte-identical files across splits →dataset_split_file_not_isolated.predictions-v3.md):return_schema_version=3,task_type=relation. v2 rows are still accepted. Unknowntask_typeor a missing version is refused per row.validate-handoffaccepts v3 rows too.tolerance(null when not reloaded),max_probability_deviationandmismatches;comparisonis nowprobabilities_within_absolute_tolerance_labels_and_evidence_sets_exact.counts{format_failures, abstentions, coverage}, withevaluation_setting=given_evidence_only. A missing language → blocked.verify-return --fusion-selectionrecomputes the whole dev grid underjoint-first-dev-v1. The result is rejected or refused for: a different selected point, an endpoint gain claim, an alpha that disagrees with the registration, a wrong gain flag, a component mismatch, an invalid grid or protocol, or the test partition.test-opening-v1.md):--partition test --freeze --freeze-hash --campaign --campaign-hash --operator. Freeze and campaign must share a root (HELD-07).<freeze dir>/held-out/<dataset manifest sha256>/test.json. It holds campaign, candidate, freeze and campaign sha, registration, verifier digest, operator and time.--ledger; the location depends on neither the command line nor the environment.held_out_test_already_opened(403) with zero test reads, including after changing directory or environment, going through a symlink, or copying the opened freeze dir.held_out_test_authorization_required(403).held_out_campaign_invalid.held_out_record_location_invalid.record_id/input_hashnot the sealed records, metadata notsplit=test, a registration that cannot load on this machine. Errors after that point carryopened. A failed verification keeps the record and does not retry.labels_parsed=false).layout,sealed_testand per-languageannotation_trace.artifact_kind,artifact_protocolandlabel_tiers. Linear returns get fixed roles and need noartifact_roles.--split testwith a return manifest is refused on a sealed package.synthetic_fixtureregistration withweights_stage=pretrained_untrained_heads, checked by 146'svalidate_encoder_return_identity.blocked_encoder_runtime_unavailable(neither pass nor fail). Any other encoder registration, external or trained, still exits 2 withpretrained_encoder_dependencies_unavailable.predictions-v3.md§3: exit 0 alone does not mean reloaded; onlyreload.status=matcheddoes.freeze.py, TestCampaign and 144 files unchanged. The new package statusSYNTHETIC_MECHANISM_SAMPLE_NOT_TRAINING_DATAmarks our mechanism samples.Review and verification
080-review-147.md(154): first review plus two re-checks, three rounds in all; final head1e2b85c. First round, onb797c95, sent back 1 P1 and 2 P2:--ledgerdirectory.4698205: 0 P1 and 2 P2.model_return_weights_stage_invalid.5c2ea93: the path now delegates to 146's check and has a CLI-level case on a real registration, and the operating rules are documented.open. Each of these was refused with zero test reads: changing directory or environment, using symlinks, passing--ledger, adding a second campaign, editing the campaign, copying after opening. 6 concurrent first openings produced exactly 1 success. Deleting the record in place still reopens; this counts as tampering.bbfe7ea: 0 P1 and 1 P2. With the encoder extra missing, even a trained external encoder return exited 0 with top-levelpartial, which looks the same as a matched reload. Last fix,1e2b85c: the dependency-missing path is lenient only for synthetic untrained-head registrations, and external encoders still exit 2 (RET-05 +2). Test opening was already safe here: an unloadable registration is refused before the record is written.red/*.mutation.log.1e2b85c, including 146's encoder registration file.eb494c0and 233 againstmain95d4883, with 0 missing and 0 regressed in both.23fb9df(temporary merge): 4 test files, 215 passed. A real fusion registration recomputes as matched, and an altered point is rejected.held_out_test_opened=true.already_opened.b797c95passed (history only). Full gate ran once on the integration tree11e53dd7…(146b765c88→ 14523fb9df→ 1471e2b85c→ 148261118e→ 1492e56be1, integration branch HEAD855b366; 157 receipt).Not claimed / registered
--extra encoder; NumPy attention was used instead.fusion_selection_not_registeredcode-name test waits for 145 to merge; the 145 cross-check did trigger it.review.pygainedmodel_kindsand test admission; DATA-06 numbering is shared with the v3 manifest cases; thecomparisonvalue change goes into the 150 manual.SHA256SUMS(150).Receipt: 完成回执/claude-coordination/147-回传复核与数据格式v3.md.