tests: extend audited rejection twins through tasks and locks

This commit is contained in:
dev committed 2026-10-08 18:12:53 +03:00
1 parent e4aacef48c
commit 272aebfd32
16 files changed
+157 -13

No files matched your search

+113
View File
@@ -86,6 +86,11 @@
"rule": "Node contains itself by value; source declaration validation retains E1003 (Q-043/Q-044).",
"lowering": "rejected"
},
"phase0/reject/reserved_feature.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "This legacy heap header now rejects missing_dependency (capabilities), not a reserved feature. Source generates the full dependency closure and cannot spell the faulty header."
},
"phase0/reject/terminator_mid_block.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a71",
@@ -122,6 +127,16 @@
"spec": "docs/spec/15-source-language.md \u00a71",
"rule": "local.alloc placement is chosen by lowering; source has no instruction-placement operation."
},
"phase1/reject/borrow_block_parameter.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a75/\u00a719",
"rule": "Borrow-typed branch block arguments require reserved borrow_joins. Source binds borrows only with ref/mut, never in an assignable var, and forbids yielding them from blocks/if/match; branches may return directly. Region allocation outcome parameters do not request borrow_joins."
},
"phase1/reject/borrow_not_ended.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "Source ends every non-returned lexical borrow on a normal return; it has no operation to omit that generated end."
},
"phase1/reject/borrow_return_without_from.air": {
"kind": "source_error",
"spec": "docs/spec/15-source-language.md \u00a719",
@@ -138,6 +153,21 @@
}
]
},
"phase1/reject/borrow_use_after_end.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "A borrow binding is no longer visible after its lexical end; source cannot use an explicitly ended borrow."
},
"phase1/reject/end_lent_parameter.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "Source does not explicitly end a lent borrow parameter; generated cleanup ends owned lexical bindings instead."
},
"phase1/reject/end_parent_first.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "Source generates lexical ends in reverse creation order and transfers returned ancestors; it cannot request parent-before-child cleanup. Task-loan conflicts with such cleanup use E4302 instead; they are covered by separate twins."
},
"phase1/reject/feature_not_declared.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
@@ -155,6 +185,11 @@
"spec": "docs/spec/08-verifier.md",
"rule": "The same deterministic budget is exceeded, with identical limit/max/found/type facts."
},
"phase1/reject/join_mismatch.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "Source lexical cleanup ends a borrow on every normal exit from its scope; explicit unmatched borrow.end edges are generated mechanics."
},
"phase1/reject/le_is_not_a_fact.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a75",
@@ -171,6 +206,12 @@
"spec": "docs/spec/15-source-language.md \u00a74",
"rule": "Source local declarations require an initializer; there is no uninitialized frame-local declaration."
},
"phase1/reject/related_borrow_live.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/08-verifier.md \u00a711.2",
"rule": "local.store writes a local with a live shared borrow, retaining that borrow as the related conflict."
},
"phase1/reject/size_overflow.air": {
"kind": "same_code",
"site": "function",
@@ -183,18 +224,36 @@
"spec": "docs/spec/08-verifier.md",
"rule": "The same deterministic budget is exceeded, with identical limit/max/found/type facts."
},
"phase2/reject/alloc_without_effect.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/05-effects-and-capabilities.md",
"rule": "own.new lacks mem.alloc; the missing effect and complete suggested list agree."
},
"phase2/reject/own_free_while_borrowed.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/03-memory-model.md",
"rule": "The same owning-resource consumption or whole-place borrow conflicts with a live borrow."
},
"phase2/reject/own_leak.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/06-resources-and-errors.md \u00a76.3",
"rule": "An allocated owner reaches return without consumption."
},
"phase2/reject/own_use_after_free.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/03-memory-model.md",
"rule": "A closed/freed resource is borrowed again."
},
"phase2/reject/own_use_after_move.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/06-resources-and-errors.md \u00a76.2",
"rule": "An owner transferred to a consuming call is subsequently borrowed."
},
"phase2/reject/region_destroy_with_live_reference.air": {
"kind": "same_code",
"site": "instruction",
@@ -231,12 +290,24 @@
"spec": "docs/spec/08-verifier.md \u00a711.4",
"rule": "The same file is closed on one incoming edge and still live on another."
},
"phase2/reject/resource_leak.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/06-resources-and-errors.md \u00a76.3",
"rule": "An opened file<read> reaches return without close."
},
"phase2/reject/resource_use_after_close.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/06-resources-and-errors.md",
"rule": "A closed/freed resource is borrowed again."
},
"phase2/reject/unsafe_outside_boundary.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/13-contracts-and-unsafe.md \u00a76",
"rule": "borrow.index.unchecked occurs outside an unsafe or trusted function."
},
"phase3/reject/cancel_join_keeps_loans.air": {
"kind": "same_code",
"site": "instruction",
@@ -255,12 +326,54 @@
"task.join.cancel": 2
}
},
"phase3/reject/channels_receiver_leak.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/06-resources-and-errors.md \u00a76.3",
"rule": "A channel receiver remains unclosed at return after its sender is closed. The source success arm passes through a single-predecessor match join; the allocation failure arm traps."
},
"phase3/reject/sync_call_waiting_function.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a741",
"rule": "A function declaring task.wait is called while a mutex guard is held."
},
"phase3/reject/sync_lock_twice.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a741",
"rule": "A second mutex.lock may wait while the first guard is held."
},
"phase3/reject/sync_wait_while_locked.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a741",
"rule": "channel.recv may wait while a mutex guard is held."
},
"phase3/reject/tasks_access_lent.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a734",
"rule": "The parent indexes an exclusive slice lent to an unjoined task; raw borrow.index/load errors share one source location."
},
"phase3/reject/tasks_end_lent_borrow.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/04-concurrency-and-atomics.md",
"rule": "The lent borrow is ended while its task remains unjoined; the creating spawn is retained."
},
"phase3/reject/tasks_same_mut_twice.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a734",
"rule": "The same exclusive borrow is lent to a second task while the first task remains live."
},
"phase3/reject/tasks_scope_end_unjoined.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a733",
"rule": "A task scope ends while a child task remains unjoined."
},
"phase4/reject/arc_release_twice.air": {
"kind": "same_code",
"site": "instruction",