Commit eb9bfe6
docs(copilot): document seq concurrent-append window; make test mock explicit
Address PR review:
- Expand appendCopilotChatMessages JSDoc to spell out the non-atomic
MAX(seq)+INSERT window: distinct concurrent appends can tie seq, which is
bounded/benign because the cutover read order (seq, created_at, id) resolves
ties and replaceCopilotChatMessages re-densifies from authoritative JSONB
order. A per-chat lock is unwarranted (copilot turns are serialized).
- Make the "no prior rows" test mock MAX(seq)=NULL explicitly instead of
relying on the chain mock's implicit empty-array default.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent a1bbb5e commit eb9bfe6
2 files changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
51 | 64 | | |
52 | 65 | | |
53 | 66 | | |
| |||
0 commit comments