Commit 3af8fc8
fix(drive): tombstone dead resumable sessions (real-Drive contract fidelity)
Running the M4 real-Drive contract suite against live Google (now that the e2e
creds exist) surfaced a fake-vs-real gap: scenario_resumable_non_multiple_rejected
failed because GoogleDriveStore rejected a non-256-KiB non-final chunk CLIENT-SIDE
(returning SessionInvalid without ever reaching Drive), so Drive never learned the
session was dead and ACCEPTED a subsequent valid 256-KiB chunk against the same
session URL -> InProgress instead of the contract-required SessionInvalid.
Fix: GoogleDriveStore now tombstones a session URL on any SessionInvalid (client-side
non-multiple rejection OR a Drive 4xx from push_chunk) in a bounded
parking_lot::Mutex<HashSet<String>>, and short-circuits any further chunk on a
tombstoned session to SessionInvalid - matching the InMemoryRemoteStore + DESIGN
s5.4 ("never issue a fresh resume_chunk against the old session URL after a 4xx").
The set is capped (cleared at 1024) as a memory bound; the executor discards a
session on SessionInvalid and never reuses its URL, so a tombstoned URL is never
legitimately re-sent. Not production-reachable (the executor sends only 256-KiB
multiples and restarts on SessionInvalid), but it closes the M4 acceptance
"contract suite green against real Google" - now 7/7 against live Drive.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CyiRqk2DVwmJjEu5gcD1m1 parent 9693a91 commit 3af8fc8
1 file changed
Lines changed: 42 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
488 | 496 | | |
489 | 497 | | |
490 | 498 | | |
| |||
512 | 520 | | |
513 | 521 | | |
514 | 522 | | |
| 523 | + | |
515 | 524 | | |
516 | 525 | | |
517 | 526 | | |
| |||
526 | 535 | | |
527 | 536 | | |
528 | 537 | | |
| 538 | + | |
529 | 539 | | |
530 | 540 | | |
531 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
532 | 559 | | |
533 | 560 | | |
534 | 561 | | |
| |||
1350 | 1377 | | |
1351 | 1378 | | |
1352 | 1379 | | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1353 | 1387 | | |
1354 | 1388 | | |
| 1389 | + | |
1355 | 1390 | | |
1356 | 1391 | | |
1357 | 1392 | | |
1358 | | - | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
1359 | 1399 | | |
1360 | 1400 | | |
1361 | 1401 | | |
| |||
0 commit comments