Commit fffe115
committed
fix: preserve stdin for permission prompts and handle count_tokens in mock
Three fixes for CI test failures:
1. Skip read_piped_stdin() when a CLI prompt is provided, so that stdin
remains available for interactive permission approval prompts. Previously
read_piped_stdin consumed all of stdin (including the "y" answer) before
the permission prompter could read it.
2. Handle /v1/messages/count_tokens in the mock Anthropic service with a
stub JSON response instead of treating it as a scenario request. The
client now makes preflight token-counting calls that were inflating the
captured request count from 21 to 42.
3. Use workspace_fingerprint in the resume_latest integration test so
session files are written to the correct fingerprinted subdirectory
that SessionStore::from_cwd expects.
https://claude.ai/code/session_01HZSVJyyV6aweGbT8YkN6nY1 parent c950ea5 commit fffe115
3 files changed
Lines changed: 26 additions & 2 deletions
File tree
- rust/crates
- mock-anthropic-service/src
- rusty-claude-cli
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
147 | 161 | | |
148 | 162 | | |
149 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
209 | 215 | | |
210 | 216 | | |
211 | 217 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
| |||
0 commit comments