feat: 14 entity contracts (155 elements, all Grade A) + apr code spec + repo hardening#721
Closed
feat: 14 entity contracts (155 elements, all Grade A) + apr code spec + repo hardening#721
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…(MUDA) Flaky tests are waste (MUDA). The test asserted linear scaling with 10x threshold which is timing-dependent and fails on shared CI runners. Fix: keep correctness assertion (filter produces results, no errors), delete performance assertion (belongs in cargo bench, not cargo test). No CI exclusions needed — the test is now deterministic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…707) Updated spec with: - Run 2 results (2026-04-09): same verdict WARN, S1/GH-707 confirmed stable FAIL - Lessons learned: $? vs pipe exit code, lint/validate non-zero by design - Stable PASS/FAIL/WARN categorization across 2 consecutive runs - Updated implementation priority with enforcement status per contract - Open work items with blocking gates and priorities Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d7be195 to
4d7906d
Compare
3b2e56b to
b96e57d
Compare
…fle (Rule 7) Per pmat query --coverage-gaps: - shell_vocab: 35 tests (shell_split edge cases) - classification: 10 tests (fit_minibatch/stochastic) - per_layer_merge: 22 tests (validate_merge_config) - rosetta: 7 tests (validate_safetensors_metadata_only) - apr serialization: 27 tests (from_bytes error paths) - ties/dare merge: 14 tests (merge strategies) Bug fix: integer overflow in fit_stochastic/fit_minibatch shuffle (wrapping_mul/wrapping_add — panicked in debug mode at epoch >= 3) aprender-core: 13,079 tests, 94.39% line coverage (was 94.19%) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b96e57d to
6a60839
Compare
…ning Entity contract system scoring repository artifacts 0-100 with letter grades: Repo-level (9 contracts, 105 elements): - readme-entity-v1: 15 elements — ToC, badges, expected output, freshness, architectures table - repo-entity-v1: 16 elements — SECURITY.md, .gitattributes, lint inheritance - crate-entity-v1: 12 elements — edition/keywords/categories/docs.rs on 73 crates - ci-entity-v1: 12 elements — permissions, SHA pins, timeouts on 7 workflows - changelog-entity-v1: 10 elements — v0.29.3 entry with entity contract changes - dep-entity-v1: 10 elements — deny.toml complete - spec-entity-v1: 10 elements — Status/Version/Date on 400+ spec files - api-entity-v1: 10 elements — #![warn(missing_docs)] on aprender-core - error-entity-v1: 10 elements — exit codes and stderr consistent Domain-specific (5 contracts, 50 elements): - subcommand-entity-v1: 10 elements per command, 56/56 pass - model-entity-v1: 10 elements per model file - template-entity-v1: 10 elements per chat template - binary-entity-v1: 10 elements — shell completions + man page added - server-entity-v1: 10 elements per serve endpoint apr code spec (components/code.md): - 6 equations, 6 falsification tests, 10 entity elements - Dogfooded: auto-discovers Qwen3-1.7B, launches apr serve, 16 tools - arXiv: 2310.03744, 2307.16789, 2310.12931, 2310.06770, 2402.01032 - Competitive analysis: claude-code, aider, continue, open-interpreter, tabby Additional: - spec-schema-v1 contract (mono spec <=500 lines, component index, TOC) - Fixed: apr explain exit code on missing file (exit 3, not 0) - Fixed: GrepTool schema says "substring" not "regex" (batuta) - All 14 entity contracts at 100/100 Grade A Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added ch14b: Entity Contracts (0-100 Scoring) to Part IV: Production - Covers the 14-contract system: scoring formula, profiles, calibration, current scores - Fixed README contract count: 540 → 547 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing as stale — branch is CONFLICTING with main after 10+ PRs merged since April 9 (PRs #726, #731, #733, #734, #737, #738, #740+). The coverage target (#715) has been met via PMAT-546 (+18 core tests) and PMAT-540 Phase 5 (+46 apr-cli tests). Entity contracts can be re-created from the branch if needed. To recover: |
auto-merge was automatically disabled
April 13, 2026 15:48
Pull request was closed
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
ml-frameworkprofileRepo-Level Contracts (9, 105 elements)
Domain-Specific Contracts (5, 50 elements)
Additional
apr codespec with 6 equations, 10 entity elements, dogfooded with Qwen3 1.7Bapr completions bash|zsh|fish+apr man(hidden subcommands)apr explainexit code fix (exit 3 on missing file, was exit 0)Test plan
cargo test -p aprender-contracts --lib— lint passescargo check --workspace— clean compileapr code -p "test" --max-turns 1— auto-discovers model, runs inferenceapr completions bash— generates valid completion scriptapr man— generates valid roff man pageapr explain /nonexistent— exits 3 (was 0)mdbook build book/— succeeds🤖 Generated with Claude Code