tests: audit feature-header context and rejection boundaries
This commit is contained in:
1 parent
fe63ae9586
commit
03305f0957
13 files changed
+326
-10
No files matched your search
@@ -1421,6 +1421,131 @@
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a77",
|
||||
"rule": "Every normal exit of a source lock block emits explicit borrow endings and mutex.unlock. The guard is never a source value, so leaving that guard live at ret cannot be authored; traps terminate without a normal-path leak."
|
||||
},
|
||||
"phase3/reject/tasks_handle_as_parameter.air": {
|
||||
"kind": "same_code",
|
||||
"site": "function",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a733.1",
|
||||
"rule": "A task<u8> parameter requires reserved task_transfer. Each full canonical repair header is validated against that module's declared features and the supplied closure; the missing closure is task_transfer on both sides. Unused arrays and mandatory source effects are header context, not the forbidden parameter rule.",
|
||||
"feature_header_context": true
|
||||
},
|
||||
"phase2/reject/unknown_narrowing_form.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md \u00a710.4",
|
||||
"rule": "cap.narrow.budget is requested for cap<io.write>, which has no budget narrowing form; both diagnostics retain capability_kind io.write and form budget."
|
||||
},
|
||||
"phase2/reject/narrow_ok_arity.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a78",
|
||||
"rule": "The authored cap.narrow.budget success arm omits its required capability binding; source reports E7005 before emitting an outcome target. The source analogue uses mem.alloc to isolate arity; AIR also has an invalid io.write narrowing form masked by its earlier arity rejection.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_narrow_ok_arity.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"outcome": "ok",
|
||||
"expected": "1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase2/reject/intrinsic_ok_arity.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a76",
|
||||
"rule": "fs.open_read success must bind one file; the authored source binding list is checked before emitting its continuation.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_intrinsic_ok_arity.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"outcome": "ok",
|
||||
"expected": "1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase2/reject/fallible_without_targets.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a78",
|
||||
"rule": "A fallible fs.open_read is used as a plain statement instead of an outcome match or or trap; source prescribes E7006 invalid_operation.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_fallible_stmt.aji",
|
||||
"codes": [
|
||||
"E7006"
|
||||
],
|
||||
"fields": {
|
||||
"reason": "invalid_operation",
|
||||
"operation": "fs.open_read"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"std/endian_payload_type.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a713",
|
||||
"rule": "The registered std.bytes.ReadU16 ok variant receives u32 rather than u16; source rejects the same payload mismatch with E7005.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_endian_u32.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"expected": "u16",
|
||||
"found": "u32"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"std/bounded_arithmetic_payload.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a713",
|
||||
"rule": "A registered standard enum variant receives a bool payload instead of u64; source checks the payload before AIR.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/std/bounded_math_payload.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"expected": "u64",
|
||||
"found": "bool"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"std/text_utf8_payload.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a713",
|
||||
"rule": "A registered standard enum variant receives a bool payload instead of u32; source checks the payload before AIR.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/std/text_utf8_payload.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"expected": "u32",
|
||||
"found": "bool"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase2/reject/resource_copy.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a75",
|
||||
"rule": "Source only duplicates Copy values by plain use. A named linear file needs explicit move (E7003), which transfers rather than duplicates it; the frontend cannot emit AIR copy of a resource."
|
||||
},
|
||||
"phase2/reject/unknown_intrinsic.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a78",
|
||||
"rule": "Only registered intrinsic names emit AIR intrinsic calls. An undeclared io.teleport in source is ordinary E7002 name resolution, not an unknown AIR intrinsic; user functions are emitted as ordinary calls."
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user