Docs and verify-issue-365 for registry outage observability #375
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#375
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?
Parent
Follow-up from GitLab #365 — approved verification follow-ups 3 and 4 (bundled):
Errvs unregistered trader.make verify-issue-365regression ladder for re-verification after implementation merges.Parent gap: GitLab #361 register item M2.
Current codebase
docs/contracts-security-audit.mddocuments on-chain fail-closed behavior and references off-chain health + dApp warning.docs/reference/fee-discount-tiers.mddistinguishes unregistered vs registry unreachable for integrators.docs/indexer-invariants.mddocumentsGET /api/v1/health/fee-discount.skills/AGENTS_FEE_DISCOUNT_TIERS.md§ Registry outage observability summarizes the stack.docs/integrators.mdmentions effective fee after registry but lacks a dedicated registry outage subsection (recommended in parent issue § Docs).scripts/qa/verify-issue-365.shormake verify-issue-365target yet (peer pattern:scripts/qa/verify-issue-324.sh,verify-issue-369.sh).swap_uses_full_fee_when_discount_registry_query_failsinsmartcontracts/tests/src/lib.rs.Why needed
Integrators and ops need a single place to learn that registry query failure ≠ “trader not registered”, and a one-command verification ladder to close #365 after child work lands (per parent verification comment: “rerun verification” once issues are implemented and closed).
Constraints / guardrails
docs/reference/fee-discount-tiers.mdas the canonical tier table — add cross-links, do not duplicate numeric tiers inintegrators.md.scripts/qa/verify-issue-*.shpatterns: PASS/FAIL summary, bootstrapmake setup-indexer-postgreswhenindexer/.envmissing, no LocalTerra required for the default ladder.make verify-issue-365inMakefileand mention indocs/testing.mdif other verify targets are listed there.Relevant files
docs/contracts-security-audit.md(P5)docs/integrators.md(add registry-outage guidance)docs/reference/fee-discount-tiers.md(I10)docs/indexer-invariants.mddocs/testing.mdskills/AGENTS_FEE_DISCOUNT_TIERS.mdscripts/qa/verify-issue-365.sh(new)Makefilesmartcontracts/tests/src/lib.rs(swap_uses_full_fee_when_discount_registry_query_fails)indexer/tests/api_fee_discount_health.rsfrontend-dapp/src/utils/__tests__/feeDiscountRegistryWarning.test.tsRecommended direction
Documentation
docs/integrators.md:GetDiscountErr→ full pairfee_bps, swap succeeds.GET /api/v1/health/fee-discount, LCDget_registration/get_discounterrors.registered: false) vs registry unreachable (LCD errors orfee_discount_registry_ok: false).skills/AGENTS_FEE_DISCOUNT_TIERS.md.Verification ladder
Create
scripts/qa/verify-issue-365.shexercising:cargo test swap_uses_full_fee_when_discount_registry_query_fails(fromsmartcontracts/testsor workspace alias)cargo test --test api_fee_discount_health -- --test-threads=1make test-frontendfiltered tofeeDiscountRegistryWarning(or full frontend if filter unsupported)Add
make verify-issue-365target mirroringverify-issue-324/verify-issue-369(chmod + invoke script).Acceptance criteria
docs/integrators.mdincludes integrator guidance distinguishing unregistered vs registry LCD outage (with links to health endpoint and on-chain semantics).make verify-issue-365exists and passes onmainwhen #365 scope is complete.docs/testing.mdorskills/AGENTS_FEE_DISCOUNT_TIERS.mdreferencesmake verify-issue-365for agents/QA.Test plan
make check-fee-discount-tier-docs(if tier doc touched)make verify-issue-365docs/integrators.mdregistry-outage section — actionable without reading Rust sourcesAttack / abuse test plan
indexer/.env.Verification criteria
make verify-issue-365green on a checkout with indexer health + frontend warning + docs landed.swap_uses_full_fee_when_discount_registry_query_failsincluded in ladder and passing.mentioned in issue #365
mentioned in commit
b92a12ced3mentioned in merge request !892
mentioned in commit
edbe288781Checked on my side on main
edbe288.Docs side is all there:
The ladder content passes — scripts/qa/verify-issue-365.sh is 3/3:
PASS/FAIL summary prints and it exits non-zero on failure as specified.
One nit on the make target:
make verify-issue-365bails before the script runs. The recipe doeschmod +x scripts/qa/verify-issue-365.sh scripts/setup-cloud-agent-indexer-postgres.sh scripts/with-node.sh, and if setup-cloud-agent-indexer-postgres.sh isn't owned by the invoking user the chmod fails and the whole target errors out. The default ladder doesn't need that script anyway (it only shells setup-indexer-postgres when indexer/.env is missing). Running scripts/qa/verify-issue-365.sh directly is 3/3 green. Suggest dropping setup-cloud-agent-indexer-postgres.sh from that chmod line (or guarding it) somake verify-issue-365is portable.Docs + ladder content are good from my side; the chmod line is the one thing to tidy so the make wrapper strictly passes. @PlasticDigits
Approved fix for make verify-issue-365
mentioned in merge request !898
mentioned in commit
b23c1c51cfmentioned in commit
10893b6b79mentioned in merge request !900
Fixed the make verify-issue-365 chmod nit I flagged. Branch qa/375-verify-365-make-chmod (commit
10893b6), MR !900.The recipe was chmod-ing two scripts the ladder doesn't directly exec — with-node.sh (run as
bash scripts/with-node.sh, no exec bit needed) and setup-cloud-agent-indexer-postgres.sh (not invoked at all; bootstrap shellsmake setup-indexer-postgres). When one of those isn't owned by the invoking user the chmod fails and the target dies before the ladder runs. Now it chmods only scripts/qa/verify-issue-365.sh, with a-prefix so a no-op chmod can't abort.Confirmed
make verify-issue-365now runs end-to-end, 3/3 PASS (contract P5 + indexer health + frontend warning). One-line recipe change.With this in, the make-target AC is satisfied — good to close from my side once !900 lands. @PlasticDigits
Closed my !900 — it raced with
2b5d263("make verify-issue-365 portable without setup script chmod"), which already landed on main and drops the setup-cloud-agent-indexer-postgres.sh chmod that was the actual blocker. Re-checked on current main:make verify-issue-365runs clean here, 3/3. So !900 was redundant; closed it and deleted the branch rather than resolve the conflict into a duplicate.One small residual, take it or leave it: the target on main still does
@chmod +x scripts/qa/verify-issue-365.sh scripts/with-node.shwith no-guard. with-node.sh is run viabashso it doesn't need the exec bit, and on a normal checkout it's user-owned — but on a host where that script ends up non-user-owned (same way setup-cloud-agent-indexer-postgres.sh did), that chmod would fail and abort the target again. A-prefix (or dropping with-node.sh from the chmod) makes it bulletproof. Not blocking — the make-target AC is satisfied as-is.Good to close from my side. @PlasticDigits