feat: Listモデルがドメインイベントを発行するようにした - #1822
Open
laminne wants to merge 5 commits into
Open
Conversation
- pkg/internal/event/type.tsにEventMeta<Actor>型を追加 - List.new()/addMember()/removeMember()でドメインイベントを生成し#eventsに積むよう変更 - List.reconstruct()はバリデーションのみ行い、イベントを生成しないよう修正 - List#pullEvents()で破壊的にイベントを取り出せるようにした - createList.ts/appendMember.tsサービスをmeta(idGenerator/actor/occurredAt)対応に更新 - InMemoryListRepository#removeListMemberをList.reconstruct経由の更新に変更 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BnQ8xnYtRtJ68NVBEibKw7
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1822 +/- ##
==========================================
+ Coverage 46.14% 47.31% +1.17%
==========================================
Files 168 168
Lines 5821 5875 +54
Branches 881 886 +5
==========================================
+ Hits 2686 2780 +94
+ Misses 3135 3095 -40 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BnQ8xnYtRtJ68NVBEibKw7
laminne
marked this pull request as draft
September 3, 2026 06:21
- ドメインイベントのIDはEventMeta経由のSnowflakeIDGenerator DIをやめ、 pkg/internal/event/idGenerator.tsのシングルトンgenerateEventID()を使う - occurredAtはイベントファクトリ内でnew Date()により生成する - 上記に追従してtimelineモジュールのservice層/mod.ts/テストから イベント生成専用だったidGenerator・clockのDI引数を削除 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XhMBrhrCBgiiMGeXDxcTVD
…ents # Conflicts: # pkg/internal/event/idGenerator.ts # pkg/timeline/model/event/listEvents.ts
laminne
marked this pull request as ready for review
September 7, 2026 12:15
MikuroXina
requested changes
Sep 8, 2026
laminne
enabled auto-merge
September 8, 2026 04:47
laminne
force-pushed
the
feat/1661-timeline-events
branch
from
September 8, 2026 11:11
2a6955a to
46ce4a1
Compare
laminne
force-pushed
the
feat/1661-timeline-events
branch
from
September 8, 2026 11:11
46ce4a1 to
eb08607
Compare
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.
related #1661
What does this PR do?
static new()メソッドはイベントを発行するのでstatic reconstruct()メソッドを定義し直しAdditional information