summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-03 16:17:51 -0300
committerGabriel Schneider <[email protected]>2026-11-03 16:21:16 -0300
commitd197289c331365081295cb44f27ee2893294cffa (patch)
treef4d64abdcdfcb714ece786fd050264dcc22a2bf5 /docs
parent86e9f8e241df16d96df542e08684af638c39fb89 (diff)
downloadpardes-d197289c331365081295cb44f27ee2893294cffa.tar.gz
pardes-d197289c331365081295cb44f27ee2893294cffa.zip
test: the behaviour-test step and test/session.zig, T1 of docs/next-tests.md: a Session drives the core as a 9P client does (walk by path, open, read or write, clunk, held lines run at the clunk as src/9p_io.zig runs them), the core opaque and the step's module importing session alone, so a behavioural test cannot reach past the 9P tree; keys (kbdin), click (on text found on /screen, mousein), screen, focused, refused and the refusal's words; test/behaviour/{other_files,panes,edit}.zig, a file a section of the reference: kbdin and mousein, a collapsed pane's ctl, name's leading blank, Putall, Edit blocks, moved out of src/ninep/ctl.zig (an Edit block left open now checked as a client sees it, an err in the log at its clunk), each checked to fail against a break (collapsed left off the ctl read, Putall saving nothing); the plan doc says the layout, the decisions and the progress
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'docs')
-rw-r--r--docs/next-tests.md40
1 files changed, 36 insertions, 4 deletions
diff --git a/docs/next-tests.md b/docs/next-tests.md
index f05a6e73..7dbbff60 100644
--- a/docs/next-tests.md
+++ b/docs/next-tests.md
@@ -15,9 +15,29 @@ agent's survey. The `e2e` line (kbdin, mousein) is its first step.
- **T1, in-process 9P, is the main tier.** The core is driven only through
`serveFs` (src/ninep/testing.zig's `call`, `rd`, `wr`): as behavioural
as a client on a socket, and milliseconds a case.
-- **Process-level tests (T2) get a Zig runner, not Python.** The Python
- suites (test/fs.py and the rest) stay as examples of scripting a session
- and are not grown.
+- **Process-level tests (T2) get a Zig runner, not Python:** test/snapshot.zig,
+ the `.snap` runner, which already forks the app in a pty and has a 9P
+ client (`snap9p`), grows 9P verbs (`9pwrite`, `9pexpect`, `signal`). The
+ Python suites (test/fs.py and the rest) stay as examples of scripting a
+ session and are not grown.
+- **Layout (from a ponytail review, 2026-11-03):**
+ - **test/session.zig is the T1 `Session`:** a 9P client's walk, open,
+ read or write, clunk, by path, with the core opaque.
+ - **test/behaviour/<label>.zig holds the tests,** a file a section of
+ the book named by its label (`other-files` is other_files.zig), each
+ test's name its label first.
+ - **The `behaviour-test` step:** its module imports `session` alone, so
+ a behavioural test that reaches for `pardes` does not compile. That
+ boundary is the lint.
+ - **Expectations are inline;** goldens stay where they are.
+- **A surface is added when a test being migrated needs one,** as a word in
+ a file that exists where it can be (a pane ctl's read already ends
+ `collapsed fit:… tint:…`; rio's wctl read is its window's rectangle).
+- **A migration is one commit:** the behavioural test in, the M test it
+ replaces out, and the break it was checked against named. Phases 2 and 4
+ are one.
+- **A replica's agreement is checked opt-in** (a Session option, to come),
+ for kbdin and mousein input, which a replica takes as events.
- **Later, not now:**
- The reference as the spec: one test per documented behaviour, named by
its section (docs/typ/reference.typ for the 9P surface, guide.typ and
@@ -32,7 +52,6 @@ agent's survey. The `e2e` line (kbdin, mousein) is its first step.
| T1 | the core through `serveFs`, in process | most behaviour; each case also through a replica that must agree |
| T2 | a real `pardes` over its socket, a Zig runner | daemon, attach, mounts, shells, flags |
| T3 | terminal bytes, the `.snap` scripts | tty rendering and keys |
-
| T4 | the window: `pardes-gui` hidden (`PARDES_TEST`, offscreen), its input through the same 9P files, frames captured once its status file says idle | what only pixels show |
| perf | T1 or T4 gestures, timed | latency gates against baselines |
@@ -80,6 +99,19 @@ What the M tests reach into, and the public surface for it:
| `.pdf.?` | 25 | **missing**: page, viewport |
| terminal cursor, overlay | 60 | partial |
+## Progress
+
+Left to migrate, a file a row (`grep -c '^test "' <file>` before and
+after; M as the inventory classed them):
+
+| file | M at the start | moved | checked against |
+|---|---|---|---|
+| src/ninep/ctl.zig | 82 | 5 | `collapsed ` left off the ctl read; Putall saving nothing |
+
+Migrated so far, in test/behaviour/: other_files (kbdin, mousein), panes
+(collapsed, name's leading blank, Putall), edit (an Edit block to a pane's
+ctl, the root's and exec, one left open at its clunk an err in the log).
+
## Phases
0. Inventory. Done, above.