CAP1-01: bounded OpenUI grammar/scope state graph and exact continuation quotient#333
CAP1-01: bounded OpenUI grammar/scope state graph and exact continuation quotient#333Tyler-R-Kendrick wants to merge 8 commits into
Conversation
- Add slm_training.dsl.analysis.arity package with immutable AnalysisBounds, StateAtom, StateSignature, ArityReport, and SupportOracle. - Implement AST canonicalization stable under binding/placeholder renaming. - Add bounded explorer and ArityAnalyzer emitting versioned, digestible reports. - Add scripts/analyze_grammar_arity.py CLI and pyproject.toml entry point. - Add tests/test_dsl/test_arity_analysis.py regression tests for reproducibility, renaming invariance, and conservative support decisions. - Document in docs/design/cap0-02-arity-analyzer.md and note repository owner. - Configure Linear MCP in .mcp.json for issue workflow. Caveats: partial-prefix continuation BFS is scaffolded; the prior '86 raw frontier states' claim is not reproduced or retired here. No model/ship claim.
…e functions (SLM-79) - Add src/slm_training/dsl/analysis/arity/coding.py with verified constructions and exact coding-theory bounds (Singleton, Hamming, Gilbert-Varshamov, Hamming ball volume, exhaustive code verification). - Add build_mds_7_4_2_3 and build_shortened_ternary_hamming_7_4_3 with exhaustive distance checks. - Add src/slm_training/dsl/analysis/arity/precision.py with strict margin predicate, ternary ECOC width, and ResidualScaleMode guard. - Export public symbols from slm_training.dsl.analysis.arity. - Add tests/test_dsl/test_arity_coding.py covering MDS/ternary constructions, Singleton rejection of q=6, strict margin regression, ECOC detection, and scale-mode guards. - Document in docs/design/cap0-03-coding-precision.md. Caveats: fixture/wiring evidence only; no model/ship claim. A_3(6,3)=38 is an external exact bound, not locally verified here.
…bust arms (SLM-79) - Add CodingMetadata dataclass to ArityReport with bound/construction, proof status, source citation, utilization, and scale-mode fields. - Add suggest_robust_arms helper that excludes disproven (K=6,d=4) and (K=3,d=6) arms and keeps verified (K=7,d=4) MDS and ternary n=7 arms. - Wire --include-coding-metadata flag into analyze_grammar_arity CLI. - Add tests for report metadata serialization/digest and suggestion filtering. - Update docs/design/cap0-03-coding-precision.md. Honest caveat: ternary d=7/d=8 slack arms are not emitted because no locally verified construction is available; only the verified [7,4,3]_3 shortened Hamming arm is suggested.
…ware reports (SLM-80) - Add certificate.py with EvidenceKind, ConstraintFrame, ExactEvidence, EstimatedEvidence, ArityResult, ArityProvenance, ArityCertificate, ArityCertificateBundle, and deterministic digests. - Enforce validation rules: EXACT_LOCAL needs witness, EXACT_EXTERNAL needs source URI, ESTIMATED needs positive sample count and provenance. - Add render.py with Markdown, CSV, and one-line summary renderers. - Extend analyze_grammar_arity CLI with --certificate, --out-md, --out-csv, --one-line, and provenance flags. - Add exact_certificate_from_report helper that classifies reports as exact-local when a verified construction is present, otherwise unknown. - Add tests/test_dsl/test_arity_certificate.py with 10 regression tests covering validation, JSON round-trip, digest stability, and renderers. - Add docs/design/cap0-04-arity-certificates.md and cross-links from cap0-02/cap0-03 docs. Honest caveat: fixture/wiring evidence only; no model, checkpoint, or ship-quality claim.
…tinuation quotient - Add AnalysisProfile and openui-cap-v1 fixture profile. - Implement StateGraph over ChoiceDecodeState with deterministic forced-suffix collapse, canonical StateFingerprint, and bottom-up minimization. - Wire --dsl-pack/--profile/--representation CLI path in scripts/analyze_grammar_arity.py. - Add regression tests for exact/unknown profiles, alpha-equivalence, scope-future distinction, forced-suffix collapse, replay, serialization, and over-merged fingerprints. - Record measured results in docs/design/iter-cap1-01-state-graph-20260717.md.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9197057 to
fef03b1
Compare
Status: needs a fresh CAP1-01 re-implementation (can't be adapted as-is)I've landed CAP0-03 (#327) and CAP0-04 (#330) onto main's canonical arity API, and attempted to adapt CAP1-01 here — but it isn't cleanly portable, and I won't corrupt The named deliverable — "bounded OpenUI grammar/scope state graph and enumeration" — is this branch's 724-line The only stub-free, self-contained file, What's needed: a fresh CAP1-01 implementation authored against main's canonical No stub was reintroduced, no canonical file reverted, and no test weakened. Generated by Claude Code |
|
Correction to my note above: CAP2-01 (#336) turned out not to depend on CAP1-01 after all. Its only real dependency is CAP0-03's coding constructions ( So only CAP1-01 (this PR) still needs the fresh re-implementation described above — nothing else in the CAP chain is blocked on it. CAP0-03 (#327), CAP0-04 (#330), CAP2-01 (#336), and CAP3-01 (#338) are all merged onto main's canonical arity API. Generated by Claude Code |
|
Closing as superseded by main. SLM-81 is already Done and main now contains the bounded state-graph/analyzer package under src/slm_training/dsl/analysis/arity/ along with the associated fixtures. This branch retains additional cap0-* design docs that can be cherry-picked in a follow-up if still needed. |
Implements the bounded OpenUI state graph over the choice-codec owner, adds the openui-cap-v1 fixture profile, and records measured results.
Closes SLM-81.