This repository was archived by the owner on Aug 12, 2026. It is now read-only.
Repository navigation
Commit 1e73dc2
committed
0018 C: an own parameter arrives closeable, and 0018 is done
A guest handing a host resource back transfers ownership, and there is no guest
drop afterwards -- ever. So lifting an `own` removes the table entry and hands
the caller an AutoCloseable over the value rather than the bare value: closing
it runs :drop, and the instance's own close does not drop it again because it
is no longer in the table.
That is what 0016 A decided for the other direction, for the same reason: a
transferred capability is not its bytes. A bare value carries no obligation and
no way to discover one, which for wasi:http/handler.handle -- `func(request:
request)`, an own in exactly this position -- is a leaked request per call.
Also stated in the code where it bites: only the resource_host_t from
any_to_host is ours to delete. Deleting the `any` aborts the process.
dev/resources/hres gains `eat` and `give-back`. Adding `eat` to the WIT broke
every other test in the file until each supplied it, which is the import
contract 0017 B chose working as intended -- a component's imports are all or
nothing and wasmtime names what is missing.
Fault injection: handing back the bare value gives one failure and two errors.
133 assertions. 0018 is accepted, and every shape S1's stop condition names is
now reached through cljwit.host itself rather than through a spike. What
remains is more than one host resource type per instance -- the tag is fixed at
1 -- and 0012's rows that no shipped release can express.
Claude-Session: https://claude.ai/code/session_01XF5Hfq4Ca2N2XYEzWQQuHt1 parent d67634c commit 1e73dc2
5 files changed
Lines changed: 58 additions & 10 deletions
File tree
- dev/resources
- doc/design
- src/cljwit
- test/cljwit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
626 | 634 | | |
627 | 635 | | |
628 | 636 | | |
629 | 637 | | |
630 | 638 | | |
| 639 | + | |
| 640 | + | |
631 | 641 | | |
632 | | - | |
633 | | - | |
634 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
635 | 649 | | |
636 | 650 | | |
637 | 651 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
| 534 | + | |
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
| |||
544 | 545 | | |
545 | 546 | | |
546 | 547 | | |
547 | | - | |
| 548 | + | |
| 549 | + | |
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
| |||
558 | 560 | | |
559 | 561 | | |
560 | 562 | | |
561 | | - | |
| 563 | + | |
| 564 | + | |
562 | 565 | | |
563 | 566 | | |
564 | 567 | | |
| |||
570 | 573 | | |
571 | 574 | | |
572 | 575 | | |
573 | | - | |
| 576 | + | |
| 577 | + | |
574 | 578 | | |
575 | 579 | | |
576 | 580 | | |
| |||
579 | 583 | | |
580 | 584 | | |
581 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
582 | 608 | | |
583 | 609 | | |
584 | 610 | | |
| |||
0 commit comments