A batch of rule changes has no record of its own, so its first change stands in for it #181

Open
opened 2026-10-06 21:25:05 +00:00 by cgalo5758 · 2 comments
Owner

A batch of rule changes writes one core.entitlement_set_changes row per rule and none for the batch. internal/entitlements/rule_change.go ties the rows together by writing a fresh identifier into request_id, which the data model describes as a log-tracing id, so the request's own id is dropped and RuleChangeInput.RequestID is ignored. The first change stands for the batch: its sync path and counts, the movement on keys no rule names, the drain's starting point. Obligations are stored per change and pool, yet one recomputation settles them all.

Done when: a batch row owns the identifier, count, sync path, unowned effects and one obligation per pool, and request_id holds the request's id again. #113 would read from it.

A batch of rule changes writes one `core.entitlement_set_changes` row per rule and none for the batch. `internal/entitlements/rule_change.go` ties the rows together by writing a fresh identifier into `request_id`, which the data model describes as a log-tracing id, so the request's own id is dropped and `RuleChangeInput.RequestID` is ignored. The first change stands for the batch: its sync path and counts, the movement on keys no rule names, the drain's starting point. Obligations are stored per change and pool, yet one recomputation settles them all. Done when: a batch row owns the identifier, count, sync path, unowned effects and one obligation per pool, and `request_id` holds the request's id again. #113 would read from it.
cgalo5758 added the
kind
design
area/entitlements
labels 2026-10-06 21:25:05 +00:00
Author
Owner

#179, #181 and #184 share one gap: an action that writes several rows has no record of its own, so readers rebuild it from prefixes, a borrowed request id, or the shape of a workflow id. They take one convention, decided by whichever is worked first and followed by the others. #184 comes first, because the published protocol (#171) needs its answer. #131 asks the same of subscription changes.

#179, #181 and #184 share one gap: an action that writes several rows has no record of its own, so readers rebuild it from prefixes, a borrowed request id, or the shape of a workflow id. They take one convention, decided by whichever is worked first and followed by the others. #184 comes first, because the published protocol (#171) needs its answer. #131 asks the same of subscription changes.
Author
Owner

The order changes: #187 sets the convention first, not #184, because its plan-wide acts need it before the others; this issue follows it (see #184).

The order changes: #187 sets the convention first, not #184, because its plan-wide acts need it before the others; this issue follows it (see #184).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#181