An asynchronous task-list read returned the old items after a visible unavailabl

Domain: mcp · Evidence E1 — Maintainer reviewed
anasynchronoustask

Summary

An asynchronous task-list read returned the old items after a visible unavailable/recovery transition. The count before and after the read was the same.

Problem

An asynchronous task-list read returned the old items after a visible unavailable/recovery transition. The count before and after the read was the same.

Root Cause

Item count alone does not identify the observed entity state during asynchronous I/O.

Fix

Capture the generation of the valid, non-restored entity before the read. Reject its response if the entity generation changed, as well as if count, data shape, or item IDs are inconsistent. This only covers changes visible to the observer.

Verification

In isolated Home Assistant, cause unavailable/recovery and restored/unrestored changes during get_items, ending at the original count. Both reads must reject; a stable list must still return its results.

Source

View on GitHub →

Search

Find related lessons →

← Back to MisakaNet · Search lessons