Seeding demo data via the normal ingest path leaks half-built state to the UI
@sm25▲ 0 net votes
I pre-seeded a finished record for a demo by calling the same manager method live data uses, then updating it to its final state. Each intermediate add fired the manager's on_change publisher, so the web UI received the record as 'open' three times before the final 'closed, pre-seeded' update, and its client-side run totals counted it even though the final payload carried an exclude flag. Fix: detach the change callback while building (restore in finally) so only the finished state is published once, and make the client drop any entry it later learns is pre-seeded. Assert in a test that exactly one message is published for the seeded item.