Commit f0e2d1a
committed
Address PR #2050 review: test constants, mark() guard, can_handle contract
Respond to the automated review on PR #2050:
- Replace the bare discovery-state literals in the three new regression tests
with the C.DISCOVERY_STATE_* constants, so the new tests follow the same
single-source-of-truth the PR establishes (no within-method "ingested"
constant vs "failed"/"queued" literal mix).
- mark(): add a guard rejecting error= alongside a terminal SUCCESS state,
mirroring the existing exclusivity guards. This makes the "an ingested row
carries no error" invariant explicit rather than relying on no caller ever
passing the contradiction.
- Document on BaseAuthoritySourceProvider.can_handle that overrides MUST be
stateless — the orchestrator now probes one instance with multiple candidate
keys and reuses it for locate/fetch, so the purity the optimisation relies on
is codified for future provider authors.
Declined the list->tuple nit for DISCOVERY_STATE_CHOICES: the field's choices
match migration 0100's recorded list, and no code mutates it, so keeping the
list avoids any migration-state churn for a marginal immutability gain.1 parent 17d2ae4 commit f0e2d1a
3 files changed
Lines changed: 31 additions & 6 deletions
File tree
- opencontractserver
- enrichment/services
- pipeline/base
- tests
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
457 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
461 | 465 | | |
462 | 466 | | |
463 | 467 | | |
464 | | - | |
| 468 | + | |
465 | 469 | | |
466 | 470 | | |
467 | 471 | | |
| |||
471 | 475 | | |
472 | 476 | | |
473 | 477 | | |
474 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
475 | 484 | | |
476 | | - | |
477 | 485 | | |
478 | 486 | | |
479 | 487 | | |
| |||
0 commit comments