Pre-launch: no LocalTerra smoke test for wrap-mapper pause and unpause cycle [SEC-B06] #396

Closed
opened 2026-06-19 10:38:58 +00:00 by totdking · 8 comments
totdking commented 2026-06-19 10:38:58 +00:00 (Migrated from gitlab.com)
No description provided.
totdking commented 2026-06-19 10:39:33 +00:00 (Migrated from gitlab.com)

Checklist Item

SEC-B06: Verify wrap mapper pause blocks wrapping/unwrapping and produces clear UI copy. Verify: frontend unit test plus LocalTerra smoke test.


Summary

The e2e test in wrap-swap.spec.ts confirms the wrap-mapper pause disables the UI button with correct copy. However, no LocalTerra smoke test exists to demonstrate that the wrap-mapper contract itself rejects wrap and unwrap transactions when paused, or that unpausing restores execution. The checklist requires both a frontend test and a LocalTerra smoke test.


What Was Checked

  • frontend-dapp/e2e/wrap-swap.spec.ts lines 243-255 -- e2e test confirms "Wrapping is Temporarily Paused" button is visible and disabled in UI
  • frontend-dapp/src/pages/SwapPage.tsx lines 893-895 -- UI copy exists for wrap pause state
  • docs/runbooks/ -- no wrap-mapper pause runbook or LocalTerra transcript found
  • scripts/ -- no script for wrap-mapper pause/unpause testing
  • docs/security-model.md -- wrap-mapper listed as external dependency, no associated smoke test evidence

Expected (per checklist)

A LocalTerra smoke test or equivalent transcript attached to an issue or MR must demonstrate that the wrap-mapper contract rejects wrap and unwrap transactions when paused and that unpausing restores normal execution.


Actual

The only test coverage is the e2e UI test in wrap-swap.spec.ts, which mocks the pause state at the frontend layer via routeWrapMapperPaused. There is no evidence of contract-level rejection being exercised on LocalTerra or any network. No smoke test transcript or runbook step exists for this.


Evidence

  • frontend-dapp/e2e/wrap-swap.spec.ts lines 243-255: UI disabled state test exists using LCD mock
  • docs/runbooks/: no wrap-mapper pause runbook or smoke test log
  • scripts/: no wrap-mapper pause/unpause test script

Suggested Fix

Add a LocalTerra smoke test or attach a transcript to this issue demonstrating:

  • Wrap-mapper pause state blocks a wrap transaction with a clear rejection
  • Wrap-mapper pause state blocks an unwrap transaction with a clear rejection
  • Unpausing restores both wrap and unwrap operations successfully

If the wrap-mapper contract is external and cannot be paused on LocalTerra, document this explicitly with a risk acceptance note referencing the external dependency.


Verification Checklist

  • LocalTerra smoke test or transcript exists showing wrap rejected under pause state
  • LocalTerra smoke test or transcript exists showing unwrap rejected under pause state
  • LocalTerra smoke test or transcript exists showing both operations restored after unpause
  • If wrap-mapper is external and untestable, risk acceptance is documented with a named reference

Labels

security, pre-launch

Cc: @PlasticDigits

### Checklist Item SEC-B06: Verify wrap mapper pause blocks wrapping/unwrapping and produces clear UI copy. Verify: frontend unit test plus LocalTerra smoke test. --- ### Summary The e2e test in `wrap-swap.spec.ts` confirms the wrap-mapper pause disables the UI button with correct copy. However, no LocalTerra smoke test exists to demonstrate that the wrap-mapper contract itself rejects wrap and unwrap transactions when paused, or that unpausing restores execution. The checklist requires both a frontend test and a LocalTerra smoke test. --- ### What Was Checked - `frontend-dapp/e2e/wrap-swap.spec.ts` lines 243-255 -- e2e test confirms "Wrapping is Temporarily Paused" button is visible and disabled in UI - `frontend-dapp/src/pages/SwapPage.tsx` lines 893-895 -- UI copy exists for wrap pause state - `docs/runbooks/` -- no wrap-mapper pause runbook or LocalTerra transcript found - `scripts/` -- no script for wrap-mapper pause/unpause testing - `docs/security-model.md` -- wrap-mapper listed as external dependency, no associated smoke test evidence --- ### Expected (per checklist) A LocalTerra smoke test or equivalent transcript attached to an issue or MR must demonstrate that the wrap-mapper contract rejects wrap and unwrap transactions when paused and that unpausing restores normal execution. --- ### Actual The only test coverage is the e2e UI test in `wrap-swap.spec.ts`, which mocks the pause state at the frontend layer via `routeWrapMapperPaused`. There is no evidence of contract-level rejection being exercised on LocalTerra or any network. No smoke test transcript or runbook step exists for this. --- ### Evidence - `frontend-dapp/e2e/wrap-swap.spec.ts` lines 243-255: UI disabled state test exists using LCD mock - `docs/runbooks/`: no wrap-mapper pause runbook or smoke test log - `scripts/`: no wrap-mapper pause/unpause test script --- ### Suggested Fix Add a LocalTerra smoke test or attach a transcript to this issue demonstrating: - Wrap-mapper pause state blocks a wrap transaction with a clear rejection - Wrap-mapper pause state blocks an unwrap transaction with a clear rejection - Unpausing restores both wrap and unwrap operations successfully If the wrap-mapper contract is external and cannot be paused on LocalTerra, document this explicitly with a risk acceptance note referencing the external dependency. --- ### Verification Checklist - [ ] LocalTerra smoke test or transcript exists showing wrap rejected under pause state - [ ] LocalTerra smoke test or transcript exists showing unwrap rejected under pause state - [ ] LocalTerra smoke test or transcript exists showing both operations restored after unpause - [ ] If wrap-mapper is external and untestable, risk acceptance is documented with a named reference --- ### Labels `security`, `pre-launch` Cc: @PlasticDigits
PlasticDigits commented 2026-06-19 10:49:05 +00:00 (Migrated from gitlab.com)

Pause state should be tracked by indexer then consumed by frontend

Pause state should be tracked by indexer then consumed by frontend
totdking commented 2026-06-19 10:57:16 +00:00 (Migrated from gitlab.com)

mentioned in issue #381

mentioned in issue #381
PlasticDigits commented 2026-06-19 11:09:11 +00:00 (Migrated from gitlab.com)

mentioned in commit 294de27a82

mentioned in commit 294de27a8287bada8c7f739812274602d950ed63
PlasticDigits commented 2026-06-19 11:09:29 +00:00 (Migrated from gitlab.com)

mentioned in merge request !926

mentioned in merge request !926
PlasticDigits commented 2026-06-19 13:08:39 +00:00 (Migrated from gitlab.com)

mentioned in commit 96e814ab22

mentioned in commit 96e814ab22dd15052c1bf838f5c5786d18743bdd
PlasticDigits commented 2026-06-25 11:46:23 +00:00 (Migrated from gitlab.com)

Verification complete — GitLab #396 / SEC-B06

All acceptance criteria PASS on main (no repo changes required).

Checklist

Criterion Result How verified
LocalTerra smoke: wrap rejected under pause PASS make verify-issue-396 → scripts/smoke-wrap-mapper-pause.sh: wrap_deposit while paused — rejected at broadcast with paused error
LocalTerra smoke: unwrap rejected under pause PASS Same smoke script: unwrap send while paused — rejected at broadcast with paused error
LocalTerra smoke: wrap + unwrap restored after unpause PASS Same smoke script: successful wrap_deposit after unpause and unwrap send after unpause txs
Risk acceptance (external-only untestable) N/A Not needed — wrap-mapper is deployed from ustr-cmm on LocalTerra during make deploy-local (docs/testing.md § Wrap-mapper pause smoke)

Additional coverage (issue context)

Check Result Command
Frontend pause CTA (SEC-A02) PASS Vitest SwapPage.test.tsx -t SEC-A02 (5 tests) via make verify-issue-396
E2E LCD-mocked pause UI PASS (pre-existing) frontend-dapp/e2e/wrap-swap.spec.ts — disabled Wrapping is Temporarily Paused button
Launch checklist cross-link PASS (pre-existing) docs/runbooks/launch-checklist.md SEC-B06 → make smoke-wrap-mapper-pause

Environment

  • Provisioned LocalTerra via make setup-cloud-localterra --fresh --skip-build --no-indexer (first attempt on stale volumes hit treasury fund insufficient-funds; fresh reset succeeded).
  • Smoke transcript excerpt: wrap-mapper terra124tapgv8wsn5t3rv2cvywh4ckkmj6mc6fkya005qjmshnzewwm9qe9llrj; pause tx 2A25B2FE…, unpause tx 552E45AA…, restored wrap 21DC06EE…, restored unwrap EEB23204….

Follow-ups

  • Indexer-sourced pause state (per @PlasticDigits comment): consider tracking wrap-mapper config.paused in the indexer and serving it to the frontend instead of per-client LCD queries — separate from SEC-B06 on-chain smoke, which is satisfied.

Closing as verified.

## Verification complete — GitLab #396 / SEC-B06 All acceptance criteria **PASS** on `main` (no repo changes required). ### Checklist | Criterion | Result | How verified | |-----------|--------|--------------| | LocalTerra smoke: wrap rejected under pause | **PASS** | `make verify-issue-396` → `scripts/smoke-wrap-mapper-pause.sh`: `wrap_deposit while paused — rejected at broadcast with paused error` | | LocalTerra smoke: unwrap rejected under pause | **PASS** | Same smoke script: `unwrap send while paused — rejected at broadcast with paused error` | | LocalTerra smoke: wrap + unwrap restored after unpause | **PASS** | Same smoke script: successful `wrap_deposit after unpause` and `unwrap send after unpause` txs | | Risk acceptance (external-only untestable) | **N/A** | Not needed — wrap-mapper is deployed from `ustr-cmm` on LocalTerra during `make deploy-local` ([`docs/testing.md` § Wrap-mapper pause smoke](docs/testing.md#wrap-mapper-pause-smoke-sec-b06-gitlab-396)) | ### Additional coverage (issue context) | Check | Result | Command | |-------|--------|---------| | Frontend pause CTA (SEC-A02) | **PASS** | Vitest `SwapPage.test.tsx -t SEC-A02` (5 tests) via `make verify-issue-396` | | E2E LCD-mocked pause UI | **PASS** (pre-existing) | `frontend-dapp/e2e/wrap-swap.spec.ts` — disabled **Wrapping is Temporarily Paused** button | | Launch checklist cross-link | **PASS** (pre-existing) | `docs/runbooks/launch-checklist.md` SEC-B06 → `make smoke-wrap-mapper-pause` | ### Environment - Provisioned LocalTerra via `make setup-cloud-localterra --fresh --skip-build --no-indexer` (first attempt on stale volumes hit treasury fund insufficient-funds; fresh reset succeeded). - Smoke transcript excerpt: wrap-mapper `terra124tapgv8wsn5t3rv2cvywh4ckkmj6mc6fkya005qjmshnzewwm9qe9llrj`; pause tx `2A25B2FE…`, unpause tx `552E45AA…`, restored wrap `21DC06EE…`, restored unwrap `EEB23204…`. ### Follow-ups - **Indexer-sourced pause state** (per @PlasticDigits comment): consider tracking wrap-mapper `config.paused` in the indexer and serving it to the frontend instead of per-client LCD queries — separate from SEC-B06 on-chain smoke, which is satisfied. Closing as verified.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-06-25 11:46:24 +00:00
Brouie commented 2026-06-28 23:24:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #337

mentioned in issue #337
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#396
No description provided.