test(indexer): fix stale integration fixtures for Postgres-only bootstrap (#335) #823

Merged
PlasticDigits merged 1 commit from cursor/gitlab-issue-workflow-3782 into main 2026-06-06 07:09:56 +00:00
PlasticDigits commented 2026-06-06 06:57:52 +00:00 (Migrated from gitlab.com)

Summary

Closes the remaining acceptance gap for #335 after !818 merged the Postgres-only bootstrap.

What: Update swap_events_hybrid_columns integration fixture to use runtime-stamped _contract_address (was contract_address), matching #285 parser scoping.

Why: make test-indexer-integration was the last failing acceptance criterion.

Acceptance checklist

Criterion Result
make setup-indexer-postgres PASS
api_route_solve after bootstrap (23/23) PASS
make test-indexer-integration PASS
Bootstrap idempotent PASS
psql-absent compose exec fallback PASS
AGENTS.md Postgres-only path (!818) PASS
make test-setup-postgres PASS
make verify-issue-324 PASS

Verification

make setup-indexer-postgres
make verify-issue-324
cd indexer && cargo test --test api_route_solve -- --test-threads=1
make test-indexer-integration
make test-setup-postgres


Note

Low Risk
Test-only fixture change; no production code or runtime behavior is modified.

Overview
Updates the swap_events_hybrid_columns integration test’s synthetic wasm tx fixture so the pair is stamped with _contract_address instead of contract_address, matching how parse_swaps scopes events after #285 (runtime-reserved key only).

Adds a short comment documenting that scoping rule. No indexer or parser logic changes—this unblocks make test-indexer-integration after the Postgres-only bootstrap work.

Reviewed by Cursor Bugbot for commit fec80e46ed. Bugbot is set up for automated code reviews on this repo. Configure here.

## Summary Closes the remaining acceptance gap for #335 after !818 merged the Postgres-only bootstrap. **What:** Update swap_events_hybrid_columns integration fixture to use runtime-stamped _contract_address (was contract_address), matching #285 parser scoping. **Why:** make test-indexer-integration was the last failing acceptance criterion. ## Acceptance checklist | Criterion | Result | |-----------|--------| | make setup-indexer-postgres | PASS | | api_route_solve after bootstrap (23/23) | PASS | | make test-indexer-integration | PASS | | Bootstrap idempotent | PASS | | psql-absent compose exec fallback | PASS | | AGENTS.md Postgres-only path (!818) | PASS | | make test-setup-postgres | PASS | | make verify-issue-324 | PASS | ## Verification make setup-indexer-postgres make verify-issue-324 cd indexer && cargo test --test api_route_solve -- --test-threads=1 make test-indexer-integration make test-setup-postgres <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Test-only fixture change; no production code or runtime behavior is modified. > > **Overview** > Updates the **`swap_events_hybrid_columns`** integration test’s synthetic wasm tx fixture so the pair is stamped with **`_contract_address`** instead of **`contract_address`**, matching how **`parse_swaps`** scopes events after #285 (runtime-reserved key only). > > Adds a short comment documenting that scoping rule. No indexer or parser logic changes—this unblocks **`make test-indexer-integration`** after the Postgres-only bootstrap work. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit fec80e46ed150a723abb0cfdbeb7943eb2a9d086. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
ghost1 commented 2026-06-06 06:57:58 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-06 06:58:02 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-06-06 06:58:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #335

mentioned in issue #335
PlasticDigits commented 2026-06-06 06:59:24 +00:00 (Migrated from gitlab.com)

Security review

Commit reviewed: fec80e46ed150a723abb0cfdbeb7943eb2a9d086
Scope: indexer/tests/swap_events_hybrid_columns.rs — integration fixture key rename (contract_address → _contract_address) plus comment documenting #285 parser scoping.

Outcome: FINDINGS: 0 medium+ — Security review: no medium+ findings on this diff.

Summary

This MR modifies only an integration test fixture. No production indexer, parser, API, or dependency changes are introduced.

The fixture update aligns synthetic wasm event attributes with the existing #285 security control in wasm_contract_addr / parse_swaps, which scopes swap attribution to runtime-stamped _contract_address only and ignores forgeable contract_address attributes. The change does not weaken that control; it corrects test data to match on-chain/LCD behavior already enforced in indexer/src/indexer/parser.rs.

Attack-surface check

Area Result
Injection (SQL/command/template) N/A — test-only Rust literals; no new query or sink paths
Authn/authz bypass N/A — no API or handler changes
SSRF / XSS / CSRF N/A — no network or web surface changes
Secret leakage / unsafe logging N/A — no secrets or logging changes
Deserialization / path traversal N/A — no new parsers or file I/O
Supply chain N/A — no dependency changes

Inline threads

None — no medium, high, or critical findings to annotate on the diff.


Automated security review (Cursor Cloud Agent)

## Security review **Commit reviewed:** `fec80e46ed150a723abb0cfdbeb7943eb2a9d086` **Scope:** `indexer/tests/swap_events_hybrid_columns.rs` — integration fixture key rename (`contract_address` → `_contract_address`) plus comment documenting #285 parser scoping. **Outcome:** `FINDINGS: 0` medium+ — **Security review: no medium+ findings on this diff.** ### Summary This MR modifies only an integration test fixture. No production indexer, parser, API, or dependency changes are introduced. The fixture update aligns synthetic wasm event attributes with the existing #285 security control in `wasm_contract_addr` / `parse_swaps`, which scopes swap attribution to runtime-stamped `_contract_address` only and ignores forgeable `contract_address` attributes. The change does not weaken that control; it corrects test data to match on-chain/LCD behavior already enforced in `indexer/src/indexer/parser.rs`. ### Attack-surface check | Area | Result | |------|--------| | Injection (SQL/command/template) | N/A — test-only Rust literals; no new query or sink paths | | Authn/authz bypass | N/A — no API or handler changes | | SSRF / XSS / CSRF | N/A — no network or web surface changes | | Secret leakage / unsafe logging | N/A — no secrets or logging changes | | Deserialization / path traversal | N/A — no new parsers or file I/O | | Supply chain | N/A — no dependency changes | ### Inline threads None — no medium, high, or critical findings to annotate on the diff. --- *Automated security review (Cursor Cloud Agent)*
PlasticDigits commented 2026-06-06 07:09:56 +00:00 (Migrated from gitlab.com)

mentioned in commit 593ab1353f

mentioned in commit 593ab1353f8facf62337aee7cf55ebf92109f772
PlasticDigits (Migrated from gitlab.com) merged commit 593ab1353f into main 2026-06-06 07:09:56 +00:00
PlasticDigits commented 2026-06-08 08:43:13 +00:00 (Migrated from gitlab.com)

mentioned in commit f090a17315

mentioned in commit f090a173150d0fb4eb18d452b0cdd55a26668da4
PlasticDigits commented 2026-06-08 13:42:28 +00:00 (Migrated from gitlab.com)

mentioned in commit 15bfbff71a

mentioned in commit 15bfbff71af44d56c4c23b0bc4a77c3849210f81
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!823
No description provided.