35d86741
docs: record what the dedupe measured on contact
a73x 2026-09-01 19:13
Commit message
docs/superpowers/specs/2026-09-01-e2e-dedupe-and-vm-gate-design.md
| Old | New | ||
|---|---|---|---|
| @@ -19,29 +19,34 @@ The retro record names the costs this design answers: | |||
| 19 | 19 | ||
| 20 | ## Part 1 — dedupe (no behavior change) | 20 | ## Part 1 — dedupe (no behavior change) |
| 21 | 21 | ||
| 22 | Three lib helpers replace three copied idioms. The scenario pins (105/38 in | 22 | As designed: three lib helpers. As measured on contact (2026-09-01): one |
| 23 | `test/e2e.sh`) do not move; that they do not move is the delivery check that | 23 | survived. The scenario pins (105/38 in `test/e2e.sh`) do not move; that |
| 24 | this part changed nothing. | 24 | they do not move is the delivery check that this part changed nothing. |
| 25 | 25 | ||
| 26 | **1. `ssh_shim_rig DIR`** in `e2e_lib.sh`: creates DIR, the three logs | 26 | **1. `ssh_shim_rig DIR` — DROPPED.** Reading all five shim bodies showed |
| 27 | (`DIR/pids`, `DIR/comms`, `DIR/args`), writes the option-loop head (today's | 27 | the common factor is already extracted: `ssh_shim_head` IS it, done |
| 28 | `ssh_shim_head`) plus the pid/comm/arg logging lines every rig repeats, | 28 | deliberately. The bodies differ in exactly what each group pins — 04 logs |
| 29 | registers `defer_rm`, and leaves the file open for the caller to append its | 29 | pid/comm/args, 09 remaps a runtime dir per fake box, 09's second shim |
| 30 | bespoke behavior before `chmod +x`. `04_handoff`, `09_hosts`, `15_askpass` | 30 | fakes unreachable-with-a-reason, 16 remaps a whole HOME — and 15 refuses |
| 31 | and `16_push` convert; their per-group behaviors (HRUN homes, fakebin/uname | 31 | the shared head on purpose, with a comment saying why (its subject is the |
| 32 | fronting) stay in the group files as appended bodies. | 32 | options the head discards). A rig helper would have served one caller and |
| 33 | 33 | blurred the other four. | |
| 34 | **2. `must "message" cmd args...`**: runs the command with the rc captured | 34 | |
| 35 | inside the helper, and on nonzero prints the message and the rc and exits 1. | 35 | **2. `rc0 "message" [FILE...]`** (renamed from the spec's `must`, reshaped |
| 36 | Converts only the sites whose failure block is a simple message — the | 36 | to read the `RC` the enclosing `set +e … RC=$? … set -e` capture already |
| 37 | multi-line diagnostic blocks keep their current shape, because the per-leg | 37 | holds — a wrapper taking `cmd args...` cannot carry the heredocs most |
| 38 | failure prose is load-bearing and `must` must never genericize it. Expect | 38 | sites feed ptyclient). Fails the suite printing the caller's own prose and |
| 39 | roughly half to two-thirds of the ~123 sites to convert; the true count is | 39 | the named capture files. It appends no "(rc N)" suffix: the messages carry |
| 40 | measured during implementation, not promised here. | 40 | `$RC` in bespoke positions, some with rc legends ("134 = panic"). 58 of |
| 41 | 41 | the 82 plain `-eq 0` sites converted; the ~24 that compare RC to specific | |
| 42 | **3. A shared detach tail** for ptyclient scripts: one lib variable holding | 42 | values, kill something, or dump state on the way out keep their bespoke |
| 43 | `send \x1cd` + `waitexit`, interpolated into the ~57 heredocs that end a | 43 | form, and that boundary is the point — the helper covers the shape, never |
| 44 | scripted session the same way. | 44 | the judgment. |
| 45 | |||
| 46 | **3. A shared detach tail — DROPPED.** The heredocs are quote-protected so | ||
| 47 | `$$` and `$?` reach the REMOTE shell literally; interpolating a shared | ||
| 48 | tail means unquoting every script, which breaks every marker. Two clear | ||
| 49 | lines per site beat that trade. | ||
| 45 | 50 | ||
| 46 | Conversion gate: full `make e2e` after each group file converts (the suite is | 51 | Conversion gate: full `make e2e` after each group file converts (the suite is |
| 47 | linear and stateful; `E2E_ONLY` cannot vouch for a group's neighbors), and | 52 | linear and stateful; `E2E_ONLY` cannot vouch for a group's neighbors), and |