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
Commit 5351a3e
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat(signals): OPTIMISTIC_REVERTED — an optimistic value the screen showed was replaced (#3607)
* feat(signals): OPTIMISTIC_REVERTED — the person saw the guess, then the correction
An optimistic override the screen displayed is replaced by a different
value on two roads: the guess lifts at settle back to the committed value
it covered (the action failed, or never wrote what it promised), or an
authoritative value lands that differs from it. Both are the runtime doing
what optimistic UI promises, so the finding is `info` and structured-channel
only — a count that grows for one source is what says the guess, or the
failure rate, is wrong. Judged by the node's own equality.
`AttributionHooks.optimisticReverted(el, shown, truth, how)` is the seam,
fired from supersedeOverride (how derived from whether a landing is staged)
and from the non-superseded drop in resolveOptimisticNodes. Not covered
yet, and said so: optimistic stores, and the interaction that wrote the
guess (optimistic writes bypass the write hook, so the node carries no
origin). The plan marks item 2 satisfied by #3580 — `at` equals the Event
Timing entry's `startTime`; `interactionId` is not readable at dispatch.
Size: engine +266 B, tier +38 B; the engine cap moved with a note.
Co-Authored-By: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
* chore(size): re-measure OPTIMISTIC_REVERTED at landing; engine cap 31.45 -> 31.65 KB
Co-authored-by: Claude via Cursor <[email protected]>
* fix(signals): OPTIMISTIC_REVERTED never judges the runtime's own optimistic nodes
The finding fired on every acknowledged hold: isPending()'s companion is an
optimistic signal that goes true while pending and back to false at commit
by design — the acknowledgement SILENT_HOLD asks for — so the repair for one
finding produced another. The check now skips companions and derived
overrides by the predicate the hold census already uses (`isCompanion`),
and `optimisticReverts: false` disables it like the other verdicts. The
regression test is the acknowledged hold itself (isPending and latest
readers over a held write): silent with the guard, one false finding
without it.
Co-Authored-By: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
* chore(size): re-measure the OPTIMISTIC_REVERTED companion guard; engine 31,625 B under the 31.65 KB cap
The `optimisticReverts` option and the `isCompanion` skip in
checkOptimisticRevert are +35 B on the engine scenario (31,590 -> 31,625 B).
The cap holds; the note records the new measurement. Tier unchanged at 17,618.
Co-authored-by: Claude via Cursor <[email protected]>
---------
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Claude via Cursor <[email protected]>
`OPTIMISTIC_REVERTED` (info, responsiveness): an optimistic value the screen showed was replaced by a different one — reverted at settle, or superseded by the truth — with the source and both values. `AttributionHooks.optimisticReverted` is the seam; `optimisticReverts: false` disables it. The runtime's own optimistic nodes (`isPending`/`latest` companions, derived overrides) are never judged.
0 commit comments