Commit 3edf2e5
committed
address self-review findings on PR #48
- **Structural thread-ID validation**: reject `slack::`, `slack:::`,
`slack::::` etc. via `any(seg for seg in remainder.split(":"))`
BEFORE calling the adapter. Previously relied on
`adapter.channel_id_from_thread_id()` returning exactly
`"{adapter}:"` to catch the empty-remainder case, but different
adapters return different things for malformed input (MockAdapter
returns `"slack:"`, real Slack regex-matches and returns the full
string unchanged, etc.). The structural check doesn't depend on
adapter-specific behavior, so it's a single source of truth.
- **Expand `test_empty_remainder_raises`** to cover `slack:::` and
`slack::::` variants.
- **Clean up `test_omits_history_when_adapter_does_not_persist`**:
explicitly set `adapter.persist_message_history = None` instead of
asserting on the mock's default. Prevents silent test regression
if the mock default ever changes, and makes intent unambiguous.1 parent f839e7a commit 3edf2e5
2 files changed
Lines changed: 37 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
1412 | 1416 | | |
1413 | | - | |
| 1417 | + | |
1414 | 1418 | | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
1415 | 1423 | | |
1416 | 1424 | | |
1417 | 1425 | | |
1418 | 1426 | | |
1419 | | - | |
1420 | | - | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1421 | 1430 | | |
1422 | 1431 | | |
1423 | 1432 | | |
1424 | 1433 | | |
1425 | | - | |
| 1434 | + | |
1426 | 1435 | | |
1427 | 1436 | | |
1428 | 1437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
511 | 515 | | |
512 | 516 | | |
513 | 517 | | |
514 | | - | |
| 518 | + | |
515 | 519 | | |
516 | 520 | | |
517 | 521 | | |
| |||
525 | 529 | | |
526 | 530 | | |
527 | 531 | | |
528 | | - | |
529 | | - | |
530 | | - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
531 | 539 | | |
532 | 540 | | |
533 | 541 | | |
534 | 542 | | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
539 | 546 | | |
540 | 547 | | |
541 | 548 | | |
| |||
0 commit comments