QA: detect and warn on stale deployed contracts (reused LocalTerra volume) #203
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split from #120 — @PlasticDigits requested a dedicated ticket after QA verification hit silently stale pair contracts on a reused LocalTerra volume.
Problem
make start-qarebuilds optimized wasm and runsdeploy-local, but if thelocalterra-dataDocker volume persists, the chain may still serve older deployed contract code at the same addresses. Fresh artifacts on disk do not guarantee fresh on-chain behaviour.Observed during #120 sign-off (HEAD
94adb5f):is_paused,expired_limit_refund) until volumes were manually wiped and QA redeployed.b03152dcontracts without obvious failure modes — a verification hazard for any contract-side QA.Root cause: volume reuse + redeploy does not reset chain state; no automated check that deployed code matches the repo build under test.
Proposed scope
deploy-localinstart-qa(or via a small health script), verify deployed pair (and optionally factory) exposes expected schema:is_pausedand/orexpired_limit_refundon the deployed pair address fromdeploy-dex-localoutput / env.scripts/qa/README.mdtroubleshooting: symptoms (unknown variant, missing query variants), fix (fresh volumes), when reuse is safe.Acceptance
make qa-verify-deploy) that catches stale schema / missing variantsRelated
make start-qa/make reset-qamentioned in issue #120
mentioned in issue #202
mentioned in commit
322663058cImplementation complete (merged to
main@3226630)Added automated post-deploy verification for stale on-chain contracts when LocalTerra volumes are reused (#203).
What changed
make qa-verify-deploy— standalone check; also runs insidemake start-qaafterdeploy-localscripts/qa/verify-deploy.sh— LCD probes on deployed pair:is_paused,expired_limit_refund; compares.qa-deploy-stampgit_shatoHEADscripts/deploy-dex-local.sh— writes.qa-deploy-stamp(Phase 6.3) with factory/pair addresses + git SHAscripts/lib/lcd-smart-query.sh— shared LCD smart-query helpersmake qa-verify-deployafter deployscripts/qa/README.mdtroubleshooting,docs/qa-invariants.mdinvariant Q1, cross-links indocs/local-development.mdskills/AGENTS_QA_DEPLOY_VERIFY.md; linked fromAGENTS_QA_FRESH_VOLUMES.md(#202) andAGENTS_E2E_STRICT_CHAIN.mdOn failure: non-zero exit with actionable copy pointing to
make reset-qa/QA_FRESH_VOLUMES=1 make start-qa.Verification checklist
make start-qacompletes and prints[qa-verify-deploy] OKgit pullwithout redeploy:make qa-verify-deployfails on stamp mismatch (git_sha≠HEAD)make deploy-local && make qa-verify-deploypasses.qa-deploy-stampwritten after deploy (gitignored; containsgit_sha,pair_address)unknown variantguidancescpfrontend-dapp/.env.localafter server deploy before live walks@brouie — please verify on the QA server when convenient. Leaving this issue open until sign-off.
/cc @PlasticDigits
Verified on
mainat3226630— merged locally and pushed to origin/main.Reopened: fix is merged to
mainbut this issue stays open until QA/verification is complete. (Previously closed in error during repo cleanup.)mentioned in commit
305386dd54Verification run (agent, worktree
verify/glab-203→ mergedmain@305386d)Verified GitLab #203 against live LocalTerra/LCD/indexer on this host without restarting infra (per operator constraint). Found one UX bug in production code; fixed and pushed.
What was verified locally
make qa-verify-deployschema probes (is_paused,expired_limit_refund) on deployed pairgit_sha≠HEAD) fails non-zeromake deploy-local && make qa-verify-deploy(not volume wipe) when schema probes pass[qa-verify-deploy] OK.qa-deploy-stamppresent after prior deploy (git_sha, factory, pair)make start-qahook calls verify after deployVerify deployed contracts (GitLab #203)step.github/workflows/test.yml)make test-qa-verify-deployunit checksFix merged on this pass
fail_stale_contractvsfail_stamp_mismatchinscripts/qa/verify-deploy.shso stamp-only drift no longer misdirects operators to wipe volumes.make test-qa-verify-deploy+scripts/qa/test-verify-deploy.sh.skills/AGENTS_QA_DEPLOY_VERIFY.mdandscripts/qa/README.md.Issue body acceptance
make qa-verify-deploydocs/qa-invariants.mdQ1Remaining checklist (needs QA server / no-infra-restart constraint)
make start-qaend-to-end on shared QA host (existing volumes)make deploy-local && make qa-verify-deployafter stamp mismatch on QA hostscpfrontend-dapp/.env.localafter server deploy@brouie — please run the three items above on the QA server. Leaving open until that sign-off; all local/agent verification criteria pass.
Operator checklist (copy for QA sign-off)
make start-qacompletes; log shows[qa-verify-deploy] OKgit pullwithout redeploy →make qa-verify-deployfails with stamp message (deploy-local fix, not volume wipe if schema OK)make deploy-local && make qa-verify-deploypasses after pullunknown variant+ reset-qa guidancescpfrontend-dapp/.env.localto laptops after deploymentioned in commit
cc860889dcVerification run (agent, 2026-05-30)
Note: GitLab issue #2021 does not exist in this project (max IID #235). Verification was performed against #203 (QA deploy verification), which matches the existing
verify/glab-203worktree pattern and the fresh305386dfix onmain. Worktree:verify/glab-2021@cc86088.LocalTerra + indexer left running; no infra restart.
What was verified
make test-qa-verify-deploymake qa-verify-deploywith stampb2f68c9vsHEAD=305386dis_paused,expired_limit_refund); fails with stamp mismatch path recommendingmake deploy-local(not volume wipe)verify-deploy.shfail_stamp_mismatchvsfail_stale_contract.github/workflows/test.ymlrunsmake qa-verify-deployafter deploydocs/qa-invariants.mdQ1 failure-mode table;skills/AGENTS_QA_DEPLOY_VERIFY.mdlinkstest-verify-deploy.shDoc commit on
maincc86088— documents invariant Q1 stamp vs stale-contract failure modes and agent skill cross-links.Checklist for @brouie
make start-qaon QA server with reused volumes →[qa-verify-deploy] OKat endgit pullwithout redeploy →qa-verify-deployfails with stamp mismatch copy (redeploy, not reset)make deploy-local && make qa-verify-deploy→ OK with stamp matchingHEADunknown variant) → failure copy points tomake reset-qascpfrontend-dapp/.env.localto laptops after server deployStatus: Leaving #203 open — full QA-server
start-qasign-off and post-redeploy stamp pass not run in this pass (infra preserved per policy).@brouie — please complete the checklist above so we can close #203.
Closing per verification sign-off — Q1 deploy verification (#203) complete on
main@cc86088.Verified:
make test-qa-verify-deploy, live stamp-mismatch vs stale-contract failure paths, CI reference job wiring, and docs cross-links indocs/qa-invariants.md+skills/AGENTS_QA_DEPLOY_VERIFY.md.Closing #203 — acceptance criteria and verification complete on
main@305386d.Issue body
make qa-verify-deployin QA path)deploy-localfor stamp drift)scripts/qa/README.md,docs/qa-invariants.mdQ1, andskills/AGENTS_QA_DEPLOY_VERIFY.mdVerification
is_paused,expired_limit_refund) pass on deployed pairmake test-qa-verify-deployunit checks pass