test(platform): follow the batched execution trace pipeline

The execution trace rewrite batches records and uploads them from
ExecutionCounters.flush(), replaced the per-trace direct send, dropped the
window counters, made the execution id the record identity and records the
inbound event stage after the routing stage. The ingress tests still asserted
the old mechanism, so they failed on every Python version.

Assert what the pipeline now emits instead: flush the buffered records and read
them back, require the trace registry to be empty afterwards, assert the
deterministic execution id, expect the route stage before the inbound stage,
and give the dispatch stubs the execution_id parameter the ingress passes.
This commit is contained in:
Hyu
2026-10-01 19:55:44 +08:00
parent 73797dfa04
commit 41820cd1a5
2 changed files with 42 additions and 23 deletions
@@ -33,14 +33,14 @@ async def test_slow_failed_and_duplicate_subscriptions_do_not_block_primary_rout
started = []
release = asyncio.Event()
async def subscriber(event, adapter, uuid):
async def subscriber(event, adapter, uuid, execution_id=None):
started.append(uuid)
if uuid == 'slow':
await release.wait()
if uuid == 'failed':
raise ValueError('plugin error')
async def primary(event, adapter):
async def primary(event, adapter, execution_id=None):
started.append('primary')
bot._dispatch_plugin_subscription = subscriber