[PMAT-254] README derived + enforced by pv contract and SHACL shape - #256
Merged
Merged
Conversation
…shape (Refs #254) - README.md rewritten short; examples are files under examples/readme/ with .expected output; version and MSRV derive from Cargo.toml. - Removed wrong claims: `ruchy wasm compile`/`wasm run` (no such commands), hand-typed 16,102-test count and badge, the async/http example that does not run, `cargo install ruchy` as the way to get 5.0.0-beta.2. - contracts/ruchy-readme-v1.yaml: pv contract (pv validate clean) whose SHACL shape grades contracts/ruchy-readme-claims.json (pv lint --gate shapes: Pass). - src/readme_contract.rs (lib test, runs in CI): claims fresh, version/MSRV, examples == files and evaluate, links resolve, shape graded in-process, no hand-typed counts, positive control. - tests/readme_contract.rs + readme-contract CI job (gate needs it): examples' stdout == .expected, Quick start commands exit 0, compiled binary output, Commands-table entries exist in `ruchy --help`. - ruchy package inherits rust-version (only [workspace.package] declared it). Closes: PMAT-254 Pmat-Ticket: PMAT-254 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false) {
"ticket": "PMAT-254",
"head": "d7387791ad0e2c8834e37e1e0d0035bf92f103fd",
"width": 1,
"executor": "agy",
"agreed": true,
"auto_merge": {
"checked": true,
"was_armed": false,
"disarmed": false,
"note": "auto-merge not armed"
},
"lanes": [
{
"lane": 1,
"verdict": "PASS",
"findings": 0
}
]
} |
…oof (Refs #254) - src/readme_contract.rs: evaluate() parses the whole file with Parser::parse. Interpreter::eval_string uses parse_expr, which stops after the first expression, so plant M4 (a syntax error on the last line of an example) stayed green on the lib gate. It is now RED on both gates. - docs/audits/readme-mutation-PMAT-254.{sh,txt}: 11 plants each turn a gate RED; baseline M0 and M8 (after the trapped restore) are green. - docs/audits/quorum-PMAT-254.json: sonnet-5 + agy gemini-3.1-pro-high + haiku-4-5 all PASS on d738779. Pmat-Ticket: PMAT-254 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Delta quorum on a14f517 (diff d738779..a14f517): claude-sonnet-5 PASS, agy gemini-3.1-pro-high PASS (model measured from the agy log), claude-haiku-4-5 PASS. Sonnet noted that the commit message says 11 plants when there are 10. That is corrected in the PR body. Author claude-opus-5-5 is excluded. Marked degraded: same-family. |
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.
Refs #254. Operator: "fix README.md via SHACL/pv enforce it is shambolic".
What changed
contracts/ruchy-readme-claims.json. The following wrong claims are removed:ruchy wasm compile|run: these subcommands do not exist.cargo install ruchywas presented as installing 5.x; it installs 4.2.1.--features mcp.examples/readme/*.ruchy, each with a.expectedoutput file. The README fences are byte-identical to those files.contracts/ruchy-readme-v1.yaml: pv contract with an ONT-001 SHACL shape (closed; pattern/in/min/max) over the claims JSON.pv validatepasses with 0 errors and 0 warnings.pv lint contracts --gate shapesreturns Pass with 0 violations.src/readme_contract.rs(lib, 7 tests). This is the half that runs in sovereign-ci. It checks:tests/readme_contract.rs(binary, 3 tests) runs against theruchybuilt from HEAD:.expected;ruchy --help, and<cmd> --helpsucceeds;ruchystarts the REPL.readme-contractjob.gatenow needs bothciandreadme-contract.rust-version.workspace = trueon theruchypackage. Without itCARGO_PKG_RUST_VERSIONwas empty, so the MSRV claim had no source to check against.Defects found (filed, not hidden)
ruchy fmtproduces invalid code:{x:?}becomes{x::?},mutis dropped, and the trailing newline is dropped.ruchy compiledrops loop labels and types an untyped string parameter asi32. Until ruchy fmt corrupts files and ruchy compile drops loop labels / mistypes str params (found by README verification) #255 is fixed, the README does not showfmtand showscompileonly on an example that works.MIT OR Apache-2.0, but only MIT license files exist in the repo. The README says MIT. Cargo.toml is unchanged in this PR.Mutation proof (restore trapped first)
10 plants (the commit message for a14f517 says 11; it is 10). Exit codes: 0 green, non-zero RED,
-means that gate was not run for the plant. Script and table:docs/audits/readme-mutation-PMAT-254.{sh,txt}.The first run left M4 green on the lib gate. The cause:
Interpreter::eval_stringparses only the first expression. a14f517 changed the gate to parse the whole file, and M4 is now RED on both gates. M2a and M6 are caught only by the binary gate, and thegatejob requiresreadme-contract.Quorum
docs/audits/quorum-PMAT-254.json).degraded: same-family.🤖 Generated with Claude Code