Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(workqueue): clarify receipt projection contracts
Explain embedded assignment projection at the CLI call site and document source claim order preservation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
  • Loading branch information
pelikhan and Copilot committed Oct 11, 2026
commit ac80e6fe95215cf3583d85947001d6795743553f
1 change: 1 addition & 0 deletions pkg/cli/logs_work_queue_current.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ func currentWorkQueueAssignmentReceipt(state workqueue.Projection, assignment wo
dispatch.Run.Principal != origin.Principal {
return nil, errors.New("current snapshot origin differs from durable assignment binding")
}
// The embedded Assignment.ToReceipt projects identity; enrich lifecycle facts from the captured state.
receipt := dispatch.ToReceipt()
Comment thread
pelikhan marked this conversation as resolved.
Resolved
receipt.State, receipt.Released = dispatch.State, dispatch.Released
for i, member := range receipt.Claims {
Comment thread
pelikhan marked this conversation as resolved.
Resolved
Expand Down
5 changes: 3 additions & 2 deletions pkg/workqueue/receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ type ClaimReceipt struct {
Barrier string `json:"delivery_barrier"`
}

// ToReceipt projects immutable identity only. Callers must validate the
// assignment and populate lifecycle facts from their captured projection.
// ToReceipt projects immutable identity only, preserving source claim order.
// Callers must validate the assignment and populate lifecycle facts from their
// captured projection.
func (assignment Assignment) ToReceipt() AssignmentReceipt {
receipt := AssignmentReceipt{
DispatchID: assignment.DispatchID,
Expand Down
Loading