Commit 3dfd830
committed
fix(cli): mode-appropriate retry advice, and validate input files before any call (#1114)
Both from PR review, both real.
1. The retry-cap handler gave --brief-file runs an --answers-file message: it
told them a "canned answer list cannot recover" and to "supply answers that
address every part of the question". Brief mode has no list and takes a
brief, so that advice is unactionable — and it contradicts this PR's own
claim that --brief-file survives a rejection. Worse, can_desynchronise was
added precisely to tell the two modes apart and then never used. It is now
the branch: --answers-file is pointed at --brief-file, and --brief-file is
told the brief probably does not cover the question, quoting it.
2. The input files were loaded after session.start_discovery(), which generates
the opening question — a paid call taking minutes (#902). So a typo in a path
cost a request before failing. This contradicted the comment three lines
above the conflict check ("a flag conflict must not cost an API call"), which
I had applied to the flags and not their contents. Both loads moved up; two
tests assert create_provider is never called on a bad path.
The brief-mode message test exercises the handler directly. Driving it through
the CLI hung inside the discovery engine's own retry loop, which would have
meant mocking the whole engine to assert a message string.
Full suite: 6351 passed, 49 skipped.1 parent 32d11a2 commit 3dfd830
2 files changed
Lines changed: 94 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
205 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
| |||
1741 | 1752 | | |
1742 | 1753 | | |
1743 | 1754 | | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
1744 | 1761 | | |
1745 | 1762 | | |
1746 | 1763 | | |
| |||
1793 | 1810 | | |
1794 | 1811 | | |
1795 | 1812 | | |
1796 | | - | |
1797 | | - | |
1798 | 1813 | | |
1799 | 1814 | | |
1800 | 1815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
0 commit comments