# History and decisions

This file keeps the long-form material that used to live in `AGENTS.md`: the
detailed project narrative, the decision index and the dated status log. It is a
historical record. `AGENTS.md` carries only current operational facts, `adr/`
carries per-decision detail and `specs/` carries normative behavior.

## Detailed project narrative

`igis-v2` is a from-scratch second version of a personal operating system whose first
version was written in 2005 as a front-end for a modem. It began as
a Linux driver, the user/kernel ring boundary got in the way, and it grew into a kernel
with its own boot path. No code survives; the continuity is design intent and the
constraints learned there.

- **Primary language:** Rust (`no_std`, freestanding).
- **First architecture:** x86_64. All ISA-specific code is isolated so additional
  architectures can be added without touching the kernel core (ADR 0013).
- **Central thesis:** the kernel is a programmable system — a language runtime plus
  standard library owning the machine. Applications are source code, not native
  binaries, compiled in the kernel at load and never precompiled (ADR 0019). Everything
  runs at ring 0 in one address space.
- **Execution model:** one interpreter loop per core; tasks are claimed from a global
  runnable set and are never pinned to a core (ADR 0011).
- **Long-term goal:** a general personal system. The first milestone proves the thesis
  with a booting kernel, source applications, a read-only application image and a
  persistent writable `/home`, and a REPL that can drive a device.
- **Status:** implementation. The current state (specs 0001–0022, M2–M12, 613 host
  tests) is in [`AGENTS.md`](../AGENTS.md); the snapshot below is the M10-era narrative.
  At that point specs 0001–0020 were accepted (0003 core implemented; 0015–0019
  implemented; 0020's M10.1–M10.9 and the blocking follow-up implemented; **M10
  complete**), **608 host tests** (530 language + 56 `net` + 22 `ext2w`), ABI v1 at
  **75** opcodes, M5/M6/M7.1/M8.1–M8.9 complete and
  M9.1–M9.4 (editor syntax highlighting, cheap pointer redraws, a draggable
  scrollbar, a `/lib` file-open dialog and a 128 KiB document buffer) done. The
  application
  image is a read-only ext2 tree (`lib`, `base`, `home`, `system`) mounted as a GRUB
  module; `/home` is a separate 8 MiB ext2 image on an ATA disk, mounted read-write
  through `ext2w` and one path router (persistent; `e2fsck -fn` clean). The read
  builtins are 41–43 and the write builtins are 53–57
  (`fs_write`/`fs_remove`/`fs_mkdir`/`fs_rename`/`fs_truncate`, `home/` only). Boot is
  `system/entrypoint` → `base/shell`; the language compiles source with
  `compile_with_imports` (`/lib` modules, package-wide nominal types). The kernel boots under
  GRUB/multiboot2 into long mode, prints through a framebuffer console mirrored to serial,
  has a GDT/TSS and an exception path with a double-fault IST, runs a 1 kHz APIC timer
  driving a global nanosecond clock, and owns a bitmap frame allocator. The full vertical
  slice now runs: `xtask image` builds a 4 MiB ext2 image from `samples/apps/` and attaches
  it as a GRUB module, the kernel mounts it read-only, boots `system/entrypoint` (falling
  back to `base/shell`), compiles the source in the kernel with
  `compiler::compile_with_imports` (a `/lib` module is read through the same ext2 mount),
  places
  `code`/`state`/`stack` in contiguous frames, verifies the package and enqueues the task
  in a 64-slot global runnable set. The boot core then runs the scheduler loop: claim by
  value move under a per-slot spin lock, a 10 000-bytecode quantum, per-task CPU accounting
  with a 10 s / 200 000 000-step watchdog, and release or deterministic termination. The
  boot application crosses many quanta, prints its output, exits `Ok`, and the system
  prints the claim/yield/exit summary and halts. The compiler is `no_std` and
  allocation-free; the scheduler path adds no heap. The REPL request service now runs: a
  1024-slot static queue is serviced before every claim, `core.spawn` reserves a global
  task id, `core.wait` blocks the parent (a `Blocked` slot skipped by `claim`) until the
  child's exit record wakes it, and a 64-entry exit ring serves `wait`/`run`. These
  primitives use the predeclared `Status`/`Diagnostic`/`ExitReason` shapes (spec 0005,
  "Implemented ABI"). Console input is a raw byte stream now (Q44, ADR 0037): COM1 drains
  into a 512-byte ring, the kernel neither echoes nor assembles lines, `core.read_input`
  returns whatever bytes are waiting without blocking, and the shell echoes and edits its
  own `string[256]` with the `stdlib.str_*` helpers; PS/2 key presses are events only.
  Buffers can be indexed and compared: `buf[i]` reads a raw `byte` (checked
  against the runtime length), `bytes[i] := b` writes one byte (checked against the
  capacity, extending the length and zero-filling the gap), `=`/`<>` compare two buffers
  of the same kind across capacities, and `core.len` returns the runtime length. The shell
  is now a real command loop (`help`, `echo <text>`, `run <app> [args]`, `exit`): `core.find`
  locates the first space, `core.substr_into` splits the line and the `run` tail, and the
  child prints the argument it received, so `run child world` proves argument carriage. The
  host console scripts those four commands as a byte queue so `langhost` runs the same
  application-side line editing deterministically. Integer formatting now exists as the staged `core.format_int_into`
  (decimal/hex, sign, zero padding, exact-fit `-6`), and the first `syslib` primitives —
  `port_in8`/`port_out8` with `Port` staged as a scalar `uint` — let an application drive
  hardware: `samples/apps/clock` polls the CMOS RTC update flag, reads seconds/minutes/hours
  and prints `HH:MM:SS` (`run clock` in the shell). Compilation is now bounded and runs on a
  guarded stack: the parser and the recursive codegen walks reject deeper than 32 counted
  levels with a `Diagnostic`, and after early boot `kmain` switches from the `.boot` stack
  to a 256 KiB stack with a not-present guard frame below it (the guard's 2 MiB identity
  page is split to 4 KiB PTEs; `#PF` uses its own IST). A stack overflow now faults cleanly
  at the guard instead of writing into the boot page tables (Q42). Enums are implemented
  (`type Name = (Variant, ...)`, nominal, one 8-byte ordinal, checked `EnumName(int)`);
  `Status` and `FaultCode` are predeclared; records are implemented
  (`type Name = record field: T; ... end;`: nominal, declaration-order 8-byte-aligned
  layout, nested records, buffer fields, whole-record copies, `value`/`const`/`var` record
  parameters). Sum types and pattern matching are implemented
  (`type Name = Variant | Variant(payload: T);`: nominal, 8-byte tag at 0 plus the largest
  payload at 8, destination-driven construction, exhaustive `case` with an arm-local
  by-value payload binding). `Diagnostic` is a predeclared record and `ExitReason` is the
  predeclared sum type `Ok | Killed | Faulted(code: FaultCode)` at the fixed `abi::layout`
  offsets: `core.spawn(path, args, var diag, var id)` fills `diag` on a synchronous
  failure, `core.wait(id, var reason)` writes the reason's tag/payload, and the shell
  prints `diag.message` and reports the reason with a `case`. `core.run(path, args,
  var diag, var reason)` now composes spawn + wait with the pending id in the machine, and
  the request-completion path carries the compiler's `Diagnostic` in the exit ring, so a
  compile error the service finds after `spawn` returned reaches `run`'s `diag` (`wait`
  still sees `Faulted(IoError)`). The `stdlib` is now real source: `stdlib/stdlib.ig` is
  embedded with `include_str!` and compiled into the same package as any application that
  says `uses stdlib;`, with library functions first in one function table, a shared
  constant pool, and line-table unit ids (0 app, 1 stdlib) so a broken library is a normal
  diagnostic naming `stdlib`. `function Name(...): T;` with `return` works for scalar
  results. The first helpers are `trim_into`, `split_once`, `parse_int_into`,
  `starts_with` and `contains_byte`; `samples/apps/text` exercises them on `main(args)`.
  Fixed-size arrays are implemented: `array[T, N]` (N a positive const) in state, locals,
  records, sum payloads and `value`/`const`/`var` parameters, with nominal
  element/count identity, `a[i]` read/write checked `index < N`
  (`fault(OutOfBounds)`), whole-array `copy_refs`, nested `a[i][j]`/`a[i].field`, and one
  new opcode `ref_element` (ABI v1 61 → 62, immediate `stride` and `count`). Layout is `N`
  elements at `align8(element size)`, array size `align8(N * stride)`; one structural
  array table is shared by the app and `stdlib`, so `stdlib.split_all` takes an
  `array[string[64], 8]` parameter. `samples/lang/array.ig` exercises the whole slice.
  Fixed-capacity rings are implemented too: `ring[T, N]` (N a positive const) in state,
  locals, records, sum payloads, arrays and `value`/`const`/`var` parameters, nominal in
  element and count. Layout is the `N` elements at `align8(element size)` followed by
  `head: u64` and `count: u64`; the built-in `core.ring_push`/`pop`/`peek`/`full`/`empty`
  are compiler-lowered over `ref_offset`/`ref_element`/`copy_refs`, `add_u`/`mod_u` and
  `eq`+`jz`, so no opcode was added (the ABI v1 opcode table is unchanged). `push` returns `Full` on a full
  ring; `pop`/`peek` return `NotFound` and leave the out-parameter untouched on an empty
  one; `push`/`pop` reject `const` receivers (a `value` copy is writable and private to
  the callee). One structural ring table is
  shared with `stdlib`, whose `drain_into` takes a `ring[int, 8]`; `samples/lang/ring.ig`
  covers FIFO order, wrap-around, copies and every element kind. Fixed-capacity maps are
  implemented too: `map[K, V, N]` (`N` a positive const, `K` one of `int`, `string[M]`,
  `bytes[M]`) is nominal in `(K, V, N)`, lays out a `count` header then `capacity` (the
  next power of two at least `2N`) slots of state/hash/key/value, and hashes with FNV-1a,
  probes linearly and deletes with backward shift. `core.map_put`/`get`/`has`/`remove`/
  `count` are five new opcodes (`MAP_PUT` … `MAP_COUNT`) so the algorithm lives once in
  the interpreter; `put` at `N` entries returns `Full`, a missing key is `NotFound`, and
  `get` leaves its out-parameter untouched. One structural map table is shared with
  `stdlib`, whose `map_get_or` takes a concrete map; `samples/lang/map.ig` covers
  collisions, backward shift, key 0, the empty buffer key, aggregate values, copies and
  the three parameter modes. UTF-8 is implemented: `core.substr_into` now accepts all four
  destination/source kind combinations, with the destination kind deciding the check —
  a `string` source keeps T4's code-point-boundary rule, a `bytes` source is validated as
  strict UTF-8 (no overlongs, surrogates, values above `U+10FFFF`, truncations or stray
  continuation bytes), and a `bytes` destination copies raw data. The source kind rides in
  the `SUBSTR` `b` field, so no opcode was added. `stdlib` gained `utf8_decode_into`
  (T3, the only checked bytes→string conversion), `utf8_len`, `utf8_decode` and
  `utf8_valid` as ordinary language code; `samples/lang/utf8.ig` covers every code-point
  length and malformed class and `run utf8` runs in the kernel. The checked slice stays in
  `core` permanently: the destination capacity must be a call-site immediate, and without
  generics a `stdlib` helper could only serve one capacity (the `stdlib.substr_into` move
  is withdrawn). Every online core now runs the scheduler: `smp::start()` brings the APs
  up with INIT-SIPI-SIPI through a trampoline copied to physical `0x8000` beside a
  parameter page at `0x9000`, one per-core TSS/IST set, one static 256 KiB kernel stack per
  AP (matching the boot core's guarded 256 KiB one, because any core may compile a
  request), and a bounded 100 ms wait, so `-smp 1`
  and `-smp 2` boot with fewer cores instead of hanging. Discovery is by attempt over APIC
  ids `1..MAX_CORES` with `MAX_CORES` = 8; the core index is internal and the APIC id is
  the identity software sees through `syslib.cpu_id()` (builtin 10). All cores run the
  same claim → quantum → release loop over the global runnable set, with per-core verifier
  scratch and per-core claim/yield/exit counters. An idle core does one `sti; hlt` step
  after checking the set; producers (`task::spawn`, `release`, `wake`, the REPL enqueue)
  set `need_resched` on one idle core and send the `0x40` IPI, whose handler only EOIs. A
  claimed task's slot stays reserved by task id and a reserved request id stays live while
  it compiles, so `core.wait` cannot race a spawn or a compile. The boot core's idle path
  prints the per-core summary, sets a stop flag, IPIs the APs, waits bounded for their
  acknowledgements and halts. `samples/apps/worker` and `cores` show six workers on
  distinct APIC ids in a `-smp 4` run; `xtask run` passes `-smp 4` by default (`--cores N`).
  The realtime class runs: a task promotes itself once with `core.realtime_on()` (builtin
  11; `Ok`, or `Full` when every online core already holds one), is claimed before normal
  tasks, is not released at quantum expiry, and is exempt from the total budget. It must
  call `core.heartbeat()` (builtin 12) at least once per second of non-blocked time; the
  deadline is `budget_ns + 1 s` (a compile-time constant) and a miss terminates it at the
  next quantum boundary with `Faulted(WatchdogTimeout)`. Admission is a CAS counter
  against `smp::online_count()`; a task releases its slot only at termination, so a blocked
  controller keeps it. Starvation is accepted (no reserved core). `samples/apps/realtime`
  promotes, beats through 200 control cycles and runs a `beat` child that reports `Full`
  on `-smp 1`; `samples/apps/spin` loops without a heartbeat and is killed after about a
  second. Streams now run: `in_stream[N]`/`out_stream[N]` are top-level state variables
  whose names are the stream identifiers, the compiler puts their 8-byte handles in the
  `state` prefix and lists the endpoints in the manifest, and the loader creates or pairs
  each endpoint before placing the task. A new endpoint whose peer is not live *waits*:
  a sender may fill it to capacity and a receiver blocks on it. A same-direction
  duplicate, a capacity mismatch against a live peer, and a declaration against a closed
  stream are load errors reported through `core.run`'s `diag`. `core.send`/`try_send`
  copy a whole buffer atomically (blocking, `WouldBlock`, `CapacityExceeded`, `Closed`);
  `core.recv`/`try_recv` fill a writable `bytes[N]` and return the count or a staged
  `-1`/`-2` (`string` destinations are rejected because a partial read could split a code
  point). Blocking uses `WaitFor::Stream(handle)`, a send wakes a receiver, a receive that
  frees space wakes a sender, and termination closes the owner's sides, discards queued
  bytes and frees the buffer at the close (the record stays until the surviving endpoint
  ends). `samples/apps/streams` (consumer
  `pipe_in`, producer `pipe_out`) proves in-order delivery through a blocking sender and
  the `Closed` exit; `streams_bad` proves both load errors. The `stdlib` framing layer
  now sits on top, as ordinary language code taking `const in_stream[1]`/`const
  out_stream[1]` parameters (a stream parameter's declared capacity is not checked, so one
  helper serves every capacity): `recv_exact`, `send_frame`/`recv_frame_into` (a `u32`
  little-endian length prefix), `send_line`/`recv_line_into` (`\n`, CRLF stripped, an
  overlong line keeps consuming to stay in sync), `send_u64`/`recv_u64` and `send_bytes`.
  Each helper publishes a whole value with one copy, so an error leaves the destination
  untouched; a receive is one byte wide because `core.recv` returns up to the destination
  capacity and there is no pushback. `pipe_out`/`pipe_in` now run through `send_line`/
  `recv_line_into`, and `samples/apps/frames` (`frame_in` + `frame_out`, with an ack
  stream so the producer exits only after the consumer drained) proves the length prefix,
  the typed `u64` view, both `CapacityExceeded` paths and the close. Every core's kernel
  stack is now 256 KiB: a compile on an AP overflowed the old 64 KiB stack into the
  neighbouring `.bss`. Stack guards are now complete (`kernel/src/guard.rs` over
  `arch/x86_64/src/paging.rs`): the boot stack, all seven AP `.bss` stacks and every task
  stack have a not-present 4 KiB frame. A cache of 32 4 KiB tables splits each 2 MiB page
  once and keeps the neighbouring pages present, so several guards share one table; a
  96-entry registry lets `#PF` print `stack guard: task N` / `ap core N` / `boot core`.
  Every PTE change is followed by a local CR3 reload and an IPI TLB shootdown to all online
  cores, because a frame may carry a stale translation from an earlier life on another
  core. A task stack is `stack_len + 4096` contiguous frames: the lowest frame is the
  guard, `regions.stack` starts one frame above it with exactly the manifest length, so the
  interpreter's `StackOverflow` check is unchanged; `reclaim` restores the guard and
  returns guard + stack as one unit on every destruction path. `samples/apps/deep` proves
  `run deep` reports `child: faulted StackOverflow`; a hardware guard hit is a hard backstop
  that halts with the guard named. Fixed-point float text now runs:
  `core.format_f64_into(dst, value, frac_digits) -> int` (9 fraction digits at most,
  half-away-from-zero rounding with carry, `nan`/`inf`/`-inf` specials, `-4` for a wider
  field or a magnitude at or above `2^63`, `-6` when the result does not fit) is one new
  `FORMAT_F64` opcode implemented as a pure buffer operation in the interpreter, and
  `stdlib.parse_f64_into(text, var value) -> Status` is ordinary language code accepting
  decimal text with an optional exponent plus the formatter's `inf`/`-inf`/`nan`, rejecting
  everything else with `Invalid` and saturating overflow/underflow to `±Inf`/`±0` with
  `Ok` while preserving `-0.0`. `samples/lang/f64text.ig` covers the whole surface on the
  host and `samples/apps/floats` proves `run floats 3.25` → `value=3.250` and
  `run floats nope` → `Invalid` in the kernel. Shortest round-trip float text now runs
  too: `core.format_f64_short_into(dst, value) -> int` writes the fewest significant
  digits that parse back to the same bits — positional while `-6 < e10 + 1 <= 21`,
  scientific otherwise (`1e20` vs `1e21`, `1e-6` vs `1e-7`), `0`/`-0`, `nan`, `inf`/`-inf`
  literal, an exact decimal tie away from zero, `-6` when the destination is too small —
  as one `FORMAT_F64_SHORT` opcode. It is an exact search, not an approximation: the value
  and both ends of its round-trip interval are expanded to base-`10^9` integers (at most
  769 digits, 88 limbs), the two `n`-digit decimals that bracket the value are tested in
  turn, and the first `n` that lands inside wins (17 digits always do). No allocation, no
  host call, no data tables beyond 72 bytes of `10^0..=10^8`. `samples/lang/f64short.ig`
  covers the shape boundaries and the subnormal tail on the host, and `samples/apps/floats`
  prints `s:1e21=1e21` and `s:tinysub=5e-324` in the kernel. The desktop milestone
  (M2) has started with its graphics foundation: the kernel keeps the multiboot2 mode in
  `kernel/src/gfx.rs` and allocates a full-screen **shadow screen** from the frame
  allocator (`pitch * height` bytes, 3 MiB / 768 frames at the 1024×768×32 mode GRUB
  returns) instead of drawing into the framebuffer directly. The shadow is the single
  source of truth; the text console paints its glyphs through it (`console_glyph` presents
  each cell) and `syslib` exposes nine primitives — `screen_width`/`screen_height`,
  `fill_rect`, `fill_dither` (50% `(X + Y)` checkerboard), `draw_rect` (1-px outline),
  `draw_text` (8×8 font, transparent background, no newline), `get_pixel`,
  `present` (pitch-aware row copy) and `clear` — as host builtins with `Status` results
  (`Invalid` for `w <= 0`, `h <= 0` or a colour above `0x00FFFFFF`; drawing is clipped,
  never faulted). A rectangular clip region (currently the whole screen) is the seam for
  the window service. `samples/apps/desktop` paints a System 7.5-style dither desktop, a
  menu bar with a right-aligned `core.clock()` HH:MM and a striped title-bar window, then
  checks nine pixels with `get_pixel` and prints `desktop: ok` in one claim. Graphics
  disable cleanly (no tag, non-32-bpp, bad geometry or no shadow memory: 0×0 screen,
  `Invalid`, console on serial). Spec 0009 and ADR 0020 record the decision; M2.2 is the
  mouse and events, M2.3 windows and `expose`. The desktop pointer now runs too: the
  i8042 auxiliary device is initialised at boot (`0xA8`, config aux interrupt cleared,
  `0xF6`, `0xF3 100`, `0xE8 3`, `0xE6`, `0xF4`; bounded waits) and polled in the service
  opportunity beside the keyboard, which now leaves aux bytes for it instead of
  discarding them. A pure 3-byte decoder requires bit 3 on the first byte (resync
  otherwise), drops an overflow packet whole and sign-extends the 9-bit deltas with the
  Y axis inverted; one machine-wide pointer state (`x`, `y`, buttons; clamped to the
  screen; 1:1 motion) lives in `kernel/src/gfx.rs`, and a boot self-check runs canned
  packets (including a negative delta, an overflow and a desynced stream) through the
  same decoder and clamp arithmetic on scratch state (`mouse: decoder ok`, halt on a
  mismatch). The 16×16 arrow (black outline, white fill, hotspot 0,0) is composited into
  the framebuffer by `present`, never stored in the shadow, so `get_pixel` stays
  uncomposited and headless checks stay deterministic; a move re-presents only the old
  and new cursor rectangles. `syslib` gained `pointer_x`/`pointer_y` (`int`),
  `pointer_buttons` (`uint`) and the debug-only `inject_pointer(dx, dy, buttons)`
  (builtins 22–25; host defaults 0/0/0 and `Invalid`), and `samples/apps/mouse` proves
  clamping at both edges, buttons and the "cursor is not in the shadow" rule (`mouse:
  ok`). Spec 0010 and ADR 0021 record the decision; M2.2.3 adds key events and M2.2.4 the
  event queue. The pointer is now **absolute** as well: `kernel/src/pci.rs` scans bus 0
  for the PIIX3 UHCI controller (`8086:7020` at 0:1.2, I/O BAR4), `kernel/src/usb.rs`
  resets the controller, installs a static 4 KiB frame list plus static QH/TDs and
  enumerates QEMU's `usb-tablet` (`GET_DESCRIPTOR`/`SET_ADDRESS`/`SET_CONFIGURATION`/
  `SET_IDLE`), verifying the HID report descriptor's absolute 16-bit X/Y shape. One
  self-linked interrupt-IN TD is polled from the service opportunity; the measured report
  is one buttons byte plus little-endian X and Y (`0..=32767`, top-left origin) and a
  wheel byte, scaled to `0..=w-1`/`0..=h-1` with round-to-nearest and applied through
  `gfx.set_pointer_absolute`. The tablet wins over PS/2 while ready; PS/2 motion is
  dropped (bytes still drained) and remains the fallback on a machine without the tablet.
  `syslib.pointer_source()` (builtin 26) reports 0 none / 1 PS/2 / 2 tablet. This fixes
  Q49's burst loss and host-window scale mismatch because an absolute report restates the
  position. `xtask run` passes `-usb -device usb-tablet` (`--no-tablet` omits the device);
  `scripts/tablet_qmp.py` drives QMP absolute injection and compares guest pixels. Spec
  0010 and ADR 0022 record the decision. The keyboard now
  produces events as well as console bytes (M2.2.3–M2.2.5): `arch/x86_64/src/keyboard.rs`
  decodes set 1 into a pure `KeyEvent` (stable key code, text, Shift/Ctrl/Alt/Caps,
  arrows, F1–F12, the E1 Pause sequence skipped whole) and a boot `keyboard: decoder ok`
  self-check; `kernel/src/event.rs` owns one 64-event machine-wide queue that drops the
  newest event on overflow and counts it, with pointer transitions enqueued from `gfx`.
  `EventKind` and `Event` (`kind, x, y, code, window`) are predeclared at
  `abi::layout::event`, key events pack `text | modifiers << 8 | key code << 16`
  (`abi::key`), and `syslib.next_event` (blocking on `WaitFor::Input`, SMP-safe wake),
  `poll_event`, `inject_event` (debug-only), `event_drops` and `event_flush` are builtins
  27–31 with no new opcode. `samples/apps/events` with `events_poke` proves the surface,
  the overflow policy and a genuinely blocked wake (`events: ok` on `-smp 4` and
  `-smp 1`). IRQ12 now drives the relative fallback too (M2.2.7): `arch/x86_64/src/ioapic.rs`
  routes IRQ12 through the I/O APIC at `0xFEC00000` (the page is split and marked
  `PWT | PCD`) to the boot core as a level-triggered vector `0x2C`; the `irq_aux` stub
  calls `mouse::on_irq`, which drains at most 64 aux bytes into a 1024-byte
  single-producer/single-consumer atomic ring and EOIs only the local APIC. `mouse::poll`
  decodes the ring in the service opportunity, and the direct controller drain remains
  only as the backstop when the route is unavailable; the two modes are exclusive, so an
  aux byte has one reader. `mouse::enable_irq` stops reporting, re-reads the
  configuration, re-enables reporting and writes `config | 0x02` last (once bit 1 is set
  the handler would steal the `0xF4` ACK); the configuration value is now written to the
  **data** port, fixing the old command-port write that left bit 1 clear. Boot lines
  `ioapic: version ...`, `mouse: aux IRQ12 enabled ...` and a one-time
  `mouse: aux IRQ12 delivered ...`; an absent IOAPIC/APIC or a failed write falls back to
  polling. `scripts/mouse_burst_qmp.py` clamps at x=0 and injects 300×(+2), requiring
  +600 on `-smp 4` and `-smp 1`; QEMU 10.2.2 retains PS/2 deltas, so the polled build is
  also 600/600 headlessly (the historical 346/600 was a host-window measurement). Spec
  0010 and ADR 0023 record the decision. Spec 0011 (Windows) is accepted and fixes the
  window model before implementation (ADR 0024): a 16-entry kernel table of records with
  monotonic `int` ids (`0` invalid); `window_open(x, y, w, h, title, var id)` takes the
  frame origin and the **content** size (frame = content + a 1-px border and a 16-px title
  bar, so `frame = (w + 2, h + 17)`); one bottom-to-top z-order with exactly one focus
  (open/raise focus, closing the focused window falls back to the topmost live one, task
  death closes its windows); owner-only `close`/`move` with `raise` allowed to any task;
  a 64-byte title, an 8 × 8 minimum content and an origin clamped on screen; a
  service-owned shadow clip with save/narrow/restore (no application primitive); and a
  whole-content `Expose` repair protocol for M2.3.2/M2.3.3. Geometry is read through the
  predeclared `Rect` record (`x, y, w, h: int`, size 32). M2.3.1 implements it:
  `kernel/src/window.rs` holds the 16-entry table behind one lock (`open` clamps and
  assigns monotonic ids, `close`/`move` check the owner, `raise` refocuses, `close_task`
  runs from `Task::reclaim`, the rect/focus reads are pure); `syslib.window_*` are host
  builtins 32–38 with disabled-service defaults; `gfx` gained the internal
  `set_clip`/`reset_clip` (no application primitive) with a boot self-check
  (`graphics: clip ok`) and a scratch-table self-check prints `window: rules ok`.
  `samples/apps/windows` (with `windows_child`) proves geometry, raise/focus, move,
  non-owner refusal, close-on-exit, focus fallback and the error paths (`windows: ok` on
  `-smp 4` and `-smp 1`). M2.3.2 implements composition and repair: every mutation records
  bounded damage (32-rect desktop and chrome lists) and one synchronous repair under the
  table lock (window → graphics): the desktop returns as white + the `(X + Y)` black dither
  in the parts no live window covers, chrome is redrawn bottom-to-top in each window's
  visible parts (frame minus higher frames) intersected with the damage, and the union is
  presented once. The service draws the chrome (1-px black border, 16-px title bar — white
  with black stripes when focused, plain `0xCCCCCC` when not — an 11×11 close box and a
  centred 8×8 title) and never writes the content rectangle. `window: paint ok` checks the
  damage/union arithmetic on scratch state. `samples/apps/windows_demo` composes three
  overlapping windows, moves and raises them, holds 15 s as a realtime task and prints
  `windows_demo: ok`; `scripts/windows_screenshot_qmp.py` captures the frame via QMP
  `screendump`. M2.3.3 implements routing and `Expose`: producers leave `Event.window = 0`,
  and the kernel host routes at poll time — a pending owner-only `Expose` first
  (`EventKind.Expose`, ordinal 5, `window = id`, `x = y = code = 0`, one coalesced flag per
  damaged window), then a queued event, where a `PointerDown` hit-tests the topmost frame,
  raises/focuses it and names it, other pointer/key events name the focused window, and an
  injected non-zero `window` is passed through. Routing never holds the graphics lock
  before the window lock (the pointer producer runs under graphics and only enqueues); a
  repair marks exposes and the wrappers wake `WaitFor::Input` after dropping the window
  lock, with the scheduler's input-block re-check testing `window::has_expose`.
  `syslib.window_present` (builtin 39) presents a window's content clipped to its visible
  parts (content minus higher frames), owner-only; `syslib.present` stays a generic
  primitive. `window: route ok` checks the bookkeeping and `samples/apps/windows_events`
  proves routing, expose fields, foreign isolation, `window_present` and
  close-on-termination on `-smp 4` and `-smp 1`. A client that ignores an expose leaves
  stale content and is not closed in M2. M2.3.4 separates the console and adds the first
  shell (spec 0012, ADR 0025): `console::init` opens two kernel-owned text windows
  (owner `0`) after `gfx::init` — a **terminal** for `core.write` (the application echoes
  its own input) and a **system log** for `println!` — each with its own 62×89 grid,
  cursor and per-window scroll, drawn at scale 1 inside the window's content and visible
  parts with an **explicit clip** (`gfx::draw_cell`/`present_within`), never the shadow's
  global clip, and presented cell by cell or part by part. `console::route_self_check`
  writes one probe through each real path, checks both grids and a foreground/background
  pixel in each with `get_pixel`, clears them and leaves `console: route ok`; every byte
  is still mirrored to serial and console input is the raw byte ring. A pending owner-0
  `Expose` is pulled by `console::pump` at the end of `console::poll_input` (service
  opportunity and idle loop), so the lock order stays `CONSOLE → WINDOW → SCREEN` and the
  repair never calls the console. `window::open` now admits owner `0` (task ids start at
  1) and kernel windows are ordinary windows: clickable, raiseable and enumerated. A
  boot-time `console: terminal ok` / `console: log ok` pair precedes the result line.
  `syslib.window_info(index, var id, var rect, var title[64])` is builtin 40 (no new
  opcode): index 0 is the topmost live window, `NotFound` past the end or with graphics
  disabled, and the compiler requires the title destination to hold 64 bytes.
  `samples/apps/desktop_shell` draws a System 7.5 menu bar (Apple square, File/Apps/Windows,
  right-aligned `HH:MM`, 22 rows) and a "Desktop" window; `File` lists windows through
  `window_info` into the terminal, `Apps` spawns `clock` with `core.spawn` (never
  `core.run`), `Windows` raises the terminal, and the Apple raises the shell. Check mode
  injects one pointer-down per item and prints `desktop_shell: ok`; normal mode promotes
  to realtime with heartbeats, paints, prints `desktop_shell: ready` and pumps
  `next_event`, and `scripts/desktop_screenshot_qmp.py` captures
  `/home/sinan/Desktop/igis-desktop.png` via QMP `screendump`. There is no global work
  area yet: kernel windows start at `y = 26` and the shell window at `y = 72`; an app
  opening at `y = 0` covers the bar until the next shell event. A full-screen
  `syslib.clear` still erases the kernel windows' pixels (their grids survive and the
  next expose/output repaints them). The M2.3.5 two-application proof now runs:
  `samples/apps/windows_proof` plus `windows_proof_a`/`windows_proof_b` place two
  task-owned windows side by side, switch focus and raise by real injected
  `syslib.inject_pointer` clicks (the parent asserts focus and z-order because the
  machine-wide queue is shared), drive a four-step scripted owner `window_move` drag
  (old area restored to the underlying terminal, new content painted), then move B
  over A and back so A takes its owner-only whole-content `Expose`, repaints only its
  visible strip (no per-task clip) and repaints the uncovered content through
  `window_present` (the covered part shows B while B is on top), and finally close
  both windows and exit `Ok` on a stage-4 command acknowledged by `core.wait`. Two
  prerequisites the proof exposed are fixed: the claim scan starts at a rotating
  cursor, so a busy low-slot task no longer starves higher slots on `-smp 1` (the old
  scan always began at slot 0); and console cell/grid paints compare a window-service
  visible-geometry generation before and after and retry with fresh visible parts, so
  a window that moves above the console during a repaint is not overwritten. `run
  windows_proof` prints `windows_proof: ok` on `-smp 4` and `-smp 1`; `windows_proof
  shot` holds the composed frame for `scripts/windows_proof_screenshot_qmp.py`
  (`/home/sinan/Desktop/igis-m23-proof.png`). Pointer-driven continuous dragging
  remains M2.4. The M2.4 language-level UI toolkit has started with its layout layer:
  `stdlib` now imports `core` and `syslib` (ADR 0026) and adds 18 ordinary-language
  helpers — 8×8 metrics (`ui_text_width` = code points × 8, `ui_text_height`,
  `ui_line_height`, `ui_content_inset`, `ui_title_bar_height`, `ui_close_box_size`,
  `ui_text_center_x`/`_y`), the System 7.5 palette as functions (`ui_black` 0x000000,
  `ui_white` 0xFFFFFF, `ui_gray` 0xCCCCCC, `ui_focus` 0xFFFFFF, `ui_accent` 0x000080),
  and client chrome (`ui_frame`, `ui_title_bar` with focused stripes/plain unfocused
  fill, an 11×11 close box and a code-point-safe 64-byte centred title, `ui_close_box`,
  `ui_separator`, `ui_center_text`). They draw only through the nine `syslib`
  primitives and never touch the window service's own chrome; there is no new opcode,
  builtin or `state`. `samples/apps/ui_layout` opens a real window, draws a synthetic
  dialog inside its content, presents it and checks stripes, borders, the close box, a
  button glyph and the accent swatch with `get_pixel` (`ui_layout: ok` on `-smp 4` and
  `-smp 1`); without graphics it checks the metrics and the disabled-screen `Invalid`
  path and prints `ui_layout: host ok` on `langhost`. The embedded library needed
  1,157,496 B of compile scratch at M2.4.0, so `MAX_ARENA_BYTES` rose from 1 to 2 MiB (the
  cap was provisional; spec 0008). String editing (M2.4.1) is implemented in `stdlib` as 13
  ordinary-language helpers with no new opcode, builtin or `state`: `str_boundary`,
  `str_cursor_clamp`/`left`/`right`/`home`/`end`, `str_insert_into`, `str_delete_into`,
  `str_backspace`, and `str_selection_normalize`/`all`/`collapse`/`replace`. Positions are
  byte offsets; insertion and deletion refuse a non-boundary with `Invalid`; a mutator
  stages into a local `bytes[256]`, converts through `core.substr_into` and publishes one
  whole-buffer copy, so a failure leaves the text untouched and the result is always valid
  UTF-8; the working capacity is 256 bytes (`CapacityExceeded` without a partial write).
  Cursors clamp instead of failing (negative → 0, past the end → the length, mid-code-point
  → that code point's first byte) and movement crosses whole code points; backspace at 0 is
  an `Ok` no-op; the selection is the scalar pair `start`/`stop`. `samples/apps/text_edit`
  exercises ASCII and 1-/2-/3-/4-byte code points, every rejection path, capacity and the
  selection helpers, prints `text_edit: ok` on `-smp 4` and `-smp 1`, and produces the same
  transcript on `langhost`. Controls (M2.4.2) are implemented in `stdlib` as 32 more
  ordinary-language helpers with no new opcode, builtin or `state`: `ui_rect_hit`,
  `ui_focus_ring` (a dotted inset ring), `ui_focus_next` (wrapping), the packed-key
  decoders (`ui_key_text`/`modifiers`/`code` and `is_backspace`/`tab`/`enter`/`left`/
  `right`/`up`/`down`/`home`/`end`/`delete`, using `div`/`mod` because the language has no
  bitwise operators), a button (white or gray face, black border, centred cut label, inset
  focus ring), a checkbox (11×11 box, seven-pixel check mark, label, toggle), a text field
  (visible slice from a byte scroll offset, accent selection band with white text, caret,
  `ui_text_field_reveal`, never mutates the text), a vertical scrollbar (white track, gray
  thumb with a black outline, `ui_scrollbar_clamp` and a page/thumb hit class), and a list
  (`array[string[64], 8]` rows, accent selection, `ui_list_rows`/`hit`/`ensure_visible`/
  `move`). The application owns the event loop and every state scalar; the library has no
  widget object, callback, event pump or `state`. Drawing uses the M2.4.0 metrics/palette;
  too-small geometry is `Invalid`, disabled graphics draw nothing while the pure helpers
  keep working, and the focus ring is inset so it never leaves the control.
  `samples/apps/ui_controls` drives every control with injected pointer/key events and
  `get_pixel` checks on `-smp 4`, `-smp 1` and `langhost` (`ui_controls: host ok`). Menus
  (M2.4.3) are implemented as 15 more ordinary-language helpers with no new opcode,
  builtin or `state`: `ui_menu_bar`/`ui_menu_bar_hit` draw and hit-test a 22-px bar with an
  inverted active cell, `ui_menu_dropdown` draws a 16-px-row pull-down with a check column,
  right-aligned shortcut text, an accent highlight, gray disabled rows and `-` separator
  lines, and `ui_menu_bit`/`has`/`set` are `uint` bit masks (indices 0..63, `div`/`mod`
  only) that stay independent of the highlight. `ui_menu_selectable`, `ui_menu_first`,
  `ui_menu_open`, `ui_menu_close` and `ui_menu_move` are the state transitions: disabled
  and separator items are never highlighted, and `ui_menu_move` clamps without wrapping.
  `ui_menu_key` maps a packed `Event.code` to an action code (0 none, 1 up, 2 down, 3 left,
  4 right, 5 activate, 6 close): Escape closes, Enter activates, arrows move and Left/Right
  switch the open top-level menu. The application still owns the open menu, the highlight
  and the masks. The library is now 105,673 B of source, 79,824 B of code and needs
  2,966,496 B of compile scratch (128 KiB source cap, 4 MiB arena);
  `samples/apps/ui_menus` opens menus, skips a separator and a disabled item, toggles a
  check mark and closes with Escape using injected pointer/key events and `get_pixel`
  checks on `-smp 4`, `-smp 1` and `langhost` (`ui_menus: host ok`). Dialogs (M2.4.4) are
  implemented as 10 more ordinary-language helpers with no new opcode, builtin or `state`:
  `ui_message` word-wraps text in a fixed box (16-px lines, break at the last space,
  hard-break an unbroken run, `\n`, never split a code point), `ui_dialog_button_width`/
  `_left`/`_top` are the shared button-row geometry, `ui_dialog_button` is a button with
  the default action's solid double border, `ui_alert`/`ui_alert_hit` draw and hit-test a
  framed alert (focused title bar, wrapped message, default/cancel pair; slots 0 default,
  1 cancel; the close box cancels), `ui_input_dialog`/`ui_input_dialog_hit` draw a prompt,
  a `ui_text_field` over the caller's buffer and OK/Cancel (slots 0 field, 1 default,
  2 cancel; the close box cancels) and `ui_dialog_key` maps a packed `Event.code` to
  0 none / 1 default / 2 cancel / 3 focus next / 4 focus previous (Enter always takes the
  default, Escape cancels only with `has_cancel`, Tab/Shift+Tab move the focus). The
  application owns the modal loop, the focus slot, the result and the text buffer; the
  input dialog only draws and never mutates the buffer, and editing stays the M2.4.1
  helpers. `samples/apps/ui_dialogs` drives an alert and an input dialog with injected
  key/pointer events and `get_pixel` checks on `-smp 4`, `-smp 1` and `langhost`
  (`ui_dialogs: host ok`), and `scripts/ui_dialogs_screenshot_qmp.py` captures
  `/home/sinan/Desktop/igis-dialogs.png`. Icons and the desktop interaction layer (M2.4.5)
  are implemented as 16 more ordinary-language helpers with no new opcode, builtin or
  `state`: `ui_icon` draws a 32×32 mono bitmap given as `array[uint, 32]` row masks (bit 0
  the left pixel, one `fill_rect` per maximal set-bit run) and `ui_icon_row_bit` reads a
  bit; `ui_icon_cell_x`/`_y`, `ui_icon_label_y` and `ui_icon_grid_hit` are the grid
  geometry (row-major, `count` valid cells, -1 outside); `ui_double_click` is a pure
  400 ms inclusive same-target test with no state; `ui_icon_grab`/`ui_icon_follow` carry
  the drag offset and position; `ui_selection_normalize` returns an inclusive band,
  `ui_selection_rect` the dotted outline and `ui_rect_intersects` the cell overlap;
  `ui_icon_drop` returns -2 over the trash, else the cell or -1, and `ui_trash_hit` is the
  named rectangle rule. The four bitmaps (folder, document, terminal, trash) live in the
  sample, and the app owns the cells, the live/selected flags, the click time/target and
  the clamp of a dragged icon to its content. `samples/apps/ui_icons` double-clicks the
  document (`ui_icons: open Document`), drags the folder to an empty cell and then into
  the trash, rubber-band selects the two remaining icons and checks the pixels and the
  band on `-smp 4`, `-smp 1` and `langhost` (`ui_icons: host ok`);
  `scripts/ui_icons_screenshot_qmp.py` captures `/home/sinan/Desktop/igis-icons.png`.
  The M2.4 UI toolkit is complete with the widgets demo (M2.4.6):
  `samples/apps/widgets` is one 760×560 client panel and one event loop that composes an
  app-drawn File/Edit/View menu bar with a clock, a button, a checkbox, a text field
  (typing, accent selection, horizontal scroll and a 2-byte `é` through the M2.4.1
  helpers), a scrollbar over a 16-line document, an 8-row list, a folder/document icon
  strip with a trash target, an alert and a text-input dialog. The dialogs are the same
  state machine as the panel: while one is open every key and pointer event goes to it,
  Enter always takes the default, Escape cancels, and the input buffer is published into
  the field only on OK. Check mode drives injected pointer/key events and checks
  representative pixels with `get_pixel`, prints `widgets: ok` on `-smp 4` and `-smp 1`
  and `widgets: host ok` on `langhost`; `langhost/tests/e2e.rs` pins the composed drawing
  sequence and the control/key results. It adds no helper, opcode, builtin or state (the
  library stays at 125 functions); the application source is 57,388 B and the pair needs
  6,546,928 B of compile scratch. `widgets shot` plus
  `scripts/widgets_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-widgets.png`.
  The application file API now runs (M2.5.1, spec 0013, ADR 0027): `core.fs_list`,
  `core.fs_read` and `core.fs_size` are host builtins 41–43 with no new opcode,
  exposing the application image to applications in that slice (the root-only view; spec 0018/0019 later added the tree and the writable `/home`). Paths use the shared
  `core.spawn` syntax (`abi::fs::validate_path`); in that slice listing accepted only
  `""`/`"."`, reads and sizes accepted one root component, and a separator was
  `Invalid` (subdirectories unsupported; spec 0018 later added the tree). `fs_list` returns entry `index` in directory order
  (kind `0` file / `1` directory / `2` other, inode size, at most a 64-byte name),
  `fs_read` copies at most 256 bytes at a byte offset into a compiler-checked
  `bytes[256]` (`Ok`/0 at EOF, destination length and `read` published together), and
  `fs_size` returns the inode size. Every failure leaves the out-parameters untouched;
  the kernel streams the ext2 blocks through new `Ext2::list_entry`/`read_at` with no
  allocation, `langhost` implements the same view over `samples/apps`, and
  `samples/apps/files` lists the root, reads `child` in chunks, checks offsets/EOF,
  missing names, a directory and unsupported paths, and prints `files: ok` on `-smp 4`
  and `-smp 1`. `mke2fs`'s `lost+found` is reported as kind 1 and refused by reads.

The first windowed application beyond the proofs is `samples/apps/clock_window` (M2.5.2):
one 260×280 content rectangle with a two-frame client bezel, an integer midpoint-circle
analog face, 60 minute ticks (every fifth an hour mark) and hour/minute/second hands,
plus a framed `HH:MM:SS` readout and caption. Geometry is integer-only and app-local: a
60-entry fixed-point direction table built once by rotating 6° per step (`DirScale`
16384), Bresenham 1×1 `fill_rect` lines, and no floating point, square root or new
`stdlib` helper (the library stays at 125 functions). `run clock_window check` draws a
fixed `10:08:30` and checks the bezel, the rim at 12/3/6/9, hour and minute marks, the
three hands, the centre dot, two empty face points and the digital glyphs with
`syslib.get_pixel`; `run clock_window shot` ticks live from `core.clock()` in a bounded
poll/redraw loop that never blocks in `next_event` (the scheduler preempts its spin) and
never calls `syslib.clear`, repaints the whole content on an owner `Expose`, and presents
once per complete frame with `window_present`. `langhost` covers the pure time
decomposition, zero-padded formatting and the direction table (`clock_window: host ok`);
`scripts/clock_window_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-clock.png`.
The app source is 17,744 B and its task package is 103,696 B of code (26 frames), 1,304 B
of state and a 20,896 B stack.

The first ordinary editing application now runs (M2.5.3): `samples/apps/editor` is one
640×480 client panel with an app-drawn 22-px File menu (Open, a disabled Save, Quit), a
path/read-only line, a 26-row text view, a scrollbar, a status/Ln-Col line and a caret and
selection band. The document is one `string[8192]` (valid UTF-8); `core.fs_size` checks the
size, `core.fs_read` fills a staged `bytes[8192]` in the API's 256-byte chunks and one
`core.substr_into` publishes it (a `bytes` source is the strict UTF-8 conversion), so a
missing name, a directory, a subdirectory path, a file over 8192 bytes or invalid UTF-8
reports a status line and leaves the old document byte-identical. The M2.4.1 mutators are
fixed at 256 bytes, so editing is one app-local atomic mutator (`ed_replace`: boundary
checks, prefix/insert/suffix staging in a local `bytes[8192]`, one publish, exact
`CapacityExceeded`) while the read-only `str_*` helpers work unchanged on the larger
buffer. The app owns the caret, scalar selection pair, first visible line and horizontal
byte offset; the view scans line starts on demand, keeps the caret visible, draws a
selection band and caret, and uses `ui_scrollbar`/`ui_scrollbar_hit` (track clicks page;
thumb drag is still deferred). Keys are Left/Right/Home/End/Up/Down/PageUp/PageDown,
Shift variants, Backspace/Delete/Enter/Tab (two spaces), printable text from
`ui_key_text`, Ctrl+A/O/Q and Ctrl+S (which only reports "read-only"); the File menu's
Save is disabled because there is no writable filesystem. Every frame is complete before
one `window_present`, an owner `Expose` repaints the whole content, the interactive loop
blocks in `next_event`, and `syslib.clear` is never called. `run editor check` loads
`child`, checks the line/addressing logic, every load error class, insert/delete/
backspace/Enter, a 2-byte code point, the 8192-byte capacity refusal, invalid UTF-8, the
read-only rule, vertical/horizontal scrolling, an injected `KeyDown` routed to its window,
and menu/caret/selection/scrollbar pixels (63 verifies) → `editor: ok` on `-smp 4` and
`-smp 1`; `langhost` runs the same load/edit/line logic without a screen → `editor: host
ok`; `run editor shot` prints `editor: ready` and holds 5 s, and
`scripts/editor_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-editor.png`
(1024×768, 30492 bytes). The source is 43,834 B, the task package 134,176 B of code (33
frames), 19,856 B of state and a 33,416 B stack, and the image root lists 54 entries. No
new helper, opcode or builtin (125 `stdlib` functions).

The application file browser now runs (M2.5.4): `samples/apps/browser` is one 680×480
window with a path/`entries`/`read-only` line, a 26-row app-drawn root listing (a
folder/file/other 8×8 marker, the name, the right-aligned inode size, an accent
selection band), a `ui_scrollbar`, a 2048-byte preview pane with line clipping and a
status line. `core.fs_list` is read from index 0 until `NotFound` into 64 fixed
`string[64]`/`uint` arrays; `.`/`..` are already excluded. In that slice `lost+found`
was listed as a folder (kind 1) and opening or launching it was refused because
M2.5.1 had no subdirectory traversal; a kind-2 entry is shown but not openable.
(M3.4 later added navigation and M6.3 create/remove; see the decisions table.) A
regular file preview is `core.fs_size` plus 256-byte `core.fs_read` chunks into a staged
`bytes[2048]` and one strict-UTF-8 `core.substr_into`, so a missing name, a directory,
an unsupported path, a file over the cap and invalid UTF-8 each set the status and leave
the old preview byte-identical. Up/Down/PageUp/PageDown/Home/End move the selection,
Enter and a double-click preview, Ctrl+L launches and Ctrl+Q quits; the view keeps the
selection visible and pages by clicking the track. Launch is a blocking launcher
(`core.spawn` then `core.wait`) of a regular source app; a folder or kind-2 entry is
refused, and the proof launches `editor check`, which terminates, so no child is left
running. Drawing is client content only (no `syslib.clear`), one `window_present` per
complete frame, and an owner `Expose` repaints the whole content. `run browser check`
lists, previews, checks the error classes, scrolling, a real double-click, an Enter and
pixels, then launches, and prints `browser: ok` on `-smp 4` and `-smp 1`; `langhost` runs
the same listing/preview/selection logic → `browser: host ok`; `run browser shot` holds
for `scripts/browser_screenshot_qmp.py` → `/home/sinan/Desktop/igis-browser.png`
(1024×768, 32847 bytes). The source is 33,970 B, the task package 121,688 B of code (30
frames), 10,832 B of state and a 22,608 B stack, and the image root lists 55 entries. No
new helper, opcode or builtin (125 `stdlib` functions). The terminal window (M2.5.5,
spec 0014, ADR 0028) now runs: `core.terminal_attach(window_id) -> Status` (host builtin
44, no opcode) binds the one machine-wide console terminal grid to a window owned by the
calling task; the kernel host supplies the task id and checks ownership, the first attach
releases the owner-0 boot Terminal, a repeated attach by the owner is `Ok`, another live
task is `Full`, and a disappeared window detaches to serial-only. `console::pump` pulls the
attached terminal's expose by id and the System Log's by owner `0`, follows a moved window
by generation, and keeps `CONSOLE → WINDOW → SCREEN`. `samples/apps/shell` opens a 560×360
`Terminal` window at `(24, 64)`, attaches before its banner and keeps the
`core.write`/`core.read_input` loop with application-side echo; `run terminal` reports the id, refuses an unknown id,
checks ink/background pixels and proves `Full` with `samples/apps/terminal_probe`, and
`run desktop_shell check` shows the terminal, menu bar and Desktop window together.
`scripts/terminal_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-terminal.png`
(1024×768, 32228 bytes). M2.5.6 boots to the desktop: the image stages
`samples/apps/desktop_shell` under the file name `entrypoint` (the unit keeps its name;
only the load path differs), `repl::boot` tries `entrypoint` then `shell`, and an image
without the alias boots the text shell exactly as before. The boot desktop draws the
22-row menu bar with a direct `Terminal` item, opens its `Desktop` window, prints
`desktop_shell: ready`, promotes to realtime and pumps events; the `Terminal` item
`core.spawn`s `shell` (never `core.run`) and later clicks raise the live terminal window
instead of starting a second shell that the one-terminal rule would refuse, so the
desktop stays interactive while the shell owns the terminal. The desktop never attaches
the terminal itself. A graphics-disabled boot prints `desktop_shell: no graphics` and
spawns the text shell, keeping a serial REPL. Because the desktop is a permanent consumer
of the one machine-wide event queue, an application that also calls `next_event` competes
with it; the event-injecting regression suite therefore runs on
`cargo xtask image --shell` (no `entrypoint`, the pre-M2.5.6 boot), while the boot proof
uses `build/igis.iso`. `scripts/boot_desktop_qmp.py` boots the ISO without a manual
`run`, waits for `desktop_shell: ready`, clicks `Terminal` through QMP absolute pointer
events, types `terminal` over serial, checks `terminal: ok` and writes
`/home/sinan/Desktop/igis-boot-desktop.png` (1024×768); it runs on `-smp 4` and `-smp 1`.
The desktop source is 17,289 B and its task package is 14,952 B of code (4 frames),
752 B of state and 1,136 B of stack; with `samples/apps/font` staged the desktop image
root lists 58 entries (57 staged sources plus `lost+found`) and the shell image 57. The
`font` task package is 11,296 B of code (3 frames), 264 B of state and 800 B of stack.
`stdlib` stays at 125 functions and
M2.5 is complete. The M2.6.1 proportional font now runs (spec 0015, ADR 0030):
`kernel/src/font.rs` holds the 95 printable-ASCII glyphs as 10-column ASCII art plus
explicit advances, and the first use renders a glyph into a fixed
`SpinLock<[Option<Glyph>; 95]>` cache of row bitmasks and ink bounds. The line box is
12 px (baseline row 9, caps 2–9, descenders 10–11); advances are variable (`i` 3, `m` 7,
`W` 10, `M` 11, digits tabular 6). Three host builtins (45–47) expose
`syslib.text_width_prop`, `syslib.text_height_prop` and `syslib.draw_text_prop`; every
byte outside `0x20..=0x7E` keeps an 8×8 cell with an 8-pixel advance (blank at or above
`0x80`), and with graphics disabled the metrics are 0 and drawing is `Invalid`. The
window-service title bar (truncated and centred by measured width) and the desktop
shell's menu bar/clock use the proportional face, with the menu hit ranges derived from
the label widths; `syslib.draw_text`, the console and every `stdlib.ui_*` helper stay
8×8. Boot prints `font: glyphs ok`; `run font` prints `font: ok` on `-smp 4` and
`-smp 1` and `font: host ok` on `langhost`, checking variable widths (`ii` < `MM`,
`Wi`), the `i`/`M` glyph pixels, the `é` fallback advance (16), the 8×8 path, clipping
and the prop service title. `scripts/font_screenshot_qmp.py` writes
`/home/sinan/Desktop/igis-font.png` (1024×768, 33080 bytes); `scripts/boot_desktop_qmp.py`
now clicks the moved `Terminal` item (x = 170) and refreshes
`igis-boot-desktop.png` (31481 bytes). The console's D3 paint now holds the window lock
(`window::paint_visible_parts`) instead of retrying on the generation, removing a
reproducible `desktop_shell check` chrome overwrite on `-smp 4`. **M2.6.2 completes the
performance slice** (spec 0016, ADR 0031): `kernel/src/window.rs` coalesces the two
bounded damage lists before painting (empty/contained dropped, touching/overlapping
merged; erase requests merge only within one coverage limit and a contained request with
a higher-or-equal container limit is dropped) and presents the coalesced rectangle set
instead of one bounding box of all damage, while expose marking still uses the exact
original damage. `window::damage_self_check` proves the rules and the coverage invariant
on scratch state and measures a realistic diagonal move: 4 rectangles / 510,874 px as one
bounding box become 2 rectangles / 55,348 px (89 % less present area); boot prints
`window: damage ok (present 4 -> 2 rects, 510874 -> 55348 px)`. `kernel/src/console.rs`
replaces the per-cell `present_within` with a bounded dirty rectangle: `write_bytes` and
`_print` present once per byte run, the line-discipline echo defers to one
`flush_pending` at the end of `poll_input`, and `repaint` presents each visible part once;
the flush re-reads the visible parts under `WINDOW` and copies the dirty rectangle from
the current shadow, and the lock order stays `CONSOLE → WINDOW → SCREEN`. The new
`samples/apps/perf` measures frame time and event latency with `core.clock()` (min/avg/max
plus the phase total; the 1 ms clock makes a single sample coarse, the average carries the
signal), first idle and then with `realtime` plus three `worker` children spawned
non-blocking and reaped with `core.wait`; every run delivered 200/200 injected events.
Measured on `build/igis-shell.iso` (representative runs; TCG timings vary by a few ms
between boots): `-smp 4` idle frames 60 total 18–27 ms (avg 300–450 µs, max 2–6 ms),
idle events 200 total 17–34 ms (avg 85–170 µs), load frames 60 total 109–121 ms (avg
1.8–2.0 ms, max 6–37 ms), load events 200 total 22–31 ms (avg 110–155 µs); `-smp 1`
idle frames 13–14 ms (avg 216–233 µs), idle events 21–27 ms (avg 105–135 µs), load
frames 175–177 ms (avg 2.9 ms, max 163–165 ms — the realtime controller is claimed
first and is not preempted), load events 19–23 ms (avg 95–115 µs). `stdlib` 125 functions, no cap change. **M2.6.3 completes
the visual-regression slice** (spec 0009 "Visual proof", G21; ADR 0032) and resolves
M2.1.2: `samples/apps/visual` opens a window whose frame is exactly the screen (content
`screen_w - 2` × `screen_h - 17` at `(0, 0)`), so the service chrome plus the specimen
cover both kernel text windows and every boot line. It has no clock, animation, event or
host input: it draws a fixed composition (focused prop title bar, prop and 8×8 font
specimens, a nine-colour swatch row, a `(X + Y)` dither patch, a framed box, a diagonal
raster and alternating bars), checks representative pixels, presents the content once,
prints `visual: ok` then `visual: ready`, and holds without drawing; the pointer stays at
`(0, 0)`. `scripts/visual_regression.py` boots `build/igis-shell.iso` headless, runs
`visual shot`, waits for the complete present, captures through QMP `screendump`, decodes
to RGB and compares exactly with `tests/golden/visual.png` + `tests/golden/visual.json`
(SHA-256 of the raw pixels and one hash per 64×64 tile). The golden
(`37802052…e9e81c9f`, 1024×768) matches on `-smp 4` and `-smp 1`; a mismatch prints the
differing pixel count, bounding box, first pixel and tiles and exits 1; only `--update`
writes the golden; `--tamper` flips one captured pixel in memory and requires the compare
to reject it; `--expect-mismatch` inverts the result. No kernel serial dump or debug
builtin is added (the display surface already carries the presented framebuffer). No new
opcode, builtin, `syslib` primitive, kernel table or cap change; `stdlib` 125 functions.
**M2.6.4 completes the desktop milestone with the system menu** (spec 0017, ADR 0033):
`samples/apps/desktop_shell` adds a `System` menu-bar label after `Terminal` (measured
prop widths) and a pull-down built on the M2.4.3 menu model
(`stdlib.ui_menu_dropdown`/`ui_menu_hit`/`ui_menu_move`/`ui_menu_key`) whose items are
`About igis-v2` (`Ctrl+A`), a separator, `Restart` (`Ctrl+R`) and `Halt` (`Ctrl+H`).
`About` opens a modal desktop-owned window titled `About igis-v2` (content 420×200,
centred below the bar) drawn with `ui_message`/`ui_dialog_button`; Enter, Escape and a
routed click close it, and the service's damage/`Expose` protocol restores what it
covered. Closing the pull-down raises the topmost window under it (the console pump or
the owning app repaints) and then the desktop window, so the menu leaves no stale
pixels. The shortcuts are focus-scoped and modal-aware (they fire only when no menu or
About is open and the event is routed to the desktop or `0`), so the editor's `Ctrl+A`
is unaffected; `F10` opens/toggles the menu. `core.halt()`/`core.reboot()` are host
builtins 48/49 (no opcode; `Host` defaults `Invalid`): `halt_system` sets the shutdown
flag, wakes every core on the existing `0x40` vector where `wake_ipi` acknowledges
(`smp::note_stopped`) and halts even mid-task, waits bounded by the clock plus a spin
ceiling (the boot core's timer can stop first when the caller is an AP), writes
`system: N of M APs stopped` to serial and halts; `reboot` stops the other cores then drives
`0xCF9` (`0x02`/`0x06`) and the 8042 pulse reset, halting if the firmware ignores both.
`samples/apps/system_probe halt|reboot` is the probe; `scripts/system_control_qmp.py`
shows `3 of 3`/`0 of 0` APs stopped with no later serial reply and a second boot banner
after a reset on both core counts. `desktop_shell check` now opens the menu, checks the
accent/separator pixels, traverses with Up/Down (skipping the separator), closes with
Escape, reopens with `F10`, activates About with Enter, checks the panel pixels, closes
with Escape and a routed click, opens it with `Ctrl+A`, and verifies the desktop content
is restored and no restart/halt fired (`desktop_shell: ok` on `-smp 4` and `-smp 1`).
`scripts/system_menu_qmp.py` opens the menu/About by QMP pointer events, captures
`/home/sinan/Desktop/igis-system-menu.png` (1024×768) and closes with Escape. No new
opcode (`stdlib` still 125 functions; the desktop now imports `stdlib`); the image root
grows by `system_probe` (desktop 61 entries, shell 60). The deferred Q50 scheduler bug is
fixed (spec 0007 Sch17, ADR 0034): the per-slot kill record is an id-tagged `AtomicU64`
(never reaches a later tenant), `request_kill` publishes under the slot lock, `task::block`
re-checks the record under that lock after the quantum-boundary check (the lost-wake
window), and `reclaim` clears only its own id. Boot prints `kill: records ok` (a self-check
that parks a record for a claimed scratch task and requires `block` to leave it runnable),
and `run kill_stress` spawns 300 blocking victims, kills each at a varying delay and waits:
`kill_stress: ok (300 iterations, 300 killed, 0 exited, ...)` on `-smp 4` and `-smp 1`
(the same app hangs on its first iteration against the pre-fix kernel). Q41 is resolved:
`core.parse_f64_into` (builtin 50, pure interpreter code over `core`'s allocation-free,
correctly rounded `f64: FromStr`) parses decimal text half to even over the whole
mantissa, including subnormals; `stdlib.parse_f64_into` keeps its signature and delegates,
so `1e-7` and the smallest-normal boundary text now match the literal reader bit for bit.
`run f64parse` prints `f64parse: ok 52 cases` on `-smp 4` and `-smp 1`. Q39 is
resolved: `core.poll_any` (builtin 51, non-blocking) and `core.next_any` (builtin 52,
blocking) inspect a `const array[uint, 8]` where source `0` is a console input byte being available,
`1` one input event (including a pending `Expose`) and any other value a stream handle
whose data or close is ready (a read select; send-space readiness is not included).
`core.stream_source(ep) -> uint` is compiler-lowered (`ref` + `load_ref`, no builtin) and
is the only way to name a stream in the array. One `abi::wait::WaitSet` (`Copy + Eq`, at
most eight sources) is both the interpreter's `WaitKind::Any` and the task's
`WaitFor::Any`; `wake_console_input`/`wake_input`/`wake_stream` wake a matching set, the
scheduler's post-block `task::wait_any_ready` recheck closes the failed-probe-to-block
window, and `stream::readable` is data-or-close on the caller's receive side. Readiness is
a snapshot, not a reservation: the following `read_input`/`next_event`/`recv` is
authoritative. `samples/apps/multiplex` (with `multiplex_sender`) waits on all three,
self-injects the input event and takes the console bytes typed by
`scripts/multiplex_qmp.py`; `run multiplex check` is deterministic and `run multiplex`
adds the console arm, both `-smp 4` and `-smp 1`. The image now stages 64 sources, so the
browser's listing capacity rose from 64 to 96. ABI v1 stays at 75 opcodes (two builtins,
no opcode) and `stdlib` stays at 125 functions. **M2 is complete.**
At the M2 close, **403 host tests**
(abi 22, compiler 158, interpreter 147, langhost 76, including doctests); ABI v1 stays
at 75 opcodes. M2 is complete; the deferred backlog and the accepted M2 limitations are
the next milestone's input. The current totals and milestone state are in the
"Current state" block above; this narrative is the historical record.

**M3 has started (spec 0018, ADR 0038).** The application image is now a real
directory tree: `lib` (importable modules), `base` (base applications), `home`
(user files, read-only) and `system` (kernel/boot applications), plus `mke2fs`'s
`lost+found`. The ext2 reader walks paths (8 components, 64-byte components, no
symlink following), the file API and `core.spawn`/`core.run` take hierarchical
paths, a launch name with no `/` resolves under `base/`, and the boot entry is
`system/entrypoint` (the `desktop_shell` copy) falling back to `base/shell`. The
samples moved to `samples/apps/base|system`; `xtask image` stages the tree. Boot
adds `ext2: tree ok`. The language side (`uses lib.math;` compiled as another
unit, `SourceReader`, unit ids 0/1/2.., 384 KiB/16 MiB caps) is M3.2 (done and
host-proven); M3.3 wires the reader into the kernel and proves `run module_demo`;
M3.4 gives the browser tree navigation. M3 is complete. **M4 is complete** (ADR 0039):
the predeclared nominal types and user-declared types (`<unit>.<Type>`,
`<unit>.<Type>.<Variant>`) cross unit boundaries, and the duplicated application
helpers now live in `lib/out` (`say`/`say_int`), `lib/inject` (pointer/key event
injection) and `lib/outcome` (`is_ok(ExitReason)`), with 40 applications migrated.
**M5 is complete:** the calculator (M5.1) and minesweeper (M5.2) are real windowed
applications over the existing UI/`/lib` surface. **M6 is complete:** M6.1 mounted a
dedicated 8 MiB ext2 home image from an ATA disk read-only through one path router
(`ext2w`); M6.2 added the writer and `core.fs_write`; M6.3 added
`remove`/`mkdir`/`rename` and the editor save; M6.4 proved reboot persistence and
closed M6: the system now has a real, persistent ext2 `/home`. M7.1 (done) adds
`core.fs_truncate` (builtin 57) for in-place shrink/zero-extend. M8.1 (done) makes
windows draggable by the title bar and posts an owner close request from the close box,
with no new opcode, builtin or language surface beyond the predeclared
`EventKind.Close` (spec 0011 W22–W25, ADR 0042/0043; M8.2 replaced M8.1's kill-on-close,
so a dialog such as the desktop's About panel closes itself and the task survives).
M8.3 (done) turns the `Apps` item into a real application-selection pull-down
(`Calculator`, `Minesweeper`, `Text Editor`, `File Browser`, `Clock`, `Widgets`, each a
non-blocking `core.spawn`) and adds a machine-wide **modal popup input grab**
(`syslib.popup_grab`/`popup_release`, builtins 58/59, no opcode) so an app-drawn menu
that lies over another window receives the click; both the Apps and System pull-downs take
it on open and release it on close, and F9/F10 toggle them. M8.4 (done) adds a
machine-wide **persistent pointer-region claim**
(`syslib.region_claim`/`region_release`, builtins 60/61, no opcode) and has the boot
desktop claim the 22-pixel menu bar: the press that opens a menu now reaches the desktop
even while another application is blocked in `next_event` (the M8.3 regression), a new
press inside the claim starts no service drag or close request, and the modal grab still
takes precedence while a pull-down is open. M8.5 (done) makes a dragged window's content
follow its frame: a topmost move copies the content rectangle to the new origin in the
shadow before the repair (`gfx::copy_rect`, kernel-internal, no `syslib` binding) and
records no new-frame desktop erase, so the snapshot survives; every windowed application
re-reads `window_content_rect` on an owner `Expose` and recomputes cached geometry before
drawing or hit-testing (spec 0011 W28, ADR 0046). `windows_drag` checks the copied mark
before its pump and a changed repaint marker at the new origin after it, and
`scripts/drag_content_qmp.py` drags Calculator, verifies the panel/display at the new
origin and requires a `7` click to change the display. A user-found File Browser drag
case is a follow-up (`4a0a3d4`): its `refresh_rect` now calls `compute_layout`, and
`scripts/browser_drag_qmp.py` proves the path/list/preview borders at the new origin with
the old absolute layout gone. M8.6 (done) makes queued input **window-addressed**
(spec 0010 I31 amended/I34, spec 0011 W29; ADR 0047): one kernel-internal
`window::input_target` rule gives an addressed record its window's owner, a window-less
`PointerDown` the region claimant or the topmost hit window's owner, moves/keys the
focused window's owner, and no target to an owner-0 kernel window, an empty desktop or
an unowned pending kind. `KernelHost::poll_event` peeks the head and a non-owner gets
`WouldBlock` without consuming, while the target takes the ordinary routing path (a
region press stays unchanged); the modal grab still takes precedence and skips the
target gate. `task::input_queue_ready` uses the same target for `input_ready`, the
post-block re-check and `next_any` source 1, and the boot self-check prints
`window: target ok`. This fixes the user-reported File Browser not reacting while the
boot desktop ran; `scripts/input_routing_qmp.py` proves Browser click/Enter navigation,
About's close box and a Calculator button with the desktop alive, and
`scripts/drag_content_qmp.py` no longer closes the desktop. `events`/`multiplex` own a
small window because window-less keys/moves belong to the focus. No opcode, builtin,
`Host`, `stdlib` or `Event` layout change (505 host tests; ABI v1 stays 75). M8.7 (done)
makes the shell's own `Desktop` window a help panel rather than the shell's lifetime:
its close box closes only that window, the desktop keeps its menu bar and launched
applications, and the Apple square reopens the window; losing it no longer exits the boot
entrypoint and halts the idle system (spec 0012 D12/D19; the close/reopen is proved by
`scripts/input_routing_qmp.py` with Browser and Calculator live). M8.8 (done) adds a
visible `Up` button to the File Browser path line (44×18, left of the writability label):
a pointer-down on it calls the same `go_up` as `Backspace`/`Ctrl+Up`, the status hint
names `Bksp up`, and `browser check`/`input_routing_qmp.py` prove it (the latter requires
the path to match the pre-navigation root exactly). M8.9 (done) makes the File Browser's
scrollbar thumb draggable: a press in the thumb records the grab offset, held moves map
the thumb top onto `top` across the travel (the selection stays visible), release ends
the drag, and track clicks still page; `browser check` and `input_routing_qmp.py` drag
the thumb to the bottom on both core counts. M9.1 (done) adds lexical syntax
highlighting to the text editor (`samples/apps/base/editor`): `base/`, `lib/`,
`system/` and `.ig` paths start coloured (keywords blue `0x000080`, type and
predeclared names dark red `0x800000`, strings dark green `0x008000`, comments gray
`0x808080`, numbers dark brown `0x804000`), other text files stay plain, and a checked
File > Highlight row toggles the view. `//` ends at its line, `{ ... }` block comments
span lines without nesting, strings stop at their line, the block state at the first
visible line is scanned line by line from byte 0 once per frame, and token runs use
whole UTF-8 code points through the existing checked slices. Selected text stays white
on the accent band; the all-black drawing path is unchanged when highlighting is off.
No opcode, builtin, `Host`, `stdlib`, ABI or file API change; `editor check` proves
every class, the spanning block comment, a block comment above the visible top line,
the plain-file rule, the menu check and the toggle-off absence of palette pixels; a
real QMP File > Highlight drag turns the palette pixel counts to 0 and back.
M9.2 (done) fixes the user-reported
`task 4: exit Faulted(BudgetExceeded) after 2893 claims (2891 yields) while
trying to scroll in the editor`: that was the normal-task 10 s CPU watchdog, not
a crash, because the interactive loop repainted the whole panel (with the M9.1
O(document) block scan) for every pointer event addressed to the editor, even a
no-op move. `handle_pointer` now returns whether visible state changed and the
interactive/shot loops repaint only on true (plain moves free; menu moves only
when the highlight row changes; thumb drags only when `top_line` changes; the
thumb press/release themselves free), the scrollbar thumb drags like the
browser's M8.9 (`scroll_dragging`/`scroll_grab_dy`, `scrollbar_thumb` matching
`stdlib.ui_scrollbar`, a page/drag clamps the caret into view), and the
block-comment state at every line start is cached in `bytes[8193]` and refreshed
once per document publication (`publish_staged`/`ed_replace`) instead of
rescanned from byte 0 each frame. `editor check` drags the thumb through the
injected pointer path; the new `scripts/editor_scroll_qmp.py` reproduces the
user's burst (3,000 no-button moves + a 300-step real thumb drag) and requires
`exit Ok` with no `BudgetExceeded`: the old code faults after 2,826 claims, the
new code exits `Ok` after 2,448–2,633 claims on `-smp 4`/`-smp 1` with the text
view scrolled and the thumb moved. The 10 s budget, scheduler and realtime
policy are unchanged.
M9.3 (done) adds a reusable `/lib` file-open dialog,
`samples/apps/lib/file_dialog.ig`, with one public function
`file_dialog.open_file(initial, chosen) -> Status`: it opens a task-owned
`Open File` window (520×380 content, centred), starts in the current document's
directory with its name selected, lists up to 96 image entries through
`core.fs_list` (directories/files selectable, kind-2 gray and refused), and
navigates with Up/Down/PageUp/PageDown/Home/End, Enter, Backspace/Ctrl+Up and
Escape, row click/double-click, visible `Up`/`Open`/`Cancel` buttons, scrollbar
paging and thumb dragging, and the close box (`EventKind.Close`). Only a visible
change repaints; an owner `Expose` re-reads the content rectangle. `Ok`
publishes the whole regular-file path into the caller's 256-byte destination
with one `core.substr_into`; a cancel is `Invalid` and a too-long result is
`CapacityExceeded`, both leaving the destination untouched, and a disabled
screen is `Invalid` without a window. The module imports `stdlib` (M5), owns no
`main`/top-level `var`/stream (M6), and adds no opcode, builtin, `Host` method,
file API or `stdlib` function. The editor's File > Open and Ctrl+O call it and
load the result through the existing `open_path`; a cancel leaves the document,
path, caret, selection, scroll and highlighting untouched. Its `PathCapacity`
is now 256 (`PATH_MAX`) and `TempCapacity` 260. `scripts/file_dialog_qmp.py`
proves the dialog chrome/face, the root→`lib`→`math.ig` navigation, `Open`
loading `lib/math.ig` (text 17,959 px, path ink bbox 79 → 86 px), Escape
cancelling with a 0-pixel text diff, and Ctrl+Q ending `Ok` on `-smp 4` and
`-smp 1`; the visual golden is unchanged.
M9.4 (done) raises the editor's document buffer from 8 KiB to 131072 B
(128 KiB, the spec 0008 per-unit source cap; `LineStateCapacity` 131073),
because the user could open `beat` (554 B) and `deep` (874 B) but not
`base/calculator` (32,516 B): the M9.3 dialog correctly returned the path and
`open_path` refused it with `too large (8192 max)`, leaving the old document
and a status line that was easy to miss. Every current source sample now fits
(the largest is `editor` at 81,509 B); a file over 131072 B is still refused by
size with `too large (131072 max)`, and an over-capacity edit still returns
`CapacityExceeded`. The editor state is 530,392 B and its task stack 174,328 B
(the `ed_replace` staging buffer is 128 KiB), both below the 1 MiB region caps;
`editor check` runs 2,120 claims on `-smp 4` (2,123 with the home disk) and
2,120 on `-smp 1` with no budget fault, loads `base/calculator`, verifies the
full 32,516 bytes and valid UTF-8, and restores `base/child`.
`scripts/file_dialog_qmp.py` now also selects the `base` calculator row and
`Open`s it: the dialog closes (40,199 px), the text changes by 27,137 px and
the path line becomes `base/calculator` (118 px bbox), then Escape cancels
(19 px text diff) and Ctrl+Q exits `Ok` after 1,353 claims on both core counts;
the harness holds a tablet click for 0.35 s so a busy dialog cannot lose the
USB press report. No kernel, opcode, builtin, `Host`, file-API, `stdlib` or
dialog change.

**M10 networking (2026-11-19).** The first slice (M10.1–M10.5, M10.8, M10.9) is
implemented: a legacy virtio-net driver and a polling e1000/e1000e driver behind
the kernel `net` facade, an allocation-free `net` crate (Ethernet, ARP, IPv4,
ICMP, UDP, stop-and-wait TCP client), builtins 62–68
(`core.net_config`/`net_info`/`net_mac`, `core.socket_open`/`send`/`recv`/`close`),
and the program-side `lib/socket.ig`, `lib/http.ig`, `lib/dns.ig`, `lib/dhcp.ig`
and `base/net_probe` units.
`net_probe http` fetches `http://10.0.2.2:6666/` over a real TCP connection and
prints `net_probe: ok` on `-smp 4`/`-smp 1`; `net_probe dns` resolves
`example.com` through `10.0.2.3`; `net_probe dhcp` obtains `10.0.2.15/24` from
slirp and then fetches the page. The same three proofs run over e1000 (`8086:100e`)
and e1000e (`8086:10d3`) selected by `xtask --net-device`; `--no-net` reports
`net_probe: no device`. `run net_echo` listens on TCP port 7 and echoes three
sequential host clients through `hostfwd`, proving the listener/`accept` path.
Sockets now block: `send`/`recv`/`accept` sleep on `WaitFor::Net(handle)` and
`net::service` wakes on data/space/EOF/close/timeout after dropping its lock;
`core.socket_timeout` sets a per-socket deadline (default 30 s, 0 = none) and
`WaitFor::Deadline` is a generic timer arm. `core.socket_source` feeds
`core.next_any`/`poll_any`; `base/net_select` proves the selector and 300 ms
recv/select timeouts. The DNS parser has a committed socket-free host check,
`samples/lang/dns_check.ig`, pinned by `langhost/tests/e2e.rs` (`dns_check: ok`).
**M10 is complete.**

**M10.6 NIC interrupts, the poll fallback and `net_stats` (2026-11-19).** The
NIC's PCI INTx line (QEMU GSI 11 at 00:03.0 for virtio-net and e1000/e1000e) is
routed through the I/O APIC to the boot core as vector `0x2D`
(`apic::NET_VECTOR`, `irq_net` stub, `net_irq` entry). The handler is bounded and
lock-free: it sets a pending flag, performs one read-to-clear device acknowledge
(virtio `ISR` / e1000 `ICR`, addressed through two atomics so it never touches
the network lock) and EOIs the local APIC. The used-ring drain and every
protocol step stay in `net::service`, which already runs before each claim and
in the idle loop, so an interrupt is a latency hint and polling remains the
fallback when the route is absent, when the boot asks for it, or when the device
refuses to unmask (ADR 0051). `ioapic::init` programs one redirection entry per
call and splits its page once, so IRQ12 and IRQ11 coexist. `xtask --net-irq
intx|poll` (default `intx`) selects the path by writing `igis.net_irq=poll` into
the multiboot2 command line, so the polled proof runs the same kernel and image.
Two device details are recorded: legacy virtio can leave the PCI INTx level
latched high from its boot-time test frame, so `net::enable_irq` reads the ISR
once after the route is installed; e1000 must mask every cause with `IMS` and
unmask only the receive causes (`RXT0`/`RXO`/`RXDMTO`/`LSC`) with `IMC` — the old
`IMC = u32::MAX` at reset actually unmasked everything, which polling hid.
`core.net_stats(var rx, var tx, var drops, var errors) -> Status` is builtin 73
(no opcode) over the stack's `Stats`, and `base/net_perf` runs ten timed HTTP
gets and prints the counters before and after. Boot logs
`ioapic: version 0x20, IRQ11 -> vector 0x2d on apic 0 (level)`, `net: irq ok
(vector 0x2d)` and, once an interrupt arrives, `net: irq delivered N
interrupt(s)` (`net: polling (igis.net_irq=poll)` on the polled boot). On
`-smp 4`/`-smp 1`: `http`, `dns`, `dhcp` and `net_perf` pass over virtio,
e1000 and e1000e with INTx (103 `v=2d` deliveries counted with QEMU `-d int`)
and with `--net-irq poll`; `--no-net` reports `net_probe: no device` with no
hang. `net_perf` on `-smp 4` with INTx: `total 179 ms, min 16 ms, avg 17.9 ms,
max 21 ms`, counters `17/23 -> 77/113` (virtio) and `9/12 -> 69/102`
(e1000); polling gives the same counters and equivalent times.

## Decision index

| Decision | Record |
|----------|--------|
| Rust as the implementation language | ADR 0012 (Accepted) |
| x86_64 first, multi-arch layout from day one | ADR 0013 (Accepted) |
| All code runs at ring 0 in a single address space | ADR 0001 (Accepted) |
| Applications are interpreted source, not native binaries | ADR 0002 (Accepted) |
| Per-core interpreter loops; tasks claimed from a global set, never pinned | ADR 0011 (Accepted; supersedes pinning in 0003) |
| Cooperative safe points, quantum, total CPU budget | ADR 0003 + ADR 0011 |
| Static preallocated application memory; no malloc, no GC | ADR 0004 (Accepted) |
| Internal bytecode permitted; no JIT | ADR 0005 (Accepted) |
| MMU hardening: RO kernel text, guard pages, NX | ADR 0006 (Accepted, provisional) |
| Fully static placement; no runtime allocation of any kind | ADR 0007 (Accepted) |
| `fault(code, diag)` decides, `exit(reason, diag)` always tears down; one recovery, no retry | ADR 0010 (current; supersedes 0009) |
| Boot via GRUB + multiboot2 under QEMU, with own long-mode transition | ADR 0014 (Accepted) |
| Applications delivered on a read-only ext2 image over an in-memory block device | ADR 0015 (Accepted) |
| No capability model; every application may use every `syslib` primitive | vision R14 / spec 0001 |
| Framebuffer console with a bitmap font; no windowing | vision OQ 8 |
| Byte-FIFO streams, copied through the kernel, atomic sends | spec 0006 (Draft) |
| Pascal-like language, nominal types, no user generics | spec 0003 (Draft) |
| `core` (Rust) / `stdlib` (language) / `syslib` (hardware) split | specs 0002, 0003 |
| `bytes` (raw) and `string` (UTF-8) as distinct types | spec 0003 |
| One task per application instance; REPL-only in the first milestone | specs 0001, 0007 |
| Realtime class: no quantum preemption, one-second heartbeat, admission by core count, no reserved core | ADR 0016 (Accepted) |
| REPL is a kernel service; boot tries `entrypoint` (the desktop, M2.5.6) then `shell`; `run`/`spawn` carry `string[1024]` args through a 1024-slot queue and return global task ids | ADR 0017 (Accepted + addenda), ADR 0029, spec 0012 D19 |
| Console is a byte stream (no echo, no key events); one global nanosecond clock at 1 ms resolution, no TSC; compile diagnostics via a caller-owned `Diagnostic` out-parameter | specs 0003, 0005, 0007 |
| Console input: COM1 into a 512-byte raw ring, PS/2 into events only, non-blocking `core.read_input`; the application echoes and edits | spec 0005, ADR 0037, Q44 |
| Streams are single-producer/single-consumer; names are unique per application; framing helpers live in `stdlib` | spec 0006 (Draft) |
| Floating point in the first milestone: one `f64` type, IEEE-754, with a kernel-owned per-task `fpu` region | ADR 0018 (Accepted) |
| No visibility modifiers: every top-level declaration is public; conversions are `T(x)` casts; maps use FNV-1a with linear probing | specs 0003, 0004 |
| Boot: INIT-SIPI-SIPI through a sub-1 MiB trampoline, `MAX_CORES` static state; the framebuffer tag is optional (a missing or unsupported mode leaves the console on serial); one IPI vector | specs 0002, 0007, 0009 |
| ext2 subset: 1/4 KiB blocks, double indirect, regular root files, metadata validated; unsupported images refuse the mount | specs 0002, 0007 |
| `ExitReason.Killed`; dispatcher before every claim; admission counts cores online at call time; relative paths without `..` | specs 0003, 0005, 0007 |
| Bytecode: one package per application, 4-byte-word stack VM, split `compiler`/`interpreter` crates over `abi`, structural verification | spec 0008 (Draft) |
| Scheduler: slot table of 64 tasks, claim takes the value under a per-slot spin lock, 10 000-step quantum, 10 s / 200M-step budget | spec 0007, ADR 0011 |
| Delivery is source-only, permanently: the image never carries bytecode and packages live only in memory | ADR 0019 (Accepted) |
| Integer formatting is a staged `core` opcode; `syslib` ports are staged as scalar `uint`s | specs 0003, 0008; Q45 |
| Enums: nominal `type Name = (Variant, ...)`, variants are global ordinal constants in one 8-byte slot; `Status` predeclared; `EnumName(int)` faults `Overflow` out of range | spec 0003, spec 0008 (`enum_cast`) |
| `core.spawn`/`wait`/`kill` return `Status`; `spawn` takes `var diag: Diagnostic` and `wait` takes `var reason: ExitReason` | spec 0005, Q43 |
| `core.run` is spawn + wait with the pending id in the `Machine`; a failed request carries its `Diagnostic` in the exit ring for `run`, while `wait` sees `Faulted(IoError)` | specs 0003, 0005, 0007 |
| Compiler nesting limit 32; post-boot kernel stack is 256 KiB with a guard frame | Q42, spec 0002, `arch/x86_64/src/stack.rs` |
| Stack guards for boot, AP and task stacks: 32-table cache, 96-frame registry, CR3 + IPI TLB shootdown after every PTE change | ADR 0006, spec 0002 H2, spec 0004 C6, `kernel/src/guard.rs`, `arch/x86_64/src/paging.rs` |
| Task stack allocation is `stack_len + 1` frame: guard excluded from the region, present bit restored before free, reclaim returns guard + stack as one unit. `Region::allocate_guarded` enforces the geometry with `Region::layout_ok` (span = frames + 1, `start = base + 4096`, `len <= frames * 4096`, overflow-safe) and rejects a mismatch as `Status::Invalid`; boot self-check `stack: layout ok` | specs 0004 C6, 0002 H2, 0007 |
| Records: nominal, declaration-order layout with every field aligned to 8; `Diagnostic` predeclared at fixed `abi::layout` offsets | spec 0003, spec 0008 |
| Sum types: nominal, 8-byte tag at 0 plus the largest payload at 8 (rounded); destination-driven construction; exhaustive `case` with by-value arm-local payload bindings; `ExitReason` is `Ok | Killed | Faulted(code: FaultCode)`; `FaultCode` variants are qualified | spec 0003, spec 0008 |
| `stdlib` is embedded source (`stdlib/stdlib.ig`), compiled into the application's package; `stdlib.*` is qualified, the function table is library-first, line-table unit ids are 0 (app) / 1 (stdlib) | spec 0003, spec 0008 |
| Functions: `function Name(...): T;` with `return value;`, scalar results only, `return` on every path | spec 0003, spec 0008 |
| Arrays: `array[T, N]` is nominal in element type and count, `N` a positive const, index `0..N-1` faults `OutOfBounds`; element refs via `ref_element`, whole copies via `copy_refs` | spec 0003, spec 0008 |
| Rings: `ring[T, N]` is nominal in element and count, elements then `head`/`count`, `core.ring_push`/`pop`/`peek`/`full`/`empty` lowered by the compiler with no opcode; `Full`/`NotFound` leave the ring and out-parameter untouched | spec 0003, spec 0008 |
| Maps: `map[K, V, N]` is nominal in key, value and count; `count` then `capacity` slots of state/hash/key/value; FNV-1a, linear probing, backward-shift deletion; `core.map_put`/`get`/`has`/`remove`/`count` are five `map_*` opcodes and `put` at `N` is `Full` | spec 0003, spec 0008 |
| UTF-8: `core.substr_into` has four kind combinations and the destination kind decides (boundaries for `string`, strict validation for `bytes`→`string`, raw for a `bytes` destination); the source kind is the `SUBSTR` `b` field, no new opcode; the checked slice stays in `core` forever (destination capacity is a call-site immediate) | spec 0003, spec 0008 |
| APs come up by attempt: INIT-SIPI-SIPI, trampoline at `0x8000` with a parameter page at `0x9000`, `MAX_CORES` = 8, per-core TSS/IST and 256 KiB stacks (the compiler's bound, since any core may compile), bounded 100 ms wait; absent ids are not online | spec 0002 "SMP", spec 0007 |
| Every online core runs the scheduler loop over the global set; an idle core does one `sti; hlt` step and producers set `need_resched` before the `0x40` IPI, whose handler only EOIs | spec 0007, ADR 0011 |
| A claimed task's slot stays reserved by task id until reclaim; a request id stays live while it compiles; the boot core stops the APs and prints per-core totals | spec 0007 |
| `syslib.cpu_id()` (builtin 10) reports the APIC id of the executing core; the core index is internal | spec 0003, spec 0008 |
| Realtime: one-way `core.realtime_on()` (builtin 11) admitted by a CAS counter against online cores, `core.heartbeat()` (builtin 12) with a fixed 1 s non-blocked deadline, realtime-first claim, no quantum preemption, no total budget, `WatchdogTimeout`, admission released only at termination | spec 0007, ADR 0016 |
| Streams: top-level `in_stream[N]`/`out_stream[N]` state variables, handles in the `state` prefix in manifest order, dynamic load-time pairing with a waiting peer, same-direction/mismatch/closed load errors, four `stream_*` opcodes, `WaitFor::Stream` block/wake, kernel arena with first-fit free list, close-on-termination discards queued bytes | spec 0006 (amended), spec 0008 |
| Stream framing is `stdlib` code over `const ..._stream[1]` parameters: length-prefixed `u32` LE frames, `\n`-delimited lines with CRLF stripping, fixed-width `u64`, one-byte receives (a receive returns up to the destination capacity and has no pushback), one copy publishes a whole value so errors never leave a partial destination | spec 0003, spec 0006 |
| Float text is fixed-point plus shortest round-trip in the milestone: `format_f64` is one opcode (destination kind + capacity immediate), 0–9 fraction digits, half away from zero with carry, `nan`/`inf`/`-inf` literals, `-4` for a wider field or `\|value\| >= 2^63`, `-6` for a short destination; `format_f64_short` is one opcode with no width and no magnitude bound, the shortest digits that round-trip, positional for `-6 < e10 + 1 <= 21` and scientific otherwise, ties away from zero; `stdlib.parse_f64_into` is language code over a decimal grammar that saturates overflow/underflow to `±Inf`/`±0` | spec 0003, spec 0008; Q40/Q41 |
| Graphics: one full-screen shadow from the frame allocator, sized by the returned mode (32 bpp only); drawing goes to it and `present` blits pitch-aware rows; the console draws through it; a rectangular clip is the window-manager seam | spec 0009, ADR 0020 |
| The nine `syslib` graphics primitives are host builtins (no new opcode): `0x00RRGGBB`, top-left pixel origin, `Invalid` for `w <= 0`/`h <= 0`/colour above `0x00FFFFFF`, clipped never faulted, 8×8 font, `fill_dither` is `(X + Y)` even | spec 0009, spec 0003, spec 0005 |
| The window server is a kernel `syslib` service over the shadow, with `expose` repaint and no per-window canvas or user-space stream protocol | ADR 0020; M2.3 |
| Input is one machine-wide pointer (and later one event queue) owned by the kernel; the PS/2 aux device is polled beside the keyboard, the cursor is a present-time compositor overlay and never in the shadow, and injection is the debug-only deterministic test hook | spec 0010, ADR 0021 |
| `syslib.pointer_x`/`pointer_y` are `int`, `pointer_buttons` is a `uint` mask, and `inject_pointer(dx, dy, buttons)` returns `Invalid` above `0b111`; the four are host builtins with 0/0/0 and `Invalid` defaults (builtins 22–25) | spec 0010, spec 0003, spec 0005, spec 0008 |
| The software cursor is a 16×16 black-outline/white-fill arrow with hotspot `(0, 0)`, composited into the framebuffer by `present`, with a move re-presenting only the old and new cursor rectangles | spec 0010, spec 0009 |
| The primary pointer is an absolute USB HID tablet behind the PIIX3 UHCI controller (`kernel/src/pci.rs`, `kernel/src/usb.rs`): static frame list/QH/TDs, enumeration over control transfers, one self-linked polled interrupt-IN TD, HID `0..=32767` scaled to the screen with round-to-nearest, tablet-over-PS/2 precedence, `syslib.pointer_source()` (builtin 26, no new opcode); PS/2 remains the fallback and the driver moves behind `arch`/`platform` later | spec 0010, ADR 0022, ADR 0013 |
| Input events: predeclared `EventKind`/`Event` (40 bytes at `abi::layout::event`), one 64-event machine-wide FIFO with the newest event dropped on overflow and a monotonic drop counter, key events packing `text \| modifiers << 8 \| key code << 16` (`abi::key`), `syslib.next_event` blocking on `WaitFor::Input` with SMP-safe wake, and `inject_event`/`event_drops`/`event_flush` as builtins 27–31 (no new opcode); a key produces only an event, never a console byte | spec 0010, spec 0003, spec 0008 |
| PS/2 aux IRQ12: the I/O APIC at `0xFEC00000` (page split, `PWT \| PCD`) routes IRQ12 to the boot core as a level-triggered vector `0x2C`; the handler only drains ≤ 64 aux bytes into a 1024-byte SPSC atomic ring and EOIs the local APIC; `mouse::poll` decodes the ring in the service opportunity, with the direct controller drain as the fallback when the route is unavailable (modes exclusive) | spec 0010, spec 0002, ADR 0023 |
| Windows are records in a 16-entry kernel table: monotonic `int` ids (`0` invalid), `window_open` takes the frame origin and content size (1-px border, 16-px title bar), one bottom-to-top z-order with one focus and topmost fallback, owner-only `close`/`move` with any-task `raise`, close-on-task-termination through `Task::reclaim`, a service-owned shadow clip with save/narrow/restore, and whole-content `Expose` repair; implemented in M2.3.1 as builtins 32–38 with the predeclared `Rect` and no new opcode | spec 0011, ADR 0024 |
| Window composition and repair: bounded 32-rect desktop/chrome damage, visible-part subtraction (frame minus higher frames), one `present` of the damage union, white + `(X + Y)` dither desktop, service-drawn 1-px border / 16-px title bar / close box, synchronous repair under the window lock (window → graphics), content never kept by the service | spec 0011 |
| Event routing at poll time: producers never take the window lock; `Expose` is a per-window, owner-only coalesced flag (ordinal 5, whole content) returned before the queue; a pointer-down hit-tests and raises/focuses before delivery; `window_present` presents content ∩ visible parts; `syslib.present` stays generic; a client that never repaints is left with stale content in M2 | spec 0011, spec 0010 |
| Kernel text windows: `console::init` opens a terminal (`core.write`; the application echoes its input) and a system log (`println!`) as owner-`0` windows, each with its own grid/cursor/scroll; drawing uses an explicit clip (`gfx::draw_cell`/`present_within`), never the shadow's global clip; pending owner-0 exposes are pulled by `console::pump` in `console::poll_input`; lock order `CONSOLE → WINDOW → SCREEN`; serial mirror unchanged | spec 0012, spec 0009, ADR 0025 |
| Owner `0` is the kernel (task ids start at 1); kernel windows are ordinary windows (focus, hit-test, `Expose`, `window_present`) and the kernel calls the same public window functions | spec 0012, spec 0011 (W20) |
| The desktop shell is an application, the boot entry from M2.5.6: the image stages its source as `entrypoint`; a 22-row app-drawn System 7.5 menu bar with direct items (no dropdowns), `core.spawn` launches (never `core.run`), the File item lists windows, the Windows item raises the terminal, and the Terminal item spawns `shell` once then raises the live window; no global work area | spec 0012 D9–D11/D19, ADR 0025, ADR 0029 |
| The boot desktop is a permanent consumer of the one machine-wide event queue, so event-reading apps compete with it; `cargo xtask image --shell` omits the `entrypoint` alias and is the pre-M2.5.6 boot used by the event-injecting regression suite. The shell's `core.write`/`core.read_input` terminal is independent of the queue, though its prompt loop also consumes key events | spec 0010 I31, spec 0012 D19, ADR 0029 |
| Read-only window enumeration: `syslib.window_info(index, var id, var rect, var title[64])` (builtin 40, no new opcode), index 0 = topmost, `NotFound` past the end or disabled graphics, title capacity 64 compile-checked | spec 0011 (W19), spec 0012, spec 0008 |
| Fair scheduling: the claim scan starts at the slot after the last claimed one (round-robin over the runnable slots), so a busy low-slot task cannot starve higher slots on `-smp 1`; realtime-first claim is unchanged | spec 0007 (Sch12), M2.3.5 |
| Console stale-parts retry: every window mutation bumps a visible-geometry generation; a cell/grid paint reads it before computing visible parts and compares after painting, retrying with fresh parts (bounded) so a window that moves above the console mid-repaint is not overwritten | spec 0012 (D3), M2.3.5 |
| M2.3.5 proof: two task-owned windows; the parent-owned `Proof Control` frame origin is a persistent cross-task command stage (only `window_raise` is cross-task writable); injected pointer clicks are asserted by focus/z-order, not by which task receives the event; the drag is four scripted owner `window_move` calls; teardown is a stage-4 close/exit acknowledged by `core.wait`; no new service API or opcode | spec 0011 (M2.3.5), M2.3.5 |
| `stdlib` may import `syslib`: the embedded library is trusted source compiled into the package and an application already has every `syslib` primitive, so the UI layout layer draws through the nine graphics primitives with no new authority, opcode, builtin or cross-unit type | spec 0003 ("UI layout and chrome"), spec 0008, spec 0009 (G19), ADR 0026 |
| The UI layout layer is `stdlib` source: metrics as code points × 8, line height 16, inset 8, title bar 16, close box 11; palette `0x000000`/`0xFFFFFF`/`0xCCCCCC`/`0x000080`; `ui_frame`/`ui_title_bar`/`ui_close_box`/`ui_separator`/`ui_center_text` draw client chrome only, never the window service's frames | spec 0003, ADR 0026, M2.4.0 |
| Compile caps: 128 KiB of source per unit, 384 KiB of source per application and a 16 MiB compile arena (M3.2; the M2.4.6 combined 256 KiB application cap was raised). The M2.4.x UI/scratch growth history: M2.4.0 took the library past 1 MiB, M2.4.2 past 2 MiB, M2.4.3 to 2.72 MiB, M2.4.4 to 2.97 MiB, M2.4.5 to 4.13 MiB with a minimal app (114,823 B of source, 84,920 B of code; the `ui_icons` pair needs 5,386,584 B) and M2.4.6 to 6.55 MiB (the `widgets` pair, 57,388 B app) | spec 0008, spec 0018 M11, M3.2 |
| String editing is 13 `stdlib` helpers over the checked slice and byte indexing: byte-offset positions, boundary-checked insert/delete, a `bytes[256]` stage plus one whole-buffer publish (atomic and valid UTF-8), clamping cursors, `Ok` backspace at 0, and a scalar `start`/`stop` selection; no new opcode, builtin or `state` | spec 0003 (SE1–SE7), M2.4.1 |
| Controls are 32 `stdlib` helpers with no widget object, callback, event pump or `state`: the app owns the event loop and the state scalars; `ui_focus_ring` is a dotted inset ring, `ui_focus_next` wraps, button/checkbox/text-field/scrollbar/list drawing returns `Invalid` for too-small geometry and disabled graphics, the text field shows a scroll-offset slice with an accent selection and caret but never mutates the text, the scrollbar hit returns outside/page-up/page-down/thumb, and the list uses `array[string[64], 8]`; key decoding is `div`/`mod` over the packed `Event.code` | spec 0003 ("UI controls"), M2.4.2 |
| Menus are 15 `stdlib` helpers with no widget object, callback, pump or `state`: the app owns the open menu (`-1` closed), the highlight and per-menu masks; `uint` bit masks use `div`/`mod` (indices 0..63), checked and disabled are independent, separators are the label `-` and are never selectable, disabled items are gray and skipped, and `ui_menu_move` clamps without wrapping; `ui_menu_key` returns action codes 0 none / 1 up / 2 down / 3 left / 4 right / 5 activate / 6 close (Escape closes, Enter activates while open) | spec 0003 ("UI menus"), M2.4.3 |
| Dialogs are 10 `stdlib` helpers with no widget object, event pump or `state`: `ui_message` word-wraps in a fixed box; alert slots are 0 default / 1 cancel and input-dialog slots 0 field / 1 default / 2 cancel; the title-bar close box returns the cancel slot; `ui_dialog_key` returns 0 none / 1 default / 2 cancel / 3 focus next / 4 focus previous, with Enter always the default and Escape cancel only when `has_cancel`; the default button gets a solid double border and the focus ring stays inside it; the input dialog only draws the caller's buffer (editing stays the M2.4.1 helpers) | spec 0003 ("UI dialogs"), M2.4.4 |
| Icons are 16 `stdlib` helpers with no widget object, event pump or `state`: a 32×32 bitmap is `array[uint, 32]` row masks (row 0 top, bit 0 left), drawn one run per maximal set-bit run; the app keeps the assets; grid cells are caller geometry with a row-major hit test over `count` valid cells; double-click is same-target and at most 400 ms inclusive (the app remembers the time/target and a drag cancels it); drag is grab-offset plus pointer-follow with the app clamping to its content; a selection band is inclusive (`abs + 1`) and selects live icons whose cells intersect (touching edges excluded); `ui_icon_drop` returns -2 over the trash, the cell index or -1 | spec 0003 ("UI icons and desktop"), M2.4.5 |
| The M2.4.6 widgets demo is one app and one event loop (`samples/apps/widgets`): it composes the existing menu bar/pull-down, button, checkbox, text field, scrollbar, list, icon strip, alert and input dialog, owns every state scalar, and treats a dialog as a modal mode of the same loop (keys and pointer events go to it while it is open; Enter is always default, Escape cancels, and the input buffer reaches the field only on OK). Check mode injects pointer/key events and checks pixels; `widgets shot` holds the composed frame for the QMP harness. No new helper, opcode, builtin or `state`; the library stays at 125 functions | spec 0003 ("Standard library"), spec 0010, M2.4.6 |
| Application files are stateless `core` host builtins over one path router: read `fs_list`/`fs_read`/`fs_size` (41–43) and write `fs_write`/`fs_remove`/`fs_mkdir`/`fs_rename`/`fs_truncate` (53–57, `home/` only); no handle, paths are relative (≤256 B, ≤8 components), the application image is read-only and `/home` is a persistent ext2 disk | spec 0013, spec 0018, spec 0019, ADR 0027/0040/0041 |
| `/home` is a real, persistent ext2 filesystem on a dedicated 8 MiB ATA disk, written by a new `ext2w` crate behind one path router; `core.fs_write`/`fs_remove`/`fs_mkdir`/`fs_rename`/`fs_truncate` (53–57) are the only write primitives and only under `home/`; no journal, `e2fsck -fn` is the consistency proof (spec 0019, ADR 0040/0041, M6/M7.1) |
| The clock window is an ordinary windowed app with no new API: a 260×280 content, an integer midpoint-circle face and Bresenham hands driven by a built-once 6° fixed-point direction table, an `HH:MM:SS` readout, a fixed `10:08:30` pixel check, and a live `shot` mode that derives seconds from `core.clock()` in a bounded poll/redraw loop (no `next_event`, no `syslib.clear`), repaints the whole content on an owner `Expose`, and presents once per complete frame; the client never assumes a blank screen | spec 0003, spec 0010, spec 0011, M2.5.2 |
| The editor is an ordinary windowed app: one `string[131072]` document (M2.5.3 used 8192; M9.4 raised it to the 128 KiB per-unit source cap) loaded through `fs_size` + 256-byte `fs_read` chunks and one strict-UTF-8 `substr_into`, one app-local atomic mutator (`ed_replace`) because the `str_*` mutators stay at 256 bytes, and Save enabled (File menu and `Ctrl+S`): a `home/` document is written to `<target>.tmp` and renamed over it, a `base/` document is saved as `home/<basename>`; a failure leaves the document/path intact | spec 0003, spec 0013, spec 0019, M2.5.3/M6.3/M9.4 |
| The file browser is one windowed app that navigates one directory at a time (`Enter`/double-click descends, `Backspace`/`Ctrl+Up` truncates the path; 96-entry listing), previews a file at any depth through `fs_size` + 256-byte `fs_read` chunks and one strict-UTF-8 `substr_into`, launches a regular file by its full path (`spawn`+`wait`), and creates/removes entries under `home` with `N`/`Delete` | spec 0013, spec 0018, spec 0019, M3.4/M6.3 |
| The terminal is one machine-wide grid bound to a task-owned window: `core.terminal_attach(window_id) -> Status` (builtin 44, no opcode) with the kernel supplying the caller's task id; the first attach releases the owner-0 boot Terminal, a repeated attach by the owner is `Ok`, another live task is `Full`, and a vanished window detaches to serial-only. Exposes are pulled by id (terminal) and owner `0` (log); a moved window is followed by generation; the lock order stays `CONSOLE → WINDOW → SCREEN` and console input is the raw byte ring | spec 0014, ADR 0028, ADR 0037, M2.5.5 |
| The proportional font is a kernel-owned 12-pixel bitmap: 95 printable-ASCII glyphs as 10-column ASCII art plus explicit advances (`i` 3, `m` 7, `W` 10, `M` 11, tabular digits 6), rendered on first use into a fixed `SpinLock<[Option<Glyph>; 95]>` cache of row bitmasks/ink bounds. Line box 12, baseline row 9, caps 2–9, descenders 10–11. Builtins 45–47 (`text_width_prop` 1→1, `text_height_prop` 0→1, `draw_text_prop` 4→1), no opcode; bytes outside `0x20..=0x7E` advance 8 and keep an 8×8 cell (blank at `>= 0x80`); disabled graphics give 0/0/`Invalid`. `draw_text`, the console and `stdlib.ui_*` stay 8×8; the service title bar and desktop menu bar/clock use the prop face | spec 0015, ADR 0030, M2.6.1 |
| The console paints a cell or a whole grid with `window::paint_visible_parts`, which holds the window table lock across the paint (`CONSOLE → WINDOW → SCREEN`) instead of computing parts and retrying on the generation; a window opened/raised/moved afterwards runs its own repair above the console, and the generation still follows a moved terminal on the next pump | spec 0012 D3/D17, M2.6.1 |
| A repair coalesces its damage before painting: bounded greedy merge of overlapping/touching rectangles, contained dropped, erase requests merged only within one coverage limit (a contained request with a higher-or-equal container limit is redundant), exposes marked before coalescing, and the presentation is the coalesced rectangle set instead of one bounding box of all damage. The invariant is coverage of the original union (growth is safe because the extra area is copied from the current shadow); static 32-rect lists and a 64-rect presentation, no allocation, no new opcode or counter | spec 0011 W21, ADR 0031, M2.6.2 |
| Console cells are batched: a bounded dirty rectangle per terminal, one present per `write_bytes`/`_print` run, one flush per input service opportunity, and one present per visible part on a whole-grid repaint; the flush re-reads visible parts under `WINDOW` and copies the dirty rectangle from the current shadow, keeping `CONSOLE → WINDOW → SCREEN` | spec 0012 D3, ADR 0031, M2.6.2 |
| Performance evidence lives in an ordinary app, not a counter or threshold: `samples/apps/perf` reports min/avg/max frame time and event latency from `core.clock()` (1 ms tick; the average carries the sub-millisecond signal), idle and under `realtime` + three `worker` children, with 200/200 event delivery and every child reaped; the coalescing reduction is the `window: damage ok` boot measurement | spec 0016, M2.6.2 |
| Visual proof is a host-side whole-screen dump, not a kernel serial dump: `samples/apps/visual` draws a deterministic full-screen specimen (window frame exactly the screen, no clock/input, covers the kernel text windows, fixed pointer at `(0,0)`), `scripts/visual_regression.py` captures QMP `screendump` headless and compares decoded RGB exactly against `tests/golden/visual.png` + a SHA-256/64×64-tile manifest; the same golden matches on `-smp 4` and `-smp 1`, only `--update` writes it, and `--tamper`/`--expect-mismatch` prove the compare fails. Resolves M2.1.2; no new builtin, opcode or serial protocol | spec 0009 G21, ADR 0032, M2.6.3 |
| System control is two host builtins with **no capability check**: `core.halt`/`core.reboot` (48/49, no opcode) set the shutdown flag, wake every core on the existing `0x40` vector where `wake_ipi` acknowledges and halts even mid-task, then halt or drive `0xCF9`/the 8042 reset and halt if ignored; the wait is bounded by the clock plus a spin ceiling. The desktop's `System` pull-down (About/Restart/Halt) is app-drawn on the M2.4.3 menu model and closes by raising the covered window; About is a modal desktop-owned window using the damage/`Expose` repair; shortcuts (`F10`, `Ctrl+A`/`Ctrl+R`/`Ctrl+H`) are focus-scoped and suppressed while a menu or About is open, so `Ctrl+A` in another app is unaffected | spec 0017, ADR 0033, M2.6.4 |
| Kill requests are id-tagged per-slot records (`AtomicU64` target id, `0` none) resolved under the slot lock: `request_kill` re-reads `SLOT_ID` before storing, `task::block` re-checks and consumes its own record after the boundary check (the lost-wake window), `take_kill(slot, id)` and `reclaim` consume only their own id (ids are monotonic, so a record never reaches a later tenant), and a kill published before `release` costs at most one extra quantum; the boot self-check is `kill: records ok` and `samples/apps/kill_stress` is the proof | spec 0007 Sch17, ADR 0034, Q50 |
| Correctly rounded float parsing is `core.parse_f64_into(src, var value) -> Status` (builtin 50), pure interpreter code: spec 0003's grammar check plus `core`'s allocation-free `f64: FromStr` (round half to even over the whole mantissa, ties, subnormals, `±Inf`/`±0` saturation, `-0.0`/`-inf` sign), the bit pattern written only on `Ok`, one canonical quiet NaN for `nan`, and `stdlib.parse_f64_into` kept as a thin delegating wrapper so its signature and the 125-function table are unchanged; no opcode and no `Host` method | spec 0003 ("Floating-point text"), spec 0008 (builtin 50), ADR 0035, Q41 |
| Multi-source waits are two host builtins (51/52, no opcode): `core.poll_any` is non-blocking and `core.next_any` blocks on one `abi::wait::WaitSet` (`Copy + Eq`, eight sources); source `0` is a console input byte being available (refined by Q44, row below), `1` an input event (including `Expose`) and any other value a stream handle whose data or close is ready (a read select). `core.stream_source` is compiler-lowered; the wake path wakes a matching set, the post-block `task::wait_any_ready` recheck uses the same probes, and readiness is a snapshot with the following read authoritative. `Host` gains `console_byte_ready`/`input_ready`/`stream_readable` (default `false`). `samples/apps/multiplex` proves all three arms on `-smp 4`/`-smp 1` | spec 0003 ("Multi-source waits"), spec 0005, spec 0006 ("Multi-source read readiness"), spec 0007 ("Blocking and wake-up"), ADR 0036 + 0037, Q39/Q44 |
| Console input is a raw byte stream: COM1 drains into a 512-byte ring (newest byte dropped and counted when full, no echo), PS/2 key presses go only to the event queue, and the shell echoes/edits its own `string[256]` with `stdlib.str_*` | spec 0005 ("Console input"), ADR 0037, Q44 |
| `core.read_input(var dst: bytes[N]) -> int` reuses the retired `READ_LINE` opcode slot as `READ_INPUT` (`0x42`): a raw non-blocking read that publishes the destination length and returns the count, `0` when empty; a `string` destination is a compile error; ABI v1 stays at 75 | spec 0003 ("Console input"), spec 0008, ADR 0037 |
| Q39 source `0` is "a console input byte is available"; the probe is `Host::console_byte_ready`/`console::has_byte`, the block is `WaitFor::Any`, `WaitFor::Console`/`WaitKind::Console` are deleted, and `task::wake_console_input` wakes matching sets | spec 0003 ("Multi-source waits"), spec 0007 ("Blocking and wake-up"), ADR 0037 |
| Window drag and close are service-owned: a title-bar press raises/focuses and starts a grab-offset drag (shared `relocate` clamp/damage, public `window_move` stays owner-only), a close-box press posts an owner close request (owner 0 inert), and both run from `gfx` after the graphics unlock under one `POINTER_ORDER` lock; a handled press is suppressed before `event::push_pointer` publishes it (never enqueued, so no SMP poll race), and a second press mid-drag is consumed. M8.1's kill-on-close is superseded by M8.2 | spec 0011 W22–W24, ADR 0042, M8.1 |
| A close-box press is an owner close request, never a task kill: a per-window `close_pending` flag is served as `EventKind.Close` (ordinal 6, `window = id`) through `poll_event` before `Expose` and before the queue, owner-only and topmost-first (`take_close`/`has_close`); it counts as input readiness (`input_ready`, the post-block `Input` re-check, `next_any` source 1) and the pointer hook wakes after the unlock. The window stays until its owner closes it; an ignored request leaves it. `desktop_shell` closes only About and stays alive; user apps close their own window; proof/demo windows may ignore it | spec 0011 W23/W25, spec 0010 I19/I31, spec 0003, ADR 0043 (amends 0042), M8.2 |
| An app-drawn pull-down needs a machine-wide modal popup input grab: `syslib.popup_grab(x,y,w,h)` (58) / `popup_release()` (59), one `Grab { owner, rect }` in the window table, `Ok`/`Full`/`Invalid` and owner-only release; while held `pointer_event` ignores presses and `poll_event` gives non-owners `WouldBlock` without consuming the queue while the owner receives producer events unchanged (`window = 0`, no hit-test/raise); `input_ready`, the post-block re-check and `next_any` source 1 use `grab_allows(task)`; release and `close_task` wake input waiters. The desktop's Apps (Calculator, Minesweeper, Text Editor, File Browser, Clock, Widgets) and System menus take it on open; a row over another window is now reachable | spec 0011 W26, spec 0010 I19/I31, spec 0012 D10/D11/D20, spec 0003, spec 0008 (58/59), ADR 0044, M8.3 |
| An app-drawn menu bar needs a persistent pointer-region claim: `syslib.region_claim(x,y,w,h)` (60) / `region_release()` (61), one `Region { owner, rect }` beside the grab, `Ok`/`Full`/`Invalid` and owner-only release; while held (and no grab is active) a queued `PointerDown` with `window = 0` inside the rect is dequeued only by the owner (non-owners get `WouldBlock` without consuming it), the modal grab still takes precedence, `pointer_event` starts no drag and posts no close request for a new press inside it while moves/releases still follow a drag, `task::input_queue_ready` folds the rule into queue readiness, and release/`close_task` wake input waiters. The desktop claims `(0, 0, screen_w, 22)` at startup and releases on exit; the bar click reaches it while a client is blocked in `next_event` | spec 0011 W27, spec 0010 I19/I31, spec 0012 D20, spec 0003, spec 0008 (60/61), ADR 0045, M8.4 |
| A topmost window move copies its content rectangle to the new origin in the shadow before the repair (internal `gfx::copy_rect`, overlap-safe, clipped, no application binding) and omits the new-frame desktop erase so the snapshot survives; non-topmost moves keep both erases and rely on the client. Every windowed app re-reads `window_content_rect` on an owner `Expose` and recomputes cached geometry, because drawing and hit-testing use absolute screen coordinates. The copy is a snapshot, not a canvas. A user-found Browser case exposed a missing `compute_layout` in `refresh_rect`; follow-up `4a0a3d4` calls it and `scripts/browser_drag_qmp.py` proves the new path/list/preview borders and the old layout gone | spec 0011 W12/W17 clarified + W28, spec 0012 D12/D19, ADR 0046, M8.5 |
| Queued input is window-addressed: one kernel-internal `window::input_target` rule decides who may dequeue (an addressed record its window's owner; a window-less `PointerDown` the region claimant or the topmost hit window's owner; moves/keys the focused window's owner; owner `0`/empty/unknown has no target and keeps the first-poller competition). `poll_event` peeks without consuming and a non-owner gets `WouldBlock`; the owner takes the ordinary routing path and a region press stays unchanged; the modal grab takes precedence and skips the target gate. `task::input_queue_ready` uses the same target for readiness, the post-block re-check and `next_any` source 1. The queue is still one FIFO, so an unresponsive target can head-of-line block later records (W18); `Close`/`Expose` stay owner-only flags. `window: target ok` is the boot self-check; `scripts/input_routing_qmp.py` proves Browser click/Enter, About's close box and a Calculator click with the desktop alive, and `drag_content_qmp.py` no longer closes the desktop. `events`/`multiplex` own a small window because window-less keys/moves belong to the focus. No opcode, builtin, `Host`, `stdlib` or `Event` layout change | spec 0010 I31 amended + I34, spec 0011 W29, spec 0012 D19, ADR 0047, M8.6 |
| The shell's own `Desktop` window is a help panel, not the shell's lifetime: its close box closes only that window, the desktop keeps running and the Apple square reopens it, so a boot desktop cannot halt the system by losing its own window | spec 0012 D12/D19, M8.7 |
| The file browser's path line carries a visible 44×18 `Up` button (left of the writability label) that calls the same `go_up` as `Backspace`/`Ctrl+Up`; `compute_layout` owns its geometry and the status hint names `Bksp up` | spec 0013, M8.8 |
| The file browser's scrollbar thumb is draggable: a press (hit class 3) records the offset, held moves map the thumb top onto `top` over the travel with the selection kept visible, release ends it; track clicks still page. The thumb arithmetic matches `stdlib.ui_scrollbar` | spec 0013, M8.9 |
| The text editor highlights source lexically, app-locally: `base/`/`lib/`/`system/` or `.ig` paths start on, plain text files off, and a checked File > Highlight row (five-row menu) toggles it. One line is scanned into keyword/type/string/comment/number/default runs (palette `0x000080`/`0x800000`/`0x008000`/`0x808080`/`0x804000`); `//` ends at its line, `{ ... }` spans lines without nesting, strings stop at their line, the block state at the first visible line was computed line by line from byte 0 once per frame (M9.2 caches it per line start), and whole code points plus the checked slices keep UTF-8 intact. Selected text stays white; highlighting off is the old all-black path. No opcode, builtin, `Host`, `stdlib` or API change | spec 0013, M9.1 |
| The editor repaints a pointer event only when it changes visible state (M9.2): plain moves over the text and same-row menu moves are free, a thumb drag repaints only when `top_line` changes, and the thumb press/release themselves are free; key events and `Expose` repaint as before. The thumb drags like the browser's M8.9 (`scroll_dragging`/`scroll_grab_dy`, geometry matching `stdlib.ui_scrollbar`, track clicks still page, the caret is clamped into view), and the block-comment state at every line start is cached in `bytes[8193]` and refreshed once per publication (`publish_staged`/`ed_replace`), so a frame scans only the visible lines (M9.4 raises this to `bytes[131073]` with the 128 KiB buffer). The reported `BudgetExceeded` after 2,893 claims was the normal 10 s CPU watchdog caused by a full repaint per pointer move, not a crash; the budget, scheduler and realtime policy are unchanged. `editor check` drags the thumb through the injected path and `scripts/editor_scroll_qmp.py` proves the burst ends `Ok` (old: fault at 2,826 claims; new: `Ok` at 2,448–2,633). No opcode, builtin, `Host` or `stdlib` change | spec 0013, M9.2 |
| A reusable file-open dialog is a `/lib` module, not a kernel service (M9.3): `samples/apps/lib/file_dialog.ig` exports `open_file(initial, var chosen) -> Status`, imports `stdlib` under the M5 rule, owns no state under M6, and opens a normal task-owned `Open File` window. It starts in the initial path's directory, lists up to 96 entries through `core.fs_list` (kind-2 gray/refused), navigates by keys, row click/double-click, `Up`/`Open`/`Cancel`, scrollbar paging/thumb dragging and the owner close request, repaints only on visible change, and publishes a whole regular-file path only on `Ok`; cancel is `Invalid` and a too-long result `CapacityExceeded` with the destination untouched, and a disabled screen is `Invalid`. The editor's File > Open/Ctrl+O call it and load through `open_path` (`PathCapacity` 256, `TempCapacity` 260). No opcode, builtin, `Host`, `stdlib` or file API change | spec 0013, spec 0018, M9.3 |
| The editor's document capacity is an application constant: 131072 B (128 KiB, the spec 0008 per-unit source cap) from M9.4, with `LineStateCapacity` 131073 and a 128 KiB `ed_replace` staging buffer; a file over the cap is refused by size with `too large (131072 max)` and an over-capacity edit returns `CapacityExceeded`. State is 530,392 B and stack 174,328 B (both under the 1 MiB region caps). The `/lib` dialog stays generic and does not filter by size; the reported `base/calculator` (32,516 B) failure was the editor's 8 KiB refusal after the dialog returned the path | spec 0003 ("Application buffers above 256 bytes"), spec 0013 ("The text editor"), M9.4 |
| The IPv4 wire stack (Ethernet, ARP, ICMP, UDP, minimal TCP) lives in an allocation-free `net` crate used by the kernel; the application surface is the `samples/apps/lib/socket.ig` unit on the program/interpreter side, and DNS/HTTP are ordinary `/lib` source. Host builtins cross the boundary as opaque handles, never addresses; the wire code is host-testable against a simulated link | spec 0020, ADR 0048 |
| The first NIC is virtio-net (legacy/transitional I/O BAR0, static virtqueues and identity-mapped DMA, no offloads) behind one `NetDevice` seam; polling is first and INTx vector `0x2D` is added in M10.6. e1000/e1000e follows behind the same seam (VMware exposes `e1000`/`e1000e`/`VMXNET3`, not virtio-net); modern virtio, RTL8139 and a userspace driver are rejected for M10 | spec 0020, ADR 0049 |
| Sockets are owner-checked opaque handles `(generation << 8) \| index` in a fixed table, closed on task termination; the ABI is `core.net_*`/`core.socket_*` builtins 62–73 (no opcode), blocking uses `WaitFor::Net(handle)` and a new `WaitFor::Deadline(ns)`, and `core.socket_source` tags a `next_any` source as `1 << 63 \| handle`. IPv4 is a `uint` in host order, ports are `uint`, and no new predeclared record is added | spec 0020, ADR 0050 |
| The first M10 socket slice is non-blocking: `socket_open` returns at once and the kernel `net::service()` drives the handshake; `send`/`recv` return `WouldBlock` and the caller retries under a `core.clock()` deadline. `core.socket_recv` stages the destination's declared `bytes[N]` capacity as a hidden compiler scalar (at most 2048 bytes per call) because a buffer header holds only the runtime length. `WaitFor::Net`/`Deadline`, `socket_source` and the blocking form are the follow-up; the kernel service closes owned sockets on `Task::reclaim` | spec 0020 N13 staging, spec 0005, M10.3/M10.4 (`e08745d`) |
| The blocking follow-up now exists: `WaitFor::Net(handle)` and `WaitFor::Deadline(ns)`; a host `WouldBlock` makes the machine return `Outcome::Blocked` and retry the same instruction after the wake. `net::service` expires per-socket deadlines, compares a readiness event sequence and calls `task::wake_net` after dropping `NET`; the post-block probe uses the recorded direction, so a lost wake is not possible. `core.socket_timeout` (71) sets a per-socket deadline (0 = none, default 30 s; the TCP connect keeps its 5 s `Closed`). `core.socket_source` is compiler-lowered to `1 << 63 \| handle`, and `next_any`/`poll_any` use `Host::socket_readable`; `net_select` proves the selector and 300 ms recv/select timeouts | spec 0020 N13, spec 0005, ADR 0036/0050, M10.3/M10.4 blocking (`5ae91bc`) |
| DHCP is ordinary `/lib` source over the UDP socket unit (`lib/dhcp.ig`): DISCOVER/OFFER/REQUEST/ACK from local port 68 to the limited broadcast, options 1/3/6/50/53/54/55/51, a 6 s cap and one NAK restart; `net_probe dhcp` applies the lease through `core.net_config`. A broadcast send is allowed before an address is configured, and a socket opened to the broadcast address accepts the server's reply from any source. No renewal, INFORM/RELEASE or authentication; the transaction id and magic cookie are the guard | spec 0020 N8/N18, M10.8 (`3752d17`) |
| e1000/82540EM (`8086:100e`) and e1000e/82574L (`8086:10d3`) sit behind the same `NetDevice` seam as virtio-net: MMIO BAR0 mapped uncached, legacy 16-byte descriptors, 32 RX + 16 TX static 2 KiB buffers, a monotonic TX cursor and RX tail give-back, memory-space + bus-master enable. `xtask --net-device virtio\|e1000\|e1000e` selects the device; virtio remains the default. This is the VMware/real-hardware path; VMXNET3 remains future work | spec 0020 N1–N4, ADR 0049, M10.9 (`c7989c4`) |
| A TCP listener is `KIND_LISTEN` (open kind 3, nonzero local bind port) with a two-handle pending queue: an inbound SYN creates a `SynReceived` connection and answers SYN-ACK, the final ACK moves it to `Established` and enqueues it, and `core.socket_accept` (72) returns the oldest as a normal established handle. A third completed connection gets RST; a listener close/owner death releases the listener, its pending connections and its half-open slots. `lib/socket.listen/accept` and `samples/apps/base/net_echo` (three host clients through `hostfwd`) are the proof | spec 0020 N10, M10.7 (`efeeadf`) |
| The NIC takes one PCI INTx line (QEMU GSI 11 at 00:03.0) through the I/O APIC to the boot core as vector `0x2D`. The handler is bounded and lock-free: a pending flag, one read-to-clear device acknowledge (virtio `ISR` / e1000 `ICR`, addressed through atomics so it takes no network lock) and an EOI; the used-ring drain stays in `net::service`, so an interrupt is a hint and polling is the fallback (route absent, boot-time `--net-irq poll` via the multiboot2 command line `igis.net_irq=poll`, or a device that refuses to unmask). `ioapic::init` programs one redirection entry per call and splits its page once, so IRQ12 and IRQ11 coexist. Legacy virtio can latch its INTx level high from the boot test frame, so `net::enable_irq` reads the ISR once after the route; e1000 masks with `IMS` and unmasks only the receive causes with `IMC` (the old `IMC = u32::MAX` unmasked everything). `core.net_stats` (builtin 73, no opcode) and `base/net_perf` are the counters/proof | spec 0020 N4/N19/N22, ADR 0051, M10.6 |
| The text shell is a thin command loop over separate `base/` apps: it keeps a display cwd (`/` start), prompts `igis:/> `/`igis:/base> `, has a stateful `cd` builtin, and resolves a non-builtin command as `base/<cmd>` (then `system/<cmd>`). The file commands (`ls`, `dir`, `pwd`, `cat`, `head`, `tail`, `mkdir`, `rmdir`, `rm`) receive args `"<cwd> <rest>"`; every other app receives the raw tail, so `nc`, `purl`, `text`, `child` and the rest keep their `run` interfaces. `run` remains the explicit path launcher and keeps its `child:` messages. Harness prompt waits accept both `shell> ` and `igis:/...> ` | spec 0012, spec 0013, M10 (`0b8ff2c`, `3597d6c`, `e02fc8f`) |

## Status log

| Date | Change |
|------|--------|
| 2026-11-03 | Repository created; documentation structure established. |
| 2026-11-03 | Vision captured in spec 0001; ADR 0001 (ring 0 only) and ADR 0002 (interpreted apps) accepted. |
| 2026-11-03 | Architecture spec 0002, language seed 0003; ADR 0003 (pinned cooperative tasks), 0004 (static memory), 0005 (bytecode), 0006 (MMU hardening, provisional). |
| 2026-11-03 | Memory model draft 0004; placement fork (static vs monotonic regions) left open. |
| 2026-11-03 | Option A selected: fully static placement, no runtime allocation (ADR 0007). Memory spec updated with rules, examples, and accepted costs. |
| 2026-11-03 | Destination-form construction recorded: `dst = a + b` writes into a declared buffer; no temporaries, no GC. |
| 2026-11-03 | `exit(reason)` as top-level catch: frames abandon to main level, handler may reclaim or transfer to a validated recovery label (ADR 0008 amended by 0009); aliasing forbidden, no views, capacity-typed strings. |
| 2026-11-03 | Handlers split: `fault(code)` decides terminate/recover, `exit(reason)` always tears down; one recovery per task, no retry (ADR 0010, supersedes 0009). |
| 2026-11-12 | Origin recorded: 2005 front-end for a modem; the ring boundary was the friction that produced ring 0. Execution changed to per-core interpreter loops with work stealing (ADR 0011). Rust, x86_64-first, GRUB/multiboot2 and read-only ext2 recorded (ADR 0012–0015). Specs 0001–0004 updated; host interface (0005), streams (0006) and scheduler (0007) added. |
| 2026-11-12 | Realtime class added: one-way promotion, no quantum preemption, admission by core count, one-second heartbeat with `WatchdogTimeout` (ADR 0016). |
| 2026-11-12 | Realtime admission deliberately allows occupying every core; no core is reserved for the REPL. Tradeoff recorded in the ADR 0016 addendum. |
| 2026-11-12 | REPL model settled: a kernel service compiles and starts applications from a request queue; the shell is an ordinary application; `run`/`spawn`/`wait`/`kill` with global task ids (ADR 0017). |
| 2026-11-12 | REPL details settled: `shell` then `entrypoint`, `no entry` halt, fixed `string[1024]` arguments, queue capacity 1024, orphan children continue (ADR 0017 addendum). |
| 2026-11-12 | Per-task handles replaced by global `TaskId`s and a 64-entry exit-reason ring; no per-task handle table (ADR 0017 addendum 2). |
| 2026-11-12 | Argument delivery settled as `main(args: const string[1024])`; a full request queue returns `Status.Full`, and `run` blocks only on the child. |
| 2026-11-12 | Remaining unresolved items parked in `OPEN-QUESTIONS.md`; session paused before code. |
| 2026-11-13 | Host interface settled: console is a byte stream, one global nanosecond clock (no TSC), caller-owned compile diagnostics; Q5–Q7 closed (specs 0003, 0005, 0007). |
| 2026-11-13 | Streams settled: unique application-wide names, one sender and one receiver, `stdlib` framing helpers; explicit close deferred to v2; Q11–Q13 closed (spec 0006). |
| 2026-11-13 | Floating point added to the first milestone: `f64` with a per-task FXSAVE region (ADR 0018). Language settled: no visibility modifiers, `T(x)` casts, FNV-1a maps, `core.bit_*`, `Diagnostic` only; Q15–Q23 closed (specs 0002–0004, 0006, 0007). |
| 2026-11-13 | Boot, loader and REPL settled: sub-1 MiB trampoline, mandatory framebuffer tag, one IPI vector, ext2 subset, dispatcher timing, `ExitReason.Killed`, path validation; Q24–Q38 closed (specs 0002, 0003, 0005, 0007). |
| 2026-11-13 | Spec 0008 drafted: one bytecode package per application, fixed 4-byte-word stack VM, `compiler`/`interpreter` split over `abi`, structural verification at load. |
| 2026-11-13 | Source-only delivery made permanent: no precompiled packages ever, compile latency is not a constraint (ADR 0019; specs 0002, 0008). |
| 2026-11-13 | Specs 0001–0008 accepted. Workspace created (`arch/x86_64`, `kernel`, `xtask`): GRUB/multiboot2 boots into long mode, serial works, the framebuffer tag is parsed and the screen cleared. |
| 2026-11-13 | Kernel diagnostics: 8x8 bitmap-font console on the framebuffer (mirrored to serial), IDT with 32 exception gates and a register dump (verified with a deliberate `int3`), multiboot2 memory-map parsing. |
| 2026-11-13 | Frame allocator: 4 KiB bitmap over the first 4 GiB, initialised from the multiboot2 map and reserving low memory, the kernel image, the multiboot2 structure and the framebuffer; verified by allocating, writing, reading back and freeing two frames (254 MiB usable under `-m 256M`). |
| 2026-11-13 | GDT/TSS with a double-fault IST (verified with a real non-canonical-stack fault), local APIC enabled with the legacy PIC masked, timer calibrated against the PIT (~62.5k ticks/ms in QEMU), and a 1 kHz tick advancing the global nanosecond clock (Q6, spec 0007). |
| 2026-11-13 | Host language slice: `abi` (ABI v1 opcodes/headers), `compiler` (lexer → parser → type/capacity check → deterministic package), `interpreter` (structural verifier, allocation-free machine, `Host` trait), `langhost` runner; 50 tests, kernel untouched. Spec 0008 open questions 1 and 3 resolved. |
| 2026-11-13 | Compiler made `no_std` and allocation-free (B11): a bump arena over the caller's `&mut [u8]`, source-borrowing tokens and AST, arena-backed lists instead of `Vec`/`HashMap`, fixed-buffer diagnostics, and `compile_into(source, path, arena, code, manifest) -> Package<'a>` writing into caller buffers. Packages are byte-identical to the previous build; 54 tests; `langhost` keeps a std helper that allocates the caps. |
| 2026-11-13 | First in-kernel vertical slice: `xtask image` stages `samples/apps/` into a 4 MiB ext2 image attached as the `apps` GRUB module; the kernel finds the module tag, mounts the image read-only (validated superblock, group descriptors, inodes, directories, direct/single/double indirect), reads `shell`, compiles it with `compile_into`, places `code`/`state`/`stack` in contiguous frames, verifies and runs it (`exit: Ok`), reclaims the frames and halts. Boot stack raised 16 KiB → 64 KiB after the in-kernel compiler overflowed into the boot page tables. |
| 2026-11-13 | Scheduler loop: `task.rs` owns the record and a 64-slot runnable table (claim/release by value move), `sched.rs` runs claim → quantum → release/terminate on the boot core. The REPL only compiles and enqueues; the boot application crosses 181 claims over a 10 000-step quantum, then `exit Ok` and an idle summary. Budgets are provisional: 10 s of CPU time plus a 200M-step cap because the 1 ms clock cannot resolve a quantum. |
| 2026-11-13 | REPL request service: `core.spawn`/`wait`/`kill` with a staged scalar `int` ABI, a 1024-slot static request queue serviced before every claim, a 64-entry exit ring, `Blocked(task exit)` with wake-on-termination, and a `shell` → `child` sample that blocks, wakes and reports `child: ok`. A load failure prints the diagnostic and records `Faulted(IoError)` under the reserved id. |
| 2026-11-13 | Console input: COM1 and the PS/2 keyboard are polled in the service opportunity into one static FIFO, a staged line ring echoes/edits/completes lines, and `core.read_line` blocks the shell (`Blocked(Console)`) until a line exists; `shell` reads three lines and exits. Temporary until indexing lands (Q44). |
| 2026-11-13 | Buffer indexing, comparison and length: `buf[i]` is a raw `byte` checked against the runtime length; `bytes[i] := b` is checked against the capacity and extends the length (zero-filling the gap), `string` stays read-only by index; `=`/`<>` compare buffers of the same kind across capacities; `core.len` returns `uint`. New ABI v1 opcodes `load_u8`, `store_u8`, `cmp_buffers` (54 → 57) and builtin id 6. The shell is a real `help`/`hello`/`exit` loop; the host `read_line` stub scripts those lines. |
| 2026-11-14 | String search and slicing: `core.find` (first index of a `byte` or `-1`) and `core.substr_into` (same-kind checked slice, negative → `-4`, past-end → 0, clamped copy, UTF-8 boundary check for `string`) as ABI v1 opcodes `find`/`substr` (57 → 59). The shell splits `cmd`/`rest` and the `run` tail into path/args; `child` prints its `main(args)`, `echo` writes the tail, and `run missing` exercises the `-3` spawn failure. |
| 2026-11-14 | Integer formatting and the first `syslib` primitives: `core.format_int_into` (opcode `format_int`, 59 → 60; decimal/hex, sign, zero padding, exact fit or `-6`, bad base `-4`) and `syslib.port_in8`/`port_out8` (builtin ids 7/8 through `Host::port_in8`/`port_out8`, kernel over `arch_x86_64::port`). `Port` is staged as a scalar `uint` (Q45). `samples/apps/clock` polls the CMOS RTC and prints a real `HH:MM:SS`; the host mock prints `00:00:00`. The boot stack grew 64 → 128 KiB because the added compiler paths tipped the in-kernel compile of the shell's child over the old limit and corrupted the boot page tables. |
| 2026-11-14 | Q42 closed: the compiler has a fixed 32-level nesting limit (parser expression/statement/unary recursion and independent codegen walks; a `Diagnostic` beyond it), and everything after early boot runs on a 256 KiB kernel stack with a not-present guard frame. The guard's 2 MiB identity page is split into 4 KiB PTEs in a static `.bss` table, CR3 is reloaded and the higher-half alias is shared. `#PF` got its own IST so an exhausted stack still reports a clean fault; the `.boot` stack is early-boot only. Deep-source test: clean `#PF` with CR2 in the guard frame. Per-task stack guards remain future work. |
| 2026-11-14 | Enums and the `Status` ABI: `type Name = (Variant, ...)` declares a nominal enum whose variants are global ordinal constants (`0..n-1`) in one 8-byte slot; assignment/comparison only within the same enum (ordering by ordinal), `int(enum)` yields the ordinal, `EnumName(int)` is range-checked and faults `Overflow` (opcode `enum_cast`, 60 → 61). `Status` is predeclared with `Ok` = 0; a user `type Status` and a duplicate type/variant are compile errors. `core.spawn(path, args, var id)`, `core.wait(id, var reason)` and `core.kill(id)` now return `Status`; the reason stays a staged `int` and `Diagnostic`/`ExitReason` records remain missing (Q43 narrowed). The shell checks each `Status` and prints `spawn failed`/`wait failed` plus ok/killed/faulted. |
| 2026-11-14 | Records and the record-based REPL ABI: `type Name = record field: T; ... end;` with nominal types, declaration-order 8-byte-aligned layout, nested records, buffer fields, whole-record copies (`copy_refs`), field references (`ref_offset`) and `value`/`const`/`var` record parameters. `Diagnostic` and `ExitReason` are predeclared at the fixed `abi::layout` offsets; `core.spawn(path, args, var diag, var id)` fills `diag` from the kernel compiler on a synchronous failure and clears it otherwise, and `core.wait(id, var reason)` writes `kind`/`code`. `run missing` prints `spawn failed: No such application` from `diag.message`, `run faulty` reports `child: faulted` from `reason.kind`, and the staged reason `int` is gone (Q43 narrowed to sum types and `core.run`). |
| 2026-11-14 | Sum types, `case` and the real `ExitReason`: `type Name = Variant | Variant(payload: T);` is nominal, an 8-byte tag at offset 0 plus the largest payload at offset 8, constructed into a destination (`dst := Variant(payload)`; variant names are scoped to the sum, so `Ok` is `Status.Ok` or `ExitReason.Ok` by destination). `case value of Variant: ... Variant(binding): ... end;` is exhaustive (one arm per variant, no `else`), has no fallthrough, and copies a payload by value into an arm-local binding; missing, duplicate and unknown arms, payload mismatches and cross-sum variants are compile errors. No new opcodes: construction is `store_ref`/`clear`/`append`/`copy_refs`, `case` is `load_ref`/`eq`/`jz`. `ExitReason` becomes `Ok | Killed | Faulted(code: FaultCode)` at the same 16-byte layout; `FaultCode` is a predeclared enum with qualified variant names (`FaultCode.DivideByZero`) because two names collide with `Status`. The shell's `report` is an exhaustive `case`; `run faulty` prints `child: faulted DivideByZero`, `run child world` prints `child: ok`, `run missing` keeps its `diag.message`, and the kernel run ends `task 1: exit Ok`. Q43 narrows to `core.run`, `TaskId` and the request-completion diagnostic path. |
| 2026-11-14 | `core.run` and the request-completion diagnostic: `core.run(path, args, var diag, var reason)` is spawn + wait in the interpreter, with the pending child id in the `Machine`, so a blocked retry waits without spawning twice (builtin id 9, `(4, 1)`). The exit ring now carries a 192-byte `Diagnostic` image for a load failure the service discovers after `spawn` returned; `Host::diagnostic_for` (default `false`) lets `run` copy it into its caller-owned `diag`, while `core.wait` keeps its signature and observes only `Faulted(IoError)`. The shell's `run` command uses `core.run`; the boot child still uses spawn + wait. `run broken` prints the compiler's `unknown identifier` message, `run ../shell` prints the path rule. Q43 is now only the distinct `TaskId` type. |
| 2026-11-14 | Multi-unit `stdlib`: `stdlib/stdlib.ig` is real source embedded with `include_str!`; an application with `uses stdlib;` compiles it into the same package (library functions first, shared constant pool, line-table unit ids 0 app / 1 stdlib, manifest keeps the app unit name, diagnostics name the failing unit). `function ... : T` with `return` (scalar results) and the first helpers `trim_into`, `split_once`, `parse_int_into`, `starts_with`, `contains_byte` landed; `samples/apps/text` runs `run text 42 hi` in the kernel. The stdlib adds ~5.3 KiB of source, ~4.1 KiB of code blob and ~154 KiB of compile scratch to the sample app. |
| 2026-11-14 | Fixed-size arrays: `array[T, N]` (positive const N) in state, locals, records, sum payloads and `value`/`const`/`var` parameters. Layout is N elements at `align8(element size)` with the array rounded to 8; arrays are nominal in element type and count. `a[i]` reads/writes the element (`index < N` at run time, `fault(OutOfBounds)`, never a clamp), nested `a[i][j]`/`a[i].field` composes, whole-array assignment and `value` parameters copy `N * stride` bytes, and `const`/`var` parameters are call-scoped references. One new opcode `ref_element` (immediates stride, count; ABI v1 61 → 62) forms an element reference; the verifier requires an 8-byte-multiple stride and a non-zero count whose product fits a section. One structural array table is shared by the app and `stdlib`, so arrays cross the unit boundary; `stdlib.split_all` fills an `array[string[64], 8]`. `samples/lang/array.ig` and `array_bounds.ig` cover reads, writes, copies, records, nested arrays, buffers, parameters, the stdlib helper and the bounds fault. |
| 2026-11-14 | Fixed-capacity rings: `ring[T, N]` (positive const N) in state, locals, records, sum payloads, arrays and `value`/`const`/`var` parameters; nominal in element and count; layout is the `N` elements at `align8(element size)` followed by `head: u64` and `count: u64`; whole-ring copies include the header. `core.ring_push`/`pop`/`peek`/`full`/`empty` are compiler-lowered over `ref_offset`/`load_ref`/`store_ref`/`copy_refs`/`ref_element`, `add_u`/`mod_u` and `eq`+`jz`, so the ABI v1 opcode table is unchanged. `push` on full returns `Full` and writes nothing; `pop`/`peek` on empty return `NotFound` and leave the out-parameter untouched; `push`/`pop` require a writable place, so `const` is rejected while a `value` copy is writable and private to the callee. The structural ring table is shared with `stdlib` (`drain_into` takes a `ring[int, 8]`); `samples/lang/ring.ig` covers FIFO order, peek, full/empty, wrap-around, whole copies and buffer/record/array/nested-ring elements. |
| 2026-11-15 | Fixed-capacity maps: `map[K, V, N]` (`N` a positive const, `K` one of `int`, `string[M]`, `bytes[M]`) in state, locals, records, sum payloads, array and ring elements, and `value`/`const`/`var` parameters; nominal in `(K, V, N)`, no at-least-N, no comparison. Layout is `count: u64` then `capacity` (smallest power of two at least `2N`) slots of `state`/`hash`/key/value; the hash is FNV-1a over the eight little-endian bytes of an `int` key or the `[0..len)` bytes of a buffer key, probing is linear and deletion is backward-shift with no tombstones. `core.map_put`/`get`/`has`/`remove`/`count` are five new opcodes (`MAP_PUT` … `MAP_COUNT`, key and value kinds in the opcode word, `capacity`/`count`/`key_size`/`value_size` immediates), so the algorithm lives once in the interpreter; `put` at `N` entries returns `Full` and writes nothing, a missing key is `NotFound`/`false`, and `get` leaves its out-parameter untouched. One structural map table is shared with `stdlib` (`map_get_or` takes a `map[int, int, 8]`); `samples/lang/map.ig` covers collisions, backward shift, key 0, the empty buffer key, aggregate values, whole copies and the three parameter modes. |
| 2026-11-15 | UTF-8: `core.substr_into` accepts all four destination/source kind combinations with the destination kind deciding (a `string` source keeps T4's boundary rule, a `bytes` source is validated as strict UTF-8, a `bytes` destination copies raw); the source kind is the `SUBSTR` `b` field, so no opcode was added and the ABI v1 table is unchanged. `stdlib` gains `utf8_decode_into` (T3), `utf8_len`, `utf8_decode` and `utf8_valid` as ordinary language code, `samples/lang/utf8.ig` covers 1-/2-/3-/4-byte code points and every malformed class, and `samples/apps/utf8` runs as `run utf8` in the shell. The `stdlib.substr_into` move is withdrawn: the destination capacity must be a call-site immediate and there are no generics. Also fixed a latent codegen bug where `dst := ""` left a destination reference on the operand stack. |
| 2026-11-15 | SMP: `smp::start` brings the APs up by attempt (INIT-SIPI-SIPI through the `0x8000` trampoline and `0x9000` parameter page, `MAX_CORES` 8, per-core TSS/IST and 64 KiB stacks, bounded 100 ms), every online core runs the claim/quantum/release loop with per-core verifier scratch and counters, idle cores do one `sti; hlt` step woken by the `0x40` IPI, the boot core stops the APs and prints per-core totals, and `syslib.cpu_id()` (builtin 10) reports the APIC id. Fixed two SMP races: a claimed task's slot stays reserved by id, and a reserved request id stays live while it compiles. `samples/apps/worker` + `cores` prove distribution; `xtask run` defaults to `-smp 4` (`--cores N`). |
| 2026-11-15 | Realtime class implemented (ADR 0016): `core.realtime_on()`/`core.heartbeat()` (builtins 11/12) through `Host::realtime_on`/`Host::heartbeat` defaults, admission by a CAS counter against `smp::online_count()`, realtime-first claim, no quantum preemption (an inner per-core loop keeps the claimed value), no total budget, a one-second deadline in non-blocked `budget_ns` (`HEARTBEAT_NS`) terminated as `Faulted(WatchdogTimeout)`, and admission released only in `terminate`. `samples/apps/{realtime,beat,spin}` prove promotion, `Full` on `-smp 1`, and the watchdog; the shell reports `WatchdogTimeout`. |
| 2026-11-15 | Streams implemented (spec 0006, amended): `in_stream[N]`/`out_stream[N]` top-level state variables whose name is the stream name; handles occupy the first `8 * endpoint_count` state bytes and the manifest lists descriptors in declaration order. The loader opens or pairs endpoints before placement (waiting semantics for an absent peer; same-direction duplicate, capacity mismatch and closed-stream declarations are load errors), writes handles into `state`, and rolls back on failure. A kernel table of 32 records over a 256 KiB static arena with a first-fit free list holds the buffers; handles are `(generation, index)`. `core.send`/`try_send` and `core.recv`/`try_recv` are four new opcodes; blocking is `WaitFor::Stream(handle)` with sends waking receivers, receives waking senders and close waking both. `samples/apps/{streams,pipe_in,pipe_out}` prove in-order delivery and `Closed`; `streams_bad` proves the two load errors; `bad_send`/`bad_recv`/`bad_name` cover the compile errors. |
| 2026-11-15 | `stdlib` framing layer (spec 0006, "Receive" and "Interfaces"): `recv_exact`, `send_frame`, `recv_frame_into`, `send_line`, `recv_line_into`, `send_u64`, `recv_u64` and `send_bytes` as ordinary language code over `const in_stream[1]`/`const out_stream[1]` parameters (the declared capacity of a stream parameter is not checked, so one helper serves every capacity). Each helper stages into a local `bytes[256]` and publishes the value with one copy, so a failure leaves the destination untouched; `send_frame`/`send_line`/`send_u64` build the whole message and send it atomically; `recv_line_into` strips CRLF and keeps consuming an overlong line to stay synchronised. Receives are one byte wide: `core.recv` returns up to the destination capacity and there is no pushback, so a wider chunk would steal the peer's next message (the spec's original loop was corrected). `pipe_out`/`pipe_in` now use `send_line`/`recv_line_into`; `samples/apps/frames` (`frame_in` + `frame_out` on `frames`/`frames_ack`) proves the length prefix, the `u64` view, both `CapacityExceeded` paths and the close, and the host `ConsoleHost` has a loopback FIFO so `langhost` tests the views deterministically. Also fixed an SMP bug this exposed: AP kernel stacks were 64 KiB, but any core may compile a request and a `stdlib`-using compile needs ~60 KiB, so the compiler overflowed an AP stack into the neighbouring `.bss` (random `#UD`/`#PF`). `AP_STACK_BYTES` is now 256 KiB, matching the boot core. |
| 2026-11-16 | Stack guards implemented for boot, AP and task stacks (spec 0002 H2, spec 0004 C6, ADR 0006). `arch/x86_64/src/paging.rs` gains `split_huge_page`, `set_pte_present`, `pte_present`, `flush_page` and `reload_cr3`; `kernel/src/guard.rs` owns a 32-entry 4 KiB table cache keyed by 2 MiB base and a 96-frame registry, and `install_guarded` moved there from `arch` (still the boot stack's entry point). Each `ApStack` is now guard + 256 KiB body; all seven AP guards are installed and PTE-checked before the SIPIs, and `smp::start` prints `guards: boot 1, ap 7, tables M`, halting on a mismatch or a changed free-frame count. Every PTE change does a local CR3 reload plus a generation-tagged wake-IPI TLB shootdown and bounded wait. Task placement allocates `stack_len + 4096` contiguous frames, the lowest is the guard, `regions.stack` starts one frame above with the exact manifest length, and `Region::free` unguards before `free_contiguous` on every destruction path. `#PF` prints `stack guard: task N` / `ap core N` / `boot core` before the dump. `samples/apps/deep` proves `run deep` reports `child: faulted StackOverflow` (the interpreter path, not the hardware guard). |
| 2026-11-16 | Fixed-point `f64` text (spec 0003, "Floating-point text"; spec 0008). `core.format_f64_into(dst, value, frac_digits) -> int` is one new `FORMAT_F64` opcode (`a` = destination buffer kind, a non-zero capacity immediate; destination reference, `f64` bits and `frac_digits` on the stack) implemented as a pure buffer operation in the interpreter: it builds the digits in a local array and publishes them with one copy, so a rejected value never leaves a partial destination. At most 9 fraction digits (`-4` beyond), half-away-from-zero rounding with the carry applied to the integer part (`9.999` with 2 → `10.00`), `nan`/`inf`/`-inf` written literally, `-4` for `\|value\| >= 2^63` because the form has no exponent, and `-6` when the result does not fit (destination length untouched). The sign of `-0.0` survives (`-0.000`). `stdlib.parse_f64_into(src, var value) -> Status` is ordinary language code: `[+-]? ( digits [ '.' digits? ] \| '.' digits ) ( [eE] [+-]? digits )?` plus the formatter's `inf`/`+inf`/`-inf`/`nan`; everything else is `Invalid` and writes nothing. The fraction accumulates as an integer numerator over a power of ten (18 significant digits, so `0.375` is exact) and the exponent is applied by repeated ×/÷10 with an early exit at saturation, so `1e400` is `±Inf` and `1e-400` is `±0`, both with `Ok`. Tests: interpreter hex/float formatter cases (specials, carry, `-0.0`, `2^63`, capacity and kind errors), compiler arity/type/encoding cases, `langhost` valid/malformed/round-trip cases, the stdlib helper count (21), `samples/lang/f64text.ig` on the host and `samples/apps/floats` in the kernel (`run floats 3.25` → `value=3.250`, `run floats nope` → `Invalid`). ABI v1 grows from 71 to 72 opcodes; Q41 narrows to shortest round-trip formatting and exact IEEE parsing. |
| 2026-11-16 | Shortest round-trip `f64` text (spec 0003, "Floating-point text"; spec 0008; Q41). `core.format_f64_short_into(dst, value) -> int` is one new `FORMAT_F64_SHORT` opcode (`a` = destination buffer kind, a non-zero capacity immediate, no width operand) implemented as an exact search in `interpreter/src/f64short.rs`: the value and both ends of its round-trip interval are expanded to base-`10^9` integers (the value times `5^k` and `2^shift`; at most 769 digits, 88 limbs, `5^27` and `2^30` chunk multiplication), then for `n = 1..=17` the two `n`-digit decimals that bracket the value are compared against the interval endpoints, with endpoint inclusivity from the significand's low bit (round-half-to-even) and the lower half-gap halved at a power-of-two boundary. The first `n` that lands inside wins; when both candidates do, the nearer one is taken and an exact tie rounds away from zero, matching the host reference. Shape: positional while `-6 < e10 + 1 <= 21` (`1e20`, `1e-6`, `0.000001`), scientific otherwise (`1e21`, `1e-7`, `5e-324`, `1.7976931348623157e308`), no trailing `.0`, `0`/`-0`, `nan`, `inf`/`-inf` literal, `-6` with the length untouched when the text does not fit. The text is staged in a local array and published with one copy: no allocation, no host call, no floating-point arithmetic after the decode, and no data tables beyond a 72-byte `10^0..=10^8` array (~9.4 KiB of `.text` at `-O`, stack frame 5.7 KiB). Tests: `interpreter/tests/f64short.rs` compares the produced string against the shape rule applied to Rust's `{:e}` for 24 000+ xorshift-bit values (all finite ones) plus every power of ten and two with both neighbours, every biased exponent at eight mantissa boundaries in both signs, and a hard-value list, and independently re-parses every result; `verify.rs` covers the hand-assembled cases and the kind/capacity/reserved-field rejections; `compiler/tests/compile.rs` covers arity, destination kinds and encoding; `samples/lang/f64short.ig` runs on the host and `samples/apps/floats` prints `s:third`, `s:1e21`, `s:tinysub` and `s:max` in the kernel. The ABI v1 table holds **75** opcodes (counted in `abi/src/opcodes.rs`; the `71 to 72` figure in the row above was off by two, and spec 0008's `73 to 74` for `format_f64` was already correct). Q41 narrows to correctly rounded decimal-to-binary parsing and its subnormal edges. |
| 2026-11-16 | Graphics foundation for the M2 desktop (spec 0009, ADR 0020). `kernel/src/gfx.rs` keeps the multiboot2 mode and allocates a full-screen shadow of `pitch * height` contiguous frames after `frame::init` (1024×768×32, pitch 4096 → 3 MiB, 768 frames, `0x757000` under QEMU); `present` copies clipped rectangles row by row with the pitch. `kernel/src/console.rs` lost its direct framebuffer path: glyphs are painted into the shadow by `gfx::console_glyph` and each cell is presented; `fb.rs` is gone. Nine `syslib` graphics primitives are host builtins (ids 13–21, ABI v1 stays 75 opcodes): `screen_width`/`screen_height`, `fill_rect`, `fill_dither` (`(X + Y)` even), `draw_rect` (1-px outline), `draw_text` (8×8 font, transparent, one byte per cell, no newline), `get_pixel`, `present`, `clear`; the interpreter rejects non-positive extents and colours above `0x00FFFFFF` before the host call, and the host clips to the screen and a rectangular clip region. `samples/apps/desktop` draws a System 7.5-style dither desktop, menu bar with a right-aligned `core.clock()` HH:MM, and a striped title-bar window, checks nine pixels and prints `desktop: ok` in one claim; `run desktop` verified on `--cores 4` and `--cores 1`, and `run frames`/`run streams` still pass. Graphics disable cleanly (no tag, non-32-bpp, bad geometry, no shadow memory); the framebuffer tag is now optional and the console falls back to serial. |
| 2026-11-16 | Desktop input: spec 0010 and ADR 0021 accepted; PS/2 aux driver, pointer state and the composited cursor (M2.2.0–M2.2.2). `kernel/src/mouse.rs` initialises the i8042 aux device (`0xA8`, config aux IRQ cleared, `0xF6`, `0xF3 100`, `0xE8 3`, `0xE6`, `0xF4`, bounded waits; `mouse: PS/2 aux ready` or `mouse: no aux device`), decodes 3-byte reports with a pure `Decoder` (bit-3 sync with resync, overflow dropped whole, 9-bit sign extension, Y inverted, 1:1), and is polled in the service opportunity and the idle loop next to the keyboard, which now leaves aux bytes for it. A boot self-check feeds canned packets (positive/negative deltas, an overflow, a desynced stream, both clamps, all three buttons) through the same decoder and clamp arithmetic on scratch state and prints `mouse: decoder ok`, halting on a mismatch. One machine-wide pointer state and a 16×16 black-outline/white-fill arrow live in `kernel/src/gfx.rs`; `present` copies the shadow and then composites the cursor into the framebuffer (never into the shadow), so `get_pixel` returns uncomposited pixels and headless checks stay deterministic; a move re-presents only the old and new cursor rectangles and the console's cell present carries the cursor. `syslib` gained `pointer_x`/`pointer_y` (`int`), `pointer_buttons` (`uint`) and debug-only `inject_pointer(dx, dy, buttons)` (builtins 22–25, ABI v1 stays 75 opcodes, host defaults 0/0/0 and `Invalid`; the interpreter rejects `buttons > 0b111`). `samples/apps/mouse` proves clamping at both edges, button set/clear and the "cursor is not in the shadow" rule. `run mouse`, `run desktop`, `run text 42 hi`, `run frames`, `run streams` and `run realtime` pass on `--cores 4`, `run mouse` on `--cores 1`; 290 host tests plus the doctest. |
| 2026-11-16 | Absolute pointer through QEMU's `usb-tablet` (M2.2.6; spec 0010, ADR 0022). `kernel/src/pci.rs` scans bus 0 through 0xCF8/0xCFC, logs one line per function, finds the PIIX3 UHCI controller (`8086:7020` at 0:1.2, class `0c.03.00`), enables I/O and bus mastering and takes BAR4 (`0xc040` under QEMU). `kernel/src/usb.rs` resets the controller (`HCRESET`, `FLBASEADD`, `FRNUM`, run/configured/maxp 64), resets and enables the port (QEMU needs the explicit `EN` on every PORTSC write), and enumerates at address 1 with control transfers over static QHs/TDs: device descriptor (`0627:0001`, bcdUSB 0200, maxp 8), `SET_ADDRESS(1)`, configuration (32 bytes: HID interface 3/0/0, endpoint `0x81` maxp 8 interval 10), `SET_CONFIGURATION(1)`, HID `SET_IDLE(0)`, and a 64-byte report-descriptor read that verifies the absolute 16-bit X/Y shape (descriptor declares 74 bytes). The measured report is buttons (bits 0–2), X LE16, Y LE16 (both `0..=32767`, top-left origin) and a wheel byte; it is scaled to `0..=w-1`/`0..=h-1` with `(2*v*(w-1)+32767)/65534` and applied with `gfx.set_pointer_absolute` (clamped, idempotent, old/new cursor rectangles only). One self-linked interrupt-IN TD is polled in the service opportunity and idle loop; NAK leaves it active, completion re-arms it with the next toggle, and a transfer error falls back to PS/2. PS/2 motion is ignored while the tablet is ready; `mouse::ready()` and `gfx::set_pointer_source` keep the fallback. `syslib.pointer_source()` is builtin 26 (0 none / 1 PS/2 / 2 tablet; ABI v1 stays 75 opcodes). Static `.bss` cost is 4096 bytes for the frame list plus 240 bytes of QH/TD/buffers. `xtask run` adds `-usb -device usb-tablet` (`--no-tablet` for the negative); `scripts/tablet_qmp.py` injects QMP absolute events and checks guest pixels. Boot: `pci:` lines, `usb: UHCI ...`, `usb: USBSTS ... PORTSC1 ... PORTSC2 ...`, `usb: tablet 0627:0001 addr 1 (abs X/Y)`, enumeration 76–77 ms under TCG; without the device `usb: no tablet (no device); PS/2 only` and `pointer_source` 1. QMP cases: (16384,16384)→512,384; (32767,32767)→1023,767; (0,0)→0,0; (0,32767)→0,767; (32767,0)→1023,0; (8192,16384,left)→256,384,1; all 7/7 on `--cores 4` and `--cores 1`. Regressions `mouse`, `desktop`, `text`, `frames`, `streams`, `realtime` pass in the same boot. Q49's burst loss and host scale mismatch are resolved for the tablet; M2.2.7 (aux IRQ12) remains for the relative fallback. |
| 2026-11-16 | Keyboard key events and the event queue (M2.2.3–M2.2.5; spec 0010 I18/I19/I29–I31, spec 0003, spec 0008). `arch/x86_64/src/keyboard.rs` now drains each controller byte once and reports a console byte and a `KeyEvent` together: a pure `decode` maps set 1 to a stable key code (unshifted ASCII, letters uppercase, or `abi::key` `0x100` codes for Escape/Backspace/Tab/Enter/arrows/Home/End/Page/Insert/Delete/F1–F12/modifiers), the text under Shift/Caps/Ctrl, and the Shift/Ctrl/Alt/Caps state; the `0xE1` Pause tail is skipped. `decoder_self_check` feeds canned scancodes through the same function at boot (`keyboard: decoder ok`). `kernel/src/event.rs` owns one 64-event machine-wide FIFO; a full queue drops the newest event and increments a monotonic counter, and an insertion drops the queue lock before waking every `WaitFor::Input` task. `gfx` enqueues `PointerMove`/`PointerDown`/`PointerUp` on pointer transitions (changed button bits only), so `inject_pointer` events are deterministic. `EventKind` (`PointerMove`/`PointerDown`/`PointerUp`/`KeyDown`/`KeyUp`) and `Event` (`kind,x,y,code,window`, 40 bytes) are predeclared at `abi::layout::event`; key events pack `text \| modifiers << 8 \| key code << 16` (`abi::key`). Builtins 27–31 (`next_event`, `poll_event`, `inject_event`, `event_drops`, `event_flush`) add no opcode; `next_event` blocks with `WaitKind::Input`, and `sched` re-checks the queue after the block. `samples/apps/events` + `events_poke` prove the surface, the newest-six-of-seventy overflow and a genuinely blocked wake (`events: ok` on `-smp 4` and `-smp 1`); `mouse`, `desktop`, `text`, `frames`, `streams`, `deep`, `utf8`, `realtime` and `cores` still pass, and `scripts/tablet_qmp.py` stays 7/7. Host tests: 301 (abi 14, compiler 134, interpreter 94, langhost 5 plus doctest). |
| 2026-11-16 | PS/2 aux IRQ12 (M2.2.7; spec 0010 I1/I14/I15/I32/I33, ADR 0023). `arch/x86_64/src/ioapic.rs` splits the `0xFEC00000` 2 MiB page once, marks the register page `PWT \| PCD`, reads `IOAPICVER` (version `0x20`, 24 entries) and programs redirection entry 12 as fixed/physical/active-high/**level**/unmasked to the boot core's APIC id on vector `0x2C`; `idt::init` installs the `irq_aux` gate and the stub calls `aux_irq` → `mouse::on_irq`. The handler drains at most 64 aux bytes, pushes them into a 1024-byte SPSC atomic ring (`AtomicU8` slots, producer head, consumer tail under the decoder lock), counts interrupts/bytes and EOIs only the local APIC; it takes no kernel lock and prints nothing. `mouse::poll` now drains the ring and decodes it in the service opportunity; the direct controller drain is the bounded backstop and is not executed while IRQ12 is active, so an aux byte has exactly one reader (this also removes the status/data read race across cores). `mouse::enable_irq` stops reporting (`0xF5`), re-reads the configuration, re-enables reporting (`0xF4`) and writes `config \| 0x02` **last**, because once bit 1 is set the handler would steal the `0xF4` ACK; the configuration value is written to the data port (the previous code wrote it to the command port, so bit 1 never persisted). Boot: `ioapic: version 0x20, IRQ12 -> vector 0x2c on apic 0 (level)`, `mouse: aux IRQ12 enabled (config 0x41 + aux irq, ...)`, one-time `mouse: aux IRQ12 delivered N interrupt(s), M byte(s)`; absent/unusable IOAPIC or a failed write logs `... polling` and keeps the old path. `scripts/mouse_burst_qmp.py` (with `--no-tablet`) clamps at x=0 and injects 300×(+2) as one QMP batch: 600/600 px on `-smp 4` and `-smp 1`; the polled HEAD is also 600/600 headlessly because QEMU 10.2.2 accumulates PS/2 deltas in `mouse_dx` and defers packets, so the historical host-window 346/600 is not reproducible through QMP (recorded in Q49). Regressions `events`, `mouse`, `desktop`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on `-smp 4` and `-smp 1`; `scripts/tablet_qmp.py` is 7/7 and `--no-tablet` reports `mouse: ok`; 301 host tests. |
| 2026-11-16 | Spec 0011 "Windows" accepted (M2.3.0; ADR 0024). The window model is fixed before implementation: a window is a record in a 16-entry kernel table with monotonic `int` ids (`0` invalid, never reused); `window_open(x, y, w, h, title, var id)` takes the frame origin and the content size, so the frame is `(w + 2, h + 17)` with a 1-px border and a 16-px title bar; the z-order is bottom-to-top with exactly one focus, `open`/`raise` focus, closing the focused window falls back to the topmost live one, and `Task::reclaim` closes a task's windows on every destruction path; `close`/`move` are owner-only (`Invalid` for a live foreign window) while `raise` is allowed to any task; limits are 16 windows, a 64-byte title truncated at a code-point boundary, and an 8×8 minimum content, with the frame origin clamped on screen; geometry is read through the predeclared `Rect` record (`x, y, w, h: int`, 32 bytes, `abi::layout::rect`); the shadow clip stays service-owned (internal save/narrow/restore, no application primitive) and `Expose` asks for the whole content rectangle (M2.3.2/M2.3.3). Disabled graphics make `open`/reads `Invalid`, `close`/`raise`/`move` `NotFound` and `focus` 0. Spec 0011, ADR 0024. |
| 2026-11-16 | M2.3.1 window records and lifecycle (spec 0011, ADR 0024). `kernel/src/window.rs` owns a 16-entry table (`MAX_WINDOWS`) with monotonic `u64` ids behind one `SpinLock`: `open` validates the 8×8 content minimum and screen fit, clamps the frame origin, truncates the 64-byte title at a code point, appends to the top of the z-order and focuses; `close`/`move_to` are owner-only (`Invalid` for a live foreign window), `raise` is any task's and focuses, `close_task` removes a terminating task's windows with the topmost fallback; the frame is `(w + 2, h + 17)` and the content `(x + 1, y + 16)`. `Task::reclaim` calls `window::close_task` on every destruction path, before the regions are freed. Builtins 32–38 (`window_open` 6→1, `close` 1→1, `raise` 1→1, `move` 3→1, `frame_rect`/`content_rect` 2→1 writing a 32-byte `Rect`, `focus` 0→1) with disabled-service `Host` defaults, compiler signature + `Rect` checks, and interpreter arm tests; `Rect` is predeclared (record id 2, `abi::layout::rect`, size 32) and cannot be redeclared. `gfx` gained the kernel-internal `set_clip`/`reset_clip` (no application binding) and a pre-console clip self-check; `window::self_check` runs the policy on a scratch table at boot. Proof: `samples/apps/windows` + `windows_child` (a child opens its own window, is refused `close`/`move` on the parent's, then exits and its window disappears with the focus fallback) prints `windows: ok` on `-smp 4` and `-smp 1`; boot prints `graphics: clip ok`, `window: rules ok`. 312 host tests (abi 15, compiler 139, interpreter 113, langhost 45, including doctests). Regressions `events`, `mouse`, `desktop`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on both core counts; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py --cores 1 --batch 300` 600/600. Chrome, damage, damage-union `present` (M2.3.2) and `Expose` routing (M2.3.3) are not implemented. |
| 2026-11-16 | M2.3.2 window composition and repair (spec 0011, W11; ADR 0020/0024). `kernel/src/window.rs` records damage on every mutation in two bounded 32-rect lists: `Erase { rect, covers_from }` (desktop restore, with a per-entry z-order coverage limit so an opened window's whole frame starts as desktop, a moved window's new frame subtracts only windows above it, and a closed/moved-away frame subtracts every live window) and a chrome rectangle list. One synchronous `repair` under the table lock (window → graphics, no path takes graphics then the table) resets the clip, paints the base white and the `(X + Y)` black dither in each erase's visible parts, then redraws the chrome of every window whose frame intersects the damage, bottom-to-top, clipped to the exact visible parts (frame minus higher frames) intersected with the damage, and presents the bounding-box union once (the cursor is composited as before). The chrome is service-drawn: a 1-px black outer border, a 16-px title bar (white with 1-px black stripes when focused, plain `0xCCCCCC` when not), an 11×11 close box at `(x+4, y+3)`, an 8×8 centred title truncated to the band and its own fill, a separator at the last title row; the content rectangle is never touched. `move` to the same origin and every refused call record nothing; `close_task` accumulates all removed frames and repairs once. Boot adds `window: paint ok`: `paint_self_check` proves list merging, visible-part subtraction (area-exact, never touching the subtracted frame) and the damage each lifecycle operation records, all on scratch state. Proof: `samples/apps/windows_demo` composes three overlapping windows (Alpha/Beta/Gamma) with distinct content colours, moves Beta and raises Alpha, repaints contents and rotates the z-order so every chrome is repainted in its visible parts, checks eight chrome/content pixels, prints `windows_demo: checks ok` / `windows_demo: ready`, repaints after the console scroll and holds 15 s as a realtime task (heartbeats; fallback short hold if admission is full) before `windows_demo: ok`. `scripts/windows_screenshot_qmp.py` boots headless without a tablet, runs the demo, waits for ready, and captures the framebuffer with QMP `screendump` (PNG, PPM fallback) to `/home/sinan/Desktop/igis-windows.png` (1024×768, 11078 bytes). 313 host tests (abi 15, compiler 139, interpreter 113, langhost 46, including doctests). Regressions `events`, `mouse`, `desktop`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores`, `windows` pass on `-smp 4` and `-smp 1`; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py --cores 1 --batch 300` 600/600. Expose, event routing and `window_present` remain M2.3.3. |
| 2026-11-16 | M2.3.3 event routing, `Expose` and `window_present` (spec 0011, W12/W16/W17; spec 0010). `abi::EventKind` gains `Expose = 5` (compiler predeclared variants, `from_ordinal`, layout tests). Producers (`event::push_pointer`, `push_key`) still write `window = 0` because the pointer path runs under the graphics lock and the repair holds window → graphics. The kernel host routes on `poll_event` with no graphics lock: `window::take_expose(current)` first (topmost pending window of the caller, flag cleared, 40-byte Expose with `window = id`, `x = y = code = 0`), otherwise `event::poll`; a `PointerDown` is hit-tested against the topmost frame, `window::route_click` raises/focuses and repairs it (window → graphics) and the event names it; other pointer/key events name `window::focus()`; an event with a non-zero `window` (an injected `Expose` or addressed injection) is passed through. `Table::repair` marks one coalesced expose on every window whose frame intersects the chrome damage before painting and returns whether it did; wrappers drop the window lock and then call `task::wake_input`, and the scheduler's `WaitKind::Input` block re-check also tests `window::has_expose(task_id)`, closing the empty-read/block race. `close_task` only records damage and the final focus title when it actually removed a window, so a task that owns none cannot spuriously expose the focused window. `syslib.window_present` is builtin 39 (1 → 1, owner-only; `NotFound` unknown, `Invalid` foreign/disabled) and presents the content minus higher frames part by part with `set_clip`/`present`/`reset_clip`; `syslib.present` remains the generic primitive. Compiler signature + tests, interpreter arm + tests, disabled-service `Host` default `Invalid`. `window: route ok` (`route_self_check`) checks expose marking, owner isolation, topmost-first take order, hit-testing and expose loss on close on scratch state. Proof `samples/apps/windows_events` (+ `windows_events_child` for foreign expose/present refusal and `windows_events_open` for close-on-termination, using `stdlib.parse_int_into` for the parent id): pointer move to the focus, click-to-raise-before-delivery, key routing, Expose fields and a repaint with `window_present`, C-above-A visible-part repaint with chrome/content checks, foreign isolation, child close with focus fallback and expose; prints `windows_events: ok` on `-smp 4` and `-smp 1`. Boot lines `graphics: clip ok`, `window: rules ok`, `window: paint ok`, `window: route ok`; `windows`, `windows_demo` still pass. 316 host tests (abi 15, compiler 140, interpreter 114, langhost 47, including doctests). Regressions `events`, `mouse`, `desktop`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores`, `windows`, `windows_demo` pass on both; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py --cores 1 --batch 300` 600/600. M2 policy: a client that ignores an `Expose` leaves stale content and is not closed (W18); M2.3.4 is the desktop shell, M2.3.5 the two-app/drag proof. |
| 2026-11-16 | M2.3.4 desktop shell and kernel text windows (spec 0012, ADR 0025; spec 0011 W19/W20). `kernel/src/console.rs` is rewritten: after `gfx::init` it paints the white + `(X + Y)` dither desktop and opens two owner-`0` windows — `Terminal` at `(8, 26)` and `System Log` beside it — with content derived from the reported screen (62×89 cells at 1024×768, 16 KiB grid cap each, scale-1 glyphs, black on white / light grey). `println!`/`print!` feed the log; `core.write` and the line-discipline echo feed the terminal; both still mirror every byte to COM1 and `core.read_line` is unchanged. Each grid has its own cursor and per-window scroll (`copy_within`, clear the bottom row, repaint); a cell is drawn and presented only in the intersection of the cell, the content rectangle and the window's visible parts, using the new **explicit-clip** helpers `gfx::draw_cell`/`gfx::present_within` (`gfx::Clip`, `Screen::clipped_by`/`put_in`/`fill_in`/`glyph_in`/`present_in`) and never the shadow's global clip, so a long grid repaint cannot clip another task's drawing. `console::pump` drains `window::take_expose(0)` at the end of `console::poll_input` and repaints the matching grid; order stays `CONSOLE → WINDOW → SCREEN` and the repair never calls the console. `console::route_self_check` writes `console: terminal ok` through `write_bytes` and `console: log ok` through `_print`, checks both grids and a foreground/background glyph pixel with `get_pixel`, clears them, and `kmain` prints `console: route ok` (or `console: serial only`). The whole-screen `gfx::console_clear`/`console_glyph`/`console_scroll` and `Screen::scroll` are removed. `window::open` admits owner `0` (task ids start at 1), `window::info`/`Table::info` return a topmost-first snapshot, `window::visible_content_parts` serves the console, and `self_check`/`route_self_check` cover owner 0 and enumeration order. `syslib.window_info(index, var id, var rect, var title[64])` is builtin 40 (`(4,1)`, no opcode): the interpreter validates the title destination (cap 64 compile-checked in `compiler/src/codegen.rs`, region-bounds-checked in `interpreter/src/machine.rs`), writes id/rect/length+title only on `Ok`, and the disabled `Host` default is `None` → `NotFound`. `samples/apps/desktop_shell` (menu bar: Apple square, File/Apps/Windows, right-aligned clock, 22 rows; one `Desktop` window at `(600, 72)`; File lists windows into the terminal, Apps spawns `clock` with `core.spawn`, Windows raises the terminal, Apple raises the shell; check mode injects a pointer-down per item; normal mode promotes realtime, prints `desktop_shell: ready`, pumps `next_event` and heartbeats; it never calls `syslib.clear`). `samples/apps/{events,windows,windows_events}` record the boot focus baseline (the kernel windows exist) and `events` uses the menu-bar row `(40, 10)` so a click hits no window; `scripts/desktop_screenshot_qmp.py` captures `/home/sinan/Desktop/igis-desktop.png` (1024×768, ~31 KB) through QMP `screendump`, and the harness samples nothing. 320 host tests (abi 15, compiler 141, interpreter 117, langhost 48, including doctests); `cargo xtask build`/`image` clean. Boot on `-smp 4` and `-smp 1`: `console: terminal ok`, `console: log ok`, `console: route ok`, `graphics: clip ok`, `window: rules ok`, `window: paint ok`, `window: route ok`; `run desktop_shell check` → `desktop_shell: ok`, `run desktop_shell` → `desktop_shell: ready`. Regressions `events`, `mouse`, `desktop`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores`, `windows`, `windows_demo`, `windows_events` pass on both; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py --cores 1 --batch 300` 600/600. Remaining: M2.3.5 (two apps side by side, focus switch, raise, drag, expose redraw headless). |
| 2026-11-17 | M2.3.5 two-application proof (spec 0011; spec 0007 Sch12; spec 0012 D3). `samples/apps/windows_proof` spawns `windows_proof_a` and `windows_proof_b` (separate tasks, one window each) and owns a third `Proof Control` window; a child reads the control window's frame `y` through `window_info` as a persistent command stage, because only `window_raise` is cross-task writable and the shared event queue cannot carry an addressed command reliably. The parent raises the control (any-task raise) to establish a non-app focus, then injects real pointer clicks over A and B (`inject_pointer` clamp→move→press→release); the poll-time routing raises/focuses before delivery, and the proof asserts `window_focus()` and the topmost index plus the striped/grey title bar, not which task received the event. Stage 1: A performs four owner `window_move` calls; the proof waits for the final frame and checks the new content/border and that the old area is white again (the terminal below is repainted by `console::pump`). Stage 2: B (topmost) moves over A; A takes its owner-only whole-content `Expose`, repaints only the part left of B's frame (M2 has no per-task clip) and presents; the overlap shows B, A's visible strip and border stay A. Stage 3: B moves back; A takes the new expose and repaints the previously covered content (checked at a pixel that was B's), and the vacated log/terminal area is restored. Stage 4: both children close their windows and exit `Ok`, acknowledged by `core.wait`; the control closes and the focus falls back to the entry baseline. Two prerequisites fixed: `task::claim_class` now scans from a global `NEXT_CLAIM` cursor and stores the claimed slot + 1 (the old always-from-slot-0 scan starved the higher-slot children on `-smp 1`, leaving the proof stuck at "both app windows exist"); and `window` carries a visible-geometry `generation` bumped by open/close/raise/move/close_task, which the console's `paint_cell`/`repaint` read before `visible_content_parts` and compare after painting, retrying (4×) with fresh parts—the proof reproducibly caught the old log-repaint overwriting B after B had moved above it. `run windows_proof` → `windows_proof: ok` on `-smp 4` and `-smp 1`; `windows_proof shot` prints `ready` and holds 3 s; `scripts/windows_proof_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-m23-proof.png` (1024×768, 30901 bytes). 323 host tests (abi 15, compiler 141, interpreter 117, langhost 51, including doctests); `cargo xtask build`/`image` clean; boot self-checks unchanged; regressions `desktop_shell` (check), `windows`, `windows_events`, `windows_demo`, `events`, `mouse`, `desktop`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on both; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py --cores 1 --batch 300` 600/600; desktop/windows screenshots still 1024×768. Pointer-driven continuous drag remains M2.4. |
| 2026-11-17 | M2.4.0 `stdlib` UI layout and chrome layer (spec 0003 "UI layout and chrome"; spec 0008; spec 0009 G19; ADR 0026). The embedded library now says `uses core, syslib;` and adds 18 ordinary-language helpers with no new opcode, builtin, `state`, record, sum or user enum: metrics `ui_text_width` (code points × 8 via `utf8_len`), `ui_text_height` 8, `ui_line_height` 16, `ui_content_inset` 8, `ui_title_bar_height` 16, `ui_close_box_size` 11, `ui_text_center_x`/`_y`; palette `ui_black` 0x000000, `ui_white` 0xFFFFFF, `ui_gray` 0xCCCCCC, `ui_focus` 0xFFFFFF, `ui_accent` 0x000080 (functions because `stdlib` constants are not exported); client chrome `ui_frame` (1-px black outline), `ui_title_bar` (frame-origin geometry, white/striped focused or plain 0xCCCCCC interior, 11×11 close box at `(x+4, y+3)` when the interior is at least 14 px, code-point-safe 64-byte centred title with its own band fill, separator at `y+15`, `w < 3` → `Invalid`), `ui_close_box` (outline only), `ui_separator`, `ui_center_text` (left/top aligned when it does not fit). The title uses a local `string[64]`; the helpers never call the window service, so the service's own chrome is unchanged. The library source is 35,647 B and needs 1,157,496 B of compile scratch, so `MAX_ARENA_BYTES` rose from 1 to 2 MiB (provisional cap; `compile_into_reports_its_caps` and the cost test updated). `samples/apps/ui_layout` opens a window at `(120, 120)` with content 360×220, fills it, draws a framed dialog with a focused title bar, a centred "OK" button, an unfocused bar and an accent swatch, calls `window_present` and checks 15 shadow pixels (content white, top/bottom borders, stripe on/off, separator, close box outline/interior, unfocused fill/no-stripe/box, button border/interior/glyph `0x1C` bit 2, accent) before closing; it prints `ui_layout: ok` on `-smp 4` and `-smp 1`. Without graphics it checks the metrics/palette and that all five drawing helpers return `Invalid`, printing `ui_layout: host ok` (the `langhost` test asserts it). Tests: compiler pins the 39 library functions and an app's use of every helper, and checks a record/sum argument is still rejected across the unit; a langhost fake host records the exact title-bar call sequence (background, seven stripes at rows 22..34, box, separator, band, text at `(62, 24)`) and the metrics output. **328 host tests** (abi 15, compiler 143, interpreter 117, langhost 53, including doctests), `cargo xtask build`/`image` clean; boot self-checks unchanged; `ui_layout: ok`, `windows_proof: ok`, `desktop_shell: ok`, `windows: ok`, `windows_events: ok`, `windows_demo: checks ok/ready/ok`, `desktop`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on `-smp 4` and `-smp 1`; `mouse: ok` in its own boot and through `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py` 600/600. Note: running `mouse` after a long window-app sequence can fail its background-pixel check because its whole-screen `syslib.clear` races a console `Expose` repaint on another core; that is the pre-existing full-screen-clear limitation (spec 0012), not an M2.4.0 regression, and the QMP harness runs it in a fresh boot. No screenshot for this slice: the host and kernel pixel checks are the proof. M2.4.1 string editing is next. |
| 2026-11-17 | M2.4.1 `stdlib` string editing and selection (spec 0003 "String editing", SE1–SE7; spec 0005 Q44). 13 ordinary-language helpers with no new opcode, builtin or `state`: `str_boundary`, `str_cursor_clamp`/`left`/`right`/`home`/`end`, `str_insert_into`, `str_delete_into`, `str_backspace`, `str_selection_normalize`/`all`/`collapse`/`replace`. Positions are byte offsets and both ends of an insert/delete range must be code-point boundaries (`Invalid`, text untouched); a mutator stages the result in a local `bytes[256]`, converts through `core.substr_into` (strict UTF-8) and publishes one whole-buffer copy, so no partial buffer is ever visible. The 256-byte working capacity returns `CapacityExceeded` without a write (delete never grows, so there it only reports an incoming length above 256). Cursors clamp (negative → 0, past the end → the length, mid-code-point → that code point's first byte) and move whole code points; backspace at 0 is an `Ok` no-op; the selection is the scalar pair `start`/`stop` (normalize clamps and orders, select-all, collapse, replace). `samples/apps/text_edit` proves ASCII and 1-/2-/3-/4-byte code points, every rejection and capacity path and the selection helpers, printing `text_edit: ok` on `-smp 4` and `-smp 1` and the same transcript on `langhost`; the library is 46,933 B source / 32,600 B code / 1,319,272 B arena (52 functions, 2 MiB cap). 330 host tests (abi 15, compiler 144, interpreter 117, langhost 54). Q44 narrows: the language side exists; the kernel keeps `core.read_line` and its 4-line ring until the terminal window (M2.5.5). |
| 2026-11-17 | M2.4.2 `stdlib` controls (spec 0003 "UI controls"; spec 0008 caps). 32 ordinary-language helpers with no new opcode, builtin, record, sum, user enum, generic or `state` (84 `stdlib` functions total): `ui_rect_hit`, `ui_focus_ring` (dotted 1-px inset perimeter), `ui_focus_next` (wrapping; `count <= 0` → 0), the packed-key decoders (`ui_key_text`/`modifiers`/`code` plus `is_backspace`/`tab`/`enter`/`left`/`right`/`up`/`down`/`home`/`end`/`delete`), a button (white face, gray pressed face, black border, centred cut label, one-pixel pressed inset, inset focus ring, `ui_button_hit`, `ui_button_pressed` = held and released inside), a checkbox (11×11 box, seven-pixel black check mark, label six pixels right, `ui_checkbox_hit` on the box, `ui_checkbox_toggle`), a text field (`ui_text_field(x,y,w,h,text,cursor,scroll,sel_start,sel_stop,focused)` draws the visible slice from a code-point-clamped byte scroll offset — at most 64 bytes and `(w-6)/8` code points — an accent selection band with white text, a caret when visible, an inset ring; never mutates `text`; `ui_text_field_reveal` is the horizontal ensure-visible), a vertical scrollbar (white track, gray thumb with a black outline, thumb at least 8 px, `ui_scrollbar_clamp` and `ui_scrollbar_hit` = 0 outside / 1 page up / 2 page down / 3 thumb), and a list (`const array[string[64], 8]`, count 0–8, 16-px rows, accent selected row, `ui_list_rows`, `ui_list_hit`, `ui_list_ensure_visible`, `ui_list_move` clamped without wrapping). Too-small geometry is `Invalid` (`ui_button`/`ui_text_field` need 9×10, `ui_scrollbar` 5×5, `ui_list` 4×4); disabled graphics draw nothing while the pure helpers keep working; focus rings stay inside the control (no per-task clip in M2). The app owns the event loop and state; there is no widget object, callback or pump. Proof `samples/apps/ui_controls` opens a window, draws all five controls, injects pointer/key events and checks the pressed face, check mark, caret, accent selection, thumb travel, list selection, focus rings and Tab wrap with `syslib.get_pixel` — `ui_controls: ok` on `-smp 4` and `-smp 1`, `ui_controls: host ok` on `langhost`; `langhost/tests/e2e.rs` records the exact drawing sequence. The source cap rose 64 → 128 KiB (library 72,426 B) and `MAX_ARENA_BYTES` 2 → 4 MiB (2,428,888 B), spec 0008 updated; library code 54,704 B. 333 host tests (abi 15, compiler 145, interpreter 117, langhost 56); `ui_controls shot` plus `scripts/ui_controls_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-controls.png` (1024×768, 32967 bytes). Menus (M2.4.3) are next. |
| 2026-11-17 | M2.4.3 `stdlib` menus (spec 0003 "UI menus"; spec 0008). 15 ordinary-language helpers with no new opcode, builtin, record, sum, user enum, generic or `state` (99 `stdlib` functions total): `ui_menu_bar_height`, `ui_menu_is_separator`, the `uint` masks `ui_menu_bit`/`has`/`set`, `ui_menu_selectable`, `ui_menu_first`, `ui_menu_open`/`close`, `ui_menu_move`, `ui_menu_key`, `ui_menu_bar`/`ui_menu_bar_hit` and `ui_menu_dropdown`/`ui_menu_hit`. The bar is 22 px with an inverted active cell and a black bottom rule; the pull-down uses 16-px rows, a white face, a black frame, a check column at `x+8`, labels at `x+22`, right-aligned shortcuts at `x+w-8`, an accent highlight (white text), gray disabled labels/checks, and a 1-px inset line for a `-` separator. Checked and disabled are independent masks (item indices 0..63); the highlight never changes them, and a mask is menu-scoped by the caller. `ui_menu_move` skips separators and disabled rows and clamps without wrapping; `ui_menu_key` maps a packed `Event.code` to 0 none / 1 up / 2 down / 3 left / 4 right / 5 activate / 6 close (Escape always closes, Enter activates and arrows move/switch only while open). Too-small geometry is `Invalid`, disabled graphics draw nothing while the pure helpers work, and clipping is `syslib`'s. Proof `samples/apps/ui_menus` opens a window, draws File/Edit/View, opens a pull-down with a checked item, a disabled item and a separator, moves the highlight across both, activates a checked item, toggles its check mark, refuses a disabled click, closes with Escape, switches menus with Left/Right and checks pixels with `get_pixel` — `ui_menus: ok` on `-smp 4` and `-smp 1`, `ui_menus: host ok` on `langhost`; `langhost/tests/e2e.rs` records the exact drawing sequence. The library is 90,615 B source / 69,280 B code / 2,720,800 B arena; 337 host tests (abi 15, compiler 147, interpreter 117, langhost 58, including doctests); `ui_menus shot` plus `scripts/ui_menus_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-menus.png` (1024×768, 27590 bytes). Regressions `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass; `windows_proof` passes in its own boot (its step-23 terminal-restore pixel is a pre-existing sample sensitivity, reproduced on `92b140c`); `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py` 600/600. Dialogs (M2.4.4) are next. |
| 2026-11-17 | M2.4.4 `stdlib` dialogs (spec 0003 "UI dialogs"; spec 0008). 10 ordinary-language helpers with no new opcode, builtin, record, sum, user enum, generic or `state` (109 `stdlib` functions total): `ui_message` (word wrap: 8-px cells, 16-px lines, break at the last space, hard-break an unbroken run, `\n`, never split a code point, at most `h / 16` lines), the button-row geometry `ui_dialog_button_width` (`max(72, width + 24)`), `ui_dialog_button_left` (cancel right-aligned 8 px from the edge, default 12 px left of it) and `ui_dialog_button_top` (`y + h - 8 - 24`), `ui_dialog_button` (a `ui_button` at rest plus the default action's solid inset double border at +2; the dotted focus ring sits at +3), `ui_alert`/`ui_alert_hit` (white interior, frame, focused title bar, wrapped message, default/cancel pair; focus slots 0 default / 1 cancel; the 11×11 close box returns cancel) and `ui_input_dialog`/`ui_input_dialog_hit` (prompt at `y+24`, a `ui_text_field` at `y+44` spanning `w-16` and 22 tall, OK/Cancel; focus slots 0 field / 1 default / 2 cancel; the close box returns cancel) and `ui_dialog_key` (Enter 0x103 → 1 default, Escape 0x100 → 2 cancel only when `has_cancel`, Tab → 3 focus next, Shift+Tab → 4 focus previous, everything else 0). Too-small geometry is `Invalid` (alert `h >= 80`, input dialog `h >= 106`, the two buttons must fit with 8-px insets and a 12-px gap) and too-small hit tests are -1; disabled graphics draw nothing while the pure helpers work. The application owns the modal loop (`syslib.next_event`/`poll_event`), the focus slot, the result and the text buffer; the input dialog takes `const string[0]` plus the cursor/scroll/selection scalars and never mutates the buffer, and editing stays the M2.4.1 helpers (no second editing API). Proof `samples/apps/ui_dialogs` opens an alert (frame, focused stripes, two message lines, double border, Tab/Shift+Tab focus, Enter result 1, Escape result 2, close-box cancel) and a text-input dialog (prompt, field, caret/glyph/selection pixels, typed text, Backspace, Home/End/Left/Right through `str_*`, Tab field→OK→Cancel→field, a printable key ignored while a button is focused, Enter and a pointer click commit, Escape cancels with the buffer untouched) — `ui_dialogs: ok` on `-smp 4` and `-smp 1`, `ui_dialogs: host ok` on `langhost`; `langhost/tests/e2e.rs` pins the exact outline/text sequence and the key/result helpers. The library is 105,673 B source / 79,824 B code / 2,966,496 B arena; **341 host tests** (abi 15, compiler 147, interpreter 117, langhost 60, including doctests); `ui_dialogs shot` plus `scripts/ui_dialogs_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-dialogs.png` (1024×768, 29544 bytes). Regressions `ui_menus`, `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on both core counts; `windows_proof` passes in its own boot (its step-23 terminal-restore pixel remains a pre-existing sample sensitivity); `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py` 600/600. Icons (M2.4.5) are next. |
| 2026-11-17 | M2.4.5 `stdlib` icons and the desktop interaction layer (spec 0003 "UI icons and desktop"; spec 0008 caps). 16 ordinary-language helpers with no new opcode, builtin, record, sum, user enum, generic or `state` (125 `stdlib` functions total): `ui_icon`/`ui_icon_size`/`ui_icon_row_bit` for 32×32 mono bitmaps given as `array[uint, 32]` row masks (row 0 top, bit 0 the left pixel; one `fill_rect` per maximal set-bit run, so at most 64 calls; a colour above `0x00FFFFFF` is `Invalid` before drawing, `syslib` clips); `ui_icon_label`; the grid geometry `ui_icon_cell_x`/`_y`, `ui_icon_label_y` (`icon_y + 34`) and `ui_icon_grid_hit` (row-major over `count` valid cells, -1 outside or for non-positive geometry); `ui_double_click` (same target and `now - last <= 400 ms`, inclusive, no state, false on a backwards clock); `ui_icon_grab`/`ui_icon_follow` (offset only inside the 32×32 bitmap, follow = pointer − offset); `ui_selection_normalize` (inclusive `abs + 1` band), `ui_selection_rect` (the dotted `ui_focus_ring` outline, transparent) and `ui_rect_intersects` (positive extents, touching edges excluded); `ui_icon_drop` (-2 inside the trash, else the cell or -1) and `ui_trash_hit`. The four bitmaps (folder, document, terminal, trash) live in the sample, and the app owns the cells, the live/selected flags, the drag origin, the click time/target and the content clamp; a drag cancels the pending double-click. Proof `samples/apps/ui_icons` opens a `Desktop Icons` window, draws a dither desktop with a 2×2 grid and a trash target, double-clicks the document (`ui_icons: open Document`, exactly one open), drags the folder to the empty cell 3 (source cleared, icon redrawn, cell recorded), drags it into the trash (removed, cell cleared), rubber-band selects the remaining document and terminal (accent label bands, removed folder excluded, band outline then cleared), presents and closes — `ui_icons: ok` on `-smp 4` and `-smp 1`, `ui_icons: host ok` on `langhost`; `langhost/tests/e2e.rs` pins the icon run/text/selection drawing sequence and every pure helper. The library is 114,823 B source / 84,920 B code and needs 4,134,600 B of scratch with a minimal app (the `ui_icons` pair needs 5,386,584 B), so `MAX_ARENA_BYTES` rose 4 → 8 MiB (kernel `.bss` included) with spec 0008 and the caps test updated; the source cap stays 128 KiB (16,249 B headroom). **345 host tests** (abi 15, compiler 151, interpreter 117, langhost 62, including doctests); `cargo xtask build`/`image` clean; boot self-checks unchanged; `ui_icons`, `ui_dialogs`, `ui_menus`, `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `desktop`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on `-smp 4` and the UI samples on `-smp 1`; `windows_proof` passes in its own boot (its step-23 terminal-restore pixel is the known sample sensitivity, and step 8 failed once under load then passed on rerun); `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py` 600/600; `ui_icons shot` plus `scripts/ui_icons_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-icons.png` (1024×768, 33991 bytes). The widgets demo (M2.4.6) is next. |
| 2026-11-17 | M2.4.6 widgets demo (spec 0003 "Standard library"; spec 0010). One app and one event loop, `samples/apps/widgets`, composes the whole M2.4 toolkit in a 760×560 client panel: an app-drawn File/Edit/View menu bar with an HH:MM clock and pull-downs (separators, a disabled Quit/Zoom, `ui_menu_move` skipping, checked masks, Left/Right switching, Escape), a button (pressed face, release activation, Space/Enter), a checkbox (click/Space/Enter), a text field (click/Tab focus, typed ASCII, Select All, accent selection, horizontal reveal, a 2-byte `é` inserted/replaced and deleted by Backspace, a long-text scroll and a caret), a vertical scrollbar over a 16-line document (click below pages, Up/Down keys, thumb pixels), an 8-row list (Down + ensure-visible, row hit selection), a compact 2-cell folder/document icon strip with a trash plate (`ui_icon`, grid hit, double-click opens and selection outline/accent label), an alert (default/cancel, Tab focus, Enter always default, Escape cancel) and a text-input dialog (prompt, field, typed edits, Tab field→OK→Cancel, Escape cancel leaves the field untouched, OK click commits the buffer only then), with a status/focus line. The dialogs are a modal mode of the same loop; the app owns every scalar. Check mode sets `auto_present` false and paints only before its pixel probes, drives injected pointer/key events and checks pixels, printing `widgets: ok` on `-smp 4` and `-smp 1`, `widgets: host ok` on `langhost`; `langhost/tests/e2e.rs` adds the host-path test and a composed-sequence test (menu bar/pull-down, every control, icon run, alert and input dialog geometry plus the pure control/key results). No new helper, opcode, builtin or `state` (125 `stdlib` functions); the app source is 57,388 B, the task package 165,424 B of code / 9,608 B state / 25,360 B stack and the pair needs 6,546,928 B of scratch of the 8 MiB cap. **347 host tests** (abi 15, compiler 151, interpreter 117, langhost 64, including doctests); `cargo xtask build`/`image` clean; boot self-checks unchanged; regressions `ui_icons`, `ui_dialogs`, `ui_menus`, `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `desktop`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on `-smp 4` and the UI samples on `-smp 1`; `windows_proof` passes in its own boot; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py` 600/600; `widgets shot` plus `scripts/widgets_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-widgets.png` (1024×768, 25894 bytes). M2.4 is complete; M2.5.1 (read-only file API) is next. |
| 2026-11-17 | M2.5.1 read-only application file API (spec 0013, ADR 0027). Three `core` host builtins (41–43) and no opcode: `fs_list(path, index, var name: string[64], var kind: uint, var size: uint) -> Status`, `fs_read(path, offset, var dst: bytes[256], var read: int) -> Status` and `fs_size(path, var size: uint) -> Status`. `abi::fs` fixes the limits (`PATH_MAX` 256, `NAME_CAP` 64, `READ_CHUNK` 256, kinds 0/1/2) and the three validators; `repl::validate_path` now delegates to the shared `validate_path`, so spawn and file paths cannot drift. The machine validates the path and the root-only M2.5.1 subset (`""`/`"."` for listing, one component with no `/` for read/size), checks the 64-byte name and 256-byte destination regions before the host call, stages the result on its frame and publishes it with one copy only on `Ok`. `Ext2` gains `list_entry(index, name)` (root entries, `.`/`..` excluded, directory order, inode kind/size) and `read_at(name, offset, out)` (streams data blocks, `Ok(0)` at/past EOF, no allocation); the kernel host uses the existing mount, `langhost` implements the same root-only view over `samples/apps` (sorted names) and a bare host keeps `NotFound` defaults. Proof `samples/apps/files` lists the root (52 entries: 51 staged sources plus `mke2fs`'s `lost+found`, reported as kind 1), checks `""`/`"."` listing, `fs_size`, a 559-byte chunked read of `child`, offset 1/last byte/EOF/past-EOF, a missing name with untouched `dst`/`read`, a directory read and subdirectory paths (`Invalid`), and prints `files: ok` on `-smp 4` and `-smp 1` (`files: 6936 B code, 520 B state, 664 B stack`). **362 host tests** (abi 18, compiler 152, interpreter 127, langhost 65, including doctests); `cargo xtask build`/`image` clean; boot self-checks unchanged; regressions `text_edit`, `ui_layout`, `ui_controls`, `ui_menus`, `ui_dialogs`, `ui_icons`, `widgets check`, `desktop_shell check`, `desktop`, `events`, `windows`, `windows_events`, `windows_demo`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on `-smp 4`; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py --cores 1` 600/600. No stdlib change (125 functions) and no compile-cap change. |
| 2026-11-17 | M2.5.3 text editor (spec 0003 "Application buffers above 256 bytes", spec 0013 files, spec 0010 events, spec 0011 windows). `samples/apps/editor` is one 640×480 window with an app-drawn 22-px File menu (Open / disabled Save / Quit), a path + "read-only" line (22 px), a 26-row text view (612 px wide, 76 visible byte columns), a 16-px scrollbar, a status + `Ln`/`Col` line and a caret and accent selection band. The document is one `string[8192]`; `open_path` checks `core.fs_size` first, reads in the API's 256-byte `core.fs_read` chunks into a staged `bytes[8192]` and publishes once with `core.substr_into` (a `bytes` source is the strict UTF-8 conversion), so `NotFound`, a directory (`.`, `lost+found`), a subdirectory path (`child/x`), a file over 8192 bytes (`widgets`, 57,388 B) and invalid UTF-8 each set a status line and leave the previous document and path byte-identical. The M2.4.1 `str_*` mutators stay 256-byte, so editing is one app-local atomic mutator `ed_replace(text, at, count, ins)`: both range ends must be code-point boundaries, the result is staged in a local `bytes[8192]` and published with one copy, `CapacityExceeded` refuses an over-capacity result without a partial write, and `ed_backspace`/`ed_delete_forward` are thin wrappers; the read-only `str_boundary`, `str_cursor_*` and `str_selection_normalize/all` helpers run unchanged on the 8 KiB buffer (SE1–SE7 hold). State is the caret, the scalar selection anchor, `top_line` and a horizontal byte offset; line starts/ends/count and the cursor line are scanned on demand (`line_count`, `line_start_of`, `line_end_of`, `line_of_pos`, `column_of`, `snap_boundary`), `ensure_visible` keeps the caret line in the 26 rows and the byte column in view, and vertical/page movement keeps the byte column with snapping. Keys: Left/Right/Home/End/Up/Down/PageUp/PageDown, Shift variants extending the selection, Backspace/Delete/Enter/Tab (two spaces), printable text from `ui_key_text` through a checked `bytes[2]`→`string`, Ctrl+A select all, Ctrl+O re-read the current path, Ctrl+Q quit, and Ctrl+S which only reports `read-only: no writable filesystem` (the File menu's Save row is disabled; no write primitive exists). Pointer: menu-bar click opens/closes the File pull-down, move highlights selectable rows, click opens/pages, a click in the text area places the caret at the nearest boundary, track clicks page, thumb drag stays deferred. Drawing is client content only (never `syslib.clear`); every frame is complete before one `window_present`, an owner `Expose` repaints the whole content, and the interactive loop blocks in `next_event`. `run editor check` (63 verifies) loads `child`, checks line geometry, all load-error classes, insert/backspace/Enter/Delete, a 2-byte `é` (insert, backspace, boundary and cursor rules), the full-buffer `CapacityExceeded` refusal, invalid-UTF-8 refusal, the read-only rule, vertical scrolling on child's 28 lines and horizontal scrolling on a 100-byte line, an injected `KeyDown` that must arrive with the window id and edit the text, and menu-rule/path-rule/glyph/caret/selection/scrollbar/status pixels with `get_pixel` → `editor: ok` on `-smp 4` and `-smp 1`; the disabled-screen path runs the same logic and prints `editor: host ok` (one new `langhost` test). `run editor shot` opens `child`, prints `editor: ready` and holds 5 s; `scripts/editor_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-editor.png` (1024×768, 30492 bytes). Source 43,834 B, task package 134,176 B code (33 frames), 19,856 B state, 33,416 B stack; image root 54 entries. **364 host tests** (abi 18, compiler 152, interpreter 127, langhost 67, including doctests); no new helper, opcode or builtin (125 `stdlib` functions), no cap change; `cargo xtask build`/`image` clean; boot self-checks unchanged; regressions `clock_window check`, `files`, `widgets check`, `ui_icons`, `ui_dialogs`, `ui_menus`, `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `desktop`, `windows`, `windows_events`, `windows_demo`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on `-smp 4`; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py` 600/600. M2.5.4 (the file browser) is next. |
| 2026-11-17 | M2.5.4 file browser (spec 0013 "The file browser"; spec 0010, spec 0011, spec 0003). `samples/apps/browser` is one 680×480 window with a path/count/`read-only` line, a 26-row app-drawn root listing (an 8×8 folder/file/other marker, the name, the right-aligned inode size and an accent selection band; the eight-item `ui_list` cannot model 55 entries), a `ui_scrollbar`, a 2048-byte preview pane with code-point-safe line clipping and a status line. `core.fs_list` is read from index 0 until `NotFound` into 64 fixed `string[64]`/`uint` arrays; `.`/`..` are excluded by the API. `lost+found` is listed as a folder (kind 1); opening or launching it is refused with a clear status because M2.5.1 has no subdirectory traversal, and a kind-2 entry is shown but not openable. A regular file preview is `core.fs_size` plus 256-byte `core.fs_read` chunks into a staged `bytes[2048]` and one strict-UTF-8 `core.substr_into`, so a missing name, a directory, an unsupported path, a file over the cap and invalid UTF-8 each set the status and leave the old preview byte-identical. Up/Down/PageUp/PageDown/Home/End move the selection (clamped, no wrap), Enter and a double-click preview, Ctrl+L launches and Ctrl+Q quits; a scrollbar track click pages and the selection is kept visible. Launch is a blocking launcher (`core.spawn` then `core.wait`) of a regular source app; a folder or kind-2 entry is refused, and the proof launches `editor check`, which terminates `Ok`, so no child is left running. Drawing is client content only (never `syslib.clear`), one `window_present` per complete frame, and an owner `Expose` repaints the whole content. `run browser check` lists, previews `child`/`text`, exercises every error class, scrolling, a real injected double-click and Enter, checks 14 frame pixels with `get_pixel`, then launches, and prints `browser: ok` on `-smp 4` and `-smp 1`; `langhost` runs the listing/preview/selection logic and prints `browser: host ok` (one new test); `run browser shot` prints `browser: ready` and holds 5 s; `scripts/browser_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-browser.png` (1024×768, 32847 bytes). The source is 33,970 B, the task package 121,688 B of code (30 frames), 10,832 B of state and a 22,608 B stack; the image root lists 55 entries. **365 host tests** (abi 18, compiler 152, interpreter 127, langhost 68, including doctests); no new helper, opcode or builtin (125 `stdlib` functions), no cap change; `cargo xtask build`/`image` clean; boot self-checks unchanged; regressions `editor check`, `clock_window check`, `files`, `widgets check`, `ui_icons`, `ui_dialogs`, `ui_menus`, `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` pass on `-smp 4` and `-smp 1`; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py --cores 1` 600/600. M2.5.5 (the terminal window) is next. |
| 2026-11-17 | M2.5.5 terminal window (spec 0014, ADR 0028; spec 0003/0005/0008). `core.terminal_attach(window_id) -> Status` is host builtin 44 (1 → 1, no opcode; ABI v1 stays at 75): the kernel host supplies the caller's task id, `window::owned_content_rect` checks ownership and reads the content rectangle under `CONSOLE → WINDOW`, the first attach releases the owner-0 boot Terminal through the ordinary close/repair, the grid is cleared, derived from the content rectangle (cols/rows, bounded 128×128) and repainted with the explicit-clip helpers, a repeated attach by the owner is `Ok`, the same owner may rebind, another live task is `Full`, and `console::pump` detaches a terminal whose window disappeared (serial-only until the next attach). `window` gains kernel-internal `owned_content_rect`, `exists` and `take_expose_id`; `pump` pulls the attached terminal's expose by id and the System Log's by owner `0`, follows a moved window by generation, and keeps `CONSOLE → WINDOW → SCREEN`. `console_write`/`read_line` are unchanged; `println!` stays in the System Log. `samples/apps/shell` opens a 560×360 `Terminal` window at `(24, 64)`, attaches before its banner and keeps its loop; `run terminal` prints the id, refuses an unknown id (`NotFound`), scans ink/background pixels, spawns `samples/apps/terminal_probe` (must be `Full`) and prints `terminal: ok`; `run desktop_shell check` and the terminal coexist. `Console::Terminal` gains `owner` and `generation`; `langhost` keeps the `Invalid` default. **368 host tests** (abi 18, compiler 153, interpreter 129, langhost 68, including doctests); `cargo xtask build`/`image` clean; boot self-checks unchanged; `terminal: ok`, the full regression set and `windows_proof` pass on `-smp 4` and `-smp 1`; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `scripts/mouse_burst_qmp.py --cores 1 --batch 300` 600/600; `scripts/terminal_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-terminal.png` (1024×768, 32228 bytes). Image root 56 entries; shell package 6432 B code / 1504 B state / 336 B stack; `stdlib` stays at 125 functions; no cap change. M2.5.6 (boot to the desktop) is next. |
| 2026-11-17 | M2.5.6 boot to the desktop (spec 0012 D9–D11/D19, spec 0014 T14, spec 0002; spec 0001 R15; ADR 0029; M2.5 complete). `repl::boot` now tries `entrypoint` then `shell`; `xtask image` stages `samples/apps/desktop_shell` a second time under the file name `entrypoint` (the unit name stays `desktop_shell`; only the load path differs), and `xtask image --shell` / `xtask run --shell` omit the alias and write `build/igis-shell.iso` (the pre-M2.5.6 boot, used to prove the fallback and to run the event-injecting regression suite). `desktop_shell` gains a fourth direct menu item `Terminal`: the first click `core.spawn`s `shell` (non-blocking) and records the id; later clicks raise the live `Terminal` window instead of spawning a second shell that the one-terminal rule would refuse, or spawn a fresh one after the shell exits. The desktop never attaches the terminal itself and never waits on a child; the shell opens its window and attaches before its banner. A graphics-disabled boot prints `desktop_shell: no graphics` and spawns the text shell, keeping a serial REPL; `check` mode (`shell_launched = true`, since the caller already holds the terminal) additionally verifies the `Terminal` item reuses/raises it. Because the desktop is a permanent consumer of the one machine-wide event queue (spec 0010 I31), an app that also calls `next_event` competes with it; the event-injecting suite (terminal/files/text_edit/ui_*/widgets/clock_window/editor/browser/desktop_shell check/windows/windows_events/windows_demo/events/text/frames/streams/deep/utf8/realtime/cores/windows_proof) was run on `build/igis-shell.iso` on `-smp 4` and `-smp 1` with no failures. `scripts/boot_desktop_qmp.py` boots `build/igis.iso` with no manual `run`, waits for `desktop_shell: ready`, clicks `Terminal` via QMP absolute pointer events, types `terminal`, checks `terminal: ok`, and writes `/home/sinan/Desktop/igis-boot-desktop.png` (1024×768, about 31 KiB on `-smp 4` and `-smp 1`). Boot transcript: `repl: trying entrypoint` → `entrypoint: spawned as task 1` → `desktop_shell: ready` → click → `desktop_shell: launched shell task 2` → `shell> ` → `terminal: ok`; the shell image transcript: `entrypoint: not found` → `shell: spawned as task 2`. The desktop source is 17,289 B, the entrypoint package 14,952 B code (4 frames) / 752 B state / 1,136 B stack; the desktop image root lists 57 entries (56 staged sources plus `lost+found`), the shell image 56. `stdlib` 125 functions, no cap change, no new opcode or builtin; **368 host tests** (abi 18, compiler 153, interpreter 129, langhost 68, including doctests); `scripts/tablet_qmp.py` 7/7 on the shell image, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py --cores 1 --batch 300` 600/600. M2.5 is complete; M2.6.1 (proportional font) is next. |
| 2026-11-17 | M2.6.1 proportional font (spec 0015, ADR 0030; spec 0003/0008/0009/0012). `kernel/src/font.rs` adds `SOURCE: [Source; 95]` (10-column ASCII art + explicit advance for every printable ASCII byte) and a fixed `SpinLock<[Option<Glyph>; 95]>` cache: the first `glyph(byte)` renders the art into 12 row bitmasks and trims the ink to `left`/`width`, so metrics and drawing share one source. The line box is 12 px (baseline 9, caps 2–9, x-height 4–9, ascenders from 1, descenders 10–11, one-pixel stems); advances are `rightmost_ink + 2` with tabular digits 6 and space 4 (`i`/`l`/`.` 3, `f`/`r` 5, most letters 6, `m` 7, `w` 8, `W` 10, `M` 11). `font::self_check` validates all 95 definitions (12×10), every rendered glyph (`advance >= width`, ink in the box), `ii < MM`/`Wi`, the 8-pixel fallback and the line height; boot prints `font: glyphs ok`. Three host builtins: `text_width_prop` (45, 1→1), `text_height_prop` (46, 0→1) and `draw_text_prop` (47, 4→1, no opcode; ABI v1 stays at 75). `gfx::draw_text_prop` draws printable ASCII with the cached glyphs and every other byte as an 8×8 cell at `y + 2` with an 8-pixel advance (blank at `>= 0x80`); the interpreter reuses `resolve_text` for bounds checks, rejects an over-wide colour, and 0/0/`Invalid` is the disabled-screen and host-default contract. `window::draw_chrome` truncates and centres the title by measured width in a 12-row band at `frame.y + 2`; the desktop shell's four labels and `HH:MM` clock use the prop face and derive the hit ranges from the measured widths (`menu_file_x` 24, `apps` 56, `windows` 94, `terminal` 153..194), so `scripts/boot_desktop_qmp.py` now clicks `Terminal` at x = 170. `samples/apps/font` checks exact advances (`i` 3, `M` 11, `ii` 6, `MM` 22, `Wi` 13, `File` 18), the `i` dot/stem and `M` outer stems, the 8×8 `A` path, `é` = 16 with `éA` placing A at +16, off-screen/partial clipping and the prop service title; `langhost` runs its disabled-screen path (`font: host ok`), and a `PropPainter` test records the prop calls. `scripts/font_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-font.png` (1024×768, 33080 bytes) and the boot harness refreshes `igis-boot-desktop.png` (31481 bytes). The console's D3 paint was strengthened while proving `desktop_shell check`: `console::paint_cell`/`repaint` now call `window::paint_visible_parts`, holding `WINDOW` across the paint (`CONSOLE → WINDOW → SCREEN`) instead of the bounded generation retry, which reproducibly overwrote a newly opened window's chrome once on `-smp 4`; `generation` remains for following moves. **374 host tests** (abi 18, compiler 153, interpreter 131, langhost 70, including doctests); `cargo xtask build`/`image`/`image --shell` clean; `font: ok` on `-smp 4` and `-smp 1`; regressions `terminal`, `browser check`, `editor check`, `clock_window check`, `files`, `widgets check`, `ui_icons`, `ui_dialogs`, `ui_menus`, `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores` and `windows_proof` pass (the event-injecting set on `build/igis-shell.iso`; `windows_proof` in its own boot); `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py --cores 1 --batch 300` 600/600. `stdlib` stays at 125 functions and no cap change; M2.6.1 is complete and M2.6.2 (performance) is next. |
| 2026-11-17 | M2.6.2 performance (spec 0016, ADR 0031; spec 0011 W21, spec 0012 D3). **Damage coalescing:** `window.rs` adds a bounded greedy `coalesce` (drop empty/contained, merge overlapping or edge-touching rectangles into their bounding box) used by a new `ChromeList::coalesce` and `EraseList::coalesce` (which merges only within one `covers_from` limit and drops a request contained in one with a higher-or-equal limit, because that one paints a superset; different limits stay separate). `Presentation` is now a list of up to 64 rectangles (2× the damage bound, overflow folded rather than dropped) that is coalesced and presented rectangle by rectangle instead of as one bounding box of all damage. Coalescing runs after `mark_exposes`, so clients are woken only for the exact original damage; the coverage invariant is checked at boot. `window::damage_self_check` proves the generic merge, the erase coverage rule and the coverage of every original rectangle, and measures a scratch diagonal move of a 200×120 window: 4 damage rectangles presented as a bounding box of 510,874 px become 2 rectangles of 55,348 px (89 % less present area); `kmain` prints `window: damage ok (present 4 -> 2 rects, 510874 -> 55348 px)`. **Present batching:** `console.rs` adds a bounded `dirty: Option<Rect>` per `Terminal`; `paint_cell` draws and marks the cell instead of presenting, `write_bytes`/`_print` flush once after their byte run, the line-discipline `echo` uses `write_bytes_pending` and `poll_input` calls `flush_pending` after `pump`, and `repaint` clears the box and presents each visible part once. `Terminal::flush` re-reads the visible parts through `window::paint_visible_parts` (holding `WINDOW`) and copies only the dirty∩visible rectangle from the current shadow; the lock order stays `CONSOLE → WINDOW → SCREEN`, and the byte stream, line discipline and every grid/pixel proof are unchanged. **Measurement:** `samples/apps/perf` (uses `core, syslib`) opens a 320×220 window, draws a complete frame and `window_present`es it 60 times, and injects/polls/repaints 200 key events; it measures both idle and with `realtime` + three `worker` children spawned non-blocking and reaped with `core.wait`, reporting count, total ms and avg/min/max µs. On `build/igis-shell.iso` (representative runs; TCG timings vary between boots): `-smp 4` idle frames 60 total 18–27 ms (avg 300–450 µs), idle events 200 total 17–34 ms (avg 85–170 µs), load frames 60 total 109–121 ms (avg 1.8–2.0 ms, max 6–37 ms), load events 200 total 22–31 ms (avg 110–155 µs); `-smp 1` idle frames 13–14 ms (avg 216–233 µs), idle events 21–27 ms (avg 105–135 µs), load frames 175–177 ms (avg 2.9 ms, max 163–165 ms, the realtime controller claiming first with no quantum preemption), load events 19–23 ms (avg 95–115 µs); 200/200 events delivered in every phase and all children reaped (`perf: ok`). Specs 0011 (W21) and 0012 (D3) amended; spec 0016 and ADR 0031 added. `stdlib` stays at 125 functions (no new helper, opcode, builtin or cap change). **375 host tests** (abi 18, compiler 153, interpreter 131, langhost 71, including doctests); `cargo xtask build`/`image`/`image --shell` clean; boot self-checks now include `window: damage ok (present 4 -> 2 rects, 510874 -> 55348 px)`; the event-injecting suite (`font`, `terminal`, `browser check`, `editor check`, `clock_window check`, `files`, `widgets check`, `ui_icons`, `ui_dialogs`, `ui_menus`, `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores`, `perf`) passes on `-smp 4` and `-smp 1`, and `windows_proof` passes in its own boot on both; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py --cores 1 --batch 300` 600/600; the boot desktop still reaches `desktop_shell: ready` → `terminal: ok` and refreshes `igis-boot-desktop.png` (31777 bytes, 1024×768). The desktop image root lists 59 entries and the shell image 58. M2.6.2 is complete; M2.6.3 (the visual regression harness) is next. |
| 2026-11-17 | M2.6.3 visual-regression harness (spec 0009 "Visual proof", G21; ADR 0032; spec 0011/0015/0016 context). **Deterministic specimen:** `samples/apps/visual` (uses `core, syslib`) opens a window whose frame is exactly the screen — `window_open(0, 0, screen_w - 2, screen_h - 17)` gives `frame = content + (2, 17)` — so the service chrome plus the specimen cover the two kernel text windows (owner 0 log and shell terminal) and every boot line; nothing outside the specimen can appear. It contains no clock, animation, event, host input or `syslib.clear`: a focused prop title bar, prop lines (`Chicago 12 px`, `ii MM Wi`, caps and pangram), explicit `i`/`M` advance checks, 8×8 `A`/digits/lowercase/uppercase lines, a nine-colour swatch row, a white base with the `(X + Y)` dither patch inside a black outline, a framed grey box with centred `OK`, a 60-step 3×3 diagonal raster and 12 alternating black/grey bars. It checks 31 representative shadow pixels (content geometry, border/title/stripe, both fonts, palette, dither parity, outline, raster, bars), presents the content once with `window_present`, prints `visual: ok` then `visual: ready` (printing goes to the covered terminal, so no pixel changes), and holds 5 s with `core.clock()`/`core.heartbeat()` without drawing; `run visual` without `shot` checks and closes the window, and a disabled screen prints `visual: host ok`. The pointer stays at its boot `(0, 0)` (no injection), so the composited cursor is deterministic too. **Harness:** `scripts/visual_regression.py` boots `build/igis-shell.iso` headless with QMP, waits for `shell> `, writes `run visual shot`, waits for `visual: ok` then `visual: ready`, sleeps 0.4 s, captures via QMP `screendump` (PNG, PPM fallback) and decodes RGB with Pillow. The golden is `tests/golden/visual.png` (9,427 B) plus `tests/golden/visual.json` (14,219 B: dimensions, SHA-256 of the raw RGB bytes `3780205234a9d84f0860e38d5891f211424e4f6de2c04a19b01c3452e9e81c9f`, one SHA-256 per 64×64 tile, 16×12 tiles, and a note); a manifest that disagrees with its PNG is a hard error. Exact compare prints `visual: ok (1024x768, sha256 …)`; a mismatch prints the differing pixel count, bounding box, first differing pixel with both colours, and the differing tiles, then exits 1. `--update` is the only writer (canonical re-encoded PNG + manifest); `--tamper` flips one captured pixel in memory and requires the mismatch (exit 0) and `--expect-mismatch` inverts the result; an alternate consistent golden produced a one-pixel diff and exit 1. The identical golden (and PNG file size) matched on `-smp 4` and `-smp 1`. **M2.1.2 resolved** as this host-side whole-framebuffer dump; no kernel serial dump or debug builtin is added (the display surface already carries the presented framebuffer; a serial RLE/hex path would need a new builtin, a parser and unbounded traffic). `langhost` test `the_visual_sample_reports_the_host_path` covers the disabled screen. No new opcode, builtin, `syslib` primitive, kernel table or cap change; `stdlib` stays at 125 functions; the image root grows by the one staged `visual` source (desktop 60 entries, shell 59). **376 host tests** (abi 18, compiler 155, interpreter 131, langhost 72, including doctests); `cargo xtask build`/`image`/`image --shell` clean; the event-injecting regression set (`perf`, `font`, `terminal`, `browser check`, `editor check`, `clock_window check`, `files`, `widgets check`, `ui_icons`, `ui_dialogs`, `ui_menus`, `ui_controls`, `text_edit`, `ui_layout`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `events`, `text 42 hi`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores`) passes on `-smp 4` and `-smp 1`, and `windows_proof` in its own boot; `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py --cores 1 --batch 300` 600/600. M2.6.3 is complete; M2.6.4 (the system menu) is next. |
| 2026-11-17 | M2.6.4 system menu (spec 0017, ADR 0033; spec 0003/0005/0008; M2 complete). `samples/apps/desktop_shell` now `uses core, stdlib, syslib;` and adds a `System` menu-bar label after `Terminal`, laid out from measured prop widths (`System` starts at x = 208; the pull-down frame is `(204, 22, 224, 66)`). The pull-down is the M2.4.3 model (`ui_menu_dropdown`/`ui_menu_hit`/`ui_menu_move`/`ui_menu_key`) with items `About igis-v2` (`Ctrl+A`), `-`, `Restart` (`Ctrl+R`), `Halt` (`Ctrl+H`); the separator is skipped, Enter activates, Escape closes, pointer-down in the drop-down is handled by coordinate even when the kernel routed it to a window underneath, and a pointer move moves the highlight. Closing raises the topmost window whose frame intersects the pull-down (the console pump or the owner repaints its content through `Expose`) then raises the desktop window, so no stale pixels remain. `About` opens a modal desktop-owned window (`About igis-v2`, content 420×200 centred below the bar) drawn with `ui_message` and `ui_dialog_button`; Enter/Escape/`ui_dialog_key` and a routed click close it; a second open is a no-op. Shortcuts are focus-scoped and modal-aware: `F10` opens/toggles the menu, Ctrl+A/Ctrl+R/Ctrl+H act only when no menu/About is open and the event is routed to the desktop's own window (or 0), so the editor's Ctrl+A is unaffected. `core.halt()`/`core.reboot()` are host builtins 48/49 (no opcode; `Host` defaults `Invalid` for `langhost`); `sched::halt_system` sets the shutdown flag, counts itself stopped, broadcasts on the existing `0x40` vector where `kernel::wake_ipi` calls `smp::note_stopped` and halts even mid-task, waits bounded by the clock plus a 10M-spin ceiling (the boot timer can stop first when the caller is an AP), writes `system: N of M APs stopped` to serial and halts; `sched::reboot` stops the other cores then `arch_x86_64::reboot` writes `0xCF9` `0x02`/`0x06` and the 8042 `0xFE` pulse, halting if ignored. `samples/apps/system_probe` selects halt/reboot by argument. Proofs: `desktop_shell check` opens the menu, checks the accent row/separator pixels, walks Up/Down (skipping the separator), closes with Escape, reopens with F10, activates About with Enter, checks topmost/title/content/button/title-ink pixels, closes with Escape and a routed click, opens with Ctrl+A, verifies restart/halt never fired and the desktop marker is restored → `desktop_shell: ok` on `-smp 4` and `-smp 1`; `scripts/system_menu_qmp.py` on `build/igis.iso` clicks System/About via QMP absolute pointer events, captures `/home/sinan/Desktop/igis-system-menu.png` (1024×768, about 28 KB; the clock makes the exact size vary) and closes with Escape; `scripts/system_control_qmp.py --mode halt` shows `system: 3 of 3 APs stopped` (`0 of 0` on `-smp 1`) with no echo/prompt after a later command, and `--mode reboot` shows a second `igis-v2: long mode entered` banner on both core counts. **382 host tests** (abi 18, compiler 156, interpreter 134, langhost 74, including doctests; new `interpreter/tests/system.rs`, compiler arity/encoding and `langhost` host-path tests); `cargo xtask build`/`image`/`image --shell` clean; boot self-checks unchanged; `desktop_shell check`, the full event-injecting suite, `windows_proof` in its own boot, the visual golden on both core counts, `tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py --cores 1 --batch 300` 600/600, and `boot_desktop_qmp.py` (`desktop_shell: ready` → `terminal: ok`) all pass. `stdlib` stays at 125 functions and no cap changed; ABI v1 stays at 75; the desktop image root lists 61 entries and the shell image 60. **M2 is complete.** |
| 2026-11-17 | Q50 kill/claim races fixed (spec 0007 Sch17, ADR 0034; OPEN-QUESTIONS Q50 removed). `KILL_FLAGS` became `KILL_ID: [AtomicU64; MAX_TASKS]` (target id, `0` none): `request_kill` takes the slot lock, re-reads `SLOT_ID`, and either applies `kill_requested`/the wake to the value or parks the id; `task::block` re-checks the record under the slot lock after putting the task back (the lost-wake window created by the block trace) and leaves a killed task `Runnable` with `kill_requested`, so every wait kind is covered; `take_kill(slot, id)` and the block path clear the record only for their own id; `reclaim` clears the record and the reservation under the slot lock and only for its own id. Boot self-check `task::kill_self_check` (`kill: records ok`) proves the id-tag rules and drives the interleaving on a real slot and task value. New `samples/apps/kill_stress` + `kill_victim` (300 iterations alternating console/stream/input blocks with varying kill delays; every `wait` must return `Killed`/`Ok`): `kill_stress: ok (300 iterations, 300 killed, 0 exited, 878655 spins, 15083 ms)` on `-smp 4` and `... 268631 spins, 13831 ms` on `-smp 1`; the same app hangs on its first iteration against `a184a9d` (the parent blocked on a victim that slept with the parked kill). **382 host tests** (abi 18, compiler 156, interpreter 134, langhost 74, including doctests); `cargo xtask build`/`image`/`image --shell` clean; the full regression set (`frames`, `streams`, `events`, `realtime`, `cores`, `deep`, `utf8`, `text 42 hi`, `perf`, `kill_stress`, the five window apps, `desktop_shell check`, the UI set, `text_edit`, `font`, `clock_window check`, `files`, `browser check`, `editor check`, `terminal`) and `windows_proof` in its own boot pass on `-smp 4` and `-smp 1`; the visual golden matches both (`37802052…e9e81c9f`); `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py --cores 1` 600/600, `boot_desktop_qmp.py` reaches `terminal: ok`. No new opcode, builtin or language surface; `stdlib` stays at 125 functions and no cap changed; the image roots are 63 entries (desktop) and 62 (shell). |
| 2026-11-17 | C6 guarded-stack placement invariant enforced and Q47 recorded as blocked (spec 0004 C6, spec 0002 H2; OPEN-QUESTIONS Q47). `Region::allocate_guarded` now validates its constructed fields with the pure `Region::layout_ok` rule before returning: at least one frame and one byte, `span == frames + 1`, `start == base + 4096`, `len <= frames * 4096`, the half-open `[start, start + len)` inside the frames above the guard and disjoint from `[base, base + 4096)`, checked arithmetic on `base + span * 4096` and `start + len`, and a frame-aligned base. A mismatch restores the guard, frees the frames and returns `Status::Invalid` (the REPL reports `cannot place regions` and `Faulted(IoError)`); only a failure to *restore* the guard still halts. `Region::allocate`/`allocate_guarded` also compute frames without the old `len + FRAME_SIZE - 1` overflow. New pure boot self-check `task::stack_layout_self_check` prints `stack: layout ok` (13 valid/invalid tuple cases, no allocation) beside the unchanged `guards:` line; `#![forbid(unsafe_code)]` and the interpreter's checked slices make a mis-based/oversized `Region` the realistic route to a guard hit, so this is Q47's cheap mitigation. Q47 recovery itself stays blocked: abandoning a faulting native frame can leave a kernel `SpinLock` held (`console::read_line`, `stream_recv`, `window_info`), and the kernel has no lock-ownership tracking; a named halt is still the behaviour. Verified `run deep` → `child: faulted StackOverflow` (legal interpreter path, no guard hit), the full event-injecting suite plus `kill_stress`/`perf` on `-smp 4` and `-smp 1`, `windows_proof` in its own boot, the visual golden, `tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py` 600/600, and `boot_desktop_qmp.py` on both core counts. **382 host tests** (no new test harness in the kernel crates); no new opcode, builtin, helper or cap. |
| 2026-11-17 | Correctly rounded decimal → binary64 parsing (Q41; spec 0003 "Floating-point text", spec 0008 builtin 50, ADR 0035). `core.parse_f64_into(src, var value: f64) -> Status` is builtin 50 and pure interpreter code: `interpreter/src/f64parse.rs` checks the spec grammar (optional sign, digits with an optional `.` group, optional decimal exponent, plus the exact strings `inf`, `+inf`, `-inf`, `nan`) and converts with `core`'s allocation-free `f64: FromStr`, which rounds half to even over the whole mantissa. The old `stdlib` reader accumulated the mantissa as an `f64` and scaled by repeated ×/÷10, landing two ulps high on `1e-7` and three on the smallest-normal text `2.2250738585072012e-308`; the new reader returns the exact bits, writes them only on `Ok`, saturates overflow/underflow to `±Inf`/`±0`, keeps `-0.0`/`-inf`, rejects non-UTF-8 and the `FromStr`-only forms (`infinity`, `NaN`, `+nan`) and writes one canonical quiet NaN (`0x7ff8000000000000`) for `nan`. `stdlib.parse_f64_into` keeps its signature and the 125-function table and only delegates, so existing callers and every `format_f64_*` output are unchanged. Evidence: hard-coded bit tables for the boundary cases and an exact `f64short` round trip over 19 000+ random values in the module, builtin operand/`Status`/untouched-out-parameter tests, compiler signature and encoding tests, a `langhost` boundary test, and `samples/apps/f64parse` (`f64parse: ok 52 cases` on `-smp 4` and `-smp 1`). **390 host tests** (abi 18, compiler 157, interpreter 140, langhost 75, including doctests); `cargo xtask build`/`image`/`image --shell` clean; the event-injecting suite (`f64parse`, `files`, `text_edit`, the UI set, `widgets check`, `clock_window check`, `editor check`, `browser check`, `desktop_shell check`, `windows*`, `events`, `text`, `frames`, `streams`, `deep`, `utf8`, `realtime`, `cores`, `font`, `perf`, `kill_stress`) and `windows_proof` in its own boot pass on `-smp 4` and `-smp 1`; the visual golden matches both (`37802052…e9e81c9f`); `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py --cores 1 --batch 300` 600/600; `boot_desktop_qmp.py` still reaches `terminal: ok` and refreshes `igis-boot-desktop.png`. No opcode (ABI v1 stays at 75), no `Host` method, no cap change; image roots 64 (desktop) and 63 (shell). |
| 2026-11-17 | Q39 console/stream/input multiplexing (spec 0003 "Multi-source waits", specs 0005/0006/0007, ADR 0036; OPEN-QUESTIONS Q39 removed). `core.poll_any` (non-blocking) and `core.next_any` (blocking) are host builtins 51/52 (3→1, no opcode; ABI v1 stays at 75) over `sources: const array[uint, 8]`, `count: int` in `1..=8`, `var ready: int`: source `0` is one completed console line, `1` one input event (including a pending `Expose`) and any other value a stream handle whose data or close is ready (a read select; send space is not a source). `core.stream_source(ep) -> uint` is compiler-lowered (`ref` + `load_ref`) and is the only way to name a stream in the array. `abi::wait::WaitSet` (`Copy + Eq`, `count` plus `[u64; 8]`) is both `interpreter::WaitKind::Any` and `task::WaitFor::Any`; `task::waits_on_source` makes `wake_console`/`wake_input`/`wake_stream` wake a matching set in addition to the single wait, `task::wait_any_ready`/`wake_any_sources` close the failed-probe-to-block window for every source, and `stream::readable(task, handle)` is data-or-close (a stale/foreign handle is ready-as-error). `Host` gains `console_line_ready`/`input_ready`/`stream_readable` (default `false`; the kernel maps them to `console::has_line`, `event::has_event`/`window::has_expose(current)` and `stream::readable`, and `langhost` adds a small event queue and loopback readiness). Readiness is a snapshot; the following `read_line`/`next_event`/`recv` is authoritative. Proof: `samples/apps/multiplex` (85,608 B code/21 frames, 672 B state, 18,800 B stack) + `multiplex_sender` waits on all three, blocks on the delayed stream send, self-injects the key event and takes the console line typed by `scripts/multiplex_qmp.py`; `run multiplex check` is deterministic and `run multiplex` adds the console arm, both `-smp 4` and `-smp 1`. `samples/apps/browser` raises `EntryCapacity` 64 → 96 because the image now stages 64 sources. **403 host tests** (abi 22, compiler 158, interpreter 147, langhost 76, including doctests; new `abi::wait` tests, `interpreter/tests/multiplex.rs`, compiler signature/encoding tests and the langhost three-source test); `cargo xtask build`/`image`/`image --shell` clean; the full regression set (`streams`, `frames`, `deep`, `utf8`, `cores`, `events`, `text 42 hi`, `f64parse`, `perf`, `font`, `terminal`, `files`, the five UI apps, `widgets check`, `clock_window check`, `editor check`, `browser check`, `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `realtime`, `kill_stress`) and `windows_proof` in its own boot pass on `-smp 4` and `-smp 1`; the visual golden matches both (`37802052…e9e81c9f`); `scripts/tablet_qmp.py` 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py` 600/600 on both; `boot_desktop_qmp.py` reaches `terminal: ok`. No new opcode, no `stdlib` change (125 functions), no cap change; image roots 65 (shell) and 66 (desktop). |
| 2026-11-17 | Q44 resolved: the kernel line discipline is removed (spec 0005 "Console input", spec 0003 "Console input", spec 0007, spec 0008, spec 0012/0014; ADR 0037; OPEN-QUESTIONS Q44 removed). `kernel/src/console.rs` now owns a 512-byte raw ring (`push` stores and counts the newest byte when full, `pop` copies a prefix; no echo, no editing, no line complete) and `poll_input` drains COM1 only, while `keyboard::poll` pushes key events and never a console byte. `core.read_input(var dst: bytes[N]) -> int` reuses the retired `READ_LINE` opcode slot as `READ_INPUT` (`0x42`, capacity immediate, copied count pushed, length word always published; ABI v1 stays 75), is non-blocking (`0` when empty), and rejects a `string` destination (a partial read could split a code point). Q39 source `0` is now "a console byte is available": `Host::console_byte_ready`/`console::has_byte`, `task::wake_console_input`, `WaitFor::Any(WaitSet::single(SOURCE_CONSOLE_BYTE))`; `WaitKind::Console`/`WaitFor::Console` are deleted. `samples/apps/shell` keeps `string[256] line` + `int cursor`, selects on sources `0`/`1` via `core.next_any`, applies one byte through one editor (printable ASCII inserts via `stdlib.str_insert_into`, Backspace/`0x7F` via `str_backspace` + `\x08 \x08`, CR/LF submits + `\n`, Ctrl+C clears + `^C\n`, Tab inserts one space), routes `syslib.next_event` key text through the same path, and ignores arrows/Home/End/Delete/history (no ANSI). `multiplex` reads its console arm with `core.read_input`; `kill_victim line` blocks in `core.next_any`; `langhost` drains a scripted byte queue (`HOST_INPUT`, new `run_with_input`). Boot adds `console: input ok` (scratch ring: FIFO, partial pop, empty read, 512-byte overflow with 2 counted drops); `console: terminal/log/route ok`, `stack: layout ok`, `kill: records ok`, `guards: boot 1, ap 7, tables 3`, `font: glyphs ok`, `window: damage ok (present 4 -> 2 rects, 510874 -> 55348 px)` unchanged. Proofs: typed serial shell on `-smp 4` and `-smp 1` accepts `help`, edits `echp`+`\x7f`+`o hi` → `hi`, runs `run child world` → `child: ok`, `exitre`+2 backspaces → `bye`; `kill_stress: ok (300 iterations, 300 killed, 0 exited)` on both with all three block kinds (console `Any`, stream, input) observed; `scripts/multiplex_qmp.py` passes both (`multiplex: console line ok`); `scripts/boot_desktop_qmp.py` reaches `desktop_shell: ready` → `terminal: ok` on both; the 25-command shell-image regression set and `windows_proof` (own boot) pass both; visual golden `37802052…e9e81c9f` both; tablet 7/7, `--no-tablet` → `mouse: ok`, `mouse_burst_qmp.py` 600/600 both. **406 host tests** (abi 23, compiler 158, interpreter 148, langhost 77); `cargo xtask build`/`image`/`image --shell` clean; no `stdlib` change (125 functions), no cap change; shell package 89272 B code (22 frames)/1680 B state/18952 B stack; image roots 65 (shell) and 66 (desktop). Limitation: no ANSI escapes, no history, append-only cursor at end of line, and a read burst larger than the ring loses its newest bytes. |
| 2026-11-18 | M3.1 image tree and boot from it (spec 0018, ADR 0038; M3 start). The ext2 image is a real tree: `lib` (importable modules), `base` (base applications), `home` (user files, read-only), `system` (`system/entrypoint` = a copy of `base/desktop_shell`, plus `system_probe`/`terminal_probe`) and `mke2fs`'s `lost+found`; `xtask image` stages the tree recursively with real directories and no root files, and `--shell` omits only the `system/entrypoint` copy. `abi::fs` has one path rule for every call site (relative, no leading/trailing `/`, no empty/`.`/`..` component, ≤256 bytes, ≤8 components, ≤64 bytes each) plus `validate_dir`; the M2.5.1 root-only validators are gone. `kernel/src/ext2.rs` walks paths (`find`/`directory`/`regular_inode`/`entry_inode`), never follows symlinks, and `read_file`/`read_at`/`file_size`/`list_entry` take a path; boot self-check `ext2: tree ok` (nine steps: the four directories, `base/shell`, `home/readme.txt`, `system/system_probe`, an empty `lib`, a missing component `NotFound`, `..`/empty/over-deep and file-as-dir/dir-as-file `Invalid`). `repl::boot` tries `system/entrypoint` then `base/shell`; `core.spawn`/`core.run` resolve a path with no `/` under `base/` and carry the resolved path in the request and every message (`requested `child` -> `base/child``). The samples moved with `git mv` (62 to `base/`, `system_probe`/`terminal_probe` to `system/`, `home/readme.txt`); `files` (root = 5 entries, `base`/`system` listings, `base/child`), `browser` (`base/child`, `base/text`), `editor` (`base/child`) and `shell` (spawns `system/terminal_probe`) follow the tree; `langhost` implements the same view over `samples/apps` with a component-wise resolver and its tests route through an `app_path` helper. **408 host tests** (abi 23, compiler 158, interpreter 149 + 1 doctest, langhost 77); `cargo xtask build`/`image`/`image --shell` clean; boot on `-smp 4`/`-smp 1` prints `ext2: tree ok`, a five-entry root and the `system/entrypoint: not found` → `base/shell` fallback; typed `help`/`run files`/`run child world`/`run base/child world`/`run system/system_probe`/`exit` on both; a 26-command regression batch on both (`files`, `browser check`, `editor check`, `terminal`, `desktop_shell check`, `widgets check`, `windows`, `windows_events`, `kill_stress`, `realtime`, `multiplex check`, `streams`, `frames`, `deep`, `utf8`, `text 42 hi`, `clock_window check`, `f64parse`, the five `ui_*`, `text_edit`, `font`, `perf`); `windows_proof` in its own boot on both; `system_probe halt` → `3 of 3` / `0 of 0` APs stopped; `boot_desktop_qmp.py` reaches `terminal: ok`; visual golden unchanged. No language, opcode, builtin or cap change. |
| 2026-11-18 | M3.2 `/lib` modules compile into the package (spec 0018 M1–M13, ADR 0038; spec 0008 amended). `compiler::SourceReader` (`size`/`read`) plus `compile_with_imports(source, path, reader, arena, code, manifest)`; the compiler copies each module's bytes into the caller's arena (nothing is allocated and the compiler still does no I/O), and `compile_into` keeps its signature but rejects a `lib.*` use with a "needs a module reader" diagnostic. `uses lib.a` resolves to `lib/a.ig` and `lib.a.b` to `lib/a/b.ig`; the module must declare `unit <last segment>;`, unit names are unique per package (two paths with one name is an error), `core`/`syslib`/`stdlib` are reserved, duplicate `uses` paths are one unit, cycles/self-imports are named, and a module may not declare `main`, top-level `var` state or a stream endpoint. Discovery is depth-first over `uses` in declaration order; unit ids are 0 application, 1 embedded `stdlib` (reserved even when only a module imports it), `2..=16` modules (`abi::MAX_UNIT_ID = 16`, at most 15 modules; `interpreter::MAX_UNITS` follows it); the function table order is `stdlib`, modules, application, and a module's declarations are called as `<unit>.<name>`. Caps rose to 384 KiB of source per application (128 KiB per unit) and a 16 MiB arena; the kernel's application-source buffer stays 128 KiB, so `.bss` grew 8 MiB (`frames: 57903 free`, 226 MiB usable). `samples/apps/lib/math.ig` adds `clamp`/`min_int`/`max_int`/`abs_int`/`sign`; `langhost` implements the same reader over `samples/apps` (`TreeReader`, regular files only, symlinks refused). The ext2 boot self-check step 6 now requires `lib/math.ig` instead of an empty `lib`. **438 host tests** (abi 23, compiler 184, interpreter 150, langhost 80, 1 doctest); `cargo xtask build`/`image`/`image --shell` clean; boot `ext2: tree ok`; an inline `uses lib.math;` program prints `mod_demo: ok` on `langhost`; the 26-command regression batch and the typed transcript pass on `-smp 4`/`-smp 1`; `boot_desktop_qmp.py` reaches `terminal: ok` on both; visual golden unchanged (`37802052…e9e81c9f`). No opcode, builtin, `Host` method or `stdlib` change; the in-kernel module reader is M3.3. |
| 2026-11-18 | M3.3 in-kernel `/lib` modules and the `module_demo` proof (spec 0018 M1–M13; PLAN M3.3). `kernel/src/repl.rs` gains `ImageReader<'image,'device>`, a `compiler::SourceReader` over the mounted `Ext2` (`size` = `file_size`, `read` = `read_file`), and `load()` now calls `compiler::compile_with_imports` instead of `compile_into`; the lock order (`SOURCE → COMPILER_LOCK → ARENA → CODE_SCRATCH → MANIFEST`), the 128 KiB application-source buffer and the 16 MiB arena are unchanged, and every existing status/diagnostic path is intact. `samples/apps/base/module_demo` (`uses core, lib.math;`) exercises `clamp` (in band, both edges, below/above, low above high), `min_int`/`max_int`, `abs_int` and `sign`, and prints `module_demo: ok`; `samples/apps/lib/math.ig`'s `clamp` comment was corrected to describe the ordered checks. **439 host tests** (abi 23, compiler 184, interpreter 150, langhost 81, 1 doctest); `cargo xtask build`/`image`/`image --shell` clean; boot `ext2: tree ok`, `frames: 57899 free` (`.bss` unchanged; ~17 KiB of newly linked reader/discovery code, so the kernel image grew); `run module_demo` → `module_demo: ok` on `-smp 4` and `-smp 1`; `cargo run -p langhost -- samples/apps/base/module_demo` prints the same; the 27-command regression batch (including `module_demo`) passes on both; `boot_desktop_qmp.py` reaches `terminal: ok` on both; visual golden unchanged (`37802052…e9e81c9f`). Error paths: `run module_missing` → `No such application: base/module_missing`; `run lib/math.ig` → the compiler's `missing main` diagnostic, `child: faulted IoError`, prompt returns, no panic. No opcode, builtin, `Host` method, `stdlib` change or cap change. |
| 2026-11-18 | M3.4 browser tree navigation (spec 0013 "The file browser" as amended; spec 0018 A4). `samples/apps/base/browser` keeps a current directory (`string[256]`, `""` = root), lists `core.fs_list(dir, …)` into the existing 96 entries with the same truncation status, descends into a kind-1 entry on `Enter`/double-click (`dir + "/" + name`, or `name` at the root; selection/top/preview/status reset), goes up with `Backspace`/`Ctrl+Up` by truncating the last component (no `..`, no history; root is a no-op), previews and launches kind-0 entries by full path (`Ctrl+L` on a directory descends; kind-2 refused), and refuses a join over `PATH_MAX` 256 with the status line `path too long`. The path line shows `igis:/`/`igis:/<dir>`, with `igis:/...` plus the deepest components when it exceeds 34 columns (the full path stays in the preview title and in every I/O call). `check` now proves root (5 entries incl. `lost+found`), `base/child`, up, `system/system_probe`, `home/readme.txt`, `lib/math.ig` as kind 0, a 255-byte join refused, Ctrl+L descent, Ctrl+Up, a kind-2 refusal and `base/editor check` launched by full path; `langhost` runs the same navigation transcript (`browser: host ok`) and never launches. **439 host tests**; `run browser check` → `browser: ok` on `-smp 4`/`-smp 1`; the 27-command batch, visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both; `scripts/browser_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-browser.png` (1024×768, ~33 KB). No API, compiler, kernel, spec-surface or new-sample change. |
| 2026-11-18 | M4.1 predeclared nominal types cross unit boundaries (ADR 0039; spec 0008 "Types", spec 0003 "Cross-unit types", spec 0018 M9). `compiler/src/codegen.rs`'s one gate (`cross_unit_type_ok`) now admits `Kind::Record(id) <= RECT_RECORD` (`Diagnostic` 0, `Event` 1, `Rect` 2), `Kind::Sum(id) == EXIT_REASON_SUM` (`ExitReason` 0) and `Kind::Enum(id) <= EVENT_KIND_ENUM` (`Status` 0, `FaultCode` 1, `EventKind` 2, added by the follow-up `6a37202`), recursing through the shared array/ring/map tables; user-declared records, sums and enums still fail with "only the predeclared types can cross a unit boundary". `samples/apps/lib/probe.ig` adds `rect_area(const Rect)`, `reason_ok(const ExitReason)` (exhaustive `case`), `diagnostic_len(const Diagnostic)` and `event_is_key(const Event)`; `base/module_demo` calls all four with real values and prints `module_demo: lib types ok` then `module_demo: ok`. Compiler tests cover the accepted types (params, `FaultCode`/`Status` results, `array[Rect, 4]`, `EventKind`) and the still-rejected user aggregate. **441 host tests** (abi 23, compiler 186, interpreter 150, langhost 81, 1 doctest); `cargo xtask build`/`image`/`image --shell` clean; `module_demo: lib types ok` + `module_demo: ok` on `langhost`, `-smp 4` and `-smp 1`; the 27-command batch, visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both; boot `ext2: tree ok`. No ABI, verifier, interpreter, opcode, builtin or cap change. |
| 2026-11-18 | M4.2 package-global user types and unit-qualified names (ADR 0039, C2; spec 0003 "Cross-unit types", spec 0008 "Types", spec 0018 M9). `compiler/src/codegen.rs` now builds one package-wide `TypePool` (fixed predeclared prefix: enums `Status`/`FaultCode`/`EventKind`, records `Diagnostic`/`Event`/`Rect`, sum `ExitReason`, then `stdlib` → modules in discovery order → application, declaration order inside a unit) with a per-unit `TypeScope` and two-phase declare/layout: names are registered before any layout, so forward references are legal, and an on-demand layout with a visiting state rejects a by-value cycle (direct, through arrays/rings/maps, and across units). `TypeRef` gains `owner`; `type_ref_inner` accepts `unit.Type` in every type position; enum constants are `<unit>.<Type>.<Variant>` and casts `<unit>.<Type>(ordinal)`, while sum construction and `case` arms stay unqualified. The application's types are application-local (`app.X` is a diagnostic), two modules may share a type name, and the M4.1 `cross_unit_type_ok` gate is deleted. `samples/apps/lib/probe.ig` adds `Point` (record), `Shape` (sum with a `Rect` payload) and `Color` (enum) with `point_add`, `shape_area`, `next_color`; `base/module_demo` declares `probe.Point`/`probe.Shape`/`probe.Color`, constructs and copies them, uses `probe.Color.Red`/`probe.Color(1)`, and prints `module_demo: types ok`, `module_demo: lib types ok`, `module_demo: ok`. **450 host tests** (abi 23, compiler 195, interpreter 151 incl. doctest, langhost 81; 3 obsolete tests replaced, 12 added); `cargo xtask build`/`image`/`image --shell` clean; boot `ext2: tree ok`, `frames: 57890 free` (`.bss`/`.data` byte-identical; ~36 KiB more linked compiler code); `cargo run -p langhost -- samples/apps/base/module_demo` and `run module_demo` print the three lines on `-smp 4`/`-smp 1`; the 27-command batch, visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both; `code`/`manifest` digests of five samples (incl. stdlib users) are byte-identical to `e46f21e`. No ABI, verifier, manifest, interpreter, opcode, builtin or cap change. Known polish: a foreign sum-variant `case` error names the owning sum without its unit qualifier. |
| 2026-11-18 | M4.3 shared helpers moved into `/lib` (M4 close). Three modules with no state, no `main` and no new syntax: `samples/apps/lib/out.ig` (`say(const string[0])`, `say_int(int)` with a local `bytes[32]`), `samples/apps/lib/inject.ig` (`pointer_to`, `pointer_down`, `pointer_up`, `inject_key`, `inject_key_mods`, each building the `Event`/pointer call and returning `Status`; draining the queue stays the caller's job) and `samples/apps/lib/outcome.ig` (`is_ok(const ExitReason)`; the file was `reason.ig` in the commit and renamed immediately after so a module name cannot shadow the applications' common `reason: ExitReason` variable). 40 applications migrated mechanically: the 38 local `say` and 11 `say_int` bodies deleted with calls rewritten to `out.*`, 3 `classify_reason` bodies delegated to `outcome.is_ok(reason)`, 5 pointer/key wrappers (`browser`, `ui_controls`, `ui_dialogs`, `ui_menus`, `widgets`) keep their names and delegate to `inject.*` + `drain_events()`, and unused staging state (`digits`/`used`/`out`) was removed where safe. Duplicated bodies are gone; touched-tree source is 463,961 → 460,666 B for the 40 apps, +3,818 B of modules (net +523 B: every call gains an `out.` qualifier and the modules carry comments), per file −282…+127. Package code can grow because a module links wholesale (`ui_controls` 110,544 → 111,296 B; `visual` code unchanged, state 304 → 272 B). **450 host tests**; `cargo xtask build`/`image`/`image --shell` clean; the 27-command batch passes on `-smp 4` and `-smp 1`; `module_demo`/`ui_controls`/`visual` host verdicts unchanged; visual golden (`37802052…e9e81c9f`), `boot_desktop_qmp.py` and `scripts/browser_screenshot_qmp.py` pass on both; `events`/`windows`/`windows_events` rechecked after the rename. No compiler, kernel, abi or spec change. |
| 2026-11-18 | M5.1 the calculator (`samples/apps/base/calculator`). A 300×360 client panel at (180,100): white panel + `ui_frame` bezel, a framed 284×40 right-aligned f64 display, and a 4×5 grid of 68×48 cells (4-px gaps) with `C`/`DEL`/`+/-`/`/`, `7 8 9 *`, `4 5 6 -`, `1 2 3 +`, `0 . =` (the `=` cell spans the last two columns; 19 buttons). All buttons use `stdlib.ui_button`/`ui_button_hit`/`ui_button_pressed` with a pressed face and an `ui_focus_ring`; state is `entry: string[32]` staged through `bytes[32]`, `accum: f64`, `pending: byte`, `fresh`, `error`, `display: string[64]`, focus/pressed/running. Typing and keys go through `core.parse_f64_into`/`core.format_f64_short_into` (`-6` → `error`): digit cap 30 B, one `.`, operators fold the pending op, `=`/Enter fold and clear it, division by zero shows `error`, `C`/Escape reset, `DEL`/Backspace deletes one byte (fresh → `0`, never empty), `+/-` toggles the sign; keyboard digits/`.`/operators/Enter/Escape/Backspace work, and **Ctrl+Q** (added after review) closes the window and exits so `run calculator` does not block the shell. One complete frame before `window_present`, owner `Expose` repaints, no `syslib.clear`. `check` injects pointer/key events and checks state and pixels (`calculator: ok`); `shot` composes `12.5*4=50`, prints `calculator: ready`, holds 5 s; `langhost` prints `calculator: host ok`; `scripts/calculator_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-calculator.png`. **451 host tests**; source 31,312 B, package 116,328 B code (29 frames)/480 B state/21,872 B stack; `calculator: ok` on `-smp 4`/`-smp 1`; Ctrl+Q verified through QMP `send-key` (`task 5: exit Ok`); the 28-command batch, visual golden (`37802052…e9e81c9f`), `boot_desktop_qmp.py` and the screenshot harness pass on both. No stdlib/compiler/kernel/abi change. |
| 2026-11-18 | M5.2 minesweeper (`samples/apps/base/minesweeper`; M5 close). A 300×400 client window at (150,80): header with a 3-digit mine counter, a 30×30 face/restart button (`:)`/`:(`/`B)`), a `MM:SS` timer; a 9×9 field of 30×30 cells at (8,52) with 10 mines; a `Flag` mode button and a status line. Mines come from an app-local LCG (`x = (x*1103515245 + 12345) mod 2^31`) seeded by `core.clock()` in play mode and fixed in `check`; the first reveal is never a mine (a mine on the clicked cell moves to the first free cell), neighbour counts are computed after placement, and the flood fill is iterative over `array[int, 81]`. Left-click reveals, right-click (the `pointer_buttons` mask, `(buttons div 2) mod 2 = 1`, with an `Event.code` fallback) toggles a flag, `Flag` mode makes left-click flag, flags cap at 10, a mine loses and shows the board, revealing all 71 safe cells wins, the face/`R` restarts, `F` toggles flag mode and Ctrl+Q quits. `check` covers the fixed board, a six-cell flood and its frontier number ink, first-click safety, right-click and flag-mode flags with ink, the ten-flag cap, loss with every mine shown and a frozen timer, win, restart, key dispatch, both Ctrl+Q shapes and `MM:SS`; `shot` composes a mid-game board, prints `minesweeper: ready` and holds 5 s; `langhost` prints `minesweeper: host ok`; `scripts/minesweeper_screenshot_qmp.py` writes `/home/sinan/Desktop/igis-minesweeper.png` (1024×768, ~36.9 KB). **452 host tests**; source 36,198 B, package 125,568 B code (31 frames)/3,720 B state/23,008 B stack; `minesweeper: ok` on `-smp 4`/`-smp 1`; the 29-command batch, visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both. The ticket also exposed and fixed a pre-existing shortcut bug: the decoder reports letter key codes uppercase (`Q` 0x51, `S` 0x53, `O` 0x4F, `A` 0x41, `L` 0x4C), while `calculator`/`editor`/`browser` compared the lower-case forms; all now accept both, and QMP `send-key` Ctrl+Q exits `calculator`/`editor`/`browser`/`minesweeper` (tasks 6–9, `exit Ok`). No stdlib/compiler/kernel/abi change. |
| 2026-11-18 | M6.1 home disk mounted read-only through a router (spec 0019 H1–H5/W1–W2/A4, ADR 0040). New `ext2w` crate (`no_std`, `#![forbid(unsafe_code)]`, allocation-free, `abi` only): a `SectorDevice` trait (`sector_count`, 512-byte `read_sector`/`write_sector`), a 4-block 1 KiB cache, full mount validation (ext2 magic, 1 KiB blocks, revision 1, group descriptors, inode size, bitmaps, inode table, bounds), and `find`/`list`/`read_at`/`read_file`/`file_size`; 6 host tests build a 1 MiB image with `mke2fs -d` in a temporary file and cover mount, listing, `readme.txt`, `NotFound`, directory-read `Invalid` and a corrupt magic. `kernel/src/ata.rs` is a primary-master ATA PIO driver (LBA28, 512-byte sectors, bounded BSY/DRQ polling with a 400 ns delay, reset on timeout, no DMA/interrupts) behind `SectorDevice`; `arch/x86_64/src/port.rs` adds `insw`/`outsw`. `kernel/src/fs.rs` is the one router: `home`/`home/*` use the home mount when present (else the app image's `home`), everything else the read-only app image; `/` lists the app root and `home` lists the home root; the boot source read, `repl::load`, `core.spawn` and `KernelHost::fs_*` all go through it (lock rule documented: `HOME → ATA ports only`). `xtask` builds `build/home.img` (8 MiB, `mke2fs -b 1024 -d samples/home`) only when missing, adds `--reset-home`, and `run` attaches `-drive file=build/home.img,format=raw,if=ide` unless `--no-home`; `samples/home/readme.txt` is the initial tree and `base/files` now lists `home` and reads `home/readme.txt` (238 B). Boot with the drive: `ata: primary master, LBA28, 16384 sectors` / `ext2w: mounted, 1024 byte blocks, 8192 KiB` / `ext2w: home ok`; without: `ata: no primary master` / `ext2w: no home disk`; an all-zero image: `ext2w: home failed (Invalid)` and a read-only boot. **458 host tests** (abi 23, compiler 195, interpreter 151, langhost 83, ext2w 6); `cargo xtask build`/`image`/`image --shell` clean; the 29-command batch passes in all four combinations (`-smp 4`/`-smp 1` × drive/no drive); `e2fsck -fn build/home.img` exits 0; visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both. No write API or builtin yet; the clean-state/mount-count rule lands with the writer. |
| 2026-11-18 | M6.2 the ext2 writer and `core.fs_write` (spec 0019 W1–W7/A1–A3, ADR 0040). `ext2w` becomes a writer on the same `SectorDevice`: a writable mount marks the filesystem clean (`s_state = 1`, `s_errors = 0`, no mount-count increment, one superblock write), allocation scans a group bitmap and updates bitmap → group descriptor → superblock counts, inodes are created as `S_IFREG | 0644` with links 1, directory entries reuse free space or allocate a block, and `write_at` plans capacity before mutating (a full disk is `CapacityExceeded` with no partial tree), grows direct/single/double indirect pointers, read-modify-writes partial blocks, zero-fills a gap past the old end, and writes data → inode → directory entry through the write-through cache. `core.fs_write(path, offset, data, var written)` is builtin 53 (`fs_write_call` in codegen to keep `codegen::call`'s frame small), `abi::fs::validate_writable` accepts only `home`/`home/…`, the interpreter checks the destination regions and leaves `written` untouched on failure, `Host::fs_write` defaults to `Invalid`, and the kernel router creates a missing file only at offset 0. `langhost` now mounts a temporary home directory (seeded from the image tree) so the primitive is host-testable. `samples/apps/base/home_write` writes, reads back, appends, writes a gap, checks the error paths (outside home, missing parent, nonzero offset, directory) and prints nine step lines + `home_write: ok`; without the disk it prints `home_write: no writable home`. **474 host tests** (abi 24, compiler 196, interpreter 154 incl. doctest, langhost 84, ext2w 15; +16); `cargo xtask build`/`image`/`image --shell` clean; `home_write: ok` on `-smp 4`/`-smp 1` and on `langhost`; `e2fsck -fn` exits 0 after the writes (12 → 13 files, 563 → 564 blocks) and after `--reset-home`; the 30-command batch with/without the drive, visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both. No remove/mkdir/rename/truncate, no editor save; ABI v1 stays at 75 opcodes. |
| 2026-11-18 | M6.3 `remove`, `mkdir`, `rename` and the applications (spec 0019 W3–W6/A1–A3/E1–E2, ADR 0040). `ext2w` frees data blocks (direct/single/double indirect) and inodes with the bitmap → group descriptor → superblock reversal, removes a directory entry with predecessor-record merge and direct/single-indirect tail compaction, creates a directory (`S_IFDIR | 0755`, links 2, `.`/`..`, parent link bump, `bg_used_dirs_count`), and renames within/across directories (regular-file replacement, `..` rewrite, cycle/directory-target refusal; `Inode.links` and `bg_used_dirs_count` are now preserved). New builtins 54–56: `core.fs_remove(path)`, `core.fs_mkdir(path)`, `core.fs_rename(from, to)` (ABI v1 stays at 75), `home`-only, `Host` defaults `Invalid`, kernel router through `HOME`, `langhost` temp-home implementations. The editor's File-menu Save is enabled and `Ctrl+S` writes `<target>.tmp` then renames it over the document (a `base/` document is saved as `home/<basename>` and the path switches; a failure leaves the document/path intact); the browser adds `N` (create `home/newdir`) and `Delete`/`D` (remove a selected regular file or empty directory under `home`) with a refreshed listing and status. `samples/apps/base/home_ops` proves mkdir/write/rename/replace/remove/list/error paths and prints `home_ops: ok`. **484 host tests** (abi 24, compiler 197, interpreter 159 incl. doctest, langhost 85, ext2w 19; +10); `cargo xtask build`/`image`/`image --shell` clean; `home_ops: ok`, `editor: ok`, `browser: ok`, `files: ok` on `-smp 4`/`-smp 1` with the drive; `home_ops: no writable home` and the read-only editor/browser arms without it; `e2fsck -fn` exits 0 after the proofs (12 → 13 files) and after reset (12); the 31-verdict batch with/without the drive, visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both. No truncate, no journal, no persistence proof yet. |
| 2026-11-18 | M6.4 home persistence across a reboot (spec 0019 V2–V4; M6 close). `samples/apps/base/home_persist` creates `home/persist`, writes `a.txt` with a fixed 34-byte payload and renames it to `b.txt`; `samples/apps/base/home_verify` checks the directory, the absent old name and the exact `b.txt` size/contents. `scripts/home_persistence_qmp.py` boots the shell image with `build/home.img`, runs `home_persist`, quits QEMU, boots a **second** QEMU with the same image, runs `home_verify`, then runs `e2fsck -fn`; `--cores`, `--reset` (via `cargo xtask image --reset-home`) and `--keep` control it. **486 host tests** (langhost +2); `--cores 4 --reset --keep` and a second `--cores 1 --keep` cycle: `home_persist: ok` → `home_verify: ok` (size/contents), fsck exit 0 (14/2048 files, 565/8192 blocks), idempotent at 14/565; `debugfs -R "cat /persist/b.txt"` shows the exact payload; reset returns 12/563 with fsck 0. Targeted runs on both counts: with the drive `home_persist`/`home_verify`/`home_ops`/`editor`/`browser`/`files` pass; without it `home_persist: no writable home`, `home_verify: FAIL`, and the read-only editor/browser arms pass. Visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both. Spec 0019 is Implemented; the application image remains read-only, ABI v1 stays at 75, no truncate at that point (M7.1 later added `core.fs_truncate`) and no journal. |
| 2026-11-18 | M7.1 `core.fs_truncate` (spec 0019 A7, ADR 0041). `ext2w::truncate(path, size)` shrinks by zeroing the tail of the last kept partial block, clearing the inode-level and indirect pointers past the new block count, writing the inode (size + `i_blocks`) and only then freeing the data blocks/empty pointer blocks and the bitmaps/counters (a crash leaks blocks, never double-allocation); it extends after planning capacity (a full disk is `CapacityExceeded` with no change), zeroes the old partial tail and every new block, then writes the size; a directory is `Invalid`, a missing path `NotFound`, the current size an `Ok` no-op. New builtin 57 `core.fs_truncate(path, size) -> Status` (ABI v1 stays at 75) with compiler (`fs_truncate_call`), interpreter (writable-path check, no out-parameters), `Host::fs_truncate` default `Invalid`, kernel router through `HOME`, and the `langhost` temp-home `set_len`. `samples/apps/base/home_truncate` proves write 3000 → shrink 1000 (size/content) → extend 4000 (kept bytes + zeros from 1000) → 0 → idempotent → error paths, printing 16 step lines + `home_truncate: ok`; without the disk `home_truncate: no writable home`. The editor deliberately keeps its temporary-file + rename save (ADR 0041). **494 host tests** (abi 24, compiler 198, interpreter 159 incl. doctest, langhost 88, ext2w 25; +8); `cargo xtask build`/`image`/`image --shell` clean; `home_truncate: ok` on `-smp 4`/`-smp 1`; `e2fsck -fn` exits 0 after the proofs (15 files) and after reset (12/563); the persistence harness (`--cores 4 --reset`), the 38-command batch with/without the drive, visual golden (`37802052…e9e81c9f`) and `boot_desktop_qmp.py` pass on both. No editor/browser change, no journal, no opcode change. |
| 2026-11-18 | M8.1 service-owned window drag and close box (spec 0011 W22–W24, ADR 0042). `gfx::update_pointer`/`set_pointer_absolute` run one serialised pointer transaction under a dedicated `POINTER_ORDER` lock (`POINTER_ORDER → SCREEN`, `POINTER_ORDER → WINDOW → SCREEN`): update state and cursor, drop the graphics lock, call `window::pointer_event`, then publish events with a consumed press suppressed so its `PointerDown` is never queued (no SMP poll race). A left press in the 16-px title bar outside the close box raises/focuses and starts a grab-offset drag through `Table::relocate` (shared with `window_move`, which stays owner-only), clamped on screen with the same damage/`Expose`/repair, ended by release, cancelled by a close, with a second press mid-drag consumed; a close-box press calls `task::request_kill(owner)` after the table unlock (owner-0 windows inert). No new opcode/builtin/`Host`/`EventKind`, no `stdlib` change. `window::drag_self_check` prints `window: drag ok`; `samples/apps/base/windows_drag` (+ `windows_drag_victim`) prints `windows_drag: ok` on `-smp 4`/`-smp 1` and `windows_drag: host ok` on `langhost` (title press consumed, focus, drag steps, both clamps, release, restored underlay, content press delivered, victim `Killed` and window gone). **495 host tests**; `cargo xtask build`/`image`/`image --shell` clean; regression batch (`windows*`, `windows_proof` own boot, `desktop_shell check`, `terminal`, `calculator`, `minesweeper`, `editor`, `browser`, `events`, `mouse` own boot, UI set, `files`, `module_demo`, `kill_stress`) passes on both; visual golden `37802052…e9e81c9f` and `boot_desktop_qmp.py` pass on both; `e2fsck -fn` clean. Resize deferred. Follow-up `d4a8f93` fixed the SMP publication race and the second-press gap. |
| 2026-11-18 | M8.2 close requests (spec 0011 W23 rewritten/W25, spec 0010 I19/I31, spec 0003, ADR 0043 amending 0042). A close-box press sets a per-window `close_pending` flag (`PressAction::Close`) instead of `task::request_kill`; the owner takes the new predeclared `EventKind.Close` (ordinal 6, `window = id`, other fields 0) through `kernel::sched::KernelHost::poll_event` **before** `Expose` and before the queue, owner-only and topmost-first through `window::take_close`/`has_close`. It counts as input readiness for the owner (`input_ready`, the scheduler's post-block `Input` re-check and `next_any` source 1), and the pointer hook wakes `WaitFor::Input` after the window unlock; owner-0 close boxes stay inert and an ignored request leaves the window open. `Event` layout and ABI v1 (75) are unchanged; no opcode, builtin, `Host`, `syslib` or `stdlib` change. `window::close_self_check` prints `window: close ok`; `desktop_shell` handles `Close` in both modes (About closes itself, the desktop survives; its own Desktop window exits), and `calculator`/`minesweeper`/`editor`/`browser`/`clock_window`/`shell`/`widgets` close their own window, while proof/demo windows may ignore it. `windows_drag` proves a same-task dialog and a victim that exits `Ok` (not `Killed`); `desktop_shell check` injects a real About close-box press, gets exactly one `Close` event, closes About and reopens it. **497 host tests**; `cargo xtask build`/`image`/`image --shell` clean; the 13-command regression batch and `windows_proof` (own boot) pass on `-smp 4`/`-smp 1`; `scripts/about_close_qmp.py` reproduces System → About → close-box → Terminal on the boot desktop with no idle summary/halt; `boot_desktop_qmp.py`, the fixed `system_menu_qmp.py` (About row y = 24) and visual golden `37802052…e9e81c9f` pass on both; `e2fsck -fn` clean. Resize remains deferred. |
| 2026-11-18 | M8.3 Apps application menu and the modal popup input grab (spec 0011 W26, spec 0010 I19/I31, spec 0012 D10/D11/D20, spec 0003, spec 0008 58/59, ADR 0044). `syslib.popup_grab(x,y,w,h)` (builtin 58) and `syslib.popup_release()` (59) are host builtins with `Invalid` defaults; one `Grab { owner, rect }` lives in the window table (`Ok`/`Full`/`Invalid`, a repeat by the owner updates the rectangle, owner-only release, `Invalid` for another task, release and `close_task` wake input waiters). While held, `window::pointer_event` ignores presses (no drag, no close box) and `KernelHost::poll_event` gives non-owners `WouldBlock` without consuming the queue while the owner receives producer events unchanged (`window = 0`, no hit-test/raise); `input_ready`, the scheduler's post-block `Input` re-check and `next_any` source 1 use `window::grab_allows(task)`, and the owner's own `Close`/`Expose` still count. `window::grab_self_check` prints `window: grab ok` beside `drag`/`close`. `desktop_shell` turns `Apps` into a six-item pull-down (Calculator, Minesweeper, Text Editor, File Browser, Clock, Widgets, each non-blocking `core.spawn`, no auto-launch on open) and both it and System take/release the grab; F9/F10 toggle, Up/Down/Enter/Escape drive, Left/Right switch, an outside click dismisses and logs `desktop_shell: apps menu open/closed` and `desktop_shell: launched <label> task N`. `desktop_shell check` covers both menus, the grab, one real launch (Clock's deterministic check, reaped with `core.wait`), the outside click, the key switching and pixels; `scripts/apps_menu_qmp.py` boots `build/igis.iso`, captures `/home/sinan/Desktop/igis-apps-menu.png` (1024x768), clicks Clock over the kernel Terminal, sees `clock_window: ok`, dismisses System with an outside click and reaches `terminal: ok` with no idle summary/halt. **501 host tests**; `cargo xtask build`/`image`/`image --shell` clean; `desktop_shell check` (`ok`), `windows_drag`, `events`, `windows`, `windows_events`, `mouse` (own boot), `tablet_qmp.py` 7/7, `windows_proof` (own boot), `about_close_qmp.py`, `system_menu_qmp.py`, `boot_desktop_qmp.py` and the visual golden `37802052…e9e81c9f` pass on `-smp 4`/`-smp 1`; `e2fsck -fn` clean. No opcode (`stdlib` 125 functions); ABI v1 stays 75. |
| 2026-11-18 | M8.4 persistent pointer-region claim and the desktop menu bar (spec 0011 W27, spec 0010 I19/I31, spec 0012 D20, spec 0003, spec 0008 60/61, ADR 0045). `syslib.region_claim(x,y,w,h)` (builtin 60) and `syslib.region_release()` (61) are host builtins with `Invalid` defaults; one `Region { owner, rect }` lives in the window table beside the grab (`Ok`/`Full`/`Invalid`, a repeat by the owner updates the rectangle, owner-only release, `Invalid` for another task, release and `close_task` wake input waiters). `event::peek` reads the queue head without consuming it; while no modal grab is active, a `PointerDown` with `window = 0` inside the rectangle is dequeued only by the claim owner, while every other task gets `WouldBlock` with the queue untouched. The modal grab still takes precedence (its owner receives all queued events unchanged). `window::pointer_event` starts no drag and posts no close request for a new press inside the claim, while moves/releases still follow an in-progress drag; `task::input_queue_ready` folds the grab and region rules into `input_ready`, the scheduler's post-block `Input` re-check and `next_any` source 1. `window::region_self_check` prints `window: region ok` beside `drag`/`close`/`grab`; the desktop claims `(0, 0, screen_w, 22)` at startup in normal and check mode and releases on exit (`Full` is accepted when the boot desktop already owns the bar). `scripts/apps_menu_qmp.py` now launches `File Browser`, opens and dismisses a second Apps menu while it is live, then clicks `Terminal` and reaches `terminal: ok`; the same script fails on M8.3 on `-smp 4` (the browser consumes the bar press and no shell launches). **505 host tests** (abi 25, compiler 201, interpreter 168, langhost 89, ext2w 22; +4: one compiler signature/encoding test and three interpreter cases); `cargo xtask build`/`image`/`image --shell` clean; boot `window: region ok` on `-smp 4`/`-smp 1`; `desktop_shell check` (both images, including the boot-desktop `Full` branch), `windows_drag`, `events`, `windows`, `windows_events`, `mouse` (own boot), `windows_proof` (own boot), `tablet_qmp.py` 7/7, `about_close_qmp.py`, `system_menu_qmp.py`, `boot_desktop_qmp.py` and the visual golden `37802052…e9e81c9f` pass; `apps_menu_qmp.py --cores 4` captures `/home/sinan/Desktop/igis-apps-menu.png` (1024x768); `e2fsck -fn build/home.img` clean. No opcode (`stdlib` 125 functions); ABI v1 stays 75. |
| 2026-11-18 | M8.5 topmost move content snapshot and the client content-rect refresh (spec 0011 W12/W17 clarified, W28 added; spec 0012 D12/D19; ADR 0046). `kernel/src/gfx.rs` gains the kernel-internal `copy_rect(src_x, src_y, dst_x, dst_y, w, h)` (shadow-to-shadow, clipped to the screen and the shadow clip, per-row `copy_within`, row direction chosen by the vertical move, never touches the cursor; `Invalid` for a non-positive extent or disabled graphics, `Ok` no-op when fully clipped). `Table::relocate` takes a `copy_content` flag: a **topmost** move copies the content snapshot from the old to the new origin before touching the geometry or the repair and records the old-frame erase (`covers_from = 0`, whose subtraction protects the moved window's new frame) but **no** new-frame erase, so the desktop restore cannot wipe the copy; the chrome pass paints the new border/title, `mark_exposes`/`wake_input` run as usual, and the copy is inside the presented damage union. Non-topmost moves keep both erases and copy nothing (the source may be covered); a failed copy degrades to the old underlay-until-repaint behaviour. `window_move` and the drag path both pass `true`; the pure boot self-checks pass `false` so they never touch the screen (`paint_self_check` now asserts the topmost move has no new-frame erase). Calculator, Minesweeper, Editor, Browser, Clock Window and Widgets re-read `window_content_rect` on an owner `Expose` and recompute cached geometry (Calculator `disp_x`/`disp_y`; Editor `compute_layout`; Clock face/readout; Widgets control origins); the desktop shell's `draw_shell_window`/`draw_about` already re-read their rectangles. Other window samples either read the rectangle on every paint (`windows_drag`, `windows_events`, `windows_proof_*`) or never take input after a move (`visual`, `font`, `perf`, `windows_demo`), and are unchanged. `windows_drag` adds a 4×4 alternating repaint marker at content+(2,2): after the drag and **before** pumping, the copied marker and the 16×16 mark must already be at the new origin; after the pump, `paint_count` must have risen and the marker must be the other colour, with the old origin no longer showing it. New `scripts/drag_content_qmp.py` boots `build/igis.iso`, launches Calculator from Apps, closes the desktop's own window with its close box (the accepted one-queue-consumer competition, D19), drags the title bar (330,108) → (580,308) to frame origin (430,300), requires the new display edge 284/284 and panel border 360/360 black with the old edge 0/284 and old border 0/360, then clicks `7` at content+(42,138) and requires the display region to change (22 px, ink 36 → 20); it writes `/home/sinan/Desktop/igis-drag.png` and fails on the idle summary/halt. **505 host tests** (abi 25, compiler 201, interpreter 168, langhost 89, ext2w 22; no new host harness — the kernel crates have none); `cargo xtask build`/`image`/`image --shell` clean; boot self-checks `window: rules/paint/damage/route/drag/close/grab/region ok` on `-smp 4` and `-smp 1`; `run windows_drag check` → `windows_drag: ok` on both; `drag_content_qmp.py` passes on `--cores 4` (screenshot written) and `--cores 1 --no-capture`; `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `windows_proof` (own boot), `editor check`, `browser check`, `minesweeper check`, `calculator check`, `clock_window check`, `widgets check` and the shell `terminal` command pass on both; `apps_menu_qmp.py`, `about_close_qmp.py`, `boot_desktop_qmp.py` and `system_menu_qmp.py` pass; the visual golden still matches both (`37802052…e9e81c9f`). No opcode, builtin or `stdlib` change (ABI v1 stays 75; `stdlib` 125 functions). Follow-up `4a0a3d4` fixed the user-found File Browser case: `refresh_rect` now calls `compute_layout` (the list/preview/status were still at the old absolute origins) and `scripts/browser_drag_qmp.py` drags the Browser, requires the new path separator 680/680 and list/preview borders 420/420 with the stale layout gone, and writes `/home/sinan/Desktop/igis-browser-drag.png`; `browser check` still passes on both core counts. |
| 2026-11-18 | M8.6 window-addressed input delivery (spec 0010 I31 amended/I34 added, spec 0011 W29 added, spec 0012 D19 amended; ADR 0047). The one machine-wide FIFO keeps its poll-time routing, but `KernelHost::poll_event` now peeks the head (queue lock released) and returns `WouldBlock` without consuming when `window::input_target` names another task; the target takes the ordinary routing path, and a press inside a persistent region claim is delivered unchanged (W27). One target rule: an addressed record targets its window's owner; a window-less `PointerDown` targets the region claimant or the topmost hit window's owner; window-less moves/keys target the focused window's owner; an owner-`0` kernel window, an empty desktop or an unowned pending kind has no target and keeps the first-poller competition. The modal grab still takes precedence and skips the target gate, which is what lets the desktop's open menu receive events while the focus belongs to another task. `task::input_queue_ready` uses the same rule for `input_ready`, the scheduler's post-block `Input` re-check and `next_any` source 1. `samples/apps/base/events` and `multiplex` now open a small window (and drain its owner `Expose`) because window-less keys/moves belong to the focus. `window::target_self_check` prints `window: target ok` on a scratch table (hit/focus/region precedence/addressed/owner-0/no-target/non-owner). `scripts/input_routing_qmp.py` boots the real desktop and proves, with the Browser live, a list-row click (10,844 px), Enter navigation (path 274 px, ink 119 -> 207), About's close box and a second Escape close with no `task 3: exit Ok`, and a Calculator `7` click (display 22 px, ink 680 -> 664) without closing the desktop; `scripts/drag_content_qmp.py` drops its close-the-desktop workaround and passes on both counts. The About symptom did not reproduce on the parent `8b23ad8` (`about_close_qmp.py` still passes); the Browser-live routing proof is the regression. Boot: `window: target ok` beside the other `window:` lines on `-smp 4`/`-smp 1`. **505 host tests** (abi 25, compiler 201, interpreter 168, langhost 89, ext2w 22; no new host harness — the rule is kernel-internal). `cargo xtask build`/`image`/`image --shell` clean; `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `windows_proof` (own boot), `events`, `mouse` (own boot), `calculator/minesweeper/editor/browser/clock_window/widgets check`, `terminal`, `files`, `module_demo`, `ui_icons`/`ui_dialogs`/`ui_menus`/`ui_controls`/`ui_layout`, `text_edit`, `font`, `perf`, `f64parse`, `kill_stress`, `multiplex check`, the shell `terminal` command, `apps_menu_qmp.py`, `about_close_qmp.py`, `drag_content_qmp.py`, `browser_drag_qmp.py`, `tablet_qmp.py` 7/7 and the visual golden (`37802052…e9e81c9f`) pass on `-smp 4` and `-smp 1`. No opcode, builtin, `Host`, `stdlib` or `Event` layout change (ABI v1 stays 75; `stdlib` 125 functions). |
| 2026-11-19 | M8.7 the shell's `Desktop` window is a help panel, not the shell's lifetime (spec 0012 D12/D19). A user closed the window titled `Desktop` with its close box; the boot `desktop_shell` treated it as a quit (`task 3: exit Ok`), the entrypoint disappeared and the idle system halted. `close_desktop_window` now closes only the window, sets `own := 0` and logs `desktop_shell: desktop window closed`; the normal loop keeps running; the Apple square calls `open_desktop_window`, which raises/draws the live window or reopens it at `(600, 72)` with `window_open` and logs `desktop_shell: desktop window open`. `scripts/input_routing_qmp.py` now closes the Desktop window with the Browser and Calculator live, requires the closed/open logs, and asserts no `task 3: exit Ok`/idle summary/halt; it passes on `-smp 4` and `-smp 1`, and `desktop_shell check` still prints `desktop_shell: ok`. No kernel, ABI, opcode or `stdlib` change. |
| 2026-11-19 | M8.8 a visible `Up` button in the File Browser path line (spec 0013). `compute_layout` sets `up_w = 44`, `up_h = 18`, `up_x = rect.x + ContentW - 8 - text_width("home writable") - 8 - 44`, `up_y = rect.y + 2`; `draw_path` draws `stdlib.ui_button(..., "Up", ...)`; a `PointerDown` on `ui_button_hit` calls the same `go_up` as `Backspace`/`Ctrl+Up`; the status hint names `Bksp up`. `browser check` clicks the button through the real pointer path and verifies the root listing, then re-enters `base` for the key checks; `scripts/input_routing_qmp.py` clicks it after Enter navigation and requires the path line to match the pre-navigation root exactly (0 differing pixels) on `-smp 4` and `-smp 1`, with the Browser/About/Calculator/Desktop checks still passing. `browser: ok`; 505 host tests; no kernel/ABI/`stdlib` change. |
| 2026-11-19 | M8.9 draggable File Browser scrollbar thumb (spec 0013). The browser adds `scroll_dragging`/`scroll_grab_dy` and `scrollbar_thumb` (track `BodyH-4`, 8-pixel floor, travel, matching `stdlib.ui_scrollbar`). A pointer-down in hit class 3 records `ev.y - thumb_y`; `PointerMove` with button 1 maps the clamped thumb top onto `top` over the travel and clamps `selected` visible; `PointerUp` or a move without the button ends the drag; `load_dir` cancels it; track clicks still page. `browser check` grabs the thumb in `base`, drags it to the bottom (`top = entry_count - ListRows`, `not scroll_dragging`) and resets the view. `scripts/input_routing_qmp.py` enters `base` (the image order is lost+found, base, home, lib, system) and drags the thumb with a real QMP pointer drag; the scrollbar changed 3,604 pixels and the list 1,370 on `-smp 4` and `-smp 1`, with the Browser/About/Calculator/Desktop checks still passing and `/home/sinan/Desktop/igis-input-routing.png` refreshed. No kernel/ABI/`stdlib` change. |
| 2026-11-19 | M9.1 lexical syntax highlighting in the text editor (spec 0013 "The text editor", changelog; user request "can we do syntax highlighting for .ig files?"). `samples/apps/base/editor` gains an app-local highlighter with no opcode, builtin, `Host`, `stdlib`, ABI or file API change. Source detection (`base/`, `lib/`, `system/` prefix or `.ig` suffix) runs on a successful `open_path`, sets `highlight` and the File menu's check bit; `home/readme.txt` stays plain. The File menu grows to five rows (`Open`, `Save`, `-`, `Highlight`, `Quit`), row 3 toggles `syntax on`/`syntax off`, and `file_checked` feeds the dropdown's checked mask. One line is scanned into keyword (33 words), predeclared type (14 names), string, comment, number and grouped-default runs: keyword `0x000080`, type `0x800000`, string `0x008000`, comment `0x808080`, number `0x804000`; selected cells remain white on the accent band. `//` ends at its line, `{ ... }` ends at the first `}` (no nesting), strings end at the closing quote (`\"` skipped) or the line, and `//`/`{` inside a string stay string content. When `top_line > 0` the block state is scanned from byte 0 line by line (a `//` must not swallow a later `{`) once per frame, then carried by `draw_syntax_line`; the scan is allocation-free and O(document) over the 8192-byte buffer. Token runs advance whole UTF-8 code points and draw through `core.substr_into`/`snap_boundary`; the off path is the old all-black `draw_line` exactly. `editor check` adds plain-vs-source and menu checks, keyword/comment/type/number/string pixel scans, a spanning block comment, a block comment above the visible top line, and a toggle-off zero-palette check before restoring the deterministic document; it prints `editor: ok` on `-smp 4` and `-smp 1`, `editor: host ok` on `langhost`, and the 505 host tests are unchanged. `cargo xtask build`/`image`/`image --shell` are clean; a QMP press-File/drag-to-Highlight/release turns the `base/child` palette counts from keyword 916, type 285, string 488, comment 4,209, number 380 to all zero and back, and Ctrl+Q returns the shell prompt. The editor screenshot is `/home/sinan/Desktop/igis-editor.png` (1024×768, 29,772 bytes) with the same palette counts; `browser check`, `desktop_shell check`, `terminal` and the visual golden (`37802052…e9e81c9f`) pass, `build/home.img` is reset (12/2048 files, 563/8192 blocks, `e2fsck -fn` clean). (`a912765`) |
| 2026-11-19 | M9.2 the editor's pointer budget and draggable scrollbar (spec 0013 "The text editor", changelog; user report "task 4: exit Faulted(BudgetExceeded) after 2893 claims (2891 yields) while trying to scroll in the editor"). The report was the **normal-task 10 s CPU watchdog** (spec 0007 Sch8), not a crash: the interactive loop called `draw_all`/`present_frame` for every `PointerDown`/`PointerUp`/`PointerMove` addressed to the editor, even a no-op move, and M9.1 had made each frame O(document) (the block-comment state rescanned from byte 0 when `top_line > 0`). `handle_pointer` now returns whether visible state changed and the interactive/shot loops repaint only on true: plain moves are free, a menu move repaints only when the highlighted row changes, a thumb drag only when `top_line` changes, the thumb press/release themselves are free, and presses that open/close the menu, move the caret/selection, page the view or activate an item repaint. The scrollbar thumb drags like the browser's M8.9 (`scroll_dragging`/`scroll_grab_dy`, `scrollbar_thumb` matching `stdlib.ui_scrollbar`: track `ScrollH-4`, 8-pixel floor, travel, `Rows` vs `line_count`); track clicks still page, release or a non-primary move ends the drag, and a page/drag clamps the caret into the visible lines. The M9.1 block state is cached in `line_states: bytes[8193]` (one byte per line start) by `refresh_line_states`, called once from `publish_staged`/`ed_replace` (plus the check-mode direct `text :=` draws), and `draw_lines` reads the `top_line` entry and carries it through the visible rows; lexical output is identical and a frame is O(visible lines). `editor check` adds a real injected thumb press/drag in `base/child` (hit class 3, drag to the bottom, `top_line = line_count - Rows`, drag ended, thumb redrawn at the bottom), keeps every M9.1 syntax check, and prints `editor: ok` on `-smp 4`/`-smp 1` (`editor: host ok` on `langhost`); 505 host tests. The new `scripts/editor_scroll_qmp.py` boots `build/igis-shell.iso` with the tablet, runs interactive `editor`, sends 3,000 no-button moves plus a 300-step held-button thumb drag, requires the text region to change and the thumb strip to go gray 190 → 0, sends Ctrl+Q and requires `exit Ok`, no `BudgetExceeded`, the shell prompt and no idle summary/halt. Old code (`c98d019`) reproduces the user: `task 6: Faulted(BudgetExceeded) after 2826 claims (2823 yields)`; new code exits `Ok` after 2,448–2,633 claims with no budget fault on `-smp 4` and `-smp 1`. `browser check`, `desktop_shell check` and the visual golden (`37802052…e9e81c9f`) pass on both; `/home/sinan/Desktop/igis-editor-scroll.png` is 1024×768, 17,206 bytes. The 10 s budget, scheduler and realtime policy are unchanged (`09dc57b`). |
| 2026-11-19 | M9.3 a `/lib` file-open dialog and the editor's File > Open/Ctrl+O (spec 0013 "The text editor", spec 0018 "The `/lib` file-open dialog"; user request "Can we write a file-open dialog? But not in the kernel — as a library element..."). `samples/apps/lib/file_dialog.ig` is ordinary module source (`unit file_dialog;`, `uses core, stdlib, syslib;`) with no `main`, top-level `var` or stream, so it exercises the M5 `stdlib`-import and M6 module rules. Its one public function is `file_dialog.open_file(initial: const string[0]; chosen: var string[256]) -> Status`: it opens a task-owned `Open File` window (content 520×380, centred; frame `(251,185)`/content `(252,201)` at 1024×768), starts in the initial path's listable directory with its file name selected (`base/child` → `base`/`child`), lists up to 96 entries with `core.fs_list` (kind 1/0 selectable, kind 2 gray and refused with a status), and draws a path line with ellipsis, a visible `Up` button, folder/file/other rows, an accent selection, a scrollbar, status and `Open`/`Cancel` buttons using `syslib` + `stdlib.ui_*` only. Up/Down, PageUp/PageDown, Home/End, Enter, Backspace/Ctrl+Up and Escape work; row click selects, double-click opens, the buttons act, the scrollbar track pages and the thumb drags (matching `stdlib.ui_scrollbar`), and the close box cancels via `EventKind.Close`. `next_event` is filtered to the dialog window, an owner `Expose` re-reads `window_content_rect`, and only a visible change repaints (key no-ops, plain moves and drag press/release are free). `Ok` publishes the whole regular-file path into `chosen` with one `core.substr_into`; cancel is `Invalid` and a too-long result `CapacityExceeded`, both leaving `chosen` untouched, and a disabled screen (`langhost`) is `Invalid` with no window. No opcode, builtin, `Host`, `stdlib` or file API change. The editor imports `lib.file_dialog`, and File > Open/Ctrl+O call `browse_open` (`open_file(path, dialog_path)`, then `open_path(dialog_path)` on `Ok`, `open cancelled` otherwise) and raise its own window; a cancel leaves the document, path, caret, selection, scroll and highlighting untouched. `PathCapacity` is now 256 (`PATH_MAX`) and `TempCapacity` 260; the check/host paths still call `open_path` directly. Proof: `editor: ok` on `-smp 4`/`-smp 1` (with and without the home disk), `editor: host ok` on `langhost`, 505 host tests; `scripts/file_dialog_qmp.py` boots `build/igis-shell.iso`, runs interactive `editor`, Ctrl+O, checks the chrome/face pixels and a 28,708 px frame diff, navigates root→`lib` (row 3)→`math.ig` (row 2 from the sorted stage: `file_dialog.ig, inject.ig, math.ig, ...`), clicks `Open`, requires dialog closure 30,742 px, text 17,959 px and path 231 px with the ink bbox 79 → 86 px (11 cells = `lib/math.ig`), then Ctrl+O/Escape cancels with a 0-pixel text diff; Ctrl+Q ends `task 6: exit Ok` (161 claims) with no budget fault or idle summary on both `-smp 4` and `-smp 1`. Screenshots `/home/sinan/Desktop/igis-file-dialog.png` (1024×768, 29,726 B) and `/home/sinan/Desktop/igis-file-dialog-open.png` (1024×768, 27,826 B). `browser check`, `desktop_shell check`, `boot_desktop_qmp.py` and the visual golden (`37802052…e9e81c9f`) pass; editor package 202,328 B code (50 frames)/38,872 B state/51,416 B stack; image `lib` holds `file_dialog.ig` (28,581 B); `e2fsck -fn build/home.img` clean after the reset (12 files/563 blocks). (`be544fa`) |
| 2026-11-19 | M9.4 the editor opens the real source files (spec 0003 "Application buffers above 256 bytes", spec 0013 "The text editor"; user report "I can open code like beat and deep, but not calculator the same way; why? There is no error either."). The `/lib` file-open dialog was already correct and returned `base/calculator`; `samples/apps/base/editor` then refused it with `too large (8192 max)` because `BufferCapacity` was 8192, leaving the old document and an easy-to-miss status line. `BufferCapacity` is now 131072 (128 KiB, the spec 0008 per-unit source cap; `LineStateCapacity` 131073), so every current sample opens (the largest is `editor` at 81,509 B); `base/beat` 554 B and `base/deep` 874 B were always below the old limit, while `base/calculator` is 32,516 B. A file over 131072 B is still refused by size before it is read with `too large (131072 max)`, and the full-buffer `ed_replace` boundary still returns `CapacityExceeded` with no partial write. The editor package is now 203,136 B of code (50 frames), 530,392 B of state (130 frames) and 174,328 B of stack (43 frames; the `ed_replace` local staging buffer is 128 KiB), all under the 1 MiB region caps, so no kernel change was needed. `editor check` (2,120–2,123 claims across the `-smp 4` home/no-home runs and 2,120 on `-smp 1`, no budget fault) loads `base/calculator` after the existing error classes, verifies the exact 32,516-byte length, the path, valid UTF-8 and a known prefix, then restores `base/child`; the M9.1 highlighting and M9.2 scroll/thumb checks still pass in the same run. `scripts/file_dialog_qmp.py` now also navigates `base` -> `calculator` in the dialog (row 6 selected, checked by its accent band) and clicks `Open`: the dialog closes (40,199 px), the editor text changes by 27,137 px (22,720 non-white text pixels) and the path line becomes `base/calculator` (118 px bbox), then Escape cancels (19 px text diff) and Ctrl+Q exits `Ok` after 1,353 claims on `-smp 4` and `-smp 1` with no budget fault or idle summary; the click hold is 0.35 s so a busy dialog cannot lose the USB tablet press report. Screenshots `/home/sinan/Desktop/igis-file-dialog.png` (29,757 B), `igis-file-dialog-open.png` (27,410 B) and `igis-file-dialog-large.png` (31,173 B), all 1024x768. `editor: host ok`; 505 host tests; `cargo xtask build`/`image`/`image --shell` clean; `browser check` and `desktop_shell check` pass; the visual golden is unchanged (`37802052…e9e81c9f`) on both core counts; `build/home.img` is reset (12 files/563 blocks, `e2fsck -fn` clean). No kernel, opcode, builtin, `Host`, file-API, `stdlib` or dialog change; the dialog stays generic and does not filter by size. (`142c0f2`) |
| 2026-11-19 | M10 planning: spec 0020 "Networking — IPv4, UDP, TCP and the `socket` unit" (Accepted) and ADRs 0048–0050 (Accepted) open the network milestone. The wire stack (Ethernet, ARP, IPv4, ICMP, UDP, minimal TCP) is an allocation-free `net` crate used by the kernel and host-tested against a simulated link; the application surface is `samples/apps/lib/socket.ig` on the program/interpreter side, with DNS/HTTP as ordinary `/lib` source. The first NIC is virtio-net legacy behind one `NetDevice` seam (polling first, INTx vector `0x2D` in M10.6, e1000/e1000e later for VMware), sockets are owner-checked generation handles with `WaitFor::Net`/`WaitFor::Deadline` and a `1 << 63` source tag, and static IPv4 (`10.0.2.15/24`, gateway `10.0.2.2`, DNS `10.0.2.3`) comes before DHCP. PLAN gains M10.1–M10.9; OPEN-QUESTIONS gains Q52–Q58 (TLS, IPv6, Wi-Fi, multiple NICs, TCP backlog, DHCP/DNS follow-ups, trust). No code, no opcode, no builtin and no test count change. |
| 2026-11-19 | M10.1–M10.4 first slice implemented (`e08745d`; spec 0020 N1–N16, ADRs 0048–0050). New host-testable `net` crate (Ethernet II, 16-entry ARP, IPv4/ICMP, UDP with one datagram per socket, stop-and-wait TCP client with SYN retry, 1/2/4/8 s RTO and RST/FIN; 42 host tests) and `kernel/src/net` with a legacy virtio-net I/O-BAR0 driver (two 16 KiB split rings, 32 RX + 16 TX 2 KiB buffers, identity-map physical addresses, polling, `net: tx ok`) behind a static `SpinLock`. ABI builtins 62–68 (`net_config`, `net_info`, `net_mac`, `socket_open`, `socket_send`, `socket_recv`, `socket_close`; `socket_recv` stages the destination capacity as a hidden compiler operand) and the program-side `samples/apps/lib/socket.ig` + `lib/http.ig` + `base/net_probe`; `task::reclaim` closes owned sockets. Sockets are non-blocking (N13 staging). Proof: `scripts/net_qmp.py` boots `--shell` with `-netdev user` and fetches `http://10.0.2.2:6666/` via a real TCP handshake; the body is 1,406 bytes (the host `python3 -m http.server` listing) and `net_probe: ok` on `-smp 4` and `-smp 1`, `--expect "Directory listing"` passes, `--no-net` prints `net_probe: no device`, the visual golden is unchanged (`37802052…e9e81c9f`), and `files`/`module_demo`/`streams`/`text`/`text_edit`/`desktop_shell check`/`windows check` pass. **553 host tests** (511 language + 42 net); `cargo xtask build`/`image`/`image --shell` clean; boot frames 57,803 free; `net_probe` package 87,280 B code (22 frames), 4,104 B state, 26,152 B stack. Remaining: blocking waits/`socket_source`, DNS, INTx, listener, DHCP, e1000. |
| 2026-11-19 | M10.5 DNS resolver in source (`2b8bd70`; spec 0020 N16). `samples/apps/lib/dns.ig` (`unit dns; uses core, stdlib, lib.socket;`) builds a 29-byte standard recursive A query (id from `core.clock()` low bits, `0x0100`, one question, QNAME labels, QTYPE A/QCLASS IN), sends one UDP datagram to `server:53`, and validates a 61-byte slirp response (id/QR/opcode/TC/RCODE, qdcount 1, ancount ≥ 1, bounds-checked labels/compression pointers, first type-A/class-IN/rdlength-4 answer, CNAME chain up to four, NXDOMAIN `NotFound`, malformed `Invalid`, timeout `WouldBlock`). `net_probe dns` sets the static config and prints `net_probe: dns 104.20.23.154 (0x6814179a)` then `net_probe: ok`; the two slirp A records rotate. `net_probe bogus`/`--no-net` stay clean and a dead server times out after ~4 s with no false `ok`. 553 host tests unchanged (the canned DNS `langhost` check is not committed); `cargo xtask build`/`image --shell` clean; HTTP `net_probe` still passes. `net_probe` package 98,408 B code (25 frames), 4,104 B state, 28,912 B stack. |
| 2026-11-19 | M10.8 DHCP client in source (`3752d17`; spec 0020 N8/N18). `samples/apps/lib/dhcp.ig` (`unit dhcp; uses core, stdlib, lib.socket;`) builds a 300-byte BOOTP/DHCP packet (chaddr from `core.net_mac()`, xid from `core.clock()`, broadcast flag, options 53/55), sends DISCOVER from local port 68 to `255.255.255.255:67`, parses OFFER (options 53/54/1/3/6/51), sends REQUEST (50/54), parses ACK, and applies the lease with `core.net_config`; 4+4 attempts under a 6 s cap, one NAK restart, outputs only on `Ok`, socket closed on every path. `socket.udp_from` adds the explicit local port. A one-line `net` fix lets a broadcast send leave from `0.0.0.0` before an address is configured; a socket opened to the broadcast address accepts the server reply from any source. `net_probe dhcp` prints `net_probe: dhcp 10.0.2.15/24 gw 10.0.2.2 dns 10.0.2.3`, fetches the 1,406-byte HTTP body and prints `net_probe: ok` on `-smp 4`/`-smp 1`; the same works over e1000/e1000e (`c7989c4`). `--no-net` is clean and a dead server times out in ~6 s with no false `ok`. **576 host tests** (511 language + 43 net + 22 ext2w); `net_probe` package 113,584 B code (28 frames), 4,104 B state, 32,760 B stack. No renewal/INFORM/RELEASE; transaction id + magic cookie are the guard. |
| 2026-11-19 | M10.9 e1000/e1000e driver behind `NetDevice` (`c7989c4`; spec 0020 N1–N4, ADR 0049). `kernel/src/net/e1000.rs` drives the 82540EM (`8086:100e`, QEMU `-device e1000`) and 82574L (`8086:10d3`, `-device e1000e`): memory BAR0 mapped uncached through the existing 2 MiB split, `CTRL.RST`/`SLU`, MAC from RAL/RAH, 32 RX + 16 TX legacy 16-byte descriptor rings with static 2 KiB buffers, `RCTL = EN\|SBP\|UPE\|MPE\|BAM\|SECRC`, `TCTL = EN\|PSP\|CT\|COLD`, polling only (`IMC` masked). A monotonic TX cursor fixes a ring-wrap bug (TDT only moves forward); RX uses the standard tail give-back. `pci::find_e1000` accepts 100e/10d3 (and 100f/153a/15b8 untested), enables memory space + bus master, and `xtask --net-device virtio\|e1000\|e1000e` selects the QEMU device (default virtio). `net: e1000 8086:100e pci 00:03.0 mmio 0xfebc0000 mac 52:54:00:12:00:80`, `link up`, `tx ok`; HTTP 1,406 B + DNS pass on e1000/e1000e on `-smp 4`/`-smp 1`, DHCP + HTTP passes on both, a 10× HTTP/DNS stress run is 11/11, and virtio/`--no-net` are unchanged. The visual golden is unchanged (`37802052…e9e81c9f`). VMXNET3 and INTx remain future work. |
| 2026-11-19 | M10.6 NIC INTx, the polling fallback and `core.net_stats` (spec 0020 N4/N19/N22, ADR 0023/0049 + new ADR 0051). `arch/x86_64` gains `apic::NET_VECTOR = 0x2d`, an `irq_net` stub and an IDT gate; `main.rs` parses the multiboot2 command line for `igis.net_irq=poll`, routes GSI 11 through the existing `ioapic::init` (one redirection entry per call, page split once, IRQ12 untouched) and logs `ioapic: version 0x20, IRQ11 -> vector 0x2d on apic 0 (level)` + `net: irq ok (vector 0x2d)`. `net::on_irq` is the whole handler: pending flag, one read-to-clear acknowledge (virtio ISR / e1000 ICR through two atomics, never the `NET` lock) and an EOI; `net::service` drains as before and prints `net: irq delivered N interrupt(s)` once. `net::enable_irq` clears a stale cause after the route (legacy virtio latches its INTx level high from the boot test frame); e1000 now masks with `IMS` and unmasks only `RXT0|RXO|RXDMTO|LSC` with `IMC` (the old `IMC = u32::MAX` had unmasked everything, hidden by polling). `core.net_stats(var rx, var tx, var drops, var errors) -> Status` is builtin 73 (no opcode; `interpreter::NetStats`, `Host::net_stats` default `Invalid`, kernel mapping from `net::stats`) and `samples/apps/base/net_perf` runs ten timed HTTP gets and prints the counters before/after. `xtask --net-irq intx|poll` writes `igis.net_irq=poll` into grub.cfg for the polled proof; `--no-net`/`--net-device` unchanged. QEMU `-d int` counts 103 `v=2d` deliveries for a virtio `net_perf` run. On `-smp 4` and `-smp 1`: `net_probe http`/`dns`/`dhcp` and `net_perf` pass with INTx over virtio, e1000 and e1000e, and with `--net-irq poll` (same counters: virtio `17/23 -> 77/113`, e1000 `9/12 -> 69/102`, e1000e `15/21 -> 75/111`); poll `net_perf` 174 ms total (avg 17.4 ms) vs INTx 179 ms (avg 17.9 ms) on `-smp 4`. `--no-net` reports `net_probe: no device`; `scripts/net_qmp.py` passes on both core counts; the visual golden is unchanged (`37802052…e9e81c9f`); `boot_desktop_qmp.py` reaches `terminal: ok`. **580 host tests** (515 language + 43 `net` + 22 `ext2w`); ABI v1 stays at 75 and `stdlib` at 125 functions. |
| 2026-11-19 | M10.7 TCP listener/`accept` and `net_echo` (`efeeadf`; spec 0020 N10). `net` gains `KIND_LISTEN` (open kind 3, nonzero bind port), a two-handle pending queue, inbound SYN → `SynReceived` + SYN-ACK (MSS 1460), final ACK → `Established`/enqueue, backlog-full RST, SYN-ACK retry/5 s expiry, RST cleanup and listener close/owner cleanup; accepted connections use the normal TCP path. `core.socket_accept` is builtin 72; `lib/socket.listen/accept` and `samples/apps/base/net_echo` are the program side. `scripts/net_echo_qmp.py` boots `--shell` with `hostfwd=tcp::7007-:7`, sends three sequential lines from the host and requires byte-exact echoes + `net_echo: ok` on `-smp 4`/`-smp 1`; e1000 and e1000e pass (one port per run to avoid `hostfwd` reuse). HTTP/DNS/DHCP still pass, `--no-net` prints `net_echo: no device`, and the visual golden is unchanged (`37802052…e9e81c9f`). **590 host tests** (519 language + 49 net + 22 ext2w); `net_echo` package 85,424 B code (21 frames), 0 B state, 21,944 B stack. Limits: backlog 2 (third gets RST), no TIME-WAIT, one listener per port, non-blocking accept. |
| 2026-11-19 | Blocking socket follow-up (`5ae91bc`; spec 0020 N13, spec 0005, ADR 0036/0050). `WaitFor::Net(handle)` and `WaitFor::Deadline(ns)` are new scheduler conditions; a host `WouldBlock` makes the machine return `Outcome::Blocked` and retry the same instruction with operands intact. `net` gains per-socket `timeout_ns`/`op_deadline_ns`/`wait_op`, `set_timeout`, `arm_wait`, `finish_wait`, `take_timed_out`, `wait_ready`, `ready_handles` and an `event_seq`; `net::service` expires deadlines, compares the sequence and calls `task::wake_net` after dropping `NET`; the scheduler's post-block probe uses the recorded direction. `core.socket_timeout` is builtin 71 (0 = none, clamped to 1 h, default 30 s; connect keeps its 5 s `Closed`), `core.socket_source` is compiler-lowered to `1 << 63 \| handle`, and `next_any`/`poll_any` use `Host::socket_readable`; `net_select` proves the selector plus 300 ms recv/select timeouts, `net_echo` accept blocks, `net_probe http/dns/dhcp` and `net_perf` still pass, `kill_stress` is 300/300, `mouse` 600/600, visual golden unchanged. **605 host tests** (527 language + 56 net + 22 ext2w); `net_select` package 88,744 B code (22 frames), 64 B state, 24,720 B stack. Generic `WaitFor::Deadline` is timer-woken but no source primitive produces it; send-space is not a selector source. |
| 2026-11-19 | DNS `langhost` test (`af27de8`; spec 0020 N16). `samples/lang/dns_check.ig` is a host-only, socket-free `unit dns_check; uses core, stdlib, lib.dns;` sample that exercises the 29-byte query builder and `dns.parse_response` on canned A (0x5DB8D822), NXDOMAIN, bad id, truncated 11-byte header, TC (`q[2] = 0x83`), opcode 1, QDCOUNT 2, RDATA overrun, CNAME→A, five-CNAME bound, CNAME-only/empty-answer and the disabled-host `dns.resolve` path; it prints `dns_check: ok`. `langhost/tests/e2e.rs` adds `dns_canned_packets_parse_on_the_host`, and `langhost` is 86 tests (606 total: 528 language + 56 net + 22 ext2w). No kernel/ABI/compiler/interpreter change; `samples/lang` is not staged, so the image is unchanged. **M10 is complete.** |
| 2026-11-19 | `purl`: a minimal `curl`-like HTTP/1.0 GET command (`samples/apps/base/purl`, no window/graphics). It accepts `http://host[:port][/path]` with a dotted IPv4 or DNS name, defaults to port 80 and `/`, includes a non-default port in the `Host` header, applies the QEMU user-net static defaults only when no address is configured, and prints the body (case-by-case errors: `only http://`, `usage`, `dns failed`, `timeout`, `closed`, `failed <status>`, `no device`). It uses `lib.dns`/`lib.http`/`lib.socket`, so it is an ordinary source application, not a shell builtin. Kernel proof: `run purl http://10.0.2.2:6666/` prints the host directory listing; `run purl http://example.com/` resolves via DNS and prints the Example Domain body; `ftp://`/no-arg error paths and `--no-net` (`purl: no device`) are clean. Package: 102,496 B code (26 frames), 4,104 B state, 30,472 B stack. No kernel/ABI/compiler/interpreter change; 606 host tests unchanged. |
| 2026-11-19 | Selector readiness fix (`437969b`; spec 0020 N13, spec 0005): `net::select_ready`/`kernel::net::select_ready` is the `core.next_any`/`poll_any` predicate and reports data, EOF, error, a pending listener connection or an expired deadline — **not** a bare completed TCP connect. `net::readable` still reports connect completion for the tests/other callers. Without the split, a console loop (the new `nc`) selected an empty established socket, then blocked in `recv` where a console byte could no longer wake it; `task::source_ready` and `KernelHost::socket_readable` now use `select_ready`. The net test asserts the distinction. |
| 2026-11-19 | `nc`: a minimal TCP-only netcat (`samples/apps/base/nc`, commit `eb29827`). `run nc host port` accepts a dotted IPv4 or DNS name, applies the QEMU user-net defaults only when no address is configured, opens one TCP socket, multiplexes console bytes and socket bytes with `core.next_any(sources = [0, socket.source(id)])`, echoes typed bytes locally, forwards them (looping over a partial send), prints received bytes, and exits on peer EOF/`Closed` or Ctrl+C (0x04 also exits). Errors: `usage`, `no device`, `dns failed`, `connect failed`, `send/recv/select failed`, `closed`. No listen/UDP/TLS/redirection. Kernel proof: a host echo server on `127.0.0.1:7777` echoed `hello` (local + remote) and Ctrl+C returned to the shell; an HTTP GET through `nc 10.0.2.2 6666` printed the directory listing and closed; no-arg/missing-port usage and `--no-net` (`nc: no device`) are clean. Package: 98,528 B code (25 frames), 2,064 B state, 23,928 B stack. No kernel/ABI/compiler/interpreter change; 606 host tests unchanged. |
| 2026-11-19 | Separate base file commands (`0b8ff2c`; spec 0013/0019): `samples/apps/lib/path.ig` (`split_cwd`, `join`, `display`, `basename`; `/`, `~`, `.`, `..`, display/API paths), `lib/cli.ig` (status text, `is_home`, word split), `lib/list_dir.ig` (`ls`/`dir`) and `lib/file_view.ig` (`cat`/`head`/`tail`). New apps `base/ls`, `dir`, `pwd`, `cat`, `head`, `tail`, `mkdir`, `rmdir`, `rm`; all take `"<cwd> <rest>"` (an explicit `run` form without a leading `/` treats the whole tail as root) and print their own `<cmd>:` errors. `ls` prints `d/f/o name [size]`; `head`/`tail` default 10 (1..=64 / 1..=32) with a two-pass `tail`; `mkdir`/`rmdir`/`rm` use the home-only write API; empty dirs are detected via `fs_size == Invalid`; read-only writes print `read-only`. Proof: 23 explicit `run <app> /cwd ...` commands on `-smp 4`/`-smp 1`; `head`/`tail`/file/empty-dir/read-only/not-empty/usage paths; `home_write` + `rm /home/written.txt`; `e2fsck -fn` clean (12 files/563 blocks). A `samples/lang/path.ig` + langhost test pins the path helpers. 607 host tests. |
| 2026-11-19 | Shell current directory, `cd` and base-command dispatch (`3597d6c`; spec 0012): the shell keeps a display cwd (`/` start), prompts `igis:/> `, `igis:/base> `, and adds a stateful `cd [dir]` builtin (`~`/empty → `/home`, `/`, `.`, `..`, relative join; directory check via `fs_list`/`fs_size`, empty dirs accepted). A non-builtin command is resolved as `base/<cmd>` (fallback `system/<cmd>`) and run with args `"<cwd> <rest>"`; success is silent, a non-Ok exit prints `<cmd>: killed/faulted`, spawn/compile failures print `<cmd>: <diag>`, unknown names print `unknown command: <cmd>`. `run` keeps its `child:` messages. `help` lists the builtins and `ls dir pwd cat head tail mkdir rmdir rm`. All 28 script prompt waits accept `(?:shell> \|igis:/[^>]*> )` (old images still work), and the langhost shell tests plus a new `shell_walks_the_tree_with_cd_and_bare_commands_on_the_host` pin `pwd`/`ls`/`cat`/`head`/`tail`/`cd`/`mkdir`/`rmdir`/`run`/unknown/`bye`. Kernel transcript on `-smp 4`/`-smp 1`: root listing, `/base` navigation, `cat`/`head`/`tail child`, `/home` mkdir/rmdir, empty-dir and file `cd` errors, `cd ~`/`/`/`..`, `unknown`, `run child world` and `run ls /base`; `net_qmp.py`, `net_echo_qmp.py`, `mouse_burst_qmp.py`, `visual_regression.py` (golden unchanged) and `boot_desktop_qmp.py` (`terminal: ok` with `igis:/> `) pass. 608 host tests. |
| 2026-11-19 | Fixed bare non-file commands (`e02fc8f`): the shell passes `"<cwd> <rest>"` only to the file commands (`ls`, `dir`, `pwd`, `cat`, `head`, `tail`, `mkdir`, `rmdir`, `rm`); every other `base/`/`system/` app receives the raw tail. This restores `nc islekdemir.com 80`, `purl http://...`, `text 42 hi`, `child world` and the rest; previously they saw `"/ "` prepended and `nc` printed its usage. The staged args are in a helper procedure (not `main`) to keep the host test compile stack happy. Proof: bare `nc 10.0.2.2 6666` + HTTP, `purl http://10.0.2.2:6666/`, `ls`/`cd base`/`pwd`/`cat child`, `child world`, `text 42 hi`, and `nc islekdemir.com 80` reaching `nc: connecting to islekdemir.com:80` (Ctrl+C exits) on the shell image. 608 host tests unchanged. |
| 2026-11-20 | M11 terminal emulator, `/apps` tree and sectioned Apps menu (spec 0021, ADR 0053 supersedes ADR 0028/spec 0014; specs 0003/0005/0012/0018 amended). The kernel no longer owns a terminal grid: `console::init` opens only the System Log, `core.terminal_attach` is retired, and the new console-session service (`kernel/src/ui/session.rs`) gives each emulator an owner-checked pair of rings (4 KiB output, 512 B input) sized from `MAX_TASKS`. `core.session_open`/`close`/`send`/`recv` are host builtins 74–77 and `core.session_source` is compiler-lowered to `1 << 62 | id`; a child inherits its requester's session, so `core.write` and `core.read_input`/source 0 route through it, and serial input follows the focused window owner's session. `Task::reclaim` releases a slave binding or closes an owner session; output overflow keeps the newest bytes. `apps/utilities/terminal` is an ordinary GUI emulator: it owns a screen-only grid (no scrollback), opens a session, spawns `base/shell`, converts keys to session bytes and draws CR/LF/BS/TAB/printable output; it redraws only while topmost. `base/shell` is now a session shell (no window, no attach, clean prompt, serial fallback on a graphics-less boot) and `terminal_probe` proves one live session per owner, stale `NotFound` and close. The image gains the top-level `apps` tree (`accessories`, `games`, `productivity`, `utilities`): calculator, clock_window and widgets, minesweeper, editor and browser moved out of `base`, which keeps the CLI tools, shell and desktop. Bare launches search `base`, the four categories, then `system`; the shell does the same and the browser/file checks follow the new root (lost+found, apps, base, home, lib, system). The bar is `File / Apps / Windows / System`; the Apps pull-down has `#`-prefixed section headers (`stdlib.ui_menu_is_header`, 126 functions) and a Terminal row under Utilities; every activation starts a new emulator. `File` opens a desktop-owned window list instead of writing through a kernel terminal. `core.write` serializes under the console lock so QMP transcripts do not split app lines. Proofs: `boot_desktop_qmp` and `apps_menu_qmp` (Apps > Clock/Browser/Terminal over live windows), `scripts/multi_terminal_qmp.py` on `-smp 4`/`-smp 1` (two instances, independent `cd`/`pwd`, focus-routed serial input, one `exit` leaving the other alive), `about_close_qmp`, `system_menu_qmp`, `input_routing_qmp`, `drag_content_qmp`, `browser_drag_qmp`, `editor_scroll_qmp`, `file_dialog_qmp`, `desktop_shell check`, and the unchanged visual golden `37802052…e9e81c9f`. **609 host tests** (531 language + 56 `net` + 22 `ext2w`); ABI v1 stays at 75. |
| 2026-11-20 | Window minimize and log paint suppression (spec 0011 W30, ADR 0054; spec 0012 File list, spec 0021 B2). The service draws an 11×11 minimize box at the right end of every title bar. A press consumes the click, hides the window at the bottom of the z-order, moves focus to the topmost visible window and erases its frame; `window_raise` clears the flag, restores the window, refocuses and repaints it. Minimized windows are skipped by hit-testing, visible parts, chrome and expose marking but remain in `window_info` so `File`'s Window List can restore them; its rows are clickable. Owner-0 kernel windows may be minimized. The System Log keeps its grid and serial mirror current while minimized or while an app-drawn pull-down holds the modal grab, but does not paint; `console::pump` repaints after the menu closes or the window is restored, so kernel log refreshes no longer overdraw the Apps menu. `scripts/minimize_qmp.py` proves the log background is visible, minimized, survives a pointer sweep over Apps with the menu still white, and repaints after a Window List row click on `-smp 4`/`-smp 1`. The visual golden changes only in the title-bar band: `686d0330…de52754c` (417 pixels, bbox 466,2–1019,13). Chrome, window pixels, `desktop_shell check` and the QMP harnesses pass; 609 host tests unchanged. |
| 2026-11-20 | Minimized windows are now discoverable (spec 0011 W30, spec 0012 D10/D11, ADR 0054; spec 0005/0003 surface). `syslib.window_minimized(id) -> bool` is builtin 78 (no opcode; `Host::window_minimized`, default `false`; kernel `window::is_minimized`). The bar's `Windows` item is a pull-down listing every live window in topmost-first order; minimized rows carry a `min` shortcut label and the File window list prefixes their title with `*`. Selecting a row calls `window_raise`, so a minimized window is restored by the same click. The pull-down takes/releases the modal grab, supports Up/Down/Enter/Escape and F9/F10/Left/Right switching, and the bar label inverts while open. `desktop_shell check` lists the windows and raises the Terminal row; `scripts/minimize_qmp.py` now restores the System Log through `Windows` and proves the Apps menu is not overdrawn. **610 host tests**; ABI v1 stays at 75. |
| 2026-11-20 | Full-stack repaint on a window switch and a completed move (spec 0011 W11/W17/W21/W27 clarified, W31 added; ADR 0055; user report "moving windows pollute the windows below until they are redrawn"). `Table` gains `full` and `snapshot`. A raise that changes z-order/focus/minimized state, plus `open`/`close`/`minimize`/`close_task`, and a completed programmatic move or a drag release that moved, set `full`; an already-topmost focused raise and a drag step do not. The repair then replaces accumulated damage with the whole screen, restores the desktop outside live windows and the persistent claim rectangle, redraws every window's chrome bottom-to-top and marks every live non-minimized window for a whole-content `Expose`. Presentation is now exact service-painted pixels only — restored desktop pieces, chrome band/border pieces (clip minus the content rectangle), and the topmost move snapshot destination — so an erase rectangle can no longer copy stale lower-window content to the framebuffer; the old coalesced-present model remains in `damage_self_check` only. The claim rectangle is excluded from the desktop restore, so the app-drawn menu bar survives a switch. `terminal.ig` and the desktop shell's `Desktop`/Window List/About draws stop refusing to repaint while not topmost; `window_present`'s visible-parts clip bounds them. `window: paint ok` asserts the flag for moves/drag releases and its absence otherwise. `windows_events` drains the now-full expose set. Verified on `-smp 4` and `-smp 1`: `desktop_shell check`, `windows`, `windows_events`, `windows_demo`, `calculator check`, `minesweeper check`, `editor check`, `clock_window check`, `widgets check`, `drag_content_qmp`, `browser_drag_qmp`, `multi_terminal_qmp`, `input_routing_qmp`, `about_close_qmp`, `apps_menu_qmp`, `system_menu_qmp`, `minimize_qmp`, `boot_desktop_qmp`, visual golden `686d0330…de52754c`; `scripts/window_repaint_qmp.py` shows the desktop shell's marker repainted after Calculator moves away and a drag that stays over the shell keeps the calculator's display/border/panel intact. 610 host tests; no opcode, builtin, `Host`, `stdlib` or cap change (ABI v1 stays 75). |
| 2026-11-20 | A minimized window is no longer restored by closing an app-drawn menu (spec 0011 W30; user report "I minimize system log but running anything like calculator brings it back"). `desktop_shell`'s `repair_menu_area` scans `window_info` topmost-first and raises the first window whose frame intersects the menu so the service repairs the app-drawn pixels. It did not skip minimized windows, so the minimized System Log was the pick and `window_raise` restored it whenever Apps closed (which every launch does). It now skips minimized windows and, when no visible window is under the menu, repaints the service desktop pattern (white + dither) in the menu rectangle and presents it. `window_present` is an `Ok` no-op for a minimized window, and the shell skips its own minimized windows and does not raise a minimized Desktop window after a menu. `scripts/minimize_qmp.py` now opens and closes Apps with the log minimized and checks the log pixel stays gone and the menu edge/inner pixels return to the dither; passes on `-smp 4`/`-smp 1`. 610 host tests; no ABI or `stdlib` change. |
| 2026-11-20 | Terminal scrolling no longer trips the normal-task watchdog (spec 0021 T2; user report "terminal freezes and crashes when it has to scroll down (cursor reaches end of the text area)"). `apps/utilities/terminal` kept the screen as `array[string[MaxLine], MaxRows]` and `scroll_one` copied every row (`lines[i] := lines[i + 1]`), so one scroll copied 47 × 256 bytes and a large output burst (e.g. `cat apps/productivity/browser`, ~143 KiB, ~1,800 scrolls) burned the task's 10 s / 200 M-step budget and the task exited `Faulted(BudgetExceeded)`. The grid is now a ring: `top` names logical row 0, `phys(row) = (top + row) mod rows` indexes it, a scroll advances `top` and clears the one row that becomes the new bottom. Insert/backspace/draw use `phys`. The terminal survives the largest source and still answers `echo terminal-alive`; `scripts/terminal_scroll_qmp.py` proves it on `-smp 4`/`-smp 1` (no terminal `Faulted(BudgetExceeded)` line, prompt returns, terminal responsive), and `multi_terminal_qmp.py` still passes. 610 host tests; no ABI/`stdlib` change. |
| 2026-11-21 | `base/ifconfig` and `base/nslookup` (spec 0020 "Configuration and name resolution"; user request "can you write ifconfig, nslookup?"). Both are ordinary apps on existing builtins. `ifconfig` reads `core.net_info`/`core.net_mac`/`core.net_stats` and prints one `eth0:` block (flags, inet/prefix/netmask, MAC, gateway, DNS, RX/TX/drops/errors); `ifconfig dhcp` applies a `lib.dhcp` lease with `core.net_config`; `ifconfig <ip> <netmask> <gateway> [dns]` applies a locally parsed static configuration (the configured DNS is kept when omitted). `nslookup <name> [server]` prints Server/Name/Address, answers a numeric name locally, defaults the server to `core.net_info`, and reports NXDOMAIN, timeout or a status. Shell `help` lists both. Two `langhost` e2e tests pin the no-device paths (`eth0: no network device`, `nslookup: no network device`). On QEMU user networking the first `ifconfig` shows DOWN/0.0.0.0, `ifconfig dhcp` gives 10.0.2.15/24 gw 10.0.2.2 dns 10.0.2.3, `ifconfig` shows UP and the counters, `nslookup example.com` returns an A record, `nslookup 10.0.2.2` answers locally, and `nslookup no-such-name.invalid` reports NXDOMAIN. **612 host tests** (534 language + 56 `net` + 22 `ext2w`); no opcode, builtin, `Host`, `stdlib` or cap change (ABI v1 stays 75). |
| 2026-11-21 | Desktop halt notice (spec 0017 S9a; user request "when we halt the system in desktop mode, can we show a screen as 'you may now shutdown your computer'"). `desktop_shell` gains `draw_halt_screen`: a full-screen black fill, the centred white proportional text `You may now shut down your computer.`, and one `syslib.present`, called by `request_halt` immediately before `core.halt`. `sched::halt_system` writes `system: halt requested` straight to serial instead of `println!`, so the System Log repaint cannot cover the notice before the halt. `scripts/halt_screen_qmp.py` boots the desktop, clicks System > Halt, captures the paused framebuffer (`-no-shutdown`) and checks a black background (0 anomalies outside the message/cursor), 422 px of centred message ink at x410..611, the `N of M APs stopped` summary, and no return to the desktop; it passes on `-smp 4`/`-smp 1` and writes `build/screenshots/igis-halt.png`. `desktop_shell check`, `system_control_qmp.py --mode halt` and the visual golden still pass. **612 host tests**; no ABI, `stdlib` or cap change. |
| 2026-11-21 | Clock live mode (spec 0011 windows; sample `apps/accessories/clock_window`; user report "clock screenshot doesnt have a clock. but thatS also because when I run clock, it just disappears instantly"). A normal launch ran `check_mode`, drew the fixed 10:08:30 proof, verified pixels, closed the window and exited. `live_mode` now draws the current time and stays until the close box: it promotes with `core.realtime_on` and calls `core.heartbeat()` around the once-per-second redraw loop, so it is exempt from the normal CPU/step budget; on a single-core boot where the desktop shell already holds the realtime slot it falls back to a blocking `syslib.next_event` loop and repaints on expose/events. `check` remains the deterministic proof and `shot` the five-second QMP hold. `docs/screenshots/clock.png` is regenerated on the desktop with the menu bar and a visible face. `run clock_window check`, `clock_window_screenshot_qmp.py`, a 4-core live launch and a 1-core live launch (face visible, closes on the close box) pass; 612 host tests. |
| 2026-11-21 | Host wall-clock sync for the clock windows (spec 0003/0005; user request "can you sync the clock to host?"). `apps/accessories/clock_window` reads the CMOS RTC (status-B BCD/binary and 12/24-hour aware, update-flag wait, stable re-read) through `syslib.port_in8`/`port_out8`, records the RTC seconds-of-day and monotonic base, and advances from `core.clock()`; `desktop_shell` uses the same reader for the menu-bar `HH:MM`. `xtask run` and the clock/README screenshot harnesses pass `-rtc base=localtime`, so QEMU exposes the host local time (guest `clock` 01:04:04 vs host 01:04:05). The clock's live mode now blocks in the new `core.sleep(ms)` builtin 79 instead of a realtime spin: `Host::blocking_sleep` defaults false (mocks/`langhost` immediate `Ok`), the kernel arms `WaitKind::Deadline` and the machine keeps the absolute deadline across the retry; blocked time is not budgeted and a busy realtime clock can no longer starve input. `clock_window` prints `ready HH:MM:SS` as a diagnostic. Verified on `-smp 4`/`-smp 1`: `run clock_window check`, `clock_window shot` (host time, no fault), live launch (face visible, closes on the close box), `run clock` RTC proof, 613 host tests, and the regenerated README captures with host times. |
| 2026-11-21 | Runtime display modes and the Settings application (spec 0022, ADR 0056; spec 0011 W32, specs 0009/0012/0005 amended; user request "write a settings app and change screen resolution"). The boot mode is still GRUB's 1024×768; the Settings app changes the **real** mode through the QEMU `std` VGA Bochs VBE dispi (`0x1CE`/`0x1CF`), not a real-mode VBE BIOS trampoline (that path was prototyped and rejected: hidden CS.D/SS.B state made the `int 10h` return fragile). Builtins 80–83 (`display_mode_count`, `display_mode_width/height`, `set_resolution`) expose eight 32 bpp presets; a change allocates the new shadow before programming the device, holds the graphics lock across the device write and shadow swap, frees the old shadow, clamps the pointer, and lets `window::screen_changed` scale/clamp frame origins, drop a stale drag/grab, clamp the region claim and run the W31 full repaint with an `Expose` for every window; the kernel System Log, which is sized from the screen, is reopened at the new geometry at the bottom of the z-order so it cannot cover an application. The largest 16 MiB LFB aperture is reserved at boot so a shadow can never overlap the framebuffer. The desktop shell re-reads the screen size and re-claims the menu bar before its next draw; the Apps `Utilities` section gains `Settings` (12 rows). Proofs: `samples/tests/apps/base/display_probe.ig`, `run settings check` (8 modes, 800×600, restore 1024×768), `settings shot` + `scripts/settings_resolution_qmp.py` (QMP PNG exactly 800×600), `scripts/settings_desktop_qmp.py` (Apps > Settings > Apply, exactly 800×600), `desktop_shell check`, `scripts/apps_menu_qmp.py` (the live clock is closed before the second menu click), and the same suite on `-smp 4` and `-smp 1`; 613 host tests, ABI v1 stays at 75 opcodes. |
| 2026-11-22 | M13 PNG image viewer (spec 0023, ADR 0057; specs 0018/0012 amended; user request "jpg iptal, projeyi png'ye çevirelim"). The four JPEGs were converted at their original dimensions to 8-bit RGB Adam7-interlaced PNG (45,769,104 B) under `samples/image` and staged read-only as `/image` in a 64 MiB apps image; the VFS self-check, `files` and `langhost` learned the sixth root. Generic layers: `core.bit_and/or/xor/shl/shr` (84–88) and `core.copy_bytes/fill_bytes` (89–90) with hidden capacity and all-or-nothing length publish; `lib.bitio` (LSB-first, compacting 512 B window); `lib.inflate` (bounded 512 KiB IDAT prefix, 32 KiB window, stored/fixed/dynamic, 40,824 B state, periodic `core.heartbeat()`, window compaction and 4096-bit header refill); `lib.png` (611,360 B state, 8-bit colour types 0/2/3/4/6, filters 0–4, Adam7 pass 1, palette/tRNS/alpha-over-white, `rewind` for repaint, no full-image buffer); `syslib.blit_rgb` (91, nearest-neighbour, clipped, row origin `y`). `apps/accessories/image_viewer` opens from the `image` dialog or a path, draws the pass-1 preview 1:1 through one blitted row per decoded row, keeps the image visible on Expose through `rewind`, promotes only the row loop to realtime with heartbeats, and has `check`/`shot`; the Apps menu gains the Accessories row (13 entries). Fixed the browser root/editor-path checks and the blit row-origin bug. Proofs: **633 host tests**; `image_viewer check`/`desktop_shell check`/`files check`/`png_probe` on `-smp 4` and `-smp 1`; QMP `/home/sinan/Desktop/igis-image-viewer.png` (1024×768, 401,662 B, 51,831 colours); `apps_menu_qmp.py` and the visual golden unchanged; `e2fsck` clean; ABI v1 stays **75**. Commits 25c4719, 9e363be, 995a303, c88ba5b, 05b3f23, 7877d08, 38ad043, e680443, d95b071, 8d4095d, 1e43fba, b469f7e, 929502c. |
| 2026-11-22 | Viewer decode progress strip (spec 0023; user request "decoding için viewer'a bir progress bar koyabilir miyiz?"). `apps/accessories/image_viewer` reserves a 20 px status strip below the 1:1 Adam7 pass-1 image: a separator, `Decoding NN%` / `Ready` in the 8x8 font and a 6 px track with a proportional black fill. The strip is drawn at 0% before `png.open`, redrawn and presented every 8 decoded rows, and ends full; on `Expose` only the strip resets while the last complete frame stays visible through `png.rewind`. Window content is `out_w x (out_h + 20)`; viewer state 629,000 B; no lib/kernel/scheduler change. Host 633 tests; `--shell` `-smp 4`/`-smp 1` checks; QMP `/home/sinan/Desktop/igis-image-viewer.png` 1024x768, 401,356 B, 51,831 colours with the photo and a full bar. Commit `ed28bad`. |
| 2026-11-22 | PPM P6 raw corpus and dual-format viewer (spec 0024, ADR 0058; spec 0023 retained; user request "tamam png desteği kalsın, yaptık zaten. şimdi PPM desteği ekleyelim, mevcut görselleri de PPM'e çevirelim"). The four images were converted at their original dimensions to uncompressed P6 RGB888 (123,045,476 B) under `samples/image` and staged at `/image` in a 128 MiB apps image (`mke2fs -m 0 -N 8192`, 125,045/131,072 blocks); the PNG corpus files were replaced, while the PNG decoder, `lib.png`/`lib.inflate`/`lib.bitio`, fixtures and viewer path are retained. `lib.ppm` (`probe`/`open`/`info`/`read_row`) scans a tolerant P6 header (comments, 256-byte refills, one separator after maxval), validates the P6/maxval-255 subset and reads any row by absolute fixed stride into a 16,384-byte buffer; P5/P3/16-bit/truncated/too-wide inputs are `Invalid`/`CapacityExceeded`. `apps/accessories/image_viewer` dispatches PNG/PPM, keeps the PNG pass-1 realtime path, and for PPM samples the 1/8 preview with `sy = y*sh/oh`, `sx = x*sw/ow`, reads only those source rows and blits a 3,072-byte preview row; the shared 20 px progress strip ends `Ready`. PPM preview also runs realtime with per-row heartbeats under TCG. Proofs: **634 host tests**; `ppm_probe`/`png_probe`/`image_viewer check`/`desktop_shell check`/`files check` on `-smp 4` and `-smp 1`; QMP `/home/sinan/Desktop/igis-image-viewer.png` (1024x768, 395,559 B, 50,587 colours, full bar); `e2fsck` clean; visual golden unchanged; ABI v1 stays **75**. The PPMs are generated from the tracked `samples/image-src` JPEGs and git-ignored; `scripts/make_image_corpus.py` and `xtask image` generate them on demand. Commits c566a34, 3b867cd, 9949213, d103f36 (local history rewritten to drop the 123 MB PPM blobs). |
| 2026-11-22 | Generated image corpus kept out of git (spec 0024 C5, ADR 0058 amendment; user request "imajı kendimiz üretebiliyorsak git repoya atmayalım"). The 123,045,476 B PPM P6 corpus is a build artifact: the four original JPEGs (5.2 MB) are tracked in `samples/image-src/`, `scripts/make_image_corpus.py` (Python + Pillow) generates the PPMs at original dimensions, `cargo xtask image` runs it when `samples/image/` has no `.ppm`, and `/samples/image/*.ppm` is git-ignored (`samples/image` is staged into `image/` after generation). The local `77643c8..HEAD` history was rewritten to drop the PPM blobs and the refs were expired/gc'd: `.git` fell 153 MB -> 53 MB; the earlier PNG corpus (45.8 MB) remains only in the already-pushed M13 history, and the current tree retains the PNG decoder/tests, not the PNG corpus files. Rewritten hashes: c566a34, 3b867cd, 9949213, 97a8703, d103f36. Host suite 634; the generated PPMs are byte-identical in dimensions/header to the prior corpus; the 128 MiB image builds and `e2fsck` is clean. |
| 2026-11-22 | M15.2 attaches the application volume (spec 0025, ADR 0059; user request "GRUB yalnızca ve yalnızca kerneli yüklemeli"). The 128 MiB ext2 volume is now a real disk at `ide0` unit 1; `ata.rs` gains `Unit { Master, Slave }`, a per-command drive value and one `CHANNEL` lock (both units share `0x1F0..=0x1F7`), so `init(Unit)` identifies and logs both drives. `xtask run` makes home `index=0` and attaches `apps.img`/`apps-shell.img` at `index=1` with `snapshot=on`: QEMU's `ide-hd` refuses `readonly=on` ("Block node is read-only"), and spec 0025 B12 was amended to the overlay, which leaves the file byte-identical (md5 checked). One `apps_drive(iso)` helper in `scripts/tablet_qmp.py` maps the ISO to its matching image; all 40 QEMU harnesses use it. The kernel still boots `system/entrypoint` from the GRUB module and a boot probe mounts the slave read-only and prints `apps: volume ok (7 root entries, base/shell 15416 bytes)`. Proof: 634 host tests (0 failed; `RUST_MIN_STACK=16777216` needed only because `langhost`'s editor test overflows the default test-thread stack here), `-smp 4`/`-smp 1`/`--no-home`/`--shell` transcripts showing `ata: primary slave, LBA28, 262144 sectors`, `boot_desktop_qmp.py` (its stale Apps row 10 → 11 fixed; row 10 is the `#Utilities` header), `home_persistence_qmp.py` and `image_viewer_qmp.py`; `e2fsck -fn` clean on `apps.img`, `apps-shell.img`, `home.img`. No ABI change; the module path and `vfs/ext2` stay until M15.3. |
| 2026-11-22 | M15.3 mounts the application volume and retires the GRUB module (spec 0025 B6–B13; ADR 0059; user request "GRUB yalnızca ve yalnızca kerneli yüklemeli"). `grub.cfg` is now `multiboot2 /boot/kernel.elf` and `boot`; `xtask image` still builds `build/apps.img`/`apps-shell.img` but keeps them out of the ISO tree (a stale copy is removed), so `build/igis.iso` is 40,673,280 B and carries only `kernel.elf` plus GRUB files. The kernel identifies the primary slave, mounts it read-only with `ext2w` before SMP and before `repl::boot`, runs the ported tree check (non-empty regular `base/shell`, its first byte streams, root lists `base`/`apps`/`home`/`lib`/`system`/`image`) and publishes it through `fs::init` as `APPS: SpinLock<Option<ext2w::Fs<AtaDisk>>>`; `fs::list` returns `ext2w::Entry`, each read takes exactly one mount lock (`APPS|HOME -> ATA channel`), and `/home` follows on the master. `vfs/ext2` (850 lines), `module.rs`, `mb2::module` and the `modules:` log are deleted; `mb2::for_each_module` stays for the frame reservation. `xtask run --no-apps` omits the volume and proves the named halt. Measured on `-smp 4`/TCG: 1.694/1.696/1.708 s from QEMU start to `desktop_shell: ready` (10.4 s before; spec SHOULD ≤ 2.5 s), `available: 255 MiB`, `frames: 58744 free of 1048576 (229 MiB usable)`. Proof: 634 host tests (0 failed), `-smp 4`/`-smp 1`/`--no-home`/`--shell`/`--no-apps` transcripts (`ata: primary slave, LBA28, 262144 sectors`, `apps: read-only volume, 1024 byte blocks, 131072 KiB`, `ext2: tree ok`, `apps: volume ok (7 root entries, base/shell 15416 bytes)`, `ext2w: home ok`), `boot_desktop_qmp.py` (`terminal: ok`), `home_persistence_qmp.py` (`home_verify: ok`; fsck 14/2048 files, 565/8192 blocks), `image_viewer_qmp.py` (PASS; 329 s end-to-end, dominated by the viewer's 256-byte `/image` reads through PIO), `editor_screenshot_qmp.py`, the visual golden unchanged (`686d0330…de52754c`), `e2fsck -fn` clean on `apps.img`, and `apps.img` md5-identical before/after a boot. `boot_desktop_qmp.py` and `home_persistence_qmp.py` each required one retry after the serial input reordered a typed word; the retry passed. No ABI change; ABI v1 stays 75. |
| 2026-11-22 | M15.4 offset-independent reads (spec 0025 B19/B20, ADR 0059 amendment). `ext2w` gains a per-inode logical-to-physical resolver, `block_at(inode, index)`, that reads only the pointer path a logical block needs: direct `blocks[0..12]`, single-indirect `blocks[12]`, then the double-indirect outer and inner block. `read_at` now computes the first and last logical block the requested range touches and resolves only those, keeping the old semantics for `offset >= size` (`Ok(0)`), a short read at EOF, an empty destination and a zero pointer (`Invalid`); an index at or past `ceil(size/1024)` and a triple-indirect file stay `IoError`. `read_file` and the directory walkers keep `each_data_block`. New host test `reads_past_the_direct_blocks_by_offset` stages a 2 MiB file in an 8 MiB image and compares direct, single- and double-indirect reads, a block-crossing range, EOF/past-EOF and a 3-byte large-offset read against `read_file` and a chunked sequential loop. Measured on `-smp 4`: `image_viewer_qmp.py` **48.2 s** end to end (329 s before; B20 gate 120 s), `image_viewer: ready 4608x2963 -> 576x371`; boot-to-ready 1.78 s (1.70 s before, unchanged within measurement). Proof: **635 host tests** (0 failed; 556 language + 56 `net` + 23 `ext2w`), `home_persistence_qmp.py` (`home_verify: ok`, fsck 12/2048 files, 563/8192 blocks after the reset), `boot_desktop_qmp.py` (`terminal: ok`), `e2fsck -fn` clean on `apps.img` (81/8192 files, 125062/131072 blocks) and `home.img`. `CACHE_BLOCKS` stays 8: the seek fix removed the visible metadata cost, so no cache growth was needed. No ABI change; ABI v1 stays 75. |
| 2026-11-22 | M15 complete: the kernel-only boot (spec 0025 Implemented, ADR 0059; user request "GRUB yalnızca ve yalnızca kerneli yüklemeli"). Closing proofs on the landed tree: `desktop_shell: ready` ~1.8 s from QEMU start on TCG/4 cores (10.4 s while the 128 MiB image was a GRUB module), `frames: 58744 free of 1048576 (229 MiB usable)` in a 256 MiB guest, ISO 40,673,280 B with only `kernel.elf` and GRUB files, `--no-apps` prints `apps: no image` and halts without a fault, `--no-home`/`--shell` boot, `image_viewer_qmp.py` PASS in 45 s (329 s before M15.4; B20 gate 120 s), `boot_desktop_qmp.py` and `apps_menu_qmp.py` reach `terminal: ok`, `home_persistence_qmp.py` reaches `home_verify: ok`, `editor_screenshot_qmp.py` reads its source from the volume (`editor: ready`), the visual golden is byte-identical (`686d0330…de52754c`), `e2fsck -fn` is clean on `apps.img` (81/8192 files, 125062/131072 blocks), `apps-shell.img` (181/8192, 125540/131072) and `home.img`, and a boot leaves `apps.img` md5-identical. **635 host tests** (556 language + 56 `net` + 23 `ext2w`); ABI v1 stays 75. Remaining parked work: the deferred table in `PLAN.md` and `OPEN-QUESTIONS.md` (Q59 closed). |
| 2026-11-22 | Build-time fsck (spec 0025 B21; open question 1 closed). `xtask image` runs `e2fsck -fn` on the application volume it just built (`build/apps.img` or `build/apps-shell.img`) and fails the build with the tool's report on any inconsistency; the persistent `home.img` is deliberately not checked, because its dirtiness is owner data rather than a build defect. The reader accepts a strict ext2 subset, so a staging or `mke2fs` mistake now stops the build instead of surfacing as `apps: mount FAIL` at boot. Proof: `cargo xtask image` and `cargo xtask image --shell` print `apps image: … (e2fsck clean)`; a truncated copy is refused through `e2fsck`'s exit status (`rc 8`) and a copy whose primary superblock magic is zero passes `e2fsck` (it falls back to a backup) but is refused by the superblock subset check, both failing the build; boot output and the ISO are unchanged. |
| 2026-11-25 | Composition and surface model accepted (spec 0026, ADR 0060; specs 0009/0010/0011/0012 amended; ADR 0024's canvas clause, 0045, 0046 and 0055 superseded; user request "ekran tarafında double buffering ... kernel tamamen ekrana ne çizileceğine ait bir memory alanı tutabilir mi" and "doğru olanı yap, hafıza sorunumuz yok"). The kernel already kept one full-screen shadow; the defects came from clients drawing into it. The accepted model retains a rectangle-sized canvas per surface (window or plane), gives drawing/`get_pixel`/window-addressed input window-local coordinates, makes the compositor the only writer of the shadow (desktop pattern → windows bottom-to-top, painter's order → planes → cursor), and replaces the erase/`covers_from` repair, the move snapshot, the full-repaint flag and the persistent region claim with recomposition and planes. Six builtins (92–97), no opcode, ABI v1 stays 75; no canvas budget constant. Docs only in this session; M16.2–M16.7 slice the implementation in `PLAN.md`. |
| 2026-11-26 | M16 implemented: the composition model lands (spec 0026, ADR 0060). `gfx` gains a `Surf` surface view and `Canvas`; every window owns a content-sized canvas from the frame allocator (no budget constant; `Full` on exhaustion); builtin 92 `window_begin` opens a per-window draw scope (implicit for a new window, `0` clears it); drawing routes to the caller's canvas and is `Invalid` with no scope; the window service's compositor is the only writer of the shadow (damage rectangles → desktop pattern → windows bottom-to-top → planes → cursor) and replaces the erase/`covers_from` repair, the move snapshot, the visible-parts subtraction and the full-repaint flag; the console paints its own canvas. Builtins 93–96 add planes (above windows) and 97 `work_area_reserve`; the desktop shell's menu bar, pull-downs and halt screen are planes, the region claim (60/61) is deleted and its press rule becomes the plane rule, and window frames clamp below the 22-pixel bar strip. `syslib.present` recomposites. The corpus draws inside scopes. Verified pixel-identical to the old image except the intended 22-pixel work-area shift: the visual golden was re-baselined once (`686d0330…de52754c` → `c9546f45…79fbc65e`), 637 host tests, `desktop_shell check`, `apps_menu`, `minimize`, `drag_content`, `window_repaint` QMP, `-smp 4`/`-smp 1`. Client coordinates stay absolute (M17). |
| 2026-11-26 | M16.8 deferred scrollbar drag (spec 0013 browser/editor, spec 0018 dialog; user request "scrollbar önce çekilsin, mouse scrollbar'ı release ettiğinde scrollbar uygulamaya mevcut konumunu bildirsin, uygulama oraya gitsin. aktif scroll çünkü ağır içerikte crashe yol açıyor"). The three draggable scrollbars (editor, browser, `/lib` file dialog) no longer move the content during a held drag. A press records a `scroll_preview`; held primary-button moves map the pointer onto the preview over the travel and redraw the strip into the retained canvas, then `syslib.present(scroll_x, scroll_y, ScrollW, BodyH)` recomposites only that rectangle from the surface stack (spec 0026 C7). `top`/`top_line`, the list/document rows and the selection/caret stay fixed until the release (or a move that lost the button) applies the preview once and repaints one frame. Track clicks and keys remain immediate. The editor's `thumb_metrics`/`drag_total` keep the `stdlib.ui_scrollbar` geometry and cache the line count at the press, so a drag step never rescans a 128 KiB document. Proof: `editor check` and `browser check` assert mid-drag that the view field is unchanged while the strip pixels already moved; `scripts/editor_scroll_qmp.py` captures during the hold (text region 0 px, thumb strip moved, release 12,575 px, `task 5: exit Ok` after 668/666 claims, no `BudgetExceeded`) on `-smp 4`/`-smp 1`; `scripts/file_dialog_qmp.py` drags the dialog's own thumb in `base` (88 entries) and prints held rows 0 px, strip 240 px, release rows 3,844 px. No opcode, builtin, `Host`, `stdlib` or kernel change; ABI v1 stays 75; 637 host tests (two pre-existing large-stack `langhost` tests need `RUST_MIN_STACK=16777216` here, as recorded at M15.2). |
| 2026-11-26 | README screenshots refreshed (user request "README içindeki görselleri yenileyebilir misin? ... temiz yeni görseller koyalım"). All seven `docs/screenshots/*.png` were re-captured at 1024×768 on the product image from the M16 tree. The harness now derives every frame, close box and hide box from the sample geometry (`content = window_open(x, y) + (1, 16)`, `frame = content + (2, 17)`, close at `frame + (9, 8)`, hide at `frame.x + frame.w - 10`), computes the Apps rows from the 22-pixel bar and 16-pixel row height (Calculator 1, Clock 2, Widgets 3, Editor 8, Browser 9, Terminal 11; the previous constants still pointed at the pre-`#Utilities` row layout and clicked headers/wrong apps), and parks the pointer in the empty desktop corner before each capture. The full-screen kernel System Log is minimized first through its hide box, so the uncovered pixels are the service desktop pattern (the old images showed the log's 0xF0F0F0 paper everywhere). `desktop.png` is now the terminal (network commands) + Calculator + Desktop panel in a non-overlapping composition; `network.png` is the terminal alone; `widgets.png` runs the `shot` gallery from the terminal with the terminal fully behind its 762×577 frame. Verified programmatically: every image is 1024×768, no 0xF0F0F0 log paper remains, the bar border is present, the expected window frames/borders are at the computed coordinates, the editor has all four syntax palette colours and the browser the accent selection, and the images are pairwise distinct. README's stale "M2–M14 / 634 tests / specs 0001–0024" status line was updated to M2–M16 / 637 / 0001–0026. No kernel/ABI change. |
| 2026-11-26 | Tag-based release workflow (user request "git tag tabanli github action workflow ekler misin, ISO atsin disari", then "release paketinde igis.iso, apps.img home.img istiyorum + qemu start shell scripti"). `.github/workflows/release.yml` runs on any tag push: it installs the image/boot tooling (`e2fsprogs`, `grub-common`, `grub-pc-bin`, `xorriso`, `mtools`, `python3-pil`, `qemu-system-x86`) and the stable Rust toolchain with `x86_64-unknown-none`, runs the host suite (`RUST_MIN_STACK=16777216`, as recorded at M15.2), builds with `cargo xtask image`, and publishes a GitHub release in four files: `igis.iso` (kernel + GRUB), `apps.img` (the 128 MiB read-only application volume), `home.img` (the 8 MiB writable `/home` seed), `run.sh` and `SHA256SUMS`. The release is created as a draft, assets are uploaded with `--clobber` and only then published, so a re-run finishes an already-started release. Before publishing, a headless boot of the assembled set must print `apps: volume ok` and `desktop_shell: ready` (the ISO alone is only the kernel since M15). `scripts/run-release.sh` (shipped as `run.sh`) carries the QEMU command line: ISO on `-cdrom`, `home.img` primary master writable, `apps.img` primary slave with `snapshot=on`, 256 MiB, 4 cores, TCG by default (`--accel`/`IGIS_ACCEL` for KVM), virtio-net user networking and the USB tablet, with `--headless`, `--cores` and extra arguments passed through. `xtask` now resolves `grub2-mkrescue` or `grub-mkrescue` from `PATH` (Fedora vs Debian naming) instead of assuming the Fedora name, so the Ubuntu runner needs no shim. README gains a Releases section and AGENTS the `run-release.sh` row. Verified locally: `actionlint` clean, `sh -n` clean, the notes/summary templates render, `cargo xtask image` still uses the Fedora tool, and a staged `dist/` boots headless with `apps: volume ok (7 root entries, base/shell 15416 bytes)` and `desktop_shell: ready`. No kernel/ABI change. |
| 2026-11-26 | Editor dark theme (spec 0013 "The text editor"; user request "text editöründe dark tema desteği"). The File menu gains a checked `Dark` row (index 4; Quit moves to 5) and `Ctrl+D` toggles it. `apply_theme` fills theme-neutral roles (`bg`, `ink`, `dim`, `sel_bg`, `sel_ink`, `rule`) plus the five syntax colours, so every drawing site and pixel probe reads the current palette: dark is `0x1E1E1E` background, `0xD4D4D4` ink, `0x808080` secondary/thumb, `0x484848` rules, `0x264F78` selection with white text, and keyword `0x569CD6`, type `0x4EC9B0`, string `0xCE9178`, comment `0x6A9955`, number `0xB5CEA8`. Dark mode also repaints the menu bar, pull-down and scrollbar app-locally (the `stdlib` helpers hard-code System 7.5) with the same `ui_menu_bar`/`ui_menu_dropdown`/`ui_scrollbar` geometry, so their hit tests and keys are unchanged; light mode still calls the helpers and is pixel-identical. The theme starts light, survives opens, and is not saved. Proof: `editor check` passes on `-smp 4` and `-smp 1` (`editor: ok`, 2,129 claims) with dark pixel probes for background, ink, caret, selection, rules, thumb and all five syntax classes, the Ctrl+D routed-key path and the light restore; 637 host tests stay green; `scripts/editor_screenshot_qmp.py --dark` captures the dark frame next to the light one (content background 290,872 px of `0x1E1E1E` vs white, same glyph geometry). No file API, opcode, builtin, `Host`, `stdlib` or kernel change; ABI v1 stays 75. |
| 2026-11-26 | M16.10 interactive budget (spec 0007, spec 0013, spec 0002, ADR 0061; user report "editör gibi basit bir uygulama neden budgetexceeded yer? tek yaptığım aşağı okuna basarak satır kaydırmaya çalışmak ama seri şekilde yaptığımda uygulama çöküyor"). Two causes. First, every Down key rescanned the whole document six times: `line_count`, `line_start_of` and `line_of_pos` were linear scans, and `move_vertical`, `ensure_visible`, `draw_lines` and `draw_status` called them repeatedly, so a 98 KiB source cost O(document) per key. `refresh_line_states` now also fills `total_lines` and a sparse `line_starts` index (one anchor per 16 lines, 8,193 entries, about 64 KiB) in the same publication pass; `line_count` is O(1), `line_start_of` walks at most 15 lines and `line_of_pos` binary-searches the anchors and then walks at most 15 lines. `editor check` drops from 2,132 to 1,792 claims. Second, the normal-task budget was a lifetime quota (ADR 0011), so a responsive editor that blocked in `syslib.next_event` between bursts was still killed after ~10 s of cumulative CPU; 400 injected Down keys reproduced `Faulted(BudgetExceeded)`. ADR 0061 makes the budget a per-run watchdog: `task::block` resets `budget_ns` and records the machine step count as the new `run_steps` base, expiry compares `machine.steps() - run_steps` and the same 10 s / 200 M-step constants are kept, a plain quantum yield does not reset and realtime keeps its accumulated non-blocked time for the heartbeat. Proof: `samples/tests/apps/base/runaway` (a normal non-blocking loop) still exits `Faulted(BudgetExceeded)` after 5,145 claims, `run spin` still exits `Faulted(WatchdogTimeout)`, 300 injected Down keys to the interactive editor on the 98 KiB source end `exit Ok` after 3,391 claims with no fault, 150 keys on `-smp 1` end `Ok` after 3,203 claims, and `editor check` prints `editor: ok` on `-smp 4`/`-smp 1` (1,792 claims). `shot` mode now holds its frame with `core.sleep(50)` instead of a busy poll, so `run editor shot apps/productivity/editor` ends `Ok` after 1,695 claims instead of faulting. No opcode, builtin, `Host` or `stdlib` change; the editor's state grows to 595,984 B. |
| 2026-11-26 | Calendar application (spec 0027; user request "bir takvim uygulaması yazar mısın igis için"). `apps/productivity/calendar` is a read-only month grid in a 252×240 window: a Monday-first six-row layout, today read once from the CMOS RTC (status-B BCD/binary, update-flag wait, stable re-read, century register with a `2000 + yy` fallback), a leap-rule month table and the days-from-civil weekday algorithm. Left/Right walk months, Up/Down walk years, `H`/Home returns to the host month, `<`/`>` are ordinary press/release buttons, and a day click selects; month changes clear the selection and navigation clamps at 1970-01 and 9999-12. Today is inverted only in the host month, a selected day gets a one-pixel accent outline, and no RTC means `Today: unavailable` with no highlight. `check` compares leap/month/weekday/lead/row/column math, month/year clamping, the nav and day hit tests, one Left-key dispatch and one `>` press/release, then verifies the bezel, base, both nav frames and the today fill with `get_pixel`; `shot` holds the host month for five seconds; the disabled-screen path prints `calendar: host ok`. The Apps pull-down gains `Productivity` → `Calendar` at row 10 and grows to 14 rows (226 pixels), moving the `#Utilities` header to 11, Terminal to 12 and Settings to 13; `scripts/apps_menu_qmp.py`, `boot_desktop_qmp.py`, `settings_desktop_qmp.py` and `readme_screenshots_qmp.py` follow the new rows. Proofs: **638 host tests** (one new `langhost` e2e test), `run apps/productivity/calendar check` → `calendar: ok` and `shot` → `calendar: ready 2026-11-26` on `-smp 4` and `-smp 1`, `desktop_shell check` with the new item table, and `scripts/calendar_qmp.py` launching Calendar from the Apps menu, clicking next month, capturing `build/screenshots/igis-calendar.png` and closing through the close box on both core counts. No opcode, builtin, `Host`, `stdlib` or kernel change; ABI v1 stays 75. |
| 2026-11-27 | M17 local client coordinates (spec 0026 C4/C6/C8–C10, spec 0011 W36, spec 0010 I35; user request "sırada sence ne var?" then "dökümanları düzelt, M17'yi hallet"). The absolute-origin translation is gone from the client path: a window canvas surface is built with origin `(0, 0)` and its own size as clip, so drawing, `clear` and `get_pixel` are window-local; a plane canvas keeps its screen-anchored mapping (C11/C12). `gfx::Canvas` gained a `local` flag (`window_open` allocates local, `plane_create` does not), `get_pixel` reads the open scope surface (`window::scope_pixel`/`gfx::read_pixel_on`) and falls back to the composed shadow with no scope, and `KernelHost::poll_event` subtracts the target content origin from window-addressed pointer records. The corpus was converted to local layout, local hit tests and scoped pixel checks (calculator, minesweeper, clock, image viewer, settings, calendar, widgets, browser, editor, terminal, `lib/file_dialog`, the shell's own/window-list/About windows, `ui_*`, `font`, `mouse`, `windows_demo`, `windows_drag`, `windows_events`, `windows_proof*`, `visual`, `events`, `perf`); test-injection helpers add the content origin for the screen-coordinate pointer hook, and content self-checks run before the scope closes while chrome/composition checks call `window_begin(0)`. The W12/W28 re-read discipline is retired from the specs and ADR 0060, and the scope-lifetime wording was corrected to the implementation (spec 0026 C3, spec 0011 W17/W34: a present does **not** close the draw scope; `window_begin(0)` or another begin does). `fill_dither` parity is now surface-local (spec 0009 G11), so the visual golden was re-baselined once (`c9546f45…79fbc65e` → `62e8140a…e809d83c`; the diff is the 130×100 dither patch in the `visual` specimen only) after a confirmed diff of 12,544 pixels in that box. `windows_proof`'s two "restored to the terminal" checks sampled a blank-white assumption that no longer holds; they now sample the live window below (paper or ink) and the proof passes `-smp 4`/`-smp 1`. New proof: `samples/tests/apps/base/local_coords` (injected mid-frame drag, both corner marks at the new origin, content-local pointer event) and `scripts/local_coords_qmp.py` (real tablet drag while the owner is between frames, screenshot pixel checks, `local_coords: ok`) on both core counts. Verification: 638 host tests (`RUST_MIN_STACK=16777216` for the two large-stack langhost samples); `-smp 4` batch (`files`, `text_edit`, `ui_*`, `widgets`, `clock_window`, `editor`, `browser`, `desktop_shell check`, `events`, `windows`, `windows_events`, `windows_demo`, `perf`, `font`, `frames`, `settings`, `calendar`, `image_viewer`) green, the same apps on `-smp 1`, `windows_proof` and `windows_drag check` in their own boots on both, and the re-baselined golden matches on `-smp 4`. No opcode, builtin, `Host`, `stdlib` or ABI change (v1 stays at 75; builtins 92–97 unchanged). |
| 2026-11-27 | M18 icon grid and file browser (spec 0028, ADR 0062; user request "eski windows explorer tarzı, büyük ikonlarla bir listeleme ... iconview adında bir widget ... her bir svg'yi 32x32 PPM yapalım ... folder, igfile, file, image"). The owner's four 64×64 SVGs in `samples/icons` are rasterized once by `scripts/make_icons.py` (ImageMagick/librsvg, white composite, P6 32×32 maxval 255, 12 KB total) and committed as `samples/icons/ppm`; `xtask image` stages them as the new read-only top-level `icons/` directory and the boot tree check now requires seven directories. `lib.icons` loads the four rasters once with `lib.ppm` and draws them with `syslib.blit_rgb`; `lib.iconview` is a stateful 96-entry grid record (geometry, hit test, clamped navigation/paging/row scrolling, two-line labels, selection band and icon border). The file browser drops the text preview pane and becomes a full-width 100×68 icon grid (6×6 visible, 640×420, 16-pixel scrollbar at 656): folder/source/plain/image mapping (extensionless staged apps under `base`/`system`/`apps/<category>` count as source), a one-time icon load with a non-fatal fallback, a two-part status bar, `Enter`/double-click launches a file, and the deferred thumb drag now operates on grid rows. New proof `samples/tests/apps/base/iconview` (`iconview: ok`, `shot` shows all four icons), one new `langhost` e2e test, and updated browser e2e transcript. Verification: **639 host tests**; `iconview: ok`, `ui_icons: ok` and `browser: ok` on `-smp 4` and `-smp 1` from the `--shell` image (browser check 103 claims, no faults); `browser_drag_qmp.py` (grid border 420/420, stale layout gone) and `input_routing_qmp.py` pass on the product image; `scripts/browser_screenshot_qmp.py` captures the shell grid, and `docs/screenshots/browser.png` is refreshed from the product root. No kernel/ABI/opcode/`Host` change; ABI v1 stays 75. |
| 2026-11-27 | M19 browser open-with, context menu and clipboard (spec 0029; user request "ppm dosyalarını image viewer, .txt dosyalarını text editör ile açabilir miyiz? diğer dosyaları 'open with text editor, run in terminal, cut, copy, paste, delete' öner context menu ile"). `Enter`/double-click now opens `.ppm`/`.png` in the image viewer and `.txt` in the editor with a detached spawn (the browser stays live), keeps the blocking launch for source apps, and opens a six-row context menu for every other regular file; a right-click opens the same menu on any regular file. The menu items are `Open with editor`, `Run in terminal`, `Cut`, `Copy`, `Paste` and `Delete`, drawn with `stdlib.ui_menu_dropdown`, clamped in the content, with Up/Down/Enter/Escape and click dismissal. The clipboard is browser-local: cut/copy store one full path, paste refuses empty/same/existing/outside-home targets and never overwrites, copy streams 256-byte `fs_read`/`fs_write` chunks into a new home file (creating even an empty destination and removing a partial one), cut uses `fs_rename`, and a successful paste reloads/selects the name. `terminal` now accepts one optional initial command and forwards it to its shell session after the spawn, so `Run in terminal` passes `run <full path>`. Proof: 639 host tests; `browser: ok` (113 claims) plus `iconview: ok`/`ui_icons: ok` on `-smp 4`/`-smp 1` from the `--shell` image; the browser check right-clicks `base/child`, copies it to `home/child`, compares the bytes, deletes it from the menu and returns to `base`; the terminal command proof shows 1237 vs 341 white pixels (47 vs 16 text rows) for `terminal run base/child` vs a clean prompt. No kernel, ABI, opcode, builtin, `Host`, `stdlib` or file-API change. |
| 2026-11-27 | Image viewer: opening an image no longer decodes it twice back to back (user report "resim gösterici neden 2 kez decoding yapıyor arka arkaya"). `window_open` ends with a full-screen repair, and `mark_exposes` marks every live window whose frame intersects the chrome damage, including the window that was just opened. The viewer's first `render_image` already filled and presented its retained canvas, but the event loop then took that queued Expose and ran the whole PNG Adam7/`png.rewind` or PPM `ppm.open`+row pass again; `shot` mode additionally consumed and re-rendered the PPM Expose on purpose. The first Expose after the initial render is now answered with `window_present` only; later real Exposes still repaint. The `shot` PPM special pass is removed (spec 0023 V5, spec 0024 V6). No kernel, ABI, builtin or file-API change. |
| 2026-11-27 | Image viewer: a window move no longer re-decodes the image (user report "resim görüntüleyicinin pencerenin yeri değiştiğinde sürekli decode yapmasını nasıl engelleriz? pencerenin boyu değişmiyor, resim değişmiyor, görüntü taşınamaz mı"). A pointer drag runs `drag_move` → `relocate`, which records the old and new frame as chrome damage; `repair` then marks a whole-content `Expose` on every live window whose frame the damage intersects, including the moved window itself. The viewer treated each of those as "recompute the content" and re-ran the PNG Adam7 pass-1 / `png.rewind` or the PPM header + row-seek preview, resetting the status strip to 0% — once per drag step. Under spec 0026 C10/C14/C16 that is unnecessary: the window canvas is retained and the compositor paints it at the new origin, so a move, raise, restore or mode change is an origin change in the service. The viewer now ignores `Expose` entirely: one render owns the canvas for the window's whole life, and the image is drawn and decoded exactly once. `first_expose`, `decoded`, the rewind/re-open repaint path, the error panel's Expose repaint and the now-unreachable `error_status` tail are deleted, and `render_image` is the single-shot frame path (spec 0023 V5, spec 0024 V6; the `png.rewind` text now names it as an API for a client that must re-decode, not a viewer repaint). Verified with the host `image_viewer` e2e (`image_viewer: host ok`) and `scripts/image_viewer_qmp.py` on `-smp 4`/`-smp 1` (`image_viewer: ready 4608x2963 -> 576x371`, one decode, 396,020/395,663-byte 1024×768 captures). No kernel, ABI, builtin or file-API change. The service still marks Expose on origin-only damage, so every other app also repaints per drag step; that general fix is parked in `PLAN.md`. |
| 2026-11-27 | Editor New File, `touch`, and the command ABI (user requests "New File istiyorum metin editörüne", "touch komutu istiyorum" and "komutlar ile kabul arasında convention olması lazım, hardcoded saçma bir liste değil. /base altındaki dosyalar birer komuttur!"). The editor's File menu gains a leading **New File** row and `Ctrl+N`: it replaces the document with an unnamed empty buffer, clears the caret/selection/scroll/path and Highlight and reports `new file (unnamed)`; the first Save opens the new `/lib` Save File dialog instead of the editor inventing a name. The menu also gains **Save As...** (`Ctrl+Shift+S`): `lib.file_dialog.save_file` shares the open dialog's listing, navigation, scrollbar and deferred drag, adds a `Name:` field and `Save`/`Cancel`, starts in the current home target's directory with its basename selected (or `home` + `untitled.txt`), refuses an empty name, `/`, a path outside `home/`, an existing file or a directory, and never overwrites. On `Ok` the editor writes through its temp+rename path and adopts the chosen path. Open/Save/Save As/Highlight/Dark/Quit are indices 1/2/3/5/6/7. `base/touch` creates an empty `home/` file, treats an existing regular file as a successful no-op (`exists`), refuses a directory, reports a missing parent, and is read-only outside `home`. The shell's hardcoded `is_file_command` list is replaced by spec 0018 **L11**: every bare `base/`/`system/` command receives `<cwd display>\n<tail>`, `run` keeps the raw tail with `/` as cwd, and `apps/<category>/` GUI apps keep their own raw arguments. `lib.path.split_cwd` is the single parser, and `nc`, `purl`, `child`, `text`, `floats`, `ifconfig`, `nslookup`, `net_probe`, `desktop_shell` and `system_probe` read the tail through it; commands that ignore arguments need no change. Proof: 639 host tests (including the shell walk with bare `child world`, bare `calculator check`, `touch` create/exists/remove and `run`), `run editor check` → `editor: ok` on `-smp 4`, `scripts/editor_save_as_qmp.py` on `-smp 4`/`-smp 1` (Ctrl+N → type → Ctrl+S → Save File dialog → name → Enter → `ls`/`cat`), `scripts/file_dialog_qmp.py` (the open dialog still loads `lib/math.ig` and `apps/accessories/calculator`; its stale root `lib` row was corrected to 6 after `icons`/`image`), a shell transcript with `touch: created`/`exists`/`rm: removed` on `-smp 4`, and `scripts/httpserver_qmp.py --cores 4` (both bare and `run` server forms). No kernel, ABI, opcode, builtin, file-API or `stdlib` change; `help` lists `touch`. |
| 2026-11-28 | Home image raised from 8 MiB to 256 MiB (spec 0019 H1; user request "home arttırılır ... yükselt 256ya"). `xtask` creates a 256 MiB image and, for an existing image, grows it in place (`set_len` + `resize2fs`) with `e2fsck -fn` before and after, so raising the size never deletes the user's `/home`; the release notes and the spec 0025 device table now say 256 MiB. Proof: `build/home.img` 268435456 B, `e2fsck -fn` clean (15/65536 files, 16731/262144 blocks), boot prints `ext2w: mounted, 1024 byte blocks, 262144 KiB` / `ext2w: home ok` / `desktop_shell: ready`. No kernel, ABI or layout change. |
| 2026-11-28 | Release packages both disk images compressed (user request "workflowda img.gz iyi fikir"; follows the 256 MiB home raise). The workflow boots the raw images first, then `gzip -9 -f dist/home.img dist/apps.img` and checksums `apps.img.gz`/`home.img.gz`; `run.sh` expands each once on first use (never overwriting an existing `.img`), so the download drops from ~424 MB to ~97 MB while the guest still gets the 128 MiB and 256 MiB volumes. README/AGENTS/release notes and the `usage()` header updated. Proof: `sh -n`, `run.sh --help`, a stub-QEMU smoke test (fresh expansion, existing images preserved, corrupt `.gz` fails with no partial file), `actionlint` clean, and `gzip -9 -c` sizes: home 265840 B, apps 55689749 B. No kernel/ABI change. |
| 2026-11-28 | 44.1 kHz support, a classical sample corpus, and a 160 MiB application image (spec 0030 A8/V1, spec 0024 C2, spec 0025 B3, PLAN M21.1; ADR 0064; user requests "44.1k da açılsa sanki iyi olur" and "sample bulabilir misin? klasik müzik falan"). `sound_open` accepts 44100 and 48000; `Hda` stores the codec format word (`0x4011`/`0x0011`) instead of a compile-time constant and `set_rate` reprograms the DAC and descriptor; the boot self-test takes a rate (`igis.audio_selftest=44100`). Three public-domain Wikimedia Commons excerpts (Bach BWV 847/Ishizaka, Beethoven Eroica I/Musopen, Chopin Nocturne 21/Diana Hughes) were converted to 44.1 kHz/16-bit/stereo 10 s WAV (5.3 MB) under `samples/audio/`, staged read-only as `audio/`, with provenance/licences in `samples/audio/readme.txt`. The application volume grew 128→160 MiB because the PPM corpus (123.0 MB) plus the audio left the `--shell` image only 207 KiB; both images now have ~32 MiB free. Proof: **644 host tests**; `audio: selftest ok at 44100 Hz: 24 periods, 98304 bytes, 0 underruns` (WAV 0.558 s, 440 Hz) and `... at 48000 Hz ...` on `-smp 1` (WAV 0.513 s); `e2fsck -fn` clean on `apps.img` (96/8160 files, 130349/163840 blocks) and `apps-shell.img` (203/8160, 130865/163840); boot lists 9 root entries and reaches `desktop_shell: ready`. Release gzip sizes: `apps.img.gz` 60,418,615 B, `home.img.gz` 265,840 B. |
| 2026-11-28 | Audio corpus trimmed to one sample (user request "tek ses yeterdi ya, nocturne kalsın, diğerlerini yolla"). `samples/audio/` keeps only the Chopin Nocturne No. 21 excerpt (44.1 kHz/16-bit/stereo WAV, 10 s, 1,764,176 B); the Bach and Beethoven excerpts were removed and `samples/audio/readme.txt` now lists one source/license. The staged `audio/` shrinks from 5.3 MB to 1.7 MB; `apps.img` uses 126,914/163,840 blocks (36 MiB free) and `apps-shell.img` 127,430/163,840, both `e2fsck -fn` clean; `apps.img.gz` falls to 57,274,512 B. 44.1 kHz support and the 160 MiB volume are unchanged; boot lists `audio/`, prints 9 root entries and reaches `desktop_shell: ready`. |
| 2026-11-28 | The `syslib.sound` surface, `lib/wav.ig` and the music player (spec 0030 C1–C6/V2, spec 0031; user requests "media player'ımız var mı" and "tek ses yeterdi ya ..."). Builtins 98–103 (`sound_open/write/close/volume/mute/queued`) with owner checks, `WaitKind::Audio`/`WaitFor::Audio`/`task::wake_audio`, owner-exit teardown, compiler names and `Host` defaults; `sound_write` blocks on a full 32 KiB ring and is woken by `audio::service`. `samples/apps/lib/wav.ig` parses RIFF/WAVE (`fmt ` PCM 16-bit stereo at 44.1/48 kHz, odd chunk padding) and streams 256-byte pieces; `apps/accessories/music_player` stages 16 KiB, drains the ring before close and draws progress (Space pause, +/- volume, M mute, Esc/close); the browser maps `.wav` to it. Proof: **645 host tests** (the player compiles to `music_player: host ok`); `scripts/audio_qmp.py` on `-smp 4` and `-smp 1` → `music_player: ok` and a 1.027 s 48 kHz stereo capture (rms 1923, peak 12373); `e2fsck -fn` clean. Found and documented an `ext2w` limitation: `mke2fs` turns a full 1 KiB zero block into a hole and the reader rejects a zero pointer; the sample trims its 0.16 s digital lead-in, and hole support is a deferred ticket. |
| 2026-11-28 | Desktop music integration and no-device handling (user report "media player menüde yok" and "pencere açılıp hemen kapanıyor ... music_player: no audio"). The Apps pull-down gains `Music` (row 5, `apps/accessories/music_player`), `AppMenuCount` 14→15; later rows and the QMP harness constants move (Browser y = 191, Calendar 207, Terminal 239, Settings 255), and `apps_menu_qmp.py` passes. The player keeps its window open with `No audio device`/`Audio busy`/`Cannot open file`/`Read error` instead of exiting; a recursive `wait_close` introduced during the change was caught by the no-device boot (StackOverflow) and fixed. `cargo xtask run` now defaults to `--audio pa` (PulseAudio/PipeWire) and adds the HDA controller for `pa`/`pipewire`/`alsa`/`wav`; `run.sh` detects `pactl`/`pw-play` (`IGIS_AUDIO` overrides). Verified: a PA boot logs `audio: hda 293e ...` and `sched: task 4 blocked on audio` with a 33,569 B screenshot; a `none` boot logs `music_player: no audio` and the task stays alive; 645 host tests; `apps_menu_qmp.py` PASS. |
| 2026-11-28 | Player budget fix (user report "budgetexceed alıyoruz"). The GUI loop painted the whole window after every 256-byte read (~690 paints/s) and filled the 32 KiB ring without blocking; it now paints only after a 16 KiB flush (~12/s) and blocks 1 ms per 4 KiB of input, resetting the normal-task per-run budget (spec 0061, spec 0031 W6). A 15 s PA boot shows 309 `blocked on audio` entries and no `Faulted`/`BudgetExceeded`; the no-device window and the menu are unchanged; 645 host tests. |
| 2026-11-28 | Per-block scheduler logging removed (user request "bu logu kaldırsak mı, çok noise üretiyor"). The shell printed `sched: task 3 blocked on input` on every event-loop turn (and a terminal/player on every session/period), flooding the serial transcript; all six `sched: task N blocked on ...` prints (task/stream/input/any/socket/audio) are gone while the block/wake logic and the exit line (`... after C claims (Y yields)`) are unchanged. Proof: a 30 s PA desktop boot has **0** `blocked on` lines, `audio: hda 293e ...` and `desktop_shell: ready`; `scripts/audio_qmp.py` still passes (1.027 s stereo WAV); 645 host tests; build clean. |
| 2026-11-28 | User filesystem mounts (spec 0032; ADR 0065; user request "kernel tarafında bir FUSE benzeri driver istiyorum. ama protokol kernel'in işi değil"). The kernel gained a *seam*, not a filesystem: `net/<keyword>/` (four mounts, one in-flight operation each with a FIFO queue of eight, globally unique generation-checked tokens, a 10 s per-operation deadline that runs the same sweep as `syslib.mount_break_locks`) and builtins 104–108 (`mount_serve/request/reply/break_locks/unmount` plus compiler-lowered `core.mount_source`) with `WaitKind::Fs`. A caller that cannot take the slot blocks and retries the same instruction, exactly like `SOCKET_RECV`; a write's 128 KiB payload is staged by the promoted caller's retry before the server may fetch it (`IO_MAX` = `MAX_SOURCE_BYTES`, all-or-nothing); a serving task may not call any mount and a killed caller is swept so a dead task can never wedge a mount. The first server is `.ig`: `lib/netfs.ig` (one request/response exchange per operation, whole-frame drain) and `scripts/netfs_host.py` (stdlib only, component-wise containment after `realpath`, sorted listings, create-at-offset-0, writes restored on failure). `apps/utilities/net_mount` is the Mounts window (editable host:port and keyword, Mount/Unmount/Break locks, served-op counter) with a headless `serve <ip:port> <kw>` mode, and the editor now saves a `net/...` document in place (`.tmp` + rename, `saved`, `no_home` stays home-only, `not writable` for a failed mount target) while `lib/file_dialog` accepts `home/` and `net/` save targets. Proof: 663 host tests (abi +7, compiler +2, interpreter +9); `mount: ok` with a synthetic in-guest server on 4 and 1 cores (FIFO order, stale-token discard, `break_locks` on a wedged request, `mount: op timed out` at 10 017 ms, two killed callers, one mount per task, no nested mount); `scripts/netmount_qmp.py` serves a temporary host tree over real TCP and compares the host bytes after list/read/write/`IO_MAX`/truncate/mkdir/rename/remove, then runs `system/netmount_editor`, which injects Ctrl+A/typing/Ctrl+S and a Save As into the editor window and reads the result back through the mount (`netmount: ok` on 4 and 1 cores); `editor: ok`, `files: ok` (10 root entries), `browser: ok`, `home_write: ok`, `apps_menu_qmp.py` with the 16-row menu, `desktop_shell: ready`, `e2fsck -fn` clean. No opcode (ABI v1 stays 75); the mount table costs ~533 KiB of `.bss`. Known non-goals: no `run net/...` (the loader is caller-less), no mount at boot, no kernel cache. |
| 2026-11-28 | The serial reader can see an unterminated line (harness fix; found while re-running the visual golden after M22). The shell prompt is `igis:/> ` with no trailing newline, and every QMP harness's `Serial` was line-oriented, so a wait for the prompt could only time out: `scripts/visual_regression.py` failed with `serial: no match`, and the screenshot harnesses hung at their boot gate. `Serial` now reads with `read1`, keeps the bytes since the last newline in `tail` and matches them at the pseudo-index `len(lines)`; `visual_regression.py` uses the shared `tablet_qmp.Serial` instead of its own copy (the other 17 copies got the same body, keeping their no-index `wait_for`), and `apps_menu_qmp.py`/`netmount_qmp.py` gate on the prompt again instead of the boot banner plus a 300 ms sleep. Proof: the visual golden matches `62e8140a…e809d83c` again, `browser_screenshot_qmp.py`/`editor_screenshot_qmp.py` reach `ready` and capture, `home_persistence_qmp.py --cores 1` passes, and `apps_menu_qmp.py`, `netmount_qmp.py` (4 and 1 cores) and `boot_desktop_qmp.py` still pass. No kernel, ABI, compiler or interpreter change. |
| 2026-11-28 | The Mounts window is in the README (spec 0032; user request "bu özelliği README'ye ekledik mi"). `net_mount` gains a `shot <ip:port> <keyword>` mode: it pre-fills the two fields, mounts, prints `net_mount: serving net/<kw>/` / `mounts: ready` and keeps serving so the frame is live. `scripts/mounts_screenshot_qmp.py` starts `scripts/netfs_host.py` on a seeded temporary tree, boots the shell image, runs that mode and captures 1024×768 through QMP `screendump` to `build/screenshots/igis-mounts.png` (the README image is the committed copy, `docs/screenshots/mounts.png`, 32 657 B). README gains the screenshot row and a "Mounting a host directory" section with the host command, the Apps ▸ Mounts steps, save-in-place, Break locks and the ten-second deadline. `gui_mode` takes the initial fields and an auto-mount flag; the interactive window is unchanged. Proof: `net_mount: host ok` on `langhost`, `mounts: ready` and the capture on a headless boot, and `scripts/netmount_qmp.py` still passes. |
| 2026-11-29 | `stdlib.len` for fixed-size arrays and rings (user request "len fonksiyonu yarat ... arka planda ... büyüklüğünü tutan bir değişken tutalım"). The project owner chose the compiler-constant representation: `array[T, N]` yields `N`, `ring[T, N]` yields the capacity `N` (not the live `count`), and the compiler recognizes the qualified name and emits one `CONST` with a `Uint` result. There is no runtime length field or header, no opcode, builtin, `Host` method or ABI change; array/ring layout and copies are untouched. The call requires `uses stdlib;`, and buffers are rejected with a pointer to `core.len`. Proof: `samples/lang/len.ig` (`4 3 5 7 2 3 2 4 5; len: ok`), four compiler tests (constant counts, bad type, arity, missing import), one `langhost` e2e, 668 host tests, and a clean `cargo xtask build`; no QEMU transcript. |
| 2026-11-29 | M23 shared key-value store (spec 0033, ADR 0066; user request "kernelde key-value storage istiyorum redis gibi"). The kernel now owns one memory-only store that any task can address by key: four kinds (blob, set of unique members, map of field→value, FIFO list), 1 to 63-byte opaque keys, 16 KiB values, at most 1024 live entries in a 1 MiB payload arena the `kv` crate manages as a bump region with a freed-span list and neighbour coalescing, and one `gen` counter for change detection. The whole store is a `static` behind one `SpinLock` (`cache -> nothing`), every call is one atomic step and never blocks, `incr` is atomic across cores, set members and map fields enumerate in ascending byte order, and keys outlive the task that wrote them; there is no persistence, TTL, eviction, transaction or quota. The surface is 24 `syslib.cache.*` builtins (109–132, no opcode); a destination is staged as its declared capacity plus a data reference (the `mount_request` rule), so `get`/`key_at` are `(4,1)` and a `bytes[4]` destination cannot receive more than four bytes — the first cut bounded the copy by the rest of the task region and a canary test now pins the fix. `648f59e` moved the arena into `.bss` so the kernel ELF carries no 1 MiB of zeros. The shipped app surface is `lib/cache.ig` (six 1024-byte text readers staged through a local `bytes[1024]`, `incr_or`, `kind_name_into`) and the test-only `system/cache` CLI (`list`, `kind`, `get`, `set`, `incr`, `del`, `set-add`, `set-has`, `map-put`, `map-get`, `push`, `pop`, `stats`). Both proof units and the CLI live in the test `system/` tree because `base` already holds exactly the 96 merged entries spec 0028 fixes as the browser's listing capacity; a path with `/` is launched as written, so `run system/cache ...` needs no bare-name search. Proof: **782 host tests** (85 in `kv`; 0 failed, `RUST_MIN_STACK=16777216`); `cache: ok` from two concurrent workers whose 500 `incr` and 500 `set.add` calls leave exactly 500 and 500 (the atomicity claim) on `-smp 4` and `-smp 1`, and `scripts/cache_qmp.py` then runs `run system/cache set cli.answer 42`, `get cli.answer` and `stats`, checking `set: Ok`, `value: 42` and `count 1` (the harness now types one byte at a time, like the other serial harnesses); `cargo xtask build` clean. Deferred (spec 0033 open questions, PLAN's not-UI table): arena compaction, a record offset index, offset/partial reads, TTL/eviction, transactions/CAS/watch, per-task quotas, `clear(prefix)`, list head ops and export/import persistence. |
| 2026-11-29 | M24 lazy key expiry and `garbage_collect` (spec 0033 X1–X9, builtins 133–135; ADR 0067). The store gained an optional time to live: every slot carries an absolute `expires_at` uptime point (0 = none), `syslib.cache.expire(key, ttl_ms)` arms or clears it (`0` clears the deadline, `NotFound` for an absent or already expired key), `syslib.cache.ttl(key)` reports the remaining whole milliseconds, `-1` for no deadline and `-2` for an absent or expired key, and `syslib.cache.garbage_collect()` walks the table once and returns the removed count (`expire` is `(2,1)`, `ttl` `(1,1)`, `garbage_collect` `(0,1)`; no opcode). Expiry is **lazy** and there is no collector task, timer or wake source: an operation that writes or copies a payload checks the addressed key first, removes it when the deadline has passed and then behaves exactly as if the key had never existed; `put` starts a fresh lifetime while `incr` and the container writers keep the deadline (X7); enumeration (`count`, `key_at`, the container `has`/count readers) skips an expired slot **without** reclaiming it, while `ttl` and `garbage_collect` are the removers — the X3/X4 split keeps the readers mutation-free and `gen`-neutral, at the price of arena bytes that live until an addressing call or a sweep; a create or grow that cannot find room sweeps the expired entries once and retries, so `Full` means no expired entry could have helped (X9). The store never reads a clock: `set_now` publishes `now_ms` and the kernel wrapper sets it from `clock::now_ns()/1_000_000` under the store lock before every call, so the host tests drive expiry with a synthetic clock and never sleep, and the lock order stays `cache -> nothing`. `system/cache_proof` gained the expiry phase (armed `ttl`, a 120 ms sleep past a 40 ms deadline, `get` → `NotFound`, `count` drops, `ttl` = -2, a fresh `put` after expiry, `incr` keeping the deadline, `expire(key, 0)` clearing it, an enumeration leaving a slot for `garbage_collect`, and a second GC returning 0) and the test-only `system/cache` CLI gained `expire <key> <ms>` / `ttl <key>`; `scripts/cache_qmp.py` now also arms a 2 s deadline, requires a positive `ttl`, waits past it and checks `ttl: -2` and `stats: count 0` — 2 s rather than the 40 ms a store-only test can use, because the harness types one byte at a time at 20 ms per byte and the follow-up `ttl` line reaches the guest about 0.65 s after `expire` returned. Proof: **827 host tests** (628 language — 43 `abi`, 223 `compiler`, 256 `interpreter`, 106 `langhost` — plus 56 `net`, 23 `ext2w` and 120 `kv`; 0 failed, `RUST_MIN_STACK=16777216`), `cache: ok` on `-smp 4` and `-smp 1`, and `[harness] cache expiry ok` from `scripts/cache_qmp.py` on both core counts. Deferred: size-driven eviction only (spec 0033 open question 4) — a deadline is not an eviction policy. |
| 2026-11-29 | M25 `keyval`, the terminal interface to the shared store (spec 0033; user request "şimdi bi cli tool yazmanı istiyorum buna interface olarak terminalde çalışacak. adı 'keyval' olsun"). `base/keyval` is a shipped shell command: `list [prefix]`, `stats`, `kind`, `get`, `set`, `del`, `incr`, `expire`, `ttl`, `gc`, `clear`, the `set-add/remove/has/count/at`, `map-put/get/del/has/count/keys`, `list-push/pop/len/at` verbs and `help`. Output stays plain for scripts — `Ok` for a mutation, the text or number for a reader, `keyval: <Status>` for a failure; a free-text value is the rest of the line (spaces included, <=256 bytes) and reads go through `lib.cache` (<=1024 bytes). `lib.cache` gained `list_at_text`. The test-only `system/cache` CLI is deleted and `scripts/cache_qmp.py` drives `keyval` (`set`/`get`/`stats`, then `expire 2000` → a positive `ttl` → a 2.25 s host sleep → `-2` → `keys 0`). The shipped `base/` tree (27 units) plus the test-only `base/` tree (69) that `langhost` and the `--shell` image merge was exactly the browser's 96-entry listing capacity (spec 0028 V2), so the seventh `base/` unit needed a capacity change: `browser.ig`, `lib/iconview.ig` and `lib/file_dialog.ig` now hold 128 entries (the truncation line says 128), the icon-view proof checks 128 accepted / 129 refused with 22 rows, and spec 0028 carries a 2026-11-29 amendment. Proof: `cache: ok` plus `[harness] cache cli ok` and `[harness] cache expiry ok` from `scripts/cache_qmp.py` on `-smp 4` and `-smp 1`, 827 host tests (unchanged: the tool is an app, the icon-view proof changed in place), and `cargo xtask build` clean. |
| 2026-11-29 | M26.1: the test unit corpus leaves `base/` (spec 0018 X2/A1; user request "entrycapacity'den kurtul. saçma bir şey. testi de düzelt ağacı"). `samples/tests/apps/base` is now `samples/tests/apps/tests` (69 units), `xtask image --shell` stages it as the image's own `tests/` root and still overlays `samples/tests/apps/system` on `system/` (shipped-name collision = staging error, any other test subdirectory refused), and the product image carries no `tests/`; `base/` is product-only again at 28 commands. The kernel `LAUNCH_DIRS` is seven entries with `tests/` after `base/` (A1); `langhost` maps `tests/...` to `<test tree>/tests`, `system/...` to the shipped+test overlay and `base`/`apps`/`lib`/`home`/`image` to the shipped tree only, with `fs_list`/`fs_read`/`fs_size`/spawn sharing the mapping (and an empty relative root now verifies the directory). Proof fixes: the browser check pins `base` at 28, expects 7 root entries on the host and 11 in the shell image (with `tests`), lists `tests` (`multiplex`, `runaway`, flat, >= 50) and runs its real pointer paging plus deferred thumb drag there because `base` is now shorter than one page; its selection checks clamp a page to the last entry; `files` counts the `tests` root (11 in the shell image, 10 on the product image, 7/6 on the host). Verified: **827 host tests** (`RUST_MIN_STACK=16777216`), `cargo xtask build`, `cargo xtask image --shell` (base 28, tests 69, no `system/entrypoint`) and `cargo xtask image` (no `tests/`), `scripts/cache_qmp.py --cores 4` (`cache: ok`, CLI and expiry), `scripts/multiplex_qmp.py --cores 1`, `run ls base` printing exactly the 28 shipped names, and `browser check`/`files` on the shell image. No opcode, builtin, ABI or `Host` change. |
| 2026-11-29 | M26 paged listings and a separate test root (spec 0028, spec 0018, ADR 0068; user request "entrycapacity'den kurtul. saçma bir şey. testi de düzelt ağacı"). `EntryCapacity` is deleted: `lib/iconview` holds a 64-entry window (`names`/`kinds`/`icon_ids`, absolute `base`/`total`, `set_total`/`put`/`window_base`/`window_len`/`window_covers`/`window_start`) instead of a whole directory, and a caller pages `core.fs_list` — the browser discovers the total once per open (walking to `NotFound`), fills the window around `top` and refills when the visible range or the selection leaves it, with the parallel size array window-relative, the status line showing the entry count and the thumb travelling over total rows; the file dialog does the same with a row of slack and keeps every modal interaction (Up, Open/Save, Escape, track paging, deferred thumb drag). Nothing is truncated and no directory size is refused. The test units moved from `samples/tests/apps/base` to `samples/tests/apps/tests`, staged as their own `tests/` root (the test `system/` tree still overlays `system/` with collision checks, the product image has no `tests/`), and the bare-name search is `base/`, `tests/`, the app categories, `system/` in both the kernel REPL and `langhost`, whose file operations share one image-candidate mapping. `base/` is product-only again: 28 shipped commands, identical in every image, so `ls base` no longer shows the 69 proof units and a GUI constant is not sized by the test corpus. The earlier same-day 96→128 capacity bump is superseded. Proof: **827 host tests**, `cargo xtask build`, `image --shell`; `scripts/cache_qmp.py` (`cache: ok`, `keyval`, expiry) on `-smp 4`; `scripts/file_dialog_qmp.py` PASS on `-smp 4` and `-smp 1` (`lib/math.ig` and `apps/accessories/calculator` open; the harness now derives the root row of `lib` instead of hard-coding 6, because `audio` and `tests` had shifted it); `scripts/browser_screenshot_qmp.py` (`browser: ready`); `browser: ok` and `iconview: ok` in the shell image on 4/1 cores. |
| 2026-11-29 | `keyval` accepts the shell's command form (user report "keyval help -- keyval: Invalid"). A bare `keyval ...` line reaches a `base/` command as `<cwd display>\n<tail>` (spec 0018, L11) while the explicit `run keyval ...` form is the raw tail; the tool only understood the latter, so `keyval help` and any direct command failed with `Invalid`. It now splits the argument string with `lib.path.split_cwd` — the one convention every `base/` command uses — before parsing the words, and the free-text `set`/`map-put`/`list-push` paths re-split the stripped tail. `scripts/cache_qmp.py` now also drives the direct form (`keyval set cli.direct ok`, `get`, `help`) and prints `[harness] cache direct form ok` on `-smp 4` and `-smp 1`; 827 host tests unchanged. |
| 2026-11-29 | M27 task introspection and the Task Manager (spec 0034, ADR 0069; user request "bir task manager istiyorum"). The scheduler now publishes one `TaskInfo` summary per slot (id, basename of the resolved path, state, class, wait kind/target, session, cumulative non-blocked CPU time, current run budget, claims/yields and the three declared region lengths) in a fixed `SpinLock` table, updated at spawn, claim, block, wake, release, reclaim and after every quantum; a task claimed by another core is therefore visible as `running` without reading its private value, and a reclaim clears the summary under the same reservation that clears the live id. Two `syslib` builtins (136 `task_count`, 137 `task_info`, no opcode; ABI v1 stays at 75) expose the snapshot: `task_info` writes 14 destinations only on `Ok`, `index >= count` is `NotFound`, and the name is a 64-byte basename. `apps/utilities/task_manager` is an ordinary `.ig` window launched from `System > Task Manager` (SysMenuCount 5): an 18-row table with scroll/selection, once-a-second sampling in `core.sleep` slices, a selected-row detail line and an in-window End Task confirmation through `core.kill`; self-kill is refused by the kernel and reported. Proof: **834 host tests** (5 interpreter snapshot tests + 1 compiler signature test + 1 `langhost` app check; 0 failed with `RUST_MIN_STACK=16777216`), `task_manager: ok` on 4/1 cores, `task_probe: ok` (two sleeping `tests/task_child` instances, both found, one killed and proved gone, via `scripts/task_probe_qmp.py`) on 4/1 cores, `scripts/task_manager_qmp.py` opens it from the System menu, checks the composed 560×320 table on 4/1 cores (166k white / 5.4k black pixels), and verifies the End Task dialog opens (360-pixel top frame) and cancels with Escape, `desktop_shell: ok`, and `halt_screen_qmp.py`/`system_menu_qmp.py` pass with the new System row. Q8 is resolved by ADR 0069; Q43 stays open until `stdlib` wraps task ids. |
| 2026-11-30 | M28 one-stick USB boot and storage (spec 0035, ADR 0070). The standard release is deliberately split (spec 0025), and a machine booted from a USB stick has no IDE channel, so the boot stopped at `apps: no image`. M28 makes the stick the storage: `cargo xtask usb` emits `build/igis-usb.img`, a BIOS+UEFI hybrid ISO carrying GRUB and the kernel, with a fresh 160 MiB ext2 `igis-apps` (read-only) and 256 MiB `igis-home` (writable) appended as MBR/GPT partitions (`xorriso -append_partition`, then `scripts/fix_gpt.py` moves the backup GPT to the last LBA); `cargo xtask usb --shell` builds the isolated `build/igis-usb-shell.img` test variant with `samples/tests` and `base/shell`. The new host-testable `partition` crate parses MBR (four 0x83 entries, skip 0xEE) and GPT (protective MBR, header/entry CRC32, 128-byte entries, bounds, 176-slot hybrid images) and provides a `Copy` bounds-checked `PartitionDisk` slice (20 tests); `ext2w` gained `read_label`/`label_matches`/`Fs::label` (5 tests, 23→28 total). `kernel/src/vfs/disk.rs` discovers the xHCI LUN, then the ATA master and slave once, and `fs::mount_application`/`mount_home` select the first `igis-apps`/`igis-home` partition, with the raw primary slave/master fallback unchanged (`AtaDisk` also became `Copy`, and `setup_lba` now selects the drive before the status wait, fixing a latent absent-slave bug). The shipped USB driver is xHCI: `platform/x86_64/xhci.rs` is polled and does the controller reset, DCBAA, command/event rings, ERST and scratchpads, USB2/USB3 port reset (including warm reset), slot/address/configure and control/bulk transfers from boot-reserved DMA; `pci::find_xhci` filters `0c.03.30`. `platform/x86_64/usb_storage.rs` implements Bulk-Only Transport and the SCSI transparent set (INQUIRY, TEST UNIT READY, REQUEST SENSE, READ CAPACITY(10), READ(10), WRITE(10), SYNCHRONIZE CACHE(10)), one bounded class-reset/ClearFeature recovery and a `Copy` `UsbDisk: SectorDevice`; a static BOT transaction lock covers CBW+data+CSW, with lock order `APPS|HOME -> BOT -> xHCI`, so both partitions of the one LUN mount at once. EHCI is present in `platform/x86_64/ehci.rs` (PCI `0c.03.20`, bounded reset, async schedule, QH/qTD pool, control/bulk, `UsbTransport::Ehci`) but **blocked, not claimed**: under QEMU `usb-ehci` the first `GET_DESCRIPTOR` control QH never executes (`ehci: port 1 connected speed 0 (full-speed), timeout`), gdb shows no kernel QH activity after `ASYNCLISTADDR`, and the QH/qTD bytes, overlay, both submission shapes, dummy-head/static rings, ASE/RS restarts, the async doorbell and both PORTSC reset semantics were tried; the code is opt-in with `igis.ehci=1` and the shipped path is xHCI (U18/M28.5 remains open). Proofs: `scripts/partition_qmp.py` (partitioned disk, raw disks and the `apps: no image` negative on 4/1 cores), `scripts/xhci_qmp.py` (SuperSpeed storage endpoints `0x81`/`0x02`, USB2 tablet, empty and absent controller, UHCI tablet, 4/1), `scripts/usb_storage_qmp.py` (the one-stick image as the only disk under xHCI, `desktop_shell: ready` in 2.3 s, app partition SHA-256 unchanged, home `e2fsck -fn` clean, negative halt; 4/1), `scripts/usb_home_qmp.py` (write `home_persist: ok` in 0.28–0.29 s, QEMU power cycle, `home_verify: ok` in 0.27–0.28 s on the same stick, clean home fsck with the added file; 4/1) and `scripts/usb_image_qmp.py` (host GPT/El Torito/label checks; SeaBIOS reaches `desktop_shell: ready`, while OVMF boots the kernel but assigns the xHCI BAR at `0xc000000000`, which `pci::find_xhci` ignores as above 4 GiB, so that path stops at `apps: no image` — the proved desktop path is BIOS/xHCI). The product image is 457.5 MiB / 479,723,520 bytes; `/home` persists and the application partition is never written. 859 host tests (635 language, 56 `net`, 28 `ext2w`, 120 `kv`, 20 `partition`; 0 failed with `RUST_MIN_STACK=16777216`), ABI v1 stays at 75 opcodes. Deferred: xHCI `Reset Endpoint`/`Set TR Dequeue Pointer` after a true BOT stall (the current path does a class reset + ClearFeature and then fails bounded); a UEFI firmware that places the xHCI BAR above 4 GiB (OVMF does, and the kernel ignores it); and an unpaced multi-byte serial input burst can reorder bytes on more than one core (the `/home` proof paces one byte per 5 ms; real hardware input is PS/2). Known limits: Secure Boot must be off, no USB HID keyboard, network is e1000/e1000e only, Settings' Bochs VBE modes are QEMU-only, and EHCI machines are not supported yet. README gains "Build a bootable USB stick" with the `dd` line, AGENTS/PLAN/spec 0035 record the state, and the release workflow installs EFI GRUB + OVMF, builds and checks the USB image and publishes `igis-usb.img.gz` alongside the four IDE files (spec 0035 U27). The normal `cargo xtask image` path, the IDE/ISO boot and the visual golden are unchanged. |
| 2026-11-30 | M28.8 UEFI high-BAR xHCI and the 1 TiB boot identity map (spec 0035 U17a/U17b, ADR 0071). The BIOS/xHCI one-stick path was proved, but OVMF placed the xHCI BAR at `0xc000000000` (768 GiB), outside the 4 GiB boot map; `pci::find_xhci` rejected it and UEFI stopped at `apps: no image`. The fix is the map, not a per-device mapper: `boot.s` now identity-maps the first 1 TiB with 2 MiB pages through `pml4[0] -> pdpt0` (0..512 GiB) and `pml4[1] -> pdpt2` (512..1024 GiB), with 1024 contiguous page directories (4 MiB) and 64-bit entries filled low/high (`add 0x200000; adc 0`); the higher-half `pml4[511] -> pdpt1 -> pd0` first-GiB alias is unchanged. `.boot` is 4,349,990 bytes (4.15 MiB: 4 MiB tables, 128 KiB stack, stub), `.text` starts at physical `0x527000` with no overlap, and the stub preserves the multiboot2 pointer in EDI. `paging::MAX_PHYS` is 1 TiB while `frame::MAX_PHYS` stays 4 GiB, so RAM/DMA and every xHCI ring/context stay below 4 GiB; `directory_entry`/`split_huge_page`/`pte_present` work over the 1024 PDs. New `paging::set_huge_uncached` sets `PWT|PCD` on the present 2 MiB directory entry; `xhci::init` marks the page containing BAR0 (low BIOS and high OVMF) uncached and reloads CR3 before the first register access, with a split-table fallback for the QEMU IDE image where e1000's `0xfebc0000` shares the `0xfea00000` page. `pci::find_xhci` accepts a 32/64-bit memory BAR0 below 1 TiB, logs a high address, and rejects I/O, zero and at-or-above-1-TiB BARs with a named line; EHCI keeps its 4 GiB check because that path is still unproved. Proofs: the rebuilt product image is 461.5 MiB (483,917,824 bytes); `scripts/usb_image_qmp.py --require-desktop --expect-high-bar` boots writable copies with no IDE and asserts `usb: mass storage xhci`, INQUIRY/capacity, `partition: usb table ok (gpt, 5 partitions)`, `apps: USB partition 4`, `ext2w: home partition 5`, `ext2w: home ok` and `desktop_shell: ready`, with no high-BAR ignore: SeaBIOS/xHCI BAR0 `0xfebf0000` in 2.61 s, OVMF/xHCI BAR0 `0xc000000000` in 4.21 s (4.01 s on 1 core), both firmware paths; `scripts/usb_storage_qmp.py` 4/1 cores (2.41–2.51 s to desktop, app partition SHA unchanged after boot, home `e2fsck -fn` clean), `scripts/usb_home_qmp.py` 4/1 (`home_persist`/`home_verify` 0.27–0.29 s, fsck clean after the power cycle), `scripts/partition_qmp.py` 4/1 (partitioned, raw, `apps: no image`), `scripts/xhci_qmp.py` 4/1 (xhci, usb2, empty, none, UHCI tablet; the shared e1000 page shows the split-table fallback), 859 host tests (0 failed), the visual golden on 4/1 (`62e8140aa28771bad03626915b2567f48402457152fdb6d65e1eb2a5e809d83c`, unchanged), and `cargo xtask image` plus `cargo xtask image --shell` in an isolated copy (the product boots to the desktop; the shell ISO runs the visual specimen). README/AGENTS/PLAN/spec 0035 and the ADR index record the map and the UEFI result; the release workflow's OVMF boot is now fatal (strict desktop check) and keeps `igis-usb.img.gz` as an asset. EHCI (U18/M28.5) remains blocked and opt-in with `igis.ehci=1`; the xHCI endpoint reset and the multi-core serial input reorder remain deferred. |
| 2026-11-30 | GitHub is the backup and the code host, not a build farm (user request "github usb imajı üretmesin... temizleyelim oradaki artefactleri de"). `.github/workflows/release.yml` (tag push → build the kernel/images and publish a GitHub release) is removed and replaced by `.github/workflows/tests.yml`: on every branch push, pull request and manual dispatch it installs the stable toolchain and `mke2fs`, then runs the host suite (`RUST_MIN_STACK=16777216 cargo test -p abi -p compiler -p interpreter -p langhost -p ext2w -p net -p kv -p partition`) with `contents: read`; it builds no kernel, ISO, disk image or USB image and publishes nothing. The bootable artifacts are built locally (`cargo xtask image`, `cargo xtask usb`) and a release is a tag plus those files shipped by hand. README "Releases", the AGENTS toolchain note, spec 0035 U27 and open question 2, ADR 0070's follow-up note and the PLAN M28.7 ticket say so; the 12 historical tag-triggered run records (which produced no release, artifact or cache) were deleted. The v0.1.0 tag stays as a code backup. |
