Files
hermes-agent/persistence
Teknium fcf9b0fa55 fix: str subclasses with extra constructor fields survive copy and pickle
FooteredReply was one of six str subclasses whose __new__ needs more
than the text. Python's default copy/pickle rebuild calls
cls.__new__(cls, text), so copy.deepcopy of any payload holding one
raised TypeError. The gateway deep-copies every published event
payload, which is how a footered reply lost its message.complete
(#156709, #156824) and how an active-session refusal lost it before
(a5d3c25664, which fixed only that one class).

Give each remaining class a __getnewargs_ex__ returning its real
constructor arguments (TimelineNotification, _ConsentRefusal, _Miss,
_ProbeFailure, BacktrackResend), and replace the per-class test with
one AST invariant over the whole tree, so a new subclass of this
shape fails CI instead of a live turn.
2026-11-25 15:11:12 +05:30
..