Latest Results
Add tracked_fields to make attribute reassignment reactive
Libraries built on signified store reactive values in ordinary attributes
typed HasValue[T]. A computation that reads unref(obj.attr) follows a signal
inside the attribute but cannot see the attribute being reassigned, so each
library cache needs hand-written invalidation to notice it.
tracked_fields is a class decorator that installs a data descriptor per
attribute. Reads return exactly what was stored and never unwrap. Inside a
computation or effect, a read also depends on a hidden per-instance signal
for that attribute, and assignment writes to it under the usual change rule.
Assigning a signal replaces the stored value; it never writes into the old
signal.
- It is a class decorator rather than a per-field default, because
@dataclass(slots=True) rebuilds the class and drops field descriptors. The
descriptor takes over the slot the dataclass created, or the instance dict
for dict-based classes, so no extra storage is declared.
- The hidden signal is created on the first tracked read. Objects never read
inside a computation carry no extra nodes, and untracked reads skip the
graph.
- Copies and pickles carry plain values. A hidden signal records its owner's
id, so a shallow copy that shares one creates its own on first use instead
of writing through the original's.
- Names select a subset of fields, and are required for classes that are not
dataclasses. Frozen dataclasses, existing descriptors, and deletion are
rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Latest Branches
-1%
-1%
+12%
codex/inline-operator-computeds © 2026 CodSpeed Technology