summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-09 04:08:35 -0300
committerGabriel Schneider <[email protected]>2026-11-09 23:51:42 -0300
commit773b2196f87974ce66f50c23b7708dc5214ec98d (patch)
tree4ac6c13193f150799ebab2917d3d74daf6437b29
parent0b4cfd4b416d03ef64ccd908dfee810c6a498569 (diff)
downloadpardes-773b2196f87974ce66f50c23b7708dc5214ec98d.tar.gz
pardes-773b2196f87974ce66f50c23b7708dc5214ec98d.zip
soak: the session keeps a PDF pane open (--pdf, design.pdf by default, in a column of its own at the start and Looked at again at a quiet point if a Del closed it), so every cell carries a kind's frames and raster strips to a client without the library, and instant's pointer classes stay in the first column, where the file and the shell are
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
-rw-r--r--test/soak.py30
1 files changed, 25 insertions, 5 deletions
diff --git a/test/soak.py b/test/soak.py
index dc40c17c..d71549b7 100644
--- a/test/soak.py
+++ b/test/soak.py
@@ -35,8 +35,9 @@ Narrowing a breach down: `--trace` (PARDES_REPLICA_TRACE at both ends: per-field
digests, each unit and each divergence described in the clients' and the
session's logs), `--only move,insert` / `--skip click,hover` (the monkey's
actions by name, ACTIONS below), `--events resize,detach` ('' for none),
-`--no-upgrade`, `--no-respawn` (a dead client stays dead, a dead session ends
-the cell), `--near` (local clients without zstd and blobs by hash), `--keep`
+`--no-upgrade`, `--pdf ''` (no PDF pane: by default the session keeps one
+of design.pdf open, Looked at again when a Del closed it), `--no-respawn`
+(a dead client stays dead, a dead session ends the cell), `--near` (local clients without zstd and blobs by hash), `--keep`
(the run's files, with each terminal client's output and the actions log, a
line an input). A breach's files are kept whatever.
@@ -812,6 +813,7 @@ class Run:
(self.root / 'config' / 'pardes' / 'init').write_text('Shell bash\nMessageLinger 0\n')
self.env = env
self.work = self.root / 'work'
+ self.workdir = self.work # where the session sees it
self.nine = None
self.nine_lock = threading.RLock()
self.session_pid = None
@@ -939,6 +941,17 @@ class Run:
for _ in range(self.shells):
self.nine_write('/pane/1/exec', b'Term\n')
time.sleep(0.5)
+ self.look_pdf(column=True)
+
+ def look_pdf(self, column=False):
+ """The PDF pane the cell keeps open (--pdf): Looked at in a column of
+ its own at the start (instant's pointer stays in the first), and again
+ at a quiet point if a Del closed it."""
+ rows = (self.nine_read('/index') or b'').decode(errors='replace').splitlines()
+ if self.args.pdf and not any(self.args.pdf in r for r in rows):
+ if column:
+ self.nine_write('/exec', b'Newcol\n')
+ self.nine_write('/exec', f'Look {self.workdir}/{self.args.pdf}\n'.encode())
def session_alive(self):
return alive(self.session_pid) if self.session_pid else False
@@ -991,6 +1004,7 @@ class BoxRun(Run):
self.far = False # an ssh client is far by itself
self.run_dir = f'{BOX_T}/run-hunt'
self.home = f'{BOX_T}/home-hunt'
+ self.workdir = f'{self.home}/work'
self.env['PARDES_SSH'] = ' '.join(SSH)
self.env['PARDES_REMOTE_RUNTIME'] = self.run_dir
self.fwd = None
@@ -1031,6 +1045,7 @@ class BoxRun(Run):
for _ in range(self.shells):
self.nine_write('/pane/1/exec', b'Term\n')
time.sleep(1)
+ self.look_pdf(column=True)
def session_alive(self):
# An ssh that stalls (the box's link, 30 s once in a 20-minute run) is no session's
@@ -1137,6 +1152,7 @@ def quiet_point(run, live):
panes_check(run, c)
if isinstance(c, TtyClient) and fresh:
view_check(run, c)
+ run.look_pdf()
release(live)
@@ -1516,16 +1532,19 @@ def gen_term_keys(c, rng, i):
c.keys(b'k' if i % 4 else b'\x15')
+# The pointer's x in the first column's: the PDF pane's column is right of it.
+# A click's in the text every row of big.txt has there (its lines wrap at that
+# width): two past a short row's end put the caret where it was, nothing to show.
def gen_click(c, rng, i):
- c.click(1, rng.uniform(0.15, 0.9), rng.uniform(0.14, 0.4))
+ c.click(1, rng.uniform(0.09, 0.21), rng.uniform(0.14, 0.4))
def gen_wheel_file(c, rng, i):
- c.mouse('wheel', 1 if i % 3 == 2 else -1, 0.5, 0.3)
+ c.mouse('wheel', 1 if i % 3 == 2 else -1, 0.2, 0.3)
def gen_wheel_term(c, rng, i):
- c.mouse('wheel', 1 if i % 3 != 2 else -1, 0.5, 0.85)
+ c.mouse('wheel', 1 if i % 3 != 2 else -1, 0.2, 0.85)
# name, pane it is in, setup keys, one measured input, keys after, local only
@@ -1783,6 +1802,7 @@ def main():
ap.add_argument('--only', default='', help='the monkey\'s actions, by name: move,insert,...')
ap.add_argument('--skip', default='', help='actions left out, by name')
ap.add_argument('--events', default='resize,resize,detach,script,script', help='the global events drawn from')
+ ap.add_argument('--pdf', default='design.pdf', help='a PDF of the work directory the session keeps a pane of (\'\' for none)')
args = ap.parse_args()
if args.where == 'instant':
args.where = 'box' if args.box else 'local'