diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-22 21:55:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-22 21:59:50 -0300 |
| commit | 18e674964e5db67d35e1cf5ded128757ced22a98 (patch) | |
| tree | f99ed84b30ecfcbc028b2c9c16deadc282dd06ce /core/ninep | |
| parent | 9acf9f558de00f4588b51dee2cd56b9150c7fb35 (diff) | |
| download | pardes-18e674964e5db67d35e1cf5ded128757ced22a98.tar.gz pardes-18e674964e5db67d35e1cf5ded128757ced22a98.zip | |
replicas: one decision a unit, by one count in the core (pardes-term-join-11, item 2; P54, the coordinator's lean, held against the code first): `Replica.confirm` asked one question four ways from three sources ("did applying this unit write state outside the rollback copy, an emulator?"): the speculation's own observation (`Pending.terminal` from `Tape.touched`, set by `touchTerminal` at a grid it owed and at every READ of a terminal's rows), the unit's records (`tape.feedsTerminal`), a process-wide counter (`Term.writes`, seven increments, shared by every side of the soak's one process) and a dead read (`read_terminal`, always false); round 10's predicate over the records failed because no record names the unit whose `sync` reflows a grid, a load or a teardown; now the core counts its emulators' writes itself (`Pardes.outside`, a `Term.Outside`): a field, so copied with a speculation, digested and dumped, a function of the tape, the same on every side; every write of the `calls` table's WRITE rows takes it first and counts (core/Term.zig `open`, `close`, `revive`, `reload`, `feed`, `resize`, `endOutputHere`, and `replies` when it drained any), a comptime block fails the build if a WRITE row's entry does not take it (the compiler holds the call sites; S1's `calls` test holds that a new write is listed); `resize` owes under a speculation (counted, not made: the grid's guard moved there from panes.zig `resizeGrid`); a load sets it (the walk loads the field; `dumpRead` counts nothing); the one read in `confirm`: on the fast path the count's movement over the input's speculation (`Pending.outside`, a number, equal to the unit's by the path's premise: moved, the unit is replayed once on the confirmed core), on the replay paths its movement over `replayUnit` on the core that applied it (moved over a copy held ahead, the copy goes), and on the neutral path no read at all: the session's digest after the unit holds the count, so a unit that wrote an emulator never ends where it began (`feedsTerminal` deleted with its one use); the predicted echo is judged at every unit that moved it; DELETED: `Tape.touched`, both `touchTerminal`s and the read-touch in edit.zig `shellRows` (a read writes nothing outside the copy; on the one road a speculation reads the confirmed emulator), `Term.writes` and its seven increments, `feedsTerminal`, `read_terminal`; where the lean does not stretch, said and not built: a picture's pixels, a kind's state and the Store's closed list are written BY a speculation, so the fast path must let the copy go, not replay: `panesMoved`, the serials and `retiring` stay for them; the dump changes (a core field): the wire stays at 31 (its history line says so); tests: the existing path tests green (fast, neutral, ahead, owed grid, "a view that sized a terminal closing leaves nothing queued ..." among them); new: a session's reflow of a terminal's grid over a copy held ahead is the count's to decide (a unit with no output record: the copy goes, a rollback does not reflow again), and the count digested (one side's emulator written outside any unit, a colour set no other digested field shows: `partsApart` names `outside` alone); core-test 917/1079 (162 skipped), shell-test 1121/1124 (3 skipped), the gate below
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/ninep')
| -rw-r--r-- | core/ninep/pty.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/ninep/pty.zig b/core/ninep/pty.zig index 923dab88..43973491 100644 --- a/core/ninep/pty.zig +++ b/core/ninep/pty.zig @@ -422,7 +422,7 @@ pub fn shellExited(p: *Pardes, pane: *Pane, status: ?u8) void { const code = status orelse return; if (waitingRun(p, pane)) |slot| if (slot.phase == .sent) { pane.fs.run = null; - if (pane.terminal) |state| pardes.Term.endOutputHere(state); + if (pane.terminal) |state| pardes.Term.endOutputHere(&p.outside, state); finish(p, slot, pane, code); }; var buf: [4]u8 = undefined; @@ -1015,10 +1015,10 @@ test "a run's answer says cut when its output's start is gone, and reads a bound // A resize between its start and end reflows the pins with the text. h = sh.send(p, node); sh.put(p, c ++ "one\r\ntwo\r\n"); - pane.resizeGrid(p.live, 50, 20); + pane.resizeGrid(p, 50, 20); sh.put(p, d ++ prompt); try testing.expectEqualStrings("exit 0\none\ntwo\n", sh.answered(p, node, h, into)); - pane.resizeGrid(p.live, pane.cols, pane.rows); + pane.resizeGrid(p, pane.cols, pane.rows); // A full-screen program leaves nothing on the primary screen, and a D // with no status is not a success. |
