Fix e2e-seed-expired-parked-claim-all.sh: hybrid park swap missing min_return (#339) #841

Merged
PlasticDigits merged 1 commit from cloud1/gitlab-issue-verification-8df8 into main 2026-06-09 02:04:41 +00:00
PlasticDigits commented 2026-06-08 13:54:06 +00:00 (Migrated from gitlab.com)

Summary

Fixes pure-book hybrid park seed harness for claim-all E2E (#339).

Pure-book hybrid swaps (pool_input = 0, book_input > 0) require belief_price or min_return on execute per invariant L9 / #334. The terrad seed script and verify-issue-309.sh hybrid_swap_book_only omitted both, causing execute revert and blocking limit-orders-claim-all-tx.spec.ts.

Changes:

  • scripts/e2e-seed-expired-parked-claim-all.sh — full swap envelope with min_return: "1"
  • scripts/qa/verify-issue-309.sh — same floor on book-only hybrid helper
  • frontend-dapp/e2e/README.md + skills/AGENTS_E2E_LIMIT_ORDERS_TX.md — document #334 floor

No contract or claim-all UI changes.

Verification checklist

Acceptance item Result How verified
bash scripts/e2e-seed-expired-parked-claim-all.sh exits 0 PASS Ran on LocalTerra deploy; prints seeded pair=… owner=… expires_at=…
Hybrid park tx succeeds (no #334 revert) PASS Pre-fix: Hybrid swap with book_input 5000 requires belief_price or min_return; post-fix: tx succeeds
Indexer ≥ 2 parked_expired for dev wallet PASS GET /api/v1/pairs/{pair}/limit-placements?status=parked_expired returned ≥2 dev-wallet rows
limit-orders-claim-all-tx.spec.ts passes (e2e-tx) PASS bash scripts/with-node.sh --cwd frontend-dapp -- npx playwright test e2e/limit-orders-claim-all-tx.spec.ts --project=e2e-tx — 1 passed (60s)
No claim-all UI or contract semantics change PASS Harness + QA script + docs only
Harness prints success line with pair + expires_at PASS Seed script stdout
LCD park tx contains limit_order_expired_parked PASS Implied by indexer parked_expired rows after park tx
Full E2E: seed → Claim all parked → batch claim → rows cleared PASS Playwright spec passed end-to-end
min_return: 1 conservative floor only PASS Matches contract test hybrid_pure_book_requires_slippage_floor_without_belief pattern
Paused pair abort (L6) PASS Unchanged guard in harness
make test-contracts SKIP Harness-only change; clippy passed in pre-commit

Closes verification for #339.


Note

Low Risk
Harness and documentation only; conservative min_return floor matches existing contract test patterns with no production app or wasm changes.

Overview
Pure-book hybrid swaps used to park expired limit orders were reverting because execute requires belief_price or min_return (L9 / #334). This PR fixes the terrad harnesses and documents the floor.

e2e-seed-expired-parked-claim-all.sh now builds a full swap hook with min_return: "1" (and the usual belief/max_spread/hybrid fields) instead of a minimal {swap:{hybrid:…}} payload. verify-issue-309.sh’s hybrid_swap_book_only gets the same min_return so #309 gas sweeps stay aligned. E2E README and AGENTS_E2E_LIMIT_ORDERS_TX.md note that the claim-all seed sets min_return: "1" for the park step.

No pair contract or Claim all parked UI changes—only scripts and operator docs.

Reviewed by Cursor Bugbot for commit a0cccd0456. Bugbot is set up for automated code reviews on this repo. Configure here.

## Summary Fixes pure-book hybrid park seed harness for claim-all E2E ([#339](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/339)). Pure-book hybrid swaps (`pool_input = 0`, `book_input > 0`) require `belief_price` or `min_return` on execute per invariant L9 / [#334](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/334). The terrad seed script and `verify-issue-309.sh` `hybrid_swap_book_only` omitted both, causing execute revert and blocking `limit-orders-claim-all-tx.spec.ts`. Changes: - `scripts/e2e-seed-expired-parked-claim-all.sh` — full swap envelope with `min_return: "1"` - `scripts/qa/verify-issue-309.sh` — same floor on book-only hybrid helper - `frontend-dapp/e2e/README.md` + `skills/AGENTS_E2E_LIMIT_ORDERS_TX.md` — document #334 floor No contract or claim-all UI changes. ## Verification checklist | Acceptance item | Result | How verified | |-----------------|--------|--------------| | `bash scripts/e2e-seed-expired-parked-claim-all.sh` exits 0 | **PASS** | Ran on LocalTerra deploy; prints `seeded pair=… owner=… expires_at=…` | | Hybrid park tx succeeds (no #334 revert) | **PASS** | Pre-fix: `Hybrid swap with book_input 5000 requires belief_price or min_return`; post-fix: tx succeeds | | Indexer ≥ 2 `parked_expired` for dev wallet | **PASS** | `GET /api/v1/pairs/{pair}/limit-placements?status=parked_expired` returned ≥2 dev-wallet rows | | `limit-orders-claim-all-tx.spec.ts` passes (`e2e-tx`) | **PASS** | `bash scripts/with-node.sh --cwd frontend-dapp -- npx playwright test e2e/limit-orders-claim-all-tx.spec.ts --project=e2e-tx` — 1 passed (60s) | | No claim-all UI or contract semantics change | **PASS** | Harness + QA script + docs only | | Harness prints success line with pair + `expires_at` | **PASS** | Seed script stdout | | LCD park tx contains `limit_order_expired_parked` | **PASS** | Implied by indexer `parked_expired` rows after park tx | | Full E2E: seed → Claim all parked → batch claim → rows cleared | **PASS** | Playwright spec passed end-to-end | | `min_return: 1` conservative floor only | **PASS** | Matches contract test `hybrid_pure_book_requires_slippage_floor_without_belief` pattern | | Paused pair abort (L6) | **PASS** | Unchanged guard in harness | | `make test-contracts` | **SKIP** | Harness-only change; clippy passed in pre-commit | Closes verification for [#339](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/339). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Harness and documentation only; conservative min_return floor matches existing contract test patterns with no production app or wasm changes. > > **Overview** > Pure-book hybrid swaps used to park expired limit orders were **reverting** because execute requires **`belief_price` or `min_return`** (L9 / #334). This PR fixes the terrad harnesses and documents the floor. > > **`e2e-seed-expired-parked-claim-all.sh`** now builds a full swap hook with **`min_return: "1"`** (and the usual belief/max_spread/hybrid fields) instead of a minimal `{swap:{hybrid:…}}` payload. **`verify-issue-309.sh`**’s **`hybrid_swap_book_only`** gets the same **`min_return`** so #309 gas sweeps stay aligned. **E2E README** and **`AGENTS_E2E_LIMIT_ORDERS_TX.md`** note that the claim-all seed sets **`min_return: "1"`** for the park step. > > No pair contract or Claim all parked UI changes—only scripts and operator docs. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a0cccd0456ff5dd9788fa378982b06a3f9ac2dde. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
PlasticDigits commented 2026-06-08 13:54:30 +00:00 (Migrated from gitlab.com)

mentioned in issue #339

mentioned in issue #339
ghost1 commented 2026-06-08 13:54:58 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-08 13:55:04 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-06-09 02:04:42 +00:00 (Migrated from gitlab.com)

mentioned in commit d07ba09bed

mentioned in commit d07ba09bed9bc2155c317726d81c01d0d31256b4
PlasticDigits (Migrated from gitlab.com) merged commit d07ba09bed into main 2026-06-09 02:04:42 +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!841
No description provided.