Commit efe509f
committed
test(web): stub the park-first backlog gate in start-flow picker tests
In the full integration sweep, TestStartSessionFlow's four tests timed
out waiting for the start POST's outcome. Diagnosed with a probe page:
the click never reached /api/session/start, because startSession()
first consults GET /api/backlog (the AuDHD MAX_ACTIVE_TOPICS park-first
gate) — which was the ONE endpoint these tests left unstubbed. Earlier
study-integration runs in the same pytest process leave 3+ active
topics in the shared suite DB (their study sessions now persist through
the context layer), so the gate swallowed the click into the park-first
overlay and no POST, event, or picker error ever happened. In isolation
the backlog was empty, which is why the tests passed alone.
_stub_start() now stubs /api/backlog to 'no pressure' alongside the
start route (and the network-error test does the same), so these tests
assert what they claim to: the start POST contract, not backlog state
leaked by whoever ran first. Verified: the minimal reproducing pair
(study_integration + web_session_lifecycle) passes, as does the file
alone.1 parent c8315cc commit efe509f
1 file changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
135 | 155 | | |
136 | 156 | | |
137 | 157 | | |
| |||
378 | 398 | | |
379 | 399 | | |
380 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
381 | 405 | | |
382 | 406 | | |
383 | 407 | | |
| |||
498 | 522 | | |
499 | 523 | | |
500 | 524 | | |
| 525 | + | |
501 | 526 | | |
502 | 527 | | |
503 | 528 | | |
| |||
0 commit comments