You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zjncs (via GitHub)" <gi...@apache.org> on 2026/10/07 18:16:54 UTC
[PR] test(ai): pin the event sink seq, coalescing and failure contracts [rocketmq-dashboard]
zjncs opened a new pull request, #5667:
URL: https://github.com/apache/rocketmq-dashboard/pull/5667
### Problem
`AiEventSink` — the single writer of one run's timeline, the class the whole seq scheme rests on (per its own design docs) — had **no test**.
### Change
Add `AiEventSinkTest` with fourteen tests pinning:
| Contract group | Pinned behaviour |
| --- | --- |
| seq allocation | seeded from `MAX(seq)` — first row lands on `seed+1`; contiguous across writes; negative seeds clamp at zero |
| buffered writes | a text delta is **live-only** (seq 0 on the wire, nothing persisted, projector holds it pending); the next durability boundary flushes the buffer **ahead of itself** so persisted order is arrival order |
| last_seq cache | refreshes only when the high-water mark moves — one update per move |
| close() | flushes the buffer, idempotent, and a closed sink refuses further writes without touching the repository |
| failure discipline | a generic persistence failure is logged and swallowed (run continues at the allocated seq) while **`DuplicateKeyException` escapes** — the unique key is the backstop for a wrongly seeded allocator; a failing live publisher and a failing cache refresh never fail the write |
| emitError | publishes the live twin at the persisted seq |
### Verification
- New tests: **14/14 green** against unmodified code.
- Discriminating mutations on `AiEventSink` (build result verified): `DuplicateKeyException` swallowed like any other failure (**red**); close skips the buffer flush (**red**); closed sinks no longer refuse writes (**red**); negative seeds no longer clamped (**red**).
- Restored: 14/14 green. No product code changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(ai): pin the event sink seq, coalescing and failure contracts [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@rocketmq.apache.org>.
github-actions[bot] commented on PR #5667:
URL: https://github.com/apache/rocketmq-dashboard/pull/5667#issuecomment-6810425342
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(ai): pin the event sink seq, coalescing and failure contracts [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@rocketmq.apache.org>.
github-actions[bot] closed pull request #5667: test(ai): pin the event sink seq, coalescing and failure contracts
URL: https://github.com/apache/rocketmq-dashboard/pull/5667
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org