tests: fix decimals bootstrap test after #456 fail-closed guard #999
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!999
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/456-blacklist-verify-test-fix"
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
Verification of GitLab #456 (SEC-I03 F02) found the fail-closed blacklist guard fix is merged and correct on
main, butpair_coverage_tests::test_empty_pool_provide_rejects_asset_decimals_above_bootstrap_capstill used a fake factory address. After #456,provide_liquiditynow correctly returnsBlacklist guard unavailablebefore the decimals check runs. This MR instantiates a real factory (with both CW20 code IDs whitelisted) so the test continues to assert the bootstrap decimal-cap rejection path.Acceptance checklist (#456)
pair/src/blacklist_guard.rsandrouter/src/blacklist_guard.rsmapErr(_)→BlacklistGuardUnavailablecargo test factory_blacklist_query_error_blocks_swap— swap rejected withBlacklist guard unavailabledocs/security-model.md,docs/contracts-security-audit.md,skills/AGENTS_BLACKLIST_DECISION.mddocument fail-closed posturedex_common::blacklist::blacklist_query_error_blocksremoved inf5085087; default-deny on all query errorsmake test-contracts— 389/389 after test fixmake check-blacklist-decision-docsFollow-ups
factory_blacklist_query_error_blocks_swap(router guard already fail-closed in code; only pair path is regression-tested today).Security review
Commit reviewed:
e23df4a270ff1cac6f0bfc07573a3a5a1ac40304Scope:
smartcontracts/tests/src/lib.rs—pair_coverage_tests::test_empty_pool_provide_rejects_asset_decimals_above_bootstrap_caponly (replaces fake factory address with in-test factory instantiation so the decimals bootstrap-cap assertion runs past the #456 fail-closed blacklist guard).Method: Diff review; traced attacker-controlled inputs to sinks in changed lines; compared factory setup to adjacent
test_create_pair_rejects_cw20_above_bootstrap_decimal_capin the same module.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Rationale: Changes are confined to cw-multi-test harness code and do not alter production contracts, indexer, or frontend. The added factory
InstantiateMsg(governance/treasury, whitelisted CW20 code IDs including the adversarial shim, standard fee/limit defaults) matches an established regression pattern already used in this file. No new auth surfaces, injection sinks, secret handling, or on-chain permission boundaries are introduced; the test still assertsProvideLiquidityrejection for asset decimals above the bootstrap cap.Inline threads: none (no findings).
mentioned in commit
45d7dacb1ementioned in issue #456