test(gateway): the Desktop metadata probe reads pending/running only from the queue snapshot

3429015b2a made a local viewer's turn end republish the banner inventory as `session.info`
(main's _emit_settled_session_info), like the title and reasoning republishes already do. Those
frames carry no `pending`/`running`/`execution_generation`: they are not the owner's queue
snapshot (`SessionAuthority._publish_pending`), and Desktop's lease and execution-fence code
ignores them for the same reason (gateway.ts reads `running === true/false`,
execution-authority.ts requires a numeric execution_generation). The probe skipped nothing and
hit KeyError 'pending' on PR CI 38364468727; it now skips frames without the snapshot keys and
still requires the snapshot to show the turn queued, then settled.
This commit is contained in:
Teknium
2026-10-13 01:04:48 -07:00
parent 9747a4e2c2
commit 502e236de5

View File

@@ -44,6 +44,10 @@ def test_canonical_desktop_metadata_survives_create_info_and_reattach(tmp_path):
info = event['payload']
assert info['desktop_protocol'] == creator.subprotocol
assert 'desktop_contract' not in info
if 'pending' not in info:
# The banner/inventory republish (turn end, title, reasoning) is not the
# owner's queue snapshot; Desktop's lease/fence logic ignores it too.
continue
saw_pending |= bool(info['pending'])
finished = saw_pending and not info['pending'] and not info['running']
await settled(home)