Commit c979ade
committed
prepare-sync: precise warn text + spec-derived test bodies
PR-C.3 review fixup.
- observer.py: rewrite the awaitable-from-prepare_sync warning.
The old text claimed "did NOT run", but a user returning an
``asyncio.Task`` / ``Future`` may have work in flight on the
loop — just not awaited at the prepare_sync call site. The
contract violation is "no guarantee the prep completes before
the node body," not "definitely doesn't run." Reworded to that
shape and included ``type(result).__name__`` so the user
can see which awaitable they returned at a glance.
- tests/conformance/test_observability.py: sub-case 1's driver
hardcoded the YAML message bodies ("node a executing" /
"node b executing") for record filtering and lookup, even
though it had already read ``emits_log.message`` from the
spec to drive the node body. That duplicated spec data and
made the test brittle to fixture wording changes. Derive a
``node_emit_messages`` map from ``nodes_spec`` up front; use
the values for both record filtering and ``by_body`` indexing.
Sub-case 2 already worked this way (uses ``outer_emit`` /
``inner_emit`` derived from spec); sub-case 1 now matches.1 parent 2746090 commit c979ade
2 files changed
Lines changed: 22 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
442 | 444 | | |
443 | 445 | | |
444 | 446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
1518 | 1525 | | |
1519 | 1526 | | |
1520 | 1527 | | |
| |||
1554 | 1561 | | |
1555 | 1562 | | |
1556 | 1563 | | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1560 | 1569 | | |
1561 | 1570 | | |
1562 | 1571 | | |
1563 | 1572 | | |
1564 | 1573 | | |
1565 | | - | |
| 1574 | + | |
| 1575 | + | |
1566 | 1576 | | |
1567 | | - | |
1568 | | - | |
| 1577 | + | |
| 1578 | + | |
1569 | 1579 | | |
1570 | 1580 | | |
1571 | 1581 | | |
| |||
0 commit comments