Skip to content

id(currency_poc): no in-memory test exercises the failed-transfer lookup — reconcile Resubmit after the blocker clears (PR #6367) #6629

Closed

Description

@dezren39

Finding (unaddressed PR review comment)

PR #6367 — "id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed)" — is still open, and a CodeRabbit finding on it was never fixed or responded to. The 24-hour grace period for open PRs has passed (comment 2026-11-05T20:15:11Z; rechecked 2026-11-06).

Essence of the comment ("Add an in-memory test for a failed transfer ID after its blocker clears"): "The in-memory failed-ID lookup in validate_and_stage has no test that exercises it. Add a test that fails a conversion for insufficient liquidity, restores liquidity, and calls reconcile with RecoveryPolicy::Resubmit. Expect ResubmissionRejected, and assert that no leg is posted. The linked issue lists this test as an acceptance criterion."

No-response evidence

Still-live evidence

Read on the PR head (7d5d64f9, 2026-11-06): grep of pkgs/id/src/currency_poc/tests.rs (1854 lines) and ledger.rs shows no test exercises the in-memory failed_transfers lookup — failed_transfers appears only in ledger.rs (definition, lookup, recording), never in tests.rs. The exact scenario exists only for the live TigerBeetle backend: live_failed_conversion_recovery_reports_resubmission_rejected (tests.rs:1551), which is #[cfg(feature = "currency-poc-tb")] and #[ignore = "requires the pinned tigerbeetle binary"], so it does not run in ordinary CI and does not cover the InMemoryLedger path this PR adds. The in-memory reconcile tests that do exist (e.g. recovery_scan_continues_after_a_rejected_resubmission) reject via fresh balance validation during reconcile itself, not via a previously recorded failed ID whose blocker has since cleared.

Dedupe: searched open/closed issues for "IdAlreadyFailed", "6367", "failed transfer" on 2026-11-06 — no issue covers this test gap. Issue #6150 is the parent task PR #6367 implements; the reviewer states its acceptance criteria include this test.

Acceptance criteria

  • Fix the gap: add an in-memory (non-feature-gated, non-ignored) test in pkgs/id/src/currency_poc/tests.rs that (1) fails a conversion for insufficient liquidity so its IDs land in failed_transfers, (2) restores liquidity, (3) calls reconcile with RecoveryPolicy::Resubmit, and asserts ResubmissionRejected and that no leg posted; OR resolve this issue with a documented decision explaining why the live-backend test is sufficient coverage for the in-memory lookup.
  • Do not reply to or resolve the source PR review thread from the fix work (per the pr-comment-review job rules); the test lands in the PR itself or is decided here.

Activity

  1. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    on Nov 6, 2026
  2. developing-today commented on Nov 6, 2026

    @developing-today
    Contributor
  3. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 6, 2026
  4. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-code-k — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-k posts progress markers; after 30 minutes of silence any other worker may pick this up.)

    Lane K triage: verifying the missing in-memory failed-transfer test gap against PR #6367's current head (tests.rs) and its unresolved CodeRabbit thread.

  6. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed on Nov 7, 2026
  7. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. 68 remaining items

  9. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-code-u — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-u posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  10. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed on Nov 7, 2026
  11. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-u: claimed: revalidating against fresh GitHub state + PR #6367

  12. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-u: shared PR worktree has another lanes uncommitted 6628 ledger work - moving my test to a detached worktree at PR head

  13. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor

    Agent note — done (test landed in PR #6367)

  14. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor

    Released by repo-worker-code-u (outcome: done). Done: in-memory test in_memory_failed_conversion_recovery_reports_resubmission_rejected added to currency_poc tests and pushed to PR #6367 branch as 636b1ab (on b0e2264). Verified passing via cargo test (target on /dev/shm - laptop root disk full). Module suite: only pre-existing failure is exists_break test from the in-flight #6627 commit b0e2264, untouched by this test-only change.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/testTest coverage, test infrastructure, or test-only fixespriority/normalOrdinary priority (the default)source/pr-comment-reviewFiled by the pr-comment-review jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions