tests: audit source boundaries and cancellation join twins
This commit is contained in:
1 parent
5371eb7a2f
commit
50d1bb2c4b
20 files changed
+363
-10
No files matched your search
@@ -1049,6 +1049,268 @@
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a73",
|
||||
"rule": "Source has no built-in f32/f64 type (spec 07 \u00a78.4). An undeclared f64 spelling is an ordinary E7002 unknown name; a user nominal f64 lowers to @f64 and cannot produce the reserved AIR primitive f64. Neither tests the reserved_type rule. Spec 15 \u00a71 restricts source to published features."
|
||||
},
|
||||
"phase3/reject/cancel_join_needs_wait.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a737.4",
|
||||
"rule": "In a module declaring cancellation, task.join requires task.wait. Source declares cancellation via a shield helper in the same module, preserving main's task.spawn contract and its suggested effects.",
|
||||
"required_ops": {
|
||||
"task.spawn": 1,
|
||||
"task.join": 1
|
||||
}
|
||||
},
|
||||
"phase3/reject/sync_use_after_take.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a732",
|
||||
"rule": "A mutex is borrowed again after mutex.take consumed it; the source lock begins with that same borrow.ref.",
|
||||
"required_ops": {
|
||||
"mutex.take": 1
|
||||
}
|
||||
},
|
||||
"phase2/reject/own_nested.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "The existing AIR rejects a missing feature header, not the type itself. Source lowering automatically includes capabilities or the published linear_aggregates feature and its closure for these types."
|
||||
},
|
||||
"phase2/reject/own_of_resource.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "The existing AIR rejects a missing feature header, not the type itself. Source lowering automatically includes capabilities or the published linear_aggregates feature and its closure for these types."
|
||||
},
|
||||
"phase2/reject/resource_in_struct.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "The existing AIR rejects a missing feature header, not the type itself. Source lowering automatically includes capabilities or the published linear_aggregates feature and its closure for these types."
|
||||
},
|
||||
"phase2/reject/cap_without_feature.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "The existing AIR rejects a missing feature header, not the type itself. Source lowering automatically includes capabilities or the published linear_aggregates feature and its closure for these types."
|
||||
},
|
||||
"phase5/reject/struct_field.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "The existing AIR rejects a missing feature header, not the type itself. Source lowering automatically includes capabilities or the published linear_aggregates feature and its closure for these types."
|
||||
},
|
||||
"phase2/reject/unsafe_trusted_without_feature.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a72",
|
||||
"rule": "A source trusted clause always rejects E7006 as forbidden, independently of obligation or effects. The AIR trusted declaration rules for an empty obligation, an unsafe boundary contract or a missing feature therefore cannot be isolated in source."
|
||||
},
|
||||
"phase2/reject/unsafe_trusted_declares_unsafe.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a72",
|
||||
"rule": "A source trusted clause always rejects E7006 as forbidden, independently of obligation or effects. The AIR trusted declaration rules for an empty obligation, an unsafe boundary contract or a missing feature therefore cannot be isolated in source."
|
||||
},
|
||||
"phase2/reject/unsafe_empty_obligation.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a72",
|
||||
"rule": "A source trusted clause always rejects E7006 as forbidden, independently of obligation or effects. The AIR trusted declaration rules for an empty obligation, an unsafe boundary contract or a missing feature therefore cannot be isolated in source."
|
||||
},
|
||||
"linear/enum_incomplete.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a716",
|
||||
"rule": "A linear enum match move omits Maybe::none; source rejects the incomplete consuming match with E7004 before emitting enum.take.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_enum_incomplete.aji",
|
||||
"codes": [
|
||||
"E7004"
|
||||
],
|
||||
"fields": {
|
||||
"missing": "Maybe::none"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"linear/unpack_count.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a716",
|
||||
"rule": "array.unpack of a one-element linear array binds two components. Source rejects the authored extra binding before emitting an AIR continuation.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_unpack_count.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"buffers/metadata_owner.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a717",
|
||||
"rule": "buffer.len receives an owner instead of the required named ref/mut buffer binding; source checks that operand form before AIR.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_metadata_owner.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"buffers/push_continuation_count.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a717",
|
||||
"rule": "The authored buffer.push success arm binds an extra value although ok has zero bindings. This source outcome-arity error rejects before AIR.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_push_continuation_count.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"outcome": "ok",
|
||||
"expected": "0"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"buffers/new_count_type.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "buffer.new receives a u64 capacity instead of usize; the source operand type rule preserves both types in E7005.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_new_count_type.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"expected": "usize",
|
||||
"found": "u64"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"linear/enum_switch.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a716",
|
||||
"rule": "An ordinary match on a named linear enum needs explicit move; source rejects E7003 before the invalid enum.switch.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/linear/plain_enum_match.aji",
|
||||
"codes": [
|
||||
"E7003"
|
||||
],
|
||||
"fields": {
|
||||
"name": "old"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"buffers/new_return_type.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "Despite the AIR filename, the first rejection is the non-Copy content of own_array<own<u64>> on its outcome block parameter. Source checks that same content rule at the annotation.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/own_array_content/owner.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"constraint": "Copy",
|
||||
"type_constructor": "own_array"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase2/reject/wrong_file_mode.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "fs.write_all requires a writable file; source rejects file<read> at its operand before emitting the invalid intrinsic.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/layer6/reject/wrong_mode.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"expected": "file<write> or file<append>",
|
||||
"found": "file<read>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase2/reject/unknown_capability_kind.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "An unregistered capability kind rejects E7002 in source. AIR uses root and the existing source analogue uses unknown; neither can be registered by a program.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/diagnostic_envelope/capability_kind_unknown.aji",
|
||||
"codes": [
|
||||
"E7002"
|
||||
],
|
||||
"fields": {
|
||||
"capability_kind": "unknown"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"buffers/reserve_count_type.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "buffer.reserve receives a u64 capacity instead of usize; source reports E7005 for the same operand type mismatch.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_buffer_reserve_count_type.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"expected": "usize",
|
||||
"found": "u64"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"buffers/push_type.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "buffer.push into a buffer<own<u64>> receives a u64 value; source rejects the content type mismatch with E7005.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_buffer_push_type.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"expected": "own<u64>",
|
||||
"found": "u64"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"linear/array_count.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a71",
|
||||
"rule": "A source list literal fixes its own array length and supplies every element. The AIR mismatch between declared array.make length and input count is generated mechanics; a source annotation mismatch is a different type rule."
|
||||
},
|
||||
"buffers/pop_return_type.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a71",
|
||||
"rule": "The pop success binding type is generated from buffer<T>. Source outcome bindings cannot annotate an incompatible type; a later let annotation mismatch is a different rule."
|
||||
},
|
||||
"buffers/free_return_type.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a71",
|
||||
"rule": "The free error binding is generated as the returned buffer<T>. Source cannot annotate that outcome binding as own<T>; a later variable annotation mismatch is a different rule."
|
||||
},
|
||||
"error_values/unknown_family.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a76",
|
||||
"rule": "Only registered built-in error families lower to error.const. An undeclared family spelling in source is ordinary enum-name resolution (E7002); a user enum of that name lowers to enum.make @Name, never an unregistered error.const family."
|
||||
},
|
||||
"error_values/frozen_enum_make.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a76",
|
||||
"rule": "Built-in error expressions lower to error.const with error_values and its closure. Source cannot choose the frozen legacy enum.make spelling for a built-in error family; user nominal enums use a distinct @Name type."
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user