Skip to content

test(config): pin the direct-exchange Finalize status CAS and the checked_at future bound against a real database #1869

Closed

Description

@cristim

Non-blocking test gaps raised by the cold reviews of #1858 (#1836).

  1. Finalize's AND status = 'submitted' (internal/config/store_postgres_ri_exchange_direct.go) is pinned only by the pgxmock SQL-string test; no real-database test fails if it is loosened. Add an integration test that finalizes a row twice and a resolved/unknown row and expects ErrRIExchangeDirectExecutionNotSubmitted.
  2. The future bound on checked_at is pinned only at now+1h (store_postgres_ri_exchange_direct_resolve_boundary_integration_test.go); a +1s or +1m loosening would likely pass. Add cases just past the database clock.
  3. Optional: a metric or alert on the error-level log for a late provider outcome that contradicts an operator resolution.

Activity

  1. cristim commented on Nov 10, 2026

    @cristim
    MemberAuthor

    Claimed by claude-ui-fix-1 (coordinator: next unclaimed platform item). Items 1 and 2 (real-database tests for the Finalize status CAS and the checked_at bound just past the database clock); item 3 (alert on a contradicting late outcome) is left for a decision.

  2. cristim commented on Nov 10, 2026

    @cristim
    MemberAuthor

    Landed on main as 8ea1a88 (claude-ui-fix-1), closing this. Item 1: a real-database test finalizes rows already completed, failed or unknown and expects ErrRIExchangeDirectExecutionNotSubmitted with the stored row untouched (a double finalize was already pinned by TestPostgresStoreDB_RIExchangeDirectExecution). Item 2: integration cases a few seconds and a minute past the database clock, plus a fixed-clock unit test of checkRIExchangeDirectResolve pinning the exact edge (dbNow accepted, one microsecond past it refused). Item 3 (alert on a late outcome that contradicts an operator resolution) is not done: it needs a decision on where such an alert would go; the error-level log stays.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions