feat(cloud): LocalTerra setup for agents + deploy pair-creation fee fix #769
No reviewers
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!769
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cursor/cloud-localterra-setup-47ef"
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?
Summary
Cloud Agent sessions could not run manual
/limitsQA becausefrontend-dapp/.env.localwas missing and LocalTerra was not provisioned. This MR adds a one-command setup path, documents it inAGENTS.md, fixesdeploy-dex-local.shfor the factory pair-creation uluna fee (#276 local deploy path), and adds Playwright verification for GitLab #295.Merge conflict resolution (
9ec5c0d): Mergedmaininto this branch. Conflicts inMakefileandscripts/deploy-dex-local.shresolved by keeping all MR targets (verify-issue-295,setup-cloud-localterra) alongside main targets (test-setup-browser,verify-issue-274,verify-issue-276), and adopting main'sfactory_create_pairhelper (#276/#318) instead of the MR's inline--amountattachment.Bugbot follow-ups (
cd4389d,4dca4a6):_start_indexer_tmuxrestartsindexer-devwhen deploy ran (DEPLOY_RAN=1)._deploy_up_to_dateskips build/deploy when stamp,.env.local, artifacts, and git HEAD align._deploy_up_to_datealso probes the factory on LCD (Q1);make resetwithout--freshno longer skips redeploy on stale stamp/env.Risk-ack fix (
0f2d3c2):make verify-issue-295against plainmake devpre-seedscl8y-dex-risk-ackin localStorage.Changes
scripts/setup-cloud-agent-localterra.sh— dockerd, infra, deploy,.env.local, indexer tmux. Flags:--skip-build,--fresh,--start-frontend.make setup-cloud-localterraAGENTS.md— Cloud Agent LocalTerra +.env.local+ Chrome #295 steps; LCD probe cross-link (Q1)scripts/deploy-dex-local.sh— usesfactory_create_pairhelper (reads on-chain fee; #276/#318)make verify-issue-295+ Playwright spec +playwright.local-dev.config.tsVerification checklist
git merge origin/mainon MR branchbash -n scripts/deploy-dex-local.sh scripts/setup-cloud-agent-localterra.shmake lint-frontendsg docker -c './scripts/qa/test-verify-deploy.sh && ./scripts/qa/test-localterra-host-curl.sh'make verify-issue-276sg docker -c './scripts/setup-cloud-agent-localterra.sh --skip-build --no-indexer'(2nd run)make reset(no--fresh)sg docker -c 'make reset && make start && make wait-healthy'then setup scriptmake verify-issue-295(needsmake dev+ Playwright browsers)Notes
Closes #295.factory_create_pairfee path (#318)../scripts/setup-cloud-agent-localterra.sh --fresh --skip-buildSecurity review
Commit reviewed:
b4432f658f0b8a3b83ba1057298a0d2acce4d185Scope: 7 files — Cloud Agent LocalTerra setup (
scripts/setup-cloud-agent-localterra.sh,Makefile,AGENTS.md), local deploy pair-creation fee attachment (scripts/deploy-dex-local.sh), and GitLab #295 Playwright UI verification (playwright.local-dev.config.ts, e2e spec, verify script).Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Review notes
setup-cloud-agent-localterra.shaccepts only fixed flags (--skip-build,--infra-only,--fresh, etc.);maketargets and deploy invocations use hardcoded arguments — no attacker-controlled shell injection path identified.deploy-dex-local.shadds a constantPAIR_CREATION_FEE_ULUNA=100000000oncreate_pairexecutes. Local factory still instantiates withpair_creation_fee_uluna: "0"; factory contract refunds attached uluna when fee is zero (seeexecute_create_pairrefund path). No fund-loss or authz bypass.PLAYWRIGHT_BASE_URLdefaults to127.0.0.1:5173in dev-only test config; not a production SSRF surface.deploy-dex-local.sh/.env.developmentflow (documented, dev-only); not newly introduced exposure in this MR.Inline threads: none (no findings to anchor).
added 1 commit
0f2d3c2d- fix(e2e): seed risk ack for #295 verify against make devCompare with previous version
changed the description
changed the description
changed the description
Stale Security Review comment
Stale Security Review comment
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issues.
Reviewed by Cursor Bugbot for commit
0f2d3c2d34. Configure here.Stale indexer after redeploy
Medium Severity
After a new deploy (including
--fresh),_start_indexer_tmuxexits early whenindexer-devalready exists, so the running indexer keeps its oldindexer/.envand Postgres state whiledeploy-dex-local.shwrites new addresses and may reset volumes.Additional Locations (1)
scripts/setup-cloud-agent-localterra.sh#L185-L189Reviewed by Cursor Bugbot for commit
0f2d3c2d34. Configure here.Idempotency claim never implemented
Low Severity
The header says the script skips build/deploy when artifacts and
.env.localmatch.qa-deploy-stamp, but no code reads the stamp or skips those steps—every run rebuilds (unless--skip-build) and always runsdeploy-dex-local.sh.Additional Locations (1)
scripts/setup-cloud-agent-localterra.sh#L44-L46Reviewed by Cursor Bugbot for commit
0f2d3c2d34. Configure here.changed this line in version 3 of the diff
added 1 commit
cd4389db- Fix stale indexer restart and implement deploy idempotency in cloud setupCompare with previous version
resolved all threads
Stale Security Review comment
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Reviewed by Cursor Bugbot for commit
cd4389dbf4. Configure here.Stale deploy skip after reset
Medium Severity
_deploy_up_to_dateonly compares git HEAD,.qa-deploy-stamp, andfrontend-dapp/.env.local. After LocalTerra volumes are wiped (e.g.make reset) without--fresh, deploy is still skipped while.env.localkeeps old contract addresses, so a new chain never gets contracts.Additional Locations (1)
scripts/setup-cloud-agent-localterra.sh#L106-L117Reviewed by Cursor Bugbot for commit
cd4389dbf4. Configure here.added 1 commit
4dca4a6e- Fix stale deploy skip after volume reset in cloud setup scriptCompare with previous version
changed the description
resolved all threads
added 1 commit
5aee0ac0- docs(cloud): note LCD probe in setup script deploy skip (Q1)Compare with previous version
changed the description
changed the description
added 50 commits
main9ec5c0db- Merge main into cursor/cloud-localterra-setup-47efCompare with previous version
changed the description
changed the description
mentioned in commit
816fec5d92Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit
9ec5c0db10. Configure here.Dead dockerd tmux blocks restart
Medium Severity
_ensure_dockerdonly startsdockerdwhen nodockerdtmux session exists. Ifdocker infofails but a leftover session remains after a crashed daemon, the script never launches a newdockerdand exits after the wait loop, blockingmake setup-cloud-localterrauntil the session is removed manually.Reviewed by Cursor Bugbot for commit
9ec5c0db10. Configure here.