docs: verify #287 swap_events per-tx swap_index dedup (doc drift) #780
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!780
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cursor/gitlab-issue-verification-e1f4"
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 QA for GitLab #287 —
swap_eventsON CONFLICT collapsing two same-pair swaps in one tx.Implementation status: Already shipped on
mainvia MR !752 (swap_indexcolumn, unique key(tx_hash, pair_id, swap_index), parser ordinals, fill linkage via #316). This MR only fixes stale docs/guardrails that still described the old(tx_hash, pair_id)dedup key.Doc updates:
docs/indexer-invariants.md— swap dedup invariant rowdocs/runbooks/indexer-reorg-replay-dedup.md— replay dedup factsskills/AGENTS_INDEXER_INGESTION_HARDENING.md— do-not-regress noteindexer/scripts/seed-charts-integration.sql— seedON CONFLICTclausegaps/GAP_1780200149.md— replay idempotency noteVerification checklist
cargo test parse_swaps_assigns_per_pair_swap_index --lib→ ok. Integration:cargo test --test limit_fill_swap_linkage -j 1 -- --test-threads=1insertsswap_index0 and 1 → distinct ids. DB:SELECT COUNT(*) FROM swap_events WHERE tx_hash='TX316_MULTI_SWAP_SAME_PAIR'→ 2 rows (swap_index0, 1).idx_swap_events_tx_hash_pair_id_swap_index. Manual SQL ondex_indexer_test: secondINSERT … ON CONFLICT (tx_hash, pair_id, swap_index) DO NOTHINGfor same key returned 0 rows;COUNT(*)→ 1. Code:insert_swap+trade_exists(pool, tx_hash, pair_id, swap_index)in parser.cargo test parse_limit_order_fills_assigns_swap_index_per_pair_swap --lib→ ok.limit_fill_swap_linkageresolves fills byswap_index, notMIN(id).Issue
Leave #287 open until this doc MR merges (implementation already on
main).changed the description
changed the description
mentioned in issue #287
Security review
Commit reviewed:
d3f0a6cScope: 5 files — documentation/runbook/gap/skill text updates aligning
swap_eventsdedup narrative with(tx_hash, pair_id, swap_index);indexer/scripts/seed-charts-integration.sqlfixture addsswap_indexcolumn and widensON CONFLICTto match the existing schema (already onmainvia !752 / #287).Method: Full MR diff reviewed. No prior security-review threads on this MR. Each changed path traced for attacker-controlled input → sink (injection, authz, SSRF, XSS, secret leakage, unsafe deserialization). Unchanged runtime code (indexer parser, API, migrations) referenced only for context.
Outcome:
FINDINGS: 0medium+Inline threads: none (no findings to anchor)
Notes
docs/indexer-invariants.md,docs/runbooks/indexer-reorg-replay-dedup.md,gaps/GAP_1780200149.md,skills/AGENTS_INDEXER_INGESTION_HARDENING.md— static markdown; no executable surface.seed-charts-integration.sqlis run only in CI/local charts integration (scripts/test-charts-integration.sh,.github/workflows/test.yml) against dev/test Postgres. Inserts use hardcoded literals (swap_index = 0, fixedtx_hash);ON CONFLICTtarget change is schema-alignment, not user input. No injection path or production exposure.Security review: no medium+ findings on this diff.
mentioned in commit
1c4ad9212d