docs: catalog of stubs, mocks, and test stand-ins in repo #105
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#105
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?
Summary
This issue catalogs stubs, test doubles, and non-production stand-ins found in the cl8y-dex-terraclassic repo (snapshot audit). It is a checklist for engineers to know what is intentional test infrastructure vs what might be mistaken for “unfinished app code.”
This is not an accusation of technical debt in every case — most items are expected in tests. Use it for onboarding and to avoid duplicating work.
Test / tooling stubs (intentional)
indexer/tests/common/lcd_mock.rsindexer/tests/api_limit_book_lcd_mock.rs,api_orderbook_lcd_mock.rs, etc.frontend-dapp/src/services/indexer/__tests__/client.test.tsvi.stubGlobal('fetch', …)for client unit tests.frontend-dapp/src/services/terraclassic/__tests__/pair.test.ts(and similar)vi.mockforqueries/transactions.smartcontracts/.../orderbook.rs(unit tests)cosmwasm_std::testing::mock_dependencies().docs/testing.mddocs/indexer-invariants.mdpoolsmart query.Mock addresses and fixtures (not chain deployments)
router.test.ts,wrapMapper.test.ts,types/__tests__/helpers.test.ts—MOCK_LUNC_C/MOCK_USTC_Cplaceholder terra1 strings for unit tests.E2E conditional skips (behavioral “gaps” not code stubs)
e2e/*.spec.tsusetest.skip(...)when LocalTerra is down, no route, no balance, or pair paused — this hides failures (see separate issue to make pool-tx strict).e2e/helpers/chain.ts— skips when LCD unreachable.Architecture / product language (“not implemented” in docs, not a code TODO)
docs/reviews/20260409T030009Z/ARCHITECTURE_GAP_MATRIX.md— row “Best execution logic — not implemented server-side” (design statement).indexer/src/api/orderbook_sim.rs— Simulated AMM orderbook for CG/CMC (curve walk), not the on-chain FIFO book — name overlap can confuse readers.“Shallow” book API (product limit, not a mock)
GET .../limit-book-shallowwith default depth 10, max 20 — real endpoint; intentionally bounded (see deep book epic).package-lockintegrity fieldintegritystring containing substringw1x32s/...matched grep; not a code stub.Not found (in targeted scan)
TODO/FIXME/unimplemented!in app TS/TSX or contractssrc— no large backlog ofTODOcomments surfaced by repo-wide search (aside from test/docs contexts above).Action
lcd_mock.rsandorderbook_sim.rsif confusion persists between AMM-sim vs on-chain book.CONTRIBUTINGordocs/testing.mdif helpful.Labels suggested
documentation,testing,onboardingmentioned in issue #107
mentioned in commit
2d4e9e114d@brouie Could you verify this matches what you had in mind for #105?
Done (merged to
mainin2d4e9e1):indexer/tests/common/lcd_mock.rs— Module docs now state this is a Wiremock LCD HTTP stub only, not the on-chain FIFO book, and point toorderbook_sim+ issue #105.indexer/src/api/orderbook_sim.rs— Module-level//!docs clarify AMM curve-walk / CG–CMC-style synthetic depth vs the pair contract limit order book, and that tests often pair this withlcd_mock.docs/testing.md— Short paragraph linking issue #105 and naming the two indexer files for quick orientation.No
CONTRIBUTING.mdexists in the repo, so the catalog link lives in the testing doc per the issue checklist.Verification:
cargo fmt --checkandcargo test --libinindexer/passed on the branch before merge.If anything should be worded differently or cross-linked elsewhere, say the word.
@PlasticDigits acknowledging — this reads as a dev-owned catalog with 2 minor triager actions (code comments in lcd_mock.rs + orderbook_sim.rs, and linking from CONTRIBUTING/testing.md). No QA action. Ping when the comment/link changes land and I'll verify.
@Brouie Commit is merged
@PlasticDigits verified on
2d4e9e1.Module docs in
lcd_mock.rsandorderbook_sim.rsnow clearly distinguish three concepts that were previously confusable:docs/testing.mdcross-links the catalog. Good fix for a real naming footgun.Closing as verified.
mentioned in issue #199
mentioned in issue #210
marked as related to #210
mentioned in issue #211
mentioned in issue #225
mentioned in issue #227
marked as related to #227
mentioned in issue #230
marked as related to #230