diff --git a/internal/entitlements/rule_change.go b/internal/entitlements/rule_change.go index bb39a2b2..0694fccf 100644 --- a/internal/entitlements/rule_change.go +++ b/internal/entitlements/rule_change.go @@ -90,7 +90,7 @@ const ( const ( MessageInactiveRule = "That rule is no longer active." MessageAlreadyApplied = "Already applied." - MessageInProgress = "Another entitlement set change is in progress. Try again." + MessageInProgress = "Another change collided with this one; try again." MessagePopulation = "The pools carrying this set could not be listed. Try again." ) diff --git a/internal/entitlements/rule_change_test.go b/internal/entitlements/rule_change_test.go index b110dfbd..ce1a88a3 100644 --- a/internal/entitlements/rule_change_test.go +++ b/internal/entitlements/rule_change_test.go @@ -487,7 +487,7 @@ func TestRuleChangeCommitsSerializeOnRendezvous(t *testing.T) { t.Fatalf("second commit error = %v, want a refusal", err) } if refusal.Kind != entitlements.RefusalInProgress || - refusal.Message != "Another entitlement set change is in progress. Try again." { + refusal.Message != "Another change collided with this one; try again." { t.Errorf("refusal = %q (%s), want the in-progress sentence", refusal.Message, refusal.Kind) } diff --git a/openspec/changes/plan-act-obligations/tasks.md b/openspec/changes/plan-act-obligations/tasks.md index 90ed76ff..83137fa6 100644 --- a/openspec/changes/plan-act-obligations/tasks.md +++ b/openspec/changes/plan-act-obligations/tasks.md @@ -26,7 +26,7 @@ Each numbered section below is one commit, and its items are that commit's parts - [x] 2.1 End `ListOrganizationsByType` (`internal/organization/queries/organizations.sql`) with `ORDER BY name, org_id`, regenerate sqlc, and add a test with two organizations of one name that pins their order. No golden moves (the fixtures' names are distinct); the commit says so after running the suite. - [x] 2.2 `PollEntitlementRecompute` (`internal/workflows/entitlements/recompute_drain_workflow.go`) logs a failed `ListChangesOwingRecomputeActivity` and goes on to its sleep and continue-as-new instead of returning the error, because Temporal's five retries end after about fifteen seconds and nothing restarts a failed poller. Test with the Temporal test suite: the list activity fails on every attempt, and the poller ends with a continue-as-new error, not the activity's. - [x] 2.3 The `entitlement-set-history` delta corrects the drain-selection sentence to the dead-letter behaviour. Add a database test beside `TestSettleObligationOnSettledObligationWritesNothing` that a `failed` obligation is not returned by `ListPendingObligations` and is returned after `RequeueFailedObligations`. -- [ ] 2.4 Change `MessageInProgress` (`internal/entitlements/rule_change.go:93`) to "Another change collided with this one; try again." and the literal in `internal/entitlements/rule_change_test.go:490`; the other tests compare the constant. The `entitlements` and `entitlement-set-management` deltas carry the sentence. No golden moves: the plan-act goldens' copy of the old sentence comes from the plan-act handlers, which change in tasks 4 to 8. +- [x] 2.4 Change `MessageInProgress` (`internal/entitlements/rule_change.go:93`) to "Another change collided with this one; try again." and the literal in `internal/entitlements/rule_change_test.go:490`; the other tests compare the constant. The `entitlements` and `entitlement-set-management` deltas carry the sentence. No golden moves: the plan-act goldens' copy of the old sentence comes from the plan-act handlers, which change in tasks 4 to 8. ## 3. One rule for an outgoing default and a pool's class