fix(chat): admit messages while sessions start - #64
Conversation
Enable pending draft composers to queue messages while preserving the existing creation-readiness dispatch gate. Carry draft ownership and Agent Builder draft metadata across session promotion. Signed-off-by: Logan Johnson <loganj@squareup.com> Co-authored-by: Chai Landau <chai@block.xyz>
0f4a07e to
21d7663
Compare
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
REQUEST_CHANGES. Static review of the exact three-dot comparison found two blocking Agent Builder migration defects. Final self-check covered pending-session composer admission, ordinary and Agent Builder queue dispatch, draft-ID promotion, creation and migration failure, newer-draft preservation, navigation/consent guards, accessibility, i18n, async never-completes and race behavior, lifecycle, test honesty, design-system/project laws, duplicate overlap, and blocking user-effect evidence. The supplied GitHub evidence was inspected: all 8 captured check runs completed successfully; no local execution was performed. The findings are distinct: one concerns concurrent write/data-loss behavior, while the other concerns adopting a path returned by a successful rename. No review threads were supplied, so no findings were suppressed as duplicates.
Deterministic publication result: 2 blocking and 0 non-blocking finding(s) publishable; 0 duplicate(s) suppressed.
|
Changes requested here #64 (review) are addressed down-stack in PRs #68 and #78 |
Both P1 findings were confirmed as real at this PR's head, then resolved structurally by the stacked follow-up work: the defer-prep stack deletes migratePendingDraftAgent entirely (zero references remain), and the full stack is flattened into a single change before anything merges, so no unpatched interim window exists. Details in the resolved review threads. Dismissing on Logan's instruction so the stack can proceed.
🤖 ## Summary - Requires composer→queue acceptance even before the selected chat's session is ready. - Replaces ambiguous send/sending language with explicit queue, dequeue, dispatch, steer, and remove operations. - Names the source and sink for each chat queue law so acceptance and dispatch remain distinct observable behaviors. This is PR 2 of 2, stacked on [PR #64](#64). Review the resulting laws in [`LAWS/CHAT.md`](https://github.com/block/berd/blob/larry/chat-laws-queue-acceptance/LAWS/CHAT.md). ### Related issue None found. This canonizes the queue-admission behavior adapted from [squareup/berd#1076](squareup/berd#1076) and preserves the dispatch hold from [#61](#61). ### Testing - `just check` - `just test` — 6,308 passed, 1 skipped - Both stacked PR boundaries pass `git diff --check` --------- Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Co-authored-by: morgmart <98432065+morgmart@users.noreply.github.com> Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
🤖
Summary
This is PR 1 of 2. PR #65 updates the chat laws on top of this behavior.
Adapted from chailandau's squareup/berd#1076 for
block/berd, while retaining the dispatch ownership introduced by block/berd#61.Related issue
None found. Related pull requests: squareup/berd#1076 and #61.
Testing
just checkjust test— 6,308 passed, 1 skipped