tests: preserve rejection contexts and normalize callee effects

This commit is contained in:
dev committed 2026-10-08 19:41:01 +03:00
1 parent 06d8a1a76a
commit fd92604f36
11 files changed
+344 -35

No files matched your search

+70 -4
View File
@@ -21,7 +21,13 @@
"site": "declaration",
"spec": "docs/spec/15-source-language.md \u00a715",
"rule": "The non-generic Node recursively contains an array of itself by value, retaining E1003 before source lowering.",
"lowering": "rejected"
"lowering": "rejected",
"early_context": {
"air": "9ab84709f2349a215db70a0cad5cb3d8255dac91170c45cc3183972ad5a68b79",
"sources": {
"source/generics/monomorphic_layout_cycle.aji": "0e1495cfc4cee39827f3946b269583db945034470785b65b8cde5a6956c6818f"
}
}
},
"linear/field.air": {
"kind": "same_code",
@@ -43,7 +49,20 @@
"site": "declaration",
"spec": "docs/spec/15-source-language.md \u00a71",
"rule": "The N0 through N40 by-value cycle is rejected as E1003 at N0 before source lowering. Pure by-value cycles retain E1003 (Q-043/Q-044; AIR type rules in spec 07).",
"lowering": "rejected"
"lowering": "rejected",
"early_context": {
"air": "38bd028b4851500690cfa0f3022e726f86075cf304582d970f849d0b3c13ecd0",
"sources": {
"source/nominal_queries/cycle.aji": "29d2fd93a85456a73cd935190516622525bd0432570cf4977b9a5ac2b71fc620"
}
}
},
"nominal_queries/diamond_21_u64.air": {
"kind": "same_code",
"site": "declaration",
"spec": "docs/spec/08-verifier.md \u00a77",
"rule": "The N0\u2013N3 shared diamond value layouts exceed max_value_size at their type declarations; all four limit/max/found/type facts agree after successful lowering.",
"match_type_declarations": true
},
"phase0/reject/block_argument_type.air": {
"kind": "air_only",
@@ -127,8 +146,14 @@
"kind": "same_code",
"site": "declaration",
"spec": "docs/spec/15-source-language.md \u00a71",
"rule": "Node contains itself by value; source declaration validation retains E1003 (Q-043/Q-044).",
"lowering": "rejected"
"rule": "Node contains itself by value; source declaration validation retains E1003 (Q-043/Q-044). The scalar value field is u8 in AIR and u64 in source; its width does not decide the by-value self-cycle rule.",
"lowering": "rejected",
"early_context": {
"air": "2014f05595edd77a7840d910eff8e26f338b7724fc25701cdb62f9f0dd359524",
"sources": {
"source/layer2/reject/verifier_recursive.aji": "c88b9db00d9d382adfd0282f650ff248c7613d0b0e0b83c8ec4b6493e1fff73a"
}
}
},
"phase0/reject/reserved_feature.air": {
"kind": "air_only",
@@ -274,6 +299,18 @@
"spec": "docs/spec/05-effects-and-capabilities.md",
"rule": "own.new lacks mem.alloc; the missing effect and complete suggested list agree."
},
"phase2/reject/alloc_wrong_capability.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/05-effects-and-capabilities.md \u00a710.5",
"rule": "own.new receives cap<fs.read> instead of mem.alloc authority; ok consumes the owner and err returns normally."
},
"phase2/reject/flat_effects.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/05-effects-and-capabilities.md \u00a79.2/\u00a79.3",
"rule": "A call lacks atomic.weak despite atomic being declared; effect sets are flat and callee effect sets agree."
},
"phase2/reject/intrinsic_effect.air": {
"kind": "same_code",
"site": "instruction",
@@ -304,6 +341,11 @@
"spec": "docs/spec/06-resources-and-errors.md \u00a76.2",
"rule": "An owner transferred to a consuming call is subsequently borrowed."
},
"phase2/reject/region_allocation_outlives_borrow.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a78/\u00a79",
"rule": "The explicit region borrow lexically outlives its derived allocation borrow. Source generates reverse-order ends and forbids yielding a borrow out of an arm/block, so parent-before-allocation-end cannot be authored."
},
"phase2/reject/region_destroy_with_live_reference.air": {
"kind": "same_code",
"site": "instruction",
@@ -352,6 +394,21 @@
"spec": "docs/spec/06-resources-and-errors.md",
"rule": "A closed/freed resource is borrowed again."
},
"phase2/reject/resource_use_after_move.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/06-resources-and-errors.md \u00a76.2",
"rule": "An opened file<read> is transferred to a consuming call and then borrowed again.",
"required_ops": {
"call": 1
}
},
"phase2/reject/undeclared_effect.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/05-effects-and-capabilities.md \u00a79.3",
"rule": "A call lacks the callee io.write effect; callee identities may differ but declared effect sets agree."
},
"phase2/reject/unsafe_call_from_safe.air": {
"kind": "same_code",
"site": "instruction",
@@ -400,6 +457,15 @@
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a737.4/\u00a738",
"rule": "channel.recv lacks task.wait on a borrowed receiver parameter; no allocation adds another missing effect."
},
"phase3/reject/channels_use_after_send.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a738",
"rule": "The old owner is borrowed after failed send returns its ownership under a new name; closed and cancelled both merge to the same error site, as in AIR.",
"required_ops": {
"channel.send": 1
}
},
"phase3/reject/sync_call_waiting_function.air": {
"kind": "same_code",
"site": "instruction",