Commit c52fb97
committed
fix: strip end-of-line whitespace from wait-for needles (codeplain-tty)
The transcript is rendered per line with trailing whitespace stripped, so a
needle quoting a prompt verbatim — 'Master password: ' — could never match as
written; every such wait burned its full timeout and stacked past the script
budget. Deterministically reproduced from the cli-password-manager failure in
the pty-with-codeplain-tty benchmark run (17 of the render's conformance
failures were 120-second timeouts): the generated tests drove the CLI through
codeplain-tty exactly as instructed, and hung only on the trailing space in
'wait-for "Master password: "'.
The broker now strips end-of-line whitespace from wait-for and
wait-until-absent needles before matching; a needle that is empty after the
normalization is a usage error.1 parent 7be2136 commit c52fb97
2 files changed
Lines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
243 | 246 | | |
244 | | - | |
| 247 | + | |
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
131 | 160 | | |
132 | 161 | | |
133 | 162 | | |
| |||
0 commit comments