cli: implement explicit source borrow returns

This commit is contained in:
dev committed 2026-10-07 18:20:45 +03:00
1 parent 715a8be491
commit a9a0d63f27
78 files changed
+970 -48

No files matched your search

+1 -1
View File
@@ -447,4 +447,4 @@ Join normalizes absolute child alone, replacing base. Otherwise it normalizes ba
Both writers first validate all input bytes: NUL yields invalid_input, including in base when an absolute child replaces it. Invalid input precedes size_overflow, which precedes short_output. Every returned error leaves the entire destination unchanged. Success writes exactly the reported prefix, preserves the suffix and writes no NUL terminator. Only final normalized size must fit: a long component followed by `..` can normalize into one byte of output. Reverse measurement/emission needs fixed frame state and no intermediate buffer or allocation. Work is linear in supplied input/output bytes.
Input borrows can overlap each other; destination must be disjoint. Explicit split_at permits source/output in one allocation. Existing type/borrow/task-loan/Send/Share checks apply, including no-op/short-output paths. No unsafe boundary, new language/AIR semantics or hidden effects are needed. Borrow-return source support (Q-034) remains separate. The [pure example](../../examples/std/path.aji) joins into a caller buffer and borrows basename/parent/extension from the returned prefix. The independent Python forward-stack oracle covers normalization/join/query/capacity/idempotence; hosted fixtures confirm filesystem authority remains independent.
Input borrows can overlap each other; destination must be disjoint. Explicit split_at permits source/output in one allocation. Existing type/borrow/task-loan/Send/Share checks apply, including no-op/short-output paths. No unsafe boundary, new language/AIR semantics or hidden effects are needed. Ordinary source functions can return retained views under spec 15 §19; path queries retain their Copy range API. The [pure example](../../examples/std/path.aji) joins into a caller buffer and borrows basename/parent/extension from the returned prefix. The independent Python forward-stack oracle covers normalization/join/query/capacity/idempotence; hosted fixtures confirm filesystem authority remains independent.