Script: post-deploy smoke for pool swap (v2 sanity) #86

Closed
opened 2026-04-09 03:24:26 +00:00 by PlasticDigits · 13 comments
PlasticDigits commented 2026-04-09 03:24:26 +00:00 (Migrated from gitlab.com)

Acceptance criteria

  • Documented scripts/ entry or CI manual job instructions

Epic

#61

## Acceptance criteria - [ ] Documented `scripts/` entry or CI manual job instructions ## Epic #61
PlasticDigits commented 2026-04-09 03:24:26 +00:00 (Migrated from gitlab.com)

marked this issue as related to #61

marked this issue as related to #61
PlasticDigits commented 2026-04-09 03:24:27 +00:00 (Migrated from gitlab.com)

marked this issue as related to #57

marked this issue as related to #57
PlasticDigits commented 2026-04-13 04:10:44 +00:00 (Migrated from gitlab.com)

Added executable scripts/smoke-pool-swap.sh: read-only LCD checks for Pool and optional Simulation using pool-only messages (no hybrid fields), with env vars PAIR_ADDR, TERRA_LCD_URL, optional OFFER_TOKEN/OFFER_AMOUNT. Documented from deployment post-checklist and launch runbook; manual verification path is also described via the optimizer workflow header pattern for CI. @brouie Please run once against staging or LocalTerra and confirm outputs.

Added executable `scripts/smoke-pool-swap.sh`: read-only LCD checks for `Pool` and optional `Simulation` using pool-only messages (no hybrid fields), with env vars `PAIR_ADDR`, `TERRA_LCD_URL`, optional `OFFER_TOKEN`/`OFFER_AMOUNT`. Documented from deployment post-checklist and launch runbook; manual verification path is also described via the optimizer workflow header pattern for CI. @brouie Please run once against staging or LocalTerra and confirm outputs.
Brouie commented 2026-04-20 06:53:57 +00:00 (Migrated from gitlab.com)

@PlasticDigits Code-level verification on current main:

Script: scripts/smoke-pool-swap.sh present and executable (-rwxrwxr-x, 1860 bytes). Pool-only sanity checks (no hybrid/limit-book fields per v2 scope), requires curl + jq, clear env interface (PAIR_ADDR required; TERRA_LCD_URL, OFFER_TOKEN, OFFER_AMOUNT optional). set -euo pipefail for fail-fast behavior.

Docs:

  • docs/deployment-guide.md line 132 references the script in post-deploy checklist with env var guidance
  • docs/runbooks/launch-checklist.md line 49 references under Phase 3 (Post-deploy verification)

Holding close until I run the script against LocalTerra with a deployed pair + OFFER_TOKEN. Will batch with #71, #72, #75, #79 live tests.

@PlasticDigits Code-level verification on current main: **Script:** scripts/smoke-pool-swap.sh present and executable (-rwxrwxr-x, 1860 bytes). Pool-only sanity checks (no hybrid/limit-book fields per v2 scope), requires curl + jq, clear env interface (PAIR_ADDR required; TERRA_LCD_URL, OFFER_TOKEN, OFFER_AMOUNT optional). set -euo pipefail for fail-fast behavior. **Docs:** - docs/deployment-guide.md line 132 references the script in post-deploy checklist with env var guidance - docs/runbooks/launch-checklist.md line 49 references under Phase 3 (Post-deploy verification) Holding close until I run the script against LocalTerra with a deployed pair + OFFER_TOKEN. Will batch with #71, #72, #75, #79 live tests.
Brouie commented 2026-04-20 08:08:40 +00:00 (Migrated from gitlab.com)

@PlasticDigits Live verification on current main against LocalTerra with deployed pairs.

Pool query path: PASS

export PAIR_ADDR=terra1jwgl3jr4ag2wf2fzc3an6zc3jymrd8xd9rpphhxatha75zg6r93sf2uxga
bash scripts/smoke-pool-swap.sh

Output: well-formed JSON with 2 assets and amounts, total_share populated. 'OK: smoke-pool-swap read-only checks passed.'

Simulation path: FAIL (jq syntax bug)

With OFFER_TOKEN and OFFER_AMOUNT set:

jq: error: syntax error, unexpected INVALID_CHARACTER, expecting end of file
{simulation:{offer_asset:{info:{token:{contract_addr:$addr}},amount:$amt}}}}
jq: 1 compile error

Looking at the jq template in the script:

'{simulation:{offer_asset:{info:{token:{contract_addr:$addr}},amount:$amt}}}}'

Extra closing brace -- 5 opens, 6 closes. Should be ...amount:$amt}}} (3 closes after amount).

Primary pool-only read-only checks (the main acceptance criteria) work correctly. Optional Simulation path needs a one-char fix. Leaving open for the fix.

@PlasticDigits Live verification on current main against LocalTerra with deployed pairs. ## Pool query path: PASS ``` export PAIR_ADDR=terra1jwgl3jr4ag2wf2fzc3an6zc3jymrd8xd9rpphhxatha75zg6r93sf2uxga bash scripts/smoke-pool-swap.sh ``` Output: well-formed JSON with 2 assets and amounts, total_share populated. 'OK: smoke-pool-swap read-only checks passed.' ## Simulation path: FAIL (jq syntax bug) With OFFER_TOKEN and OFFER_AMOUNT set: ``` jq: error: syntax error, unexpected INVALID_CHARACTER, expecting end of file {simulation:{offer_asset:{info:{token:{contract_addr:$addr}},amount:$amt}}}} jq: 1 compile error ``` Looking at the jq template in the script: ``` '{simulation:{offer_asset:{info:{token:{contract_addr:$addr}},amount:$amt}}}}' ``` **Extra closing brace** -- 5 opens, 6 closes. Should be `...amount:$amt}}}` (3 closes after amount). Primary pool-only read-only checks (the main acceptance criteria) work correctly. Optional Simulation path needs a one-char fix. Leaving open for the fix.
Brouie commented 2026-04-20 08:13:57 +00:00 (Migrated from gitlab.com)

mentioned in merge request !730

mentioned in merge request !730
Brouie commented 2026-04-20 08:14:17 +00:00 (Migrated from gitlab.com)

@PlasticDigits Submitted fix as MR !730: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/12

One-char fix in scripts/smoke-pool-swap.sh line 56 -- removed extra closing brace from jq template. Verified locally against LocalTerra + deployed EMBER/JADE pair; Simulation path now returns expected return_amount/spread_amount/commission_amount.

Leaving issue open until MR merges.

@PlasticDigits Submitted fix as MR !730: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/12 One-char fix in scripts/smoke-pool-swap.sh line 56 -- removed extra closing brace from jq template. Verified locally against LocalTerra + deployed EMBER/JADE pair; Simulation path now returns expected return_amount/spread_amount/commission_amount. Leaving issue open until MR merges.
PlasticDigits commented 2026-04-20 11:54:05 +00:00 (Migrated from gitlab.com)

mentioned in commit 9032f4287b

mentioned in commit 9032f4287b3baca348fab56db7435e476a0e0259
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-04-20 11:54:05 +00:00
Brouie commented 2026-04-21 07:24:37 +00:00 (Migrated from gitlab.com)

@PlasticDigits MR !730 merged into main at 9032f42. scripts/smoke-pool-swap.sh jq brace fix landed. Closing.

@PlasticDigits MR !730 merged into main at 9032f42. `scripts/smoke-pool-swap.sh` jq brace fix landed. Closing.
PlasticDigits commented 2026-05-26 08:00:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #199

mentioned in issue #199
PlasticDigits commented 2026-06-12 04:46:03 +00:00 (Migrated from gitlab.com)

mentioned in issue #361

mentioned in issue #361
PlasticDigits commented 2026-06-12 05:05:55 +00:00 (Migrated from gitlab.com)

mentioned in issue #368

mentioned in issue #368
ghost1 commented 2026-06-12 05:46:31 +00:00 (Migrated from gitlab.com)

mentioned in merge request !877

mentioned in merge request !877
Sign in to join this conversation.
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#86
No description provided.