contracts(apr-pretrain-from-init): v1.2.0 → v1.3.0 — FALSIFY-INIT-ARCH-MATCH-001 (§86.6 closure)#1761
Merged
Merged
Conversation
…H-MATCH-001 (SPEC §86.6 closure) Codifies the INV-INIT-ARCH-MATCH-001 invariant authored as runtime code in PR #1760 (`validate_init_arch_matches_tensor_evidence` in aprender-train::train::pretrain_real). Adds: - FALSIFY-INIT-ARCH-MATCH-001: integration falsifier bound to the unit-test family `cargo test -p aprender-train --lib inv_init_arch_match_001` (7 tests covering: canonical §86 reject, inverse reject, matching qwen2 accept, matching llama accept, None metadata skip, unmappable metadata skip, GGUF-unknown tensor skip). - INV-INIT-ARCH-MATCH-001 proof_obligation: safety invariant — when both metadata.architecture and tensor-name-inferred family resolve to concrete distinct slugs, gate MUST fail-fast before any training step. No false-positive when either side returns "unknown". ## Salvage path The error message includes an inline `apr stamp` recipe (PR #1757): ``` apr stamp <pre-p0k.apr> --architecture qwen2 --hf-architecture Qwen2ForCausalLM \ -o <stamped.apr> apr pretrain --init <stamped.apr> ... ``` ## Refs - PR #1742 (PMAT-690 P0-K base — producer-side stamping) - PR #1750 (P3-A `apr inspect --quality` — surfaces hf_identity=0/20 pre-stamp) - PR #1754 (SPEC §85 P2-E findings — context) - PR #1757 (apr stamp HF identity extension — salvage path) - PR #1758 (SPEC §86 amendment — defect specification this contract closes) - PR #1760 (INV-INIT-ARCH-MATCH-001 runtime implementation) - memory/feedback_upstream_metadata_masquerade.md (methodology #33) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 tasks
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.
Summary
Closes the §86.6 contract follow-up: codifies the INV-INIT-ARCH-MATCH-001 invariant authored as runtime code in PR #1760.
Changes to
apr-pretrain-from-init-v1.yamlcargo test -p aprender-train --lib inv_init_arch_match_001(7 tests authored in feat(pretrain): INV-INIT-ARCH-MATCH-001 — fail-fast on arch-mismatched --init (§86.6) #1760 covering canonical §86 reject + inverse + matching + skip cases).metadata.architectureand tensor-name-inferred family resolve to concrete distinct slugs, gate MUST fail-fast before any training step. No false-positive when either side returns\"unknown\".Salvage path (in the error message)
Requires PR #1757 (apr stamp HF identity extension).
Test plan
cargo test -p aprender-contracts --lib lint::gates::tests::load_contracts_real— passes (schema valid)feedback_contract_schema_dryrun.md:metadata.descriptionalready presentfalsification_testsuses sequence form (not map)proof_obligations.typeis enum-valid (safety)Refs
memory/feedback_upstream_metadata_masquerade.md(methodology Add feature importance example to random_forest_regression.rs #33)🤖 Generated with Claude Code