# The pane tag has to follow the shell around, because a relative `Look` is # resolved against it: with a stale cwd, clicking `README.md` after a `cd` # looks for it in the directory the pane was SPAWNED in and finds nothing. # # On linux the host re-reads /proc//cwd every frame. macOS asks libproc, # and asks it only for a pane that just produced output — a `cd` is a command # and a shell that ran a command prints its next prompt, so nothing else can # have moved one. This script is what proves that gating is not too clever: # the tag must be right AFTER the cd and must stay right when nothing happens. start 24 100 wait 8000 $ stable 700 20000 # The hermetic world puts the shell in /work, so the boot tag names it # and no absolute path from this machine can leak into the golden. snap spawned # `cd` writes nothing but the next prompt: the one and only signal the lazy # refresh gets. Two of them, because the second has to survive the first # having already cleared the flag. text cd /tmp key enter wait 8000 $ stable 700 20000 snap moved text cd / key enter wait 8000 $ stable 700 20000 snap moved-again # ...and an idle pass must not lose it again: the refresh clears its own flag, # so a tick with no output must leave the tag exactly where it was. stable 700 20000 snap idle