feat(core): batch durable publish + listener fan-out contract + fork single transaction - #179
Merged
Merged
Conversation
…single transaction - publishMany:一批 durable 事件单事务提交,聚合内 seq 连续、投影按序、提交后单次 wake(BatchEvent 接口 + 聚合一致性校验拍平为 early-return,无 else) - notify fan-out 契约:listener 在 layer scope 绑定 fiber 上 fork 执行——单事件内按注册序、失败/慢 listener 不阻塞 publish;跨事件顺序不保证(契约注释 + event.test.ts 断言对齐为顺序无关) - commitDurableEventInner 提取为事务作用域单事件提交(seq 分配/owner 校验/投影/UPSERT+INSERT),publish 与 publishMany 共用;wakeDurable 提取 - session fork 收敛为单事务(publish 各自开 savepoint 子事务),大 session fork 一次 commit - 测试:event-batch(批提交/seq 连续/聚合校验/投影序/wake 一次)+ fork-batch(单事务收敛、@ts-ignore 镜像 sqlite driver 既有模式并有债务注释) - chore: oxlint ratchet 4831 → 4842(新测试沿用 as-never 测试惯例的 no-unsafe-type-assertion 计数;全树实测)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
publishMany(批 durable 发布)
listener fan-out 契约(随批入库——与 publishMany 经 notify 签名耦合,无法拆分)
session fork 单事务
测试与验证
chore
备注