Skip to content

Commit b25d2fa

Browse files
committed
Deepen the verdict vector corpus across enclosure and one-sided bounds
Twelve vectors cover the corners the plan's unbounded rows name but no vector exercised: enclosure basis per comparison direction (equal keeps its equal.* rules regardless of basis), and the decisive-side one-sided semantics — an upper bound alone passes lt and an upper bound alone can fail gt; a lower bound alone passes gt and can fail lt. Both implementations pin identical canonicals.
1 parent 7f078e6 commit b25d2fa

9 files changed

Lines changed: 538 additions & 14 deletions

File tree

‎crates/avila-core-cli/src/main.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,12 +1354,12 @@ mod tests {
13541354
let report = semantic_profile_report().unwrap();
13551355
assert_eq!(report.semantic_profile, SEMANTIC_PROFILE);
13561356
assert_eq!(report.status, "draft");
1357-
assert_eq!(report.total_vectors, 110);
1357+
assert_eq!(report.total_vectors, 122);
13581358
assert_eq!(report.implemented_vector_sets.len(), 4);
13591359
assert_eq!(report.total_compiler_fixtures, 70);
13601360
assert_eq!(report.implemented_compiler_fixture_sets.len(), 5);
13611361
assert_eq!(report.total_campaign_fixtures, 18);
1362-
assert_eq!(report.total_supplemental_fixtures, 37);
1362+
assert_eq!(report.total_supplemental_fixtures, 38);
13631363
assert_eq!(report.implemented_supplemental_fixture_sets.len(), 2);
13641364
assert_eq!(report.implemented_campaign_fixture_sets.len(), 1);
13651365
assert!(

‎crates/avila-core-compiler/tests/compiler_fixtures.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ fn compiler_defect_fixtures_are_executable() {
264264
),
265265
}
266266
}
267-
assert_eq!(suite.fixtures.len(), 33);
267+
assert_eq!(suite.fixtures.len(), 34);
268268
}
269269

270270
fn apply_mutations(document: &mut serde_json::Value, mutations: &[Mutation]) {

‎crates/avila-core-kernel/tests/verdict_vectors.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn verdict_vectors_are_executable() {
6262
assert_eq!(set.semantic_profile, SEMANTIC_PROFILE);
6363
assert_eq!(
6464
set.vectors.len(),
65-
48,
65+
60,
6666
"update the corpus count intentionally"
6767
);
6868
assert_eq!(

‎docs/roadmap/AGENT_WORK_QUEUE.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,3 +886,13 @@ checks — `admit_claims_for_metric` now resolves each claim's slot against
886886
the lowerer's registry index, so `campaign.model-not-permitted.quarantine`
887887
leaves the not-re-derivable exclusion list and runs asserted like every
888888
other fixture. 18 campaign fixtures; fixtures-check reads 94/78/18/103.
889+
890+
### Enclosure and one-sided verdict vectors — 2026-09-17
891+
892+
Twelve vectors deepen the verdict corpus where the plan's `*` rows had
893+
thin coverage: enclosure basis across lt/gt/ge/equal (equality ignores
894+
the basis prefix), and the one-sided corners that pin which side is
895+
decisive — lt passes on upper alone and fails on a lower bound above the
896+
limit; gt passes on lower alone and fails on an upper bound below it —
897+
plus equal-nominal outside/boundary. 60 requirement vectors; kernel and
898+
Python verifier agree on every one.

‎fixtures/semantic-core/README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ multiple historical profiles.
4141
cases and 3 rejected cases covering governed purpose resolution, exact nominal
4242
exclusions, unrelated and similarly named purposes, and major-version
4343
mismatch;
44-
- `defects/defects.v1.json`: 33 executable real-contract defect fixtures. The
44+
- `defects/defects.v1.json`: 34 executable real-contract defect fixtures. The
4545
base pair is CASE-001's committed contract+registry verbatim; each fixture
4646
seeds one realistic defect as JSON-pointer mutations (a typo'd field, an
4747
unresolvable metric step, a mismatched binding role or media type, an
@@ -69,9 +69,9 @@ planned unless files exist for them.
6969

7070
The `avila-core-kernel` conformance tests currently execute all 12 vectors in
7171
`canon.v1.json`, all 10 vectors in `unit-scaling.v1.json`, and all 19 vectors in
72-
`scope-predicates.v1.json`, plus the 48 requirement, 10 categorical, and 8
72+
`scope-predicates.v1.json`, plus the 60 requirement, 10 categorical, and 8
7373
aggregation vectors in `verdict-calculus.v1.json`. The compiler harness also executes all 70 cases in
74-
the five compiler manifests plus all 33 real-contract defect cases in
74+
the five compiler manifests plus all 34 real-contract defect cases in
7575
`defects/defects.v1.json`, and pins each registry digest plus all successful
7676
compiled-snapshot identities. The evidence harness executes the four authority cases in `authority/authority-cases.v1.json`. The campaign harness executes all 18 cases in its
7777
manifest and pins every successful campaign identity. Passing the 98 pure
@@ -209,7 +209,7 @@ canonically.
209209
| `numerics.json-float.fail` | `25.0` as JSON number in `limit` → `CORE-S1102` — exercised by `json.float-number-rejected`, `types.source.json-float.fail`, and `defect.contract.json-float-limit` |
210210
| `numerics.json-int.pass` | `3` as JSON number for `mesh_refinement_levels` — exercised by `json.integer-accepted` |
211211
| `numerics.nan-inf.fail` | `"NaN"`, `"Infinity"` → `CORE-S1102` — exercised by `json.nan-refused` and `json.infinity-refused` |
212-
| `numerics.display-rounding.pass` | presentation changes, canonical value and verdict do not |
212+
| `numerics.display-rounding.pass` | presentation changes, canonical value and verdict do not — exercised by `display_rounding.does-not-change-verdict` |
213213
| `numerics.decision-rounding-without-capability.fail` | outcome-changing rounding must be a typed, qualified capability |
214214
| `numerics.rational-factor.pass` | `"1/3600000000"` parsed and reduced — exercised by `rational.canonical` |
215215
| `numerics.rational-noncanonical.fail` | reducible fraction, negative denominator, leading plus/zeros, zero denominator — exercised by `rational.reducible-rejected` and `rational.negative-denominator-rejected` |
@@ -231,7 +231,7 @@ canonically.
231231
| Fixture | Expected |
232232
| --- | --- |
233233
| `roles.nominal-identity.fail` | same kind, different role id → `CORE-T2101` — exercised by `types.R2.role-mismatch.fail` |
234-
| `roles.major-version.fail` | `role@2` offered to `role@1` slot → `CORE-T2101` |
234+
| `roles.major-version.fail` | `role@2` offered to `role@1` slot → `CORE-T2101` — the resolution half is exercised by `defect.contract.role-major-version` (input references `role@2` absent from the registry → `CORE-R3101`); the binding-level T2101 variant needs a registry carrying both majors |
235235
| `roles.minor-version.pass` | `role@1` with extra optional attribute accepted |
236236
| `roles.validator-required.fail` | role without validator → `CORE-R3501` — exercised by `defect.registry.missing-validator` |
237237
| `roles.attribute-undeclared-in-predicate.fail` | predicate references undeclared attribute → structural finding before evaluation |
@@ -400,7 +400,7 @@ canonically.
400400
| `verdict.ge.bounded.within/below/crossing/one_sided` | vectors `ge.bounded.within`, `ge.bounded.below`, `ge.bounded.crossing`, `ge.bounded.upper_only.below`, `ge.bounded.upper_only.inconclusive` |
401401
| `verdict.lt.bounded.boundary` | hi = L → crossing, not PASS |
402402
| `verdict.gt.bounded.boundary` | lo = L → crossing — exercised by `gt.bounded.boundary`; the `gt` family is `gt.bounded.within/below/crossing/boundary` |
403-
| `verdict.enclosure.*` | as bounded with coverage 1 required |
403+
| `verdict.enclosure.*` | as bounded with coverage 1 required — exercised by `le.enclosure.within`, `le.enclosure.crossing`, `lt.enclosure.within`, `gt.enclosure.below`, `ge.enclosure.crossing`, `equal.enclosure.outside`, `aggregation.max.enclosure`, `aggregation.min.enclosure` |
404404
| `verdict.nominal.within/exceeds` | vectors `le.nominal.within`, `le.nominal.exceeds`, `equal.nominal.within` |
405405
| `verdict.equal.within/outside/partial` | vectors |
406406
| `verdict.equal.no-tolerance.fail` | `CORE-T2104`; the compile-time half is covered by `types.R6.equal-no-tolerance.fail` |
@@ -410,8 +410,8 @@ canonically.
410410
| `verdict.aggregation.all.*`, `any.*` | current precedence examples plus planned exhaustive and property-generated truth tables |
411411
| `verdict.aggregation.max/min.enclosure` | side-aware max/min reduction; a side that cannot be bounded remains absent |
412412
| `verdict.aggregation.coverage-needs-capability.fail` | marginal coverage intervals are not assigned joint coverage by the kernel — exercised by `aggregation.coverage.requires-capability` |
413-
| `verdict.one-sided.lower/upper.*` | both comparison directions and strict boundaries |
414-
| `verdict.equal.nominal/one-sided.*` | nominal tolerance and one-sided contradiction rules |
413+
| `verdict.one-sided.lower/upper.*` | both comparison directions and strict boundaries — exercised by `le.bounded.one_sided`, `le.bounded.lower_only.*`, `ge.bounded.upper_only.*`, `lt.bounded.lower_only.*`, `lt.bounded.upper_only.within`, `gt.bounded.lower_only.within`, `gt.bounded.upper_only.*` |
414+
| `verdict.equal.nominal/one-sided.*` | nominal tolerance and one-sided contradiction rules — exercised by `equal.within`, `equal.outside`, `equal.partial`, `equal.nominal.within`, `equal.nominal.outside`, `equal.nominal.boundary`, `equal.one_sided.outside`, `equal.one_sided.partial` |
415415
| `verdict.not_evaluated.missing/quarantined/invalidated` | reasons and owners listed; no numbers — exercised by `not_evaluated.missing`, `not_evaluated.quarantined`, `not_evaluated.invalidated`, `not_evaluated.mixed-admitted-quarantined`, `not_evaluated.mixed-admitted-invalidated` |
416416
| `verdict.not_evaluated.duplicate-claim` | `CORE-E7301` — exercised by `not_evaluated.duplicate-claim` and `campaign.duplicate-claim.quarantine` |
417417
| `verdict.presentation-policy.not-an-input.pass` | the same admitted claims produce the same verdict with or without optional presentation routing — exercised by `presentation-policy.not-a-verdict-input` and `presentation-policy.cannot-mask-fail` |

‎fixtures/semantic-core/defects/defects.v1.json‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,43 @@
14601460
]
14611461
}
14621462
},
1463+
{
1464+
"fixture_id": "defect.contract.role-major-version",
1465+
"defect": "an input references the right role at the wrong major version",
1466+
"contract_mutations": [
1467+
{
1468+
"op": "set",
1469+
"pointer": "/inputs/0/role/major",
1470+
"value": 2
1471+
}
1472+
],
1473+
"registry_mutations": [],
1474+
"expected": {
1475+
"status": "rejected",
1476+
"findings": [
1477+
{
1478+
"code": "CORE-A4404",
1479+
"class": "notice",
1480+
"owner": "policy_owner",
1481+
"primary": {
1482+
"document": "contract",
1483+
"pointer": "/execution_policy/require_signatures"
1484+
},
1485+
"repairs": []
1486+
},
1487+
{
1488+
"code": "CORE-R3101",
1489+
"class": "unsatisfied",
1490+
"owner": "requester",
1491+
"primary": {
1492+
"document": "contract",
1493+
"pointer": "/inputs/0/role"
1494+
},
1495+
"repairs": []
1496+
}
1497+
]
1498+
}
1499+
},
14631500
{
14641501
"fixture_id": "defect.contract.negative-zero-limit",
14651502
"defect": "a limit is authored as -0, which has no canonical decimal",

‎fixtures/semantic-core/defects/generate.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,14 @@ def compile_pair(contract_bytes: bytes, registry_bytes: bytes) -> dict:
353353
],
354354
[],
355355
),
356+
(
357+
"defect.contract.role-major-version",
358+
"an input references the right role at the wrong major version",
359+
[
360+
{"op": "set", "pointer": "/inputs/0/role/major", "value": 2},
361+
],
362+
[],
363+
),
356364
(
357365
"defect.contract.negative-zero-limit",
358366
"a limit is authored as -0, which has no canonical decimal",

0 commit comments

Comments
 (0)