ONT-4b2: extract:code + extract:lean as focus nodes; 16 of the ONT-0 table's 32 W3C SHACL-Core cases vendored in the gate, 16 accounted for by excluding form; the pinned oracle differential out of it (Refs PMAT-3509) - #3528
Merged
Conversation
…the oracle differential) against #3509 Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ymbol/ and world/ roots), 16 vendored W3C SHACL-Core cases run by the gate, the pinned oracle differential out of gate
extract:code walks the BOUND symbols only — every module_path + function a binding.yaml declares — through a syn module-tree walk (inline mods, file mods, #[path], one re-export hop, impl methods, both [package] and [lib] crate names, a facade and the crate it re-exports tried in order). Fail-closed IN THE GRAPH: a symbol the walk cannot find is still an ont:Symbol with sym:resolved false and sym:unresolvedReason naming the file and the segment, so a ghost binding is a violation naming the symbol instead of a smaller graph. Measured on this tree: 270 bound symbols, 169 resolved, 101 genuinely absent.
extract:lean reads the in-tree theorems through ONT-2a's own scan and rule (a file carrying `sorry` grounds nothing), joins them to the contracts that cite them by ONT-2a's name forms, and counts references that name nothing (lean_refs_unresolved) rather than guessing. 410 statements on this tree.
The W3C arm is two-sided. 16 of ONT-0's 32-case table are translated into the contract dialect and RUN BY THE GATE every time (ontology::w3c); the other 16 are listed by name with the form that puts them outside the subset, so the count is over the cases the subset claims and a case refused by design is never scored as a failure. A failing case declines Unknown{Differential} — never a corpus verdict. tests/oracle/ is a scratch crate DETACHED from the workspace with shacl pinned =0.3.21 (ONT-0's verdict ORACLE, R-13 release gate only); `make oracle` validates the ORIGINAL case files and the real corpus through it and writes the tracked tests/oracle/differential.json (17 cases, 0 disagreements). A planted sh:minCount change in shapes.ttl makes it disagree — measured.
Four conformance fixes the cases and the oracle found in the in-house validator:
- sh:class and targetClass use the rdfs:subClassOf closure (SHACL 2.1.1; W3C class-001), through one index per validate() instead of a scan per node — the corpus gate went 27.2s -> 6.9s in the same commit.
- sh:datatype checks the lexical form is WELL FORMED for the type ("300"^^xsd:byte is a violation; W3C datatype-ill-formed).
- sh:node reports ONE result per failing value on the outer path, with the nested findings as its detail (W3C node-001/-002).
- sh:in is TERM equality: an entry carries the datatype its YAML scalar gives it and the export writes it typed. Before, `in: ["true"]` accepted "true"^^xsd:boolean, which the oracle refuses — 490 results of difference on the real corpus, which is how it was found.
Sigma: code and lean implemented: true, concepts Symbol and Statement. The shapes bound-symbols-resolve and lean-statements-grounded ship COMPUTED AND REPORTED, not armed (§3.9): 101 ghosts and three admitted theorem files exist on main today, and a gate red on its own target the day it merges trains bypass. Arming is one string in lint-baseline.json for the release that cleans them.
check_ont_ratchet.sh, two defects fixed with rows that go red without the fix: entity_types_registered and extractors_implemented grepped the Rust for `EntityType::` and `impl Extractor`, two forms this codebase has never used, so both measured 0 while the baseline carried 1 and 1 from an older tree — they now read Sigma; and `--write` DELETED formal_prose and legacy_unresolved_depends_on, two shrink-only ratchets the sigma and relations gates read from that same file, so updating one ratchet disarmed two others. Self-test 17 -> 23 rows.
Known red, all three the same inherited assertion and none of them this row's: lint_passes_on_real_contracts, ont4b_shapes_gate::the_repo_corpus_passes_..., ont4c1_model_receipts::the_repo_corpus_reports_... assert the real corpus PASSES, and the armed ladder-measured finds 0 witnesses until the re-measured receipts of #3523 are on main (#3526's waiting note). Proven by measurement: with ladder-measured unarmed for one run the same corpus is Pass, 0 violations, 113 reported.
Pmat-Ticket: PMAT-3509
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…n) — ordinal 343, the sh:in message carries the path AND the terms, regenerated census / contracts.nt / tree-reader registry (Refs PMAT-3509) The branch was built on the reconciled 4c1 scratch base; only its two own commits were replayed (`git rebase --onto origin/main bd89c88`). One real conflict, shapes.rs check_lexical: #3530 put the property path at the front of the `in` message (`ont:study/scale: quadratic is not one of …`) and 4b2 renders the value and the list as TERMS (`sh:in` is term equality). Merged: `<path>: <term> is not one of [<terms>]` — #3530's CLI legs (contains path ∧ value ∧ "is not one of") and 4b2's still hold. The four generated files took main's copy and were regenerated with this tree's pv: `pv extract contracts --check` 0; sigma Pass, relations Pass, shapes Pass (shapes_n=5, focus_nodes_n=2318, symbols 169 resolved / 101 unresolved reported, W3C 16/16). Ordinal 340 was apr-cli-pixel-regression on main; 4b2 takes 343 (342 is 4c1's). Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
noahgift
force-pushed
the
PMAT-3509-ont-4b2-oracle-w3c
branch
from
September 19, 2026 15:16
81ef9d7 to
b7bb485
Compare
…he only one — ONT-4b2 reports two more unarmed (Refs PMAT-3509) On the 4b2 tree not_armed_shapes is [ladder-green, bound-symbols-resolve, lean-statements-grounded]; the corpus test pinned the list to one entry, a fact about ONT-4c1's tree rather than about ONT-4c1. Membership is what the row promises (§3.9 reported-first); the fixture test keeps its exact-list form. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…the unused ShapesOutcome import (clippy 1.93 -D warnings) (Refs PMAT-3509) Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
noahgift
marked this pull request as ready for review
September 19, 2026 15:26
…rmed), never pinned to one side of the arming line (Refs PMAT-3509) aprender-ba, on #3528: the 0.68.2 bump (#3498, head 5b22fb2) arms ladder-green, so a test asserting ladder-green ∈ not_armed_shapes goes red on the release branch the moment #3528 lands under it. The row's fact is that the gate computes and reports the shape (a by_shape entry) and lists it on one side or the other; which side is the bump's, not the row's. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
|
quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false) {
"ticket": "PMAT-3509",
"head": "bb738faab1635af346fe24902d81cd5e574c24ae",
"width": 3,
"executor": "agy",
"agreed": false,
"auto_merge": {
"checked": true,
"was_armed": false,
"disarmed": false,
"note": "auto-merge not armed"
},
"lanes": [
{
"lane": 1,
"verdict": "FAIL",
"findings": 1
},
{
"lane": 2,
"verdict": "FAIL",
"findings": 1
},
{
"lane": 3,
"verdict": "FAIL",
"findings": 1
}
]
} |
…the syn edge; the ticket says 16 vendored + 16 accounted for, not 32; the differential re-run on the rebased tree (Refs PMAT-3509) Quorum round 2 on bb738fa, three lanes, three findings, all real: 1. (flash, measured) `make oracle` under this Makefile's .ONESHELL: line 1376 `cd tests/oracle && cargo build` moved the shell for line 1377, whose `$(cd tests/oracle …)` then failed with "No such file" and tried to run `/release/ont-oracle`. Both lines now use --manifest-path and no cd. Proven by running `make oracle-check` after the change: the oracle built, ran, and diffed — which is the second finding. 2. tests/oracle/differential.json was the pre-rebase tree's. Fresh on 45decaf+4b2: cases=17, disagreements=0, corpus agree=true with 103 violations on BOTH sides (was 113/113 — the corpus moved under the rebase: #3530's entity-property fixes and main's contracts). The oracle and pv still agree on every case and on the corpus; the file is the run's output. 3. (pro-high, pro-low) the ticket title said "32 vendored W3C SHACL-Core cases"; the diff vendors 16 and accounts for the other 16 by excluding form (a constraint on the node shape itself, outside the subset), which `the_table_of_ont_0_is_accounted_for_case_by_case` asserts as 16 + 16 = 32 with no id twice. The title now says that, and six acceptance criteria are written from the diff (not the plan) — the CLI leg's `n >= 16` is what is vendored. Roadmap re-aggregated. Also: crates/facades/Cargo.lock regenerated for the `syn` edge aprender-contracts gained (guard-tree R5 on bb738fa: "Cargo.lock is stale"); `cargo metadata --locked` rc 0 in crates/facades. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
|
quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false) {
"ticket": "PMAT-3509",
"head": "f5dd5d7f6f6cd7b0ea5a045db9b505ae9c088928",
"width": 3,
"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
},
{
"lane": 2,
"verdict": "PASS",
"findings": 1
},
{
"lane": 3,
"verdict": "PASS",
"findings": 0
}
]
} |
Round 1 lapsed to the arming-neutral ladder-green assertion (aprender-ba's finding); round 2's three findings — the .ONESHELL cd in make oracle, the stale differential, the 32-vs-16 title — were each answered in the diff. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
noahgift
enabled auto-merge
September 19, 2026 15:46
|
§13.11 rung 1 — quorum shadow verdict Shadow mode: this records a verdict and merges nothing. A refusal |
…/ont-code-symbols-v1.yaml (make readme-sync) (Refs PMAT-3509) guard-cargo on the merge tree: FALSIFY-README-002 (the block is generated, an equality, not a ratchet). Regenerated with the generator the guard names; readme-sync-check and check_readme_claims.sh pass. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
noahgift
disabled auto-merge
September 19, 2026 16:44
Contributor
Author
|
quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false) {
"ticket": "PMAT-3509",
"head": "a6927091a2e29fdaa0de49757d88eed7298795cd",
"width": 3,
"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
},
{
"lane": 2,
"verdict": "PASS",
"findings": 3
},
{
"lane": 3,
"verdict": "PASS",
"findings": 0
}
]
} |
Round 3's 3/3 lapsed to the README CONTRACT_COUNT regeneration (guard-cargo FALSIFY-README-002 on the merge tree). Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
noahgift
enabled auto-merge
September 19, 2026 16:53
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Sep 19, 2026
…cle-w3c # Conflicts: # crates/aprender-contracts-cli/src/commands/lint.rs
Contributor
Author
|
quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false) {
"ticket": "PMAT-3509",
"head": "3329c7cde4f704673d06df5bb50ba2b4e5cf7271",
"width": 3,
"executor": "agy",
"agreed": false,
"auto_merge": {
"checked": true,
"was_armed": false,
"disarmed": false,
"note": "auto-merge not armed"
},
"lanes": [
{
"lane": 1,
"verdict": "NO-VERDICT",
"findings": 0
},
{
"lane": 2,
"verdict": "PASS",
"findings": 3
},
{
"lane": 3,
"verdict": "PASS",
"findings": 0
}
]
} |
Contributor
Author
|
quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false) {
"ticket": "PMAT-3509",
"head": "3329c7cde4f704673d06df5bb50ba2b4e5cf7271",
"width": 3,
"executor": "agy",
"agreed": true,
"auto_merge": {
"checked": true,
"was_armed": false,
"disarmed": false,
"note": "auto-merge not armed"
},
"lanes": [
{
"lane": 1,
"verdict": "PASS",
"findings": 3
},
{
"lane": 2,
"verdict": "PASS",
"findings": 4
},
{
"lane": 3,
"verdict": "PASS",
"findings": 4
}
]
} |
Round 4's 3/3 lapsed to the merge of main ebda31d (#3533 lifted the same function 4b2 had already split; resolution: keep decide_named_gate/decide_shapes_gate, drop single_gate_outcome). Round 5 was two PASS and one lane timed out at 25 min (no verdict, not a finding); round 6 agreed. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
noahgift
enabled auto-merge
September 19, 2026 18:38
noahgift
added a commit
that referenced
this pull request
Sep 19, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
ont-delta: type code
Closes #3509 (0.68.2 requirement, §0.4 second ruling relayed via the release session). Spec: paiml/infra
docs/specifications/paiml-ontology.md§5 ONT-4b2, §3.6, §3.7, R-13, R-15, R-18.DRAFT while it is stacked. This branch is built on the reconciled #3526 (ONT-4c1) + #3516 (
extract:json) tree, because all three touchextract::allandshapes_gate.rs. It rebases onto main after #3516 → #3523 → #3526 land, and the three known-red tests below go green with #3523's receipts. Quorum and seam review can run now; nothing here waits on them.extract:code— the focus objects are the bound symbols: everymodule_path+functionabinding.yamldeclares, resolved by asynmodule-tree walk (inline modules,x.rs/x/mod.rs/#[path], onepub use … ashop,implmethods, both[package] nameand[lib] name, a facade and the crate it re-exports tried in order). Not everyfnin 3.9 M lines: no contract constrains a symbol nothing binds, and ONT-3a already owns the per-binding claim. Fail-closed in the graph: a symbol the walk cannot find is still anont:Symbol, withsym:resolved falseandsym:unresolvedReasonnaming the file and the segment — so a ghost binding is a violation naming the symbol, not a quietly smaller graph. Measured here: 270 bound symbols, 169 resolved, 101 genuinely absent (chat_session,encrypt,dispatchmodules that do not exist;data::runwhere onlyrun_audit/run_splitdo).extract:lean— the in-tree theorems asont:Statementunderworld/, read by ONT-2a's own scan and rule (a file carryingsorrygrounds nothing), joined to the contracts that cite them by ONT-2a's name forms, with references that name nothing counted (lean_refs_unresolved), never guessed. 410 statements.The W3C arm, both sides. 16 of ONT-0's 32-case table are translated into the contract dialect and run by the gate every time (
ontology::w3c); the other 16 are listed by name with the form that puts them outside the subset (sh:classon a node shape,sh:or,sh:flags, blank-node kinds), sow3c_cases_passedis a count over the cases the subset claims and a case refused by design is never scored as a failure. A failing case declinesUnknown{Differential}naming it — never a corpus verdict.The oracle, out of the gate (R-13).
tests/oracle/is a scratch crate detached from the workspace ([workspace]in its own manifest) withshaclpinned=0.3.21— ONT-0's measured verdict ORACLE.make oracleruns the pinned processor over the original case files and over the real corpus and writes the trackedtests/oracle/differential.json: 17 cases, 0 disagreements. A plantedsh:minCountchange inshapes.ttlmakes it disagree (measured: 1756 vs 15). A test asserts noshacl/rudof_rdf/oxigraphis in the workspace lock (F-20).Four conformance fixes the cases and the oracle found in the in-house validator, each with the case that fires on it:
sh:class/targetClassuse therdfs:subClassOfclosure (SHACL §2.1.1)property/class-001sh:datatypechecks the lexical form is well formed ("300"^^xsd:byteis a violation)property/datatype-ill-formedsh:nodereports ONE result per failing value on the outer pathproperty/node-001,-002sh:inis term equality, and the export writes the entries typedin: ["true"]was accepting"true"^^xsd:boolean, 490 results of differenceThe closure is built once per
validate()rather than scanned per node: the corpus gate went 27.2 s → 6.9 s in the same commit.Arming.
bound-symbols-resolveandlean-statements-groundedship computed and reported, innot_armed_shapes(§3.9) — 101 ghosts and three admitted theorem files exist on main today, and a gate red on its own target the day it merges trains bypass. Arming is one string incontracts/lint-baseline.jsonfor the release that cleans them. The fixture pair proves both directions:code-bound/(unarmed → Pass,unarmed_violations1) andcode-ghost/(armed → Fail naming the symbol).Two
check_ont_ratchet.shdefects fixed, each with a self-test row that goes red without the fix (17 → 23 rows):entity_types_registeredandextractors_implementedgrepped the Rust forEntityType::andimpl Extractor— forms this codebase has never used — so both measured 0 while the baseline carried 1 and 1 from an older tree; and--writedeletedformal_proseandlegacy_unresolved_depends_on, two shrink-only ratchets the sigma and relations gates read from that same file, so updating one ratchet disarmed two others.Known red, all three the same inherited assertion, none of it this row's:
lint_passes_on_real_contracts,ont4b_shapes_gate::the_repo_corpus_passes_…,ont4c1_model_receipts::the_repo_corpus_reports_…assert the real corpus PASSES, and the armedladder-measuredfinds 0 witnesses until #3523's re-measured receipts are on main. Proven by measurement: withladder-measuredunarmed for one run the same corpus is Pass, 0 violations, 113 reported.Green here:
aprender-contractslib 1659/1660 (the one above),ontology::82/82,ont4b2_code_lean_w3c8/8,ont_extract_json7/7,ont4b_shapes_gate10/11,ont4c1_model_receipts11/12,pv extract --check0,check_ont_ratchet.sh --self-test23/23, clippy-D warningsclean,cargo fmtclean,make oracle0 disagreements.R-23 (this head,
pvbuilt from it):🤖 Generated with Claude Code