Skip to content

test: skip stale Redis status entries#6

Open
chico10117 wants to merge 1 commit into
BitgesellOfficial:mainfrom
chico10117:codex/skip-stale-redis-status-keys
Open

test: skip stale Redis status entries#6
chico10117 wants to merge 1 commit into
BitgesellOfficial:mainfrom
chico10117:codex/skip-stale-redis-status-keys

Conversation

@chico10117

Copy link
Copy Markdown

Summary

  • make bridge-operation status scans skip Redis set members whose operation record has already disappeared
  • return a clear error for unknown status names instead of scanning an empty Redis key
  • add miniredis-backed regression tests for stale status-set members and unknown statuses

Validation

  • go test ./redis
  • go test ./...
  • git diff --check

Supports the testing/reliability goals in #3.

Preferred payout if accepted: USDC on Base / EVM wallet 0x820a7bf90d944bb26bfD9b62Ab172Fc3A0829cB9.

@MyTH-zyxeon

Copy link
Copy Markdown

Review assist for maintainers:

This looks like a focused Redis consistency hardening patch: stale status-set members whose backing operation key has expired or been deleted now get skipped instead of crashing the lookup path, and unknown status names return a clear error before SSCAN. The new miniredis tests cover both FindAllBridgeOperationsByStatus and source-tx lookup behavior with stale set members.

Suggested merge checks:

  • Run go test ./redis or the repo's normal Go test target and confirm miniredis remains a test-only dependency.
  • Verify both lookup paths still surface real Redis errors after the new redis.ErrNil skip branch, so connection/protocol failures are not hidden as stale records.
  • Consider whether stale set members should also be cleaned from the Redis set after skip; if not, the current behavior is still a safe read-path fix and can be merged separately from cleanup semantics.

I do not see wallet/key, bridge signing, live RPC, or live-chain behavior changes in this patch as written; the main acceptance criterion is that stale Redis membership no longer breaks bridge operation lookup while valid records still deserialize and match normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants