Brummel
744ad41e47
fix(check): resolve type-scoped borrow-receiver ops in linearity ( closes #46 )
...
A function whose parameter is `borrow (RawBuf a)` and which calls
RawBuf.get or RawBuf.size on that parameter even once was rejected at
`ail check` with [consume-while-borrowed] — the exact borrow-receiver
use the ledger advertises for get/size. The diagnostic also misnamed the
cause: the receiver is read, not consumed.
Root cause: the linearity walk's callee_arg_modes looked up the callee
under its spelled name. A type-scoped polymorphic op is spelled
`RawBuf.get` at the call site, but check_module_with_visible registers
the kernel raw_buf ops under their bare def names (get/size). The lookup
missed, the receiver arg defaulted to Consume, and consuming a binder
whose borrow_count==1 (the Borrow param) fired the false positive. The
kernel signatures themselves are correct (receiver slot is `borrow`); the
only defect was the name-resolution gap in the linearity globals lookup.
Fix: on a direct-lookup miss, fall back to the bare method name via the
existing parse_method_qualifier + qualifier_is_class_shape resolvers,
gated on a class/type-shaped qualifier so lowercase cross-module-fn
qualifiers (std_list.length) are excluded. This is how the rest of the
checker already treats type-scoped polymorphic ops; the fix is general,
not RawBuf-specific.
This unblocks the natural borrow-helper decomposition (a shared
read-only buffer behind a helper fn) — the shape the downstream series
milestone's Series.at / Series.total_count need.
Surfaced by the raw-buf fieldtest (finding B1, docs/specs/0058).
RED-first: rawbuf_borrow_receiver_read_is_linearity_clean.
2026-05-30 17:13:56 +02:00
..
2026-05-30 16:26:48 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-28 19:00:12 +02:00
2026-05-28 19:00:12 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-14 02:12:34 +02:00
2026-05-07 11:07:36 +02:00
2026-05-13 12:43:10 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 12:22:45 +02:00
2026-05-14 02:12:34 +02:00
2026-05-28 14:43:03 +02:00
2026-05-12 14:20:27 +02:00
2026-05-28 14:43:03 +02:00
2026-05-21 01:16:21 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-18 21:16:41 +02:00
2026-05-18 21:16:41 +02:00
2026-05-18 23:28:52 +02:00
2026-05-18 23:28:52 +02:00
2026-05-18 14:32:39 +02:00
2026-05-18 21:16:41 +02:00
2026-05-18 14:50:27 +02:00
2026-05-18 14:50:27 +02:00
2026-05-18 14:50:27 +02:00
2026-05-18 21:16:41 +02:00
2026-05-18 21:16:41 +02:00
2026-05-18 21:16:41 +02:00
2026-05-18 21:16:41 +02:00
2026-05-18 14:50:27 +02:00
2026-05-18 14:32:39 +02:00
2026-05-18 21:16:41 +02:00
2026-05-28 13:31:31 +02:00
2026-05-21 01:16:21 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-30 12:21:27 +02:00
2026-05-30 12:21:27 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 12:22:45 +02:00
2026-05-12 14:20:27 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-29 17:21:32 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-17 23:57:46 +02:00
2026-05-18 01:04:19 +02:00
2026-05-17 23:33:43 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 12:22:45 +02:00
2026-05-14 02:12:34 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-14 02:12:34 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-18 11:06:17 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 12:22:45 +02:00
2026-05-28 14:43:03 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-29 17:56:10 +02:00
2026-05-14 01:38:41 +02:00
2026-05-21 12:22:45 +02:00
2026-05-14 01:51:50 +02:00
2026-05-21 11:59:38 +02:00
2026-05-21 11:59:38 +02:00
2026-05-30 00:49:51 +02:00
2026-05-30 17:13:56 +02:00
2026-05-30 10:41:52 +02:00
2026-05-30 00:49:51 +02:00
2026-05-30 00:49:51 +02:00
2026-05-30 00:49:51 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 01:16:21 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 01:16:21 +02:00
2026-05-21 01:16:21 +02:00
2026-05-20 20:51:53 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-13 11:12:48 +02:00
2026-05-21 12:22:45 +02:00
2026-05-28 14:43:03 +02:00
2026-05-28 14:43:03 +02:00
2026-05-28 14:43:03 +02:00
2026-05-12 14:20:27 +02:00
2026-05-28 14:43:03 +02:00
2026-05-28 14:43:03 +02:00
2026-05-28 14:43:03 +02:00
2026-05-28 14:43:03 +02:00
2026-05-28 14:43:03 +02:00
2026-05-12 14:20:27 +02:00
2026-05-28 14:43:03 +02:00
2026-05-12 14:20:27 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 12:22:45 +02:00
2026-05-21 01:16:21 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-10 22:35:37 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 03:31:40 +02:00
2026-05-09 17:50:29 +02:00
2026-05-09 17:45:27 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 01:11:56 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-21 12:22:45 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-13 11:12:48 +02:00
2026-05-14 02:12:34 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-14 02:12:34 +02:00
2026-05-14 02:12:34 +02:00
2026-05-11 01:46:58 +02:00
2026-05-28 14:43:03 +02:00
2026-05-11 01:46:58 +02:00
2026-05-21 12:57:06 +02:00
2026-05-13 11:12:48 +02:00
2026-05-14 02:12:34 +02:00
2026-05-13 11:12:48 +02:00
2026-05-14 02:12:34 +02:00
2026-05-21 01:16:21 +02:00
2026-05-17 23:33:43 +02:00
2026-05-17 23:33:43 +02:00
2026-05-17 23:33:43 +02:00
2026-05-17 23:33:43 +02:00
2026-05-21 12:22:45 +02:00
2026-05-13 11:12:48 +02:00
2026-05-13 11:12:48 +02:00
2026-05-14 02:12:34 +02:00
2026-05-13 11:12:48 +02:00