fix(community-tax): skip AutoLP settings invoice when sister is unchanged #1239

Merged
PlasticDigits merged 2 commits from issue/1237 into main 2026-09-12 02:43:15 +00:00

Summary

  • Token UpdateSettings.autolp queries sister GetConfig and charges 50 UST1 only when pair / threshold / lp_recipient / skim would change. Identical AutoLP (and identical minter) is NoOpSettings; UST1 is not kept.
  • Mixed batch: a real buy_bps change invoices once and does not emit sister UpdateConfig when AutoLP is unchanged. Omitted pair/skim still merge (M610-6).
  • Manage Token includes settings.autolp only on a sister delta; blank threshold/recipient are not defaulted to raw 1 or the connected wallet.

Fixes #1237

Acceptance

  • AC1. Identical sister AutoLP only → NoOpSettings; CMM UST1 unchanged; sister config unchanged.
  • AC2. Identical AutoLP + dirty buy_bps → one 50 UST1 invoice; no sister write; token buy_bps updates.
  • AC3. Threshold / listed pair / skim delta → one 50 UST1; sister updates; pair still M610-1.
  • AC4. Unbound AutoLP + autolp in batch → error, fee not kept.
  • AC5. Unactivated auto_v2_lp + autolp → SkuNotUnlocked; fee not kept.
  • AC6. Fake / wrong-token pair still reverts on set; fee not kept.
  • AC7. Empty batch still NoOpSettings. Identical launch_guards still no-op.
  • AC8. Identical minter does not take the invoice by itself.
  • AC9. Manage Token: equal AutoLP fields do not attach autolp / do not enable Save. A real threshold delta builds a 50 UST1 token-payee invoice.
  • AC10. Docs/skills T592-4 sister identity. make verify-issue-592 / make verify-issue-610 stay green.

Test plan

  • make verify-issue-1237 (first pass + retest)
  • cargo test -p cl8y-community-tax-token (100 passed)
  • make verify-issue-592
  • make verify-issue-610
  • Reviewer: confirm sister GetConfig compare, not key presence
  • Ops follow-up (not this PR): listed token wasm store + migrate
## Summary - Token `UpdateSettings.autolp` queries sister `GetConfig` and charges 50 UST1 only when pair / threshold / `lp_recipient` / skim would change. Identical AutoLP (and identical `minter`) is `NoOpSettings`; UST1 is not kept. - Mixed batch: a real `buy_bps` change invoices once and does not emit sister `UpdateConfig` when AutoLP is unchanged. Omitted pair/skim still merge (**M610-6**). - Manage Token includes `settings.autolp` only on a sister delta; blank threshold/recipient are not defaulted to raw `1` or the connected wallet. Fixes #1237 ## Acceptance - [x] AC1. Identical sister AutoLP only → `NoOpSettings`; CMM UST1 unchanged; sister config unchanged. - [x] AC2. Identical AutoLP + dirty `buy_bps` → one 50 UST1 invoice; no sister write; token `buy_bps` updates. - [x] AC3. Threshold / listed pair / skim delta → one 50 UST1; sister updates; pair still **M610-1**. - [x] AC4. Unbound AutoLP + `autolp` in batch → error, fee not kept. - [x] AC5. Unactivated `auto_v2_lp` + `autolp` → `SkuNotUnlocked`; fee not kept. - [x] AC6. Fake / wrong-token pair still reverts on set; fee not kept. - [x] AC7. Empty batch still `NoOpSettings`. Identical `launch_guards` still no-op. - [x] AC8. Identical `minter` does not take the invoice by itself. - [x] AC9. Manage Token: equal AutoLP fields do not attach `autolp` / do not enable Save. A real threshold delta builds a 50 UST1 token-payee invoice. - [x] AC10. Docs/skills **T592-4** sister identity. `make verify-issue-592` / `make verify-issue-610` stay green. ## Test plan - [x] `make verify-issue-1237` (first pass + retest) - [x] `cargo test -p cl8y-community-tax-token` (100 passed) - [x] `make verify-issue-592` - [x] `make verify-issue-610` - [ ] Reviewer: confirm sister `GetConfig` compare, not key presence - [ ] Ops follow-up (not this PR): listed token wasm store + migrate
Query sister GetConfig so identical pair/threshold/recipient/skim is NoOpSettings
and does not forward 50 UST1. Manage Token attaches autolp only on a real delta.
Author
Owner

drain skip: hard-blocked (needs-human / high-risk / human topic); remaining continue

drain skip: hard-blocked (needs-human / high-risk / human topic); remaining continue
Merge origin/main into issue/1237 for PR #1239
All checks were successful
ci/woodpecker/pr/woodpecker gitleaks tracked-tree scan passed locally
cca17d4542
PlasticDigits deleted branch issue/1237 2026-09-12 02:43:15 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1239
No description provided.