You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleting a snapshot attribute damages the cached committed frame #198
area:coreTerminal emulation, grid storage, parser and public read models.bugSomething isn't workingp3Lower urgency work with a working alternative or limited current impact.pythonThe Python library, its public distribution, and test integrations.topic:apiPublic Python types, methods, error contracts and discoverability.topic:data-integrityStored or captured values change across a round trip.
A caller can delete cursor from an immutable Snapshot. The terminal then returns the same damaged object to the next reader.
Reproduction
Run this example from a libvt checkout.
uv run python - <<'PY'from libvt import Terminalfrom libvt.testing import serialize_vt_snapshotterm = Terminal(rows=1, cols=4)term.feed(b"A")frame = term.committeddel frame.cursorprint(term.committed is frame)serialize_vt_snapshot(term)PY
Expected
del frame.cursor raises AttributeError immediately. Reading or serializing the committed frame still succeeds.
Actual
The deletion succeeds and the identity check prints True. Serialization then raises AttributeError: 'libvt.terminal.Snapshot' object has no attribute 'cursor'.
Environment
Revisions tested
Linux aarch64, CPython 3.15.2, master 299c9d9 and omnibus 4c0bf02.
References
#2 introduced the snapshot and its assignment guard. The immutable SyncToken already rejects deletion. The snapshot owns this rule, so a regression should exercise deletion through a cached frame and check that another reader can still use it.
area:coreTerminal emulation, grid storage, parser and public read models.bugSomething isn't workingp3Lower urgency work with a working alternative or limited current impact.pythonThe Python library, its public distribution, and test integrations.topic:apiPublic Python types, methods, error contracts and discoverability.topic:data-integrityStored or captured values change across a round trip.
Activity
snapshot(fix): Reject attribute deletion (#207)