Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions issues/build/doom-jpg-shows-ids-art-under-no-recorded-terms.md

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
---
status: owner
kind: question
status: open
kind: defect
opened: 2026-09-24
---

# A boot start refused a device the machine has runs without it

`/system/bin/init`'s `start` mints every device a `[programs]` row names. At a
swap or the restart that rolls one back, a device the process being replaced
held and the new one is refused fails the start (`Served::Restart`'s `owed`).
At boot there is no process before it, and a refusal is said in the kernel's
own word (`init: netd: pci:8086:10c9 is on this machine and could not be
handed over`) and the program is started without that device.
A boot start's device refusal is fatal only for a device its `[programs]` row
marks as required; for any other, init logs the refusal loudly and starts the
program without that device (owner, 2026-09-30). No row can mark a device
required, so every boot start refused a device the machine has —
`NotSupported`, `AlreadyExists`, `ResourceExhausted` — runs without it:
`/system/bin/init`'s `start` says the refusal in the kernel's own word
(`init: netd: pci:8086:10c9 is on this machine and could not be handed over`)
and starts the program. `refused_claim` (`tests/common/faults.rs`) and
`pci_function_is_exclusive` assert that behaviour today.

That is not the swap's defect — init claims nothing about a boot start beyond
`started`, and a row names every device its program can drive, so a machine
with a subset is a configuration, not a fault — but a refusal other than
`NotFound` is a fault, and the program then runs on less than the machine
has. `tests/common/faults.rs`'s `refused_claim` and `pci_function_is_exclusive`
assert exactly this behaviour today.

The question for the owner: should a boot start refused a device the machine
has — `NotSupported`, `AlreadyExists`, `ResourceExhausted` — be fatal? A failed
boot start is an init panic, so the machine would not boot over one device;
and a row cannot yet say which of its devices its program needs.
**Exit**: a `[programs]` row can mark a device required, and guest tests show
a boot start refused a required device is fatal, and one refused a device its
row does not mark logs it loudly and starts the program without it.
43 changes: 12 additions & 31 deletions issues/design-debt/os-toyos-io-traits-keep-a-posix-name.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,18 @@
---
status: owner
kind: question
status: open
kind: defect
opened: 2026-08-24
---

# Does `std::os::toyos::io` get to keep `AsRawFd`/`FromRawFd`?
# `std::os::toyos::io` names its raw-handle traits `AsRawFd` and `FromRawFd`

The owner ruled on 2026-08-19 that **"fds belong only in libc jargon"**: the
kernel has no file descriptors, a process holds typed handles
(`toyos-abi/src/handle.rs`), and `userland/libc` is the one layer whose
interface the word describes. The sweep that followed took the kernel, the ABI,
the SDK, every forced call site and both fork pins. One name it did not settle
is left, and it is the owner's because it is a fork-repo name (`Japabu/rust`)
and not this tree's to rename alone.
`os::toyos::*` is ToyOS's own extension API and speaks ToyOS, and "fds belong
only in libc jargon" (owner, 2026-08-19). The `rust/` fork's
`library/std/src/os/toyos/io.rs` re-exports `std::os::fd`, so
`std::os::toyos::io::{AsRawFd, FromRawFd}` still speak POSIX.
`tests/toyos-rust-tests/src/bin/std_fs.rs` is their one caller in this
repository.

`std::os::toyos::io::{AsRawFd, FromRawFd}`. The naming table ruled that
`os::toyos::*` is ToyOS's own extension API and must speak ToyOS, and it named
every `process` row — but not this one. std's *POSIX* surface keeps the word by
charter; whether an `os::toyos` trait carrying a POSIX name is that surface or
the extension API is what nobody has decided.

The two answers, both defensible:

- **It stays**, as a deliberate mirror of std's own
`std::os::unix::io::{AsRawFd, FromRawFd}` convention — the trait names an
`os::toyos` caller reaches for by muscle memory, and diverging costs every
such caller a lookup.
- **It is renamed the next time the trait is touched in the fork**, to whatever
`os::toyos` decides its own non-POSIX vocabulary for a raw handle is, because
the extension API speaking POSIX is precisely what the ruling forbade
everywhere else.

`tests/toyos-rust-tests/src/bin/std_fs.rs:4` is the only caller in this
repository (`use std::os::toyos::io::{AsRawFd, FromRawFd};`, used at `:59`).
Nothing is blocked on the answer; the word is legal in the two places it is
still spoken here, so this is a naming decision and not a defect.
**Exit**: the next time the trait is touched in the fork, `AsRawFd` and
`FromRawFd` in `std::os::toyos::io` are renamed to `os::toyos`'s own word for
a raw handle, and `std_fs.rs` uses the new names (owner, 2026-09-30).
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,5 @@ A deleted or disabled test covers nothing.

## Open with the owner

- Before stage 3: the ask's ABI, which is Q6a of
`issues/kernel/the-child-process-track-waits-on-the-owners-rulings.md`; whether a program
started through `launcher` is asked or only stopped; whether
`SYS_SHUTDOWN`/`SYS_REBOOT` change at all.
- Before stage 3: whether a program started through `launcher` is asked or
only stopped; whether `SYS_SHUTDOWN`/`SYS_REBOOT` change at all.
Loading
Loading