Files
WoW-Hybrid-gateway/ops/native_entity_catalog.py
praxisandClaude Fable 5.2 8a24c445b0 Content pipeline and operator tools
367 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

20 lines
1.2 KiB
Python

"""Bounded paged public native actor identities; no engine calls or payloads.
A live catalog is not an atomic world snapshot. Each actor still originates in
real authenticated Turtle updates. Cache truncation raises instead of treating
an uncaptured identity as absent; each RPC exports at most256 rows.
"""
def read_catalog(controller):
rows={};offset=0;pages=[]
for _ in range(4):
page=controller.rpc('inspect-engine-pipe',entity_offset=offset)['entities']
if page['snapshot_truncated']:raise RuntimeError('Native source identity cache exceeds bounded catalog; absence is unproven')
if page['page_offset']!=offset:raise RuntimeError('Owner did not honor identity page; preserve existing session')
pages.append({k:page[k] for k in ('page_offset','captured','snapshot_captured','snapshot_truncated')})
for actor in page['actors']:rows[actor['legacy_guid']]=actor
following=page['next_offset']
if following is None:return dict(actors=list(rows.values()),pages=pages,atomic=False)
if following!=offset+256:raise RuntimeError('Identity page continuation differs')
offset=following
raise RuntimeError('Bounded native identity pages exhausted')