Repository navigation
Description
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).
- Reviewer: coderabbitai[bot], 2026-11-05T20:15:11Z (Minor · Functional Correctness)
- Comment: id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed) #6367 (comment)
- File:
pkgs/id/src/currency_poc/ledger.rs:189
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
- The inline thread contains only the CodeRabbit comment (id 4485525947) — no replies (fresh
gh api pulls/6367/commentsread, 2026-11-06). - GraphQL
reviewThreadsfor PR id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed) #6367: the thread isisResolved: false. - PR head is unchanged since the review: head
7d5d64f9402afec929275a8d494611aa727f84d0is the PR's single commit; no test was added after the comment.
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.rsthat (1) fails a conversion for insufficient liquidity so its IDs land infailed_transfers, (2) restores liquidity, (3) callsreconcilewithRecoveryPolicy::Resubmit, and assertsResubmissionRejectedand 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
developing-today commentedon Nov 6, 2026
CODE-2035
dezren39 commentedon Nov 6, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 7, 2026
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 whilerepo-worker-code-kposts 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.
dezren39 commentedon Nov 7, 2026
🤖 Agent note · picked up
repo-worker-code-k(issue id(currency_poc): no in-memory test exercises the failed-transfer lookup — reconcile Resubmit after the blocker clears (PR #6367) #6629 is the task in fallback mode)failed_transferslookup invalidate_and_stage, against PR id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed) #6367's current head (pkgs/id/src/currency_poc/tests.rs+ledger.rs) and the source thread state. Per the acceptance note: do not reply to or resolve the source PR review thread from this work.68 remaining items
dezren39 commentedon Nov 7, 2026
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 whilerepo-worker-code-uposts progress markers; after 30 minutes of silence any other worker may pick this up.)dezren39 commentedon Nov 7, 2026
Progress from
repo-worker-code-u: claimed: revalidating against fresh GitHub state + PR #6367dezren39 commentedon Nov 7, 2026
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 headtest(currency_poc): in-memory failed-transfer lookup - Resubmit after…
developing-today commentedon Nov 7, 2026
Agent note — done (test landed in PR #6367)
in_memory_failed_conversion_recovery_reports_resubmission_rejectedtopkgs/id/src/currency_poc/tests.rs, pushed onto PR id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed) #6367's branch (queue/9942-issue-6150-remember-failed-transfer-ids) as a test-only commit on top of 8127030 (the id(currency_poc): validate_and_stage returns the stored original error for a failed transfer ID instead of IdAlreadyFailed (PR #6367) #6628 fix; id(currency_poc): failed_transfers recording marks every chain leg and already-posted IDs — an identical retry of a posted transfer returns the cached failure instead of Exists (PR #6367) #6627's fb8079d is below it). Per the issue's rules, the source CodeRabbit thread on PR id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed) #6367 was NOT replied to or resolved from this work.failed_transfers, no leg posts, intent stays Submitted), restores liquidity (refill from ISSUER_DST; LP_DST spendable asserted >= amount_out, so balance validation would now pass), then reconciles withRecoveryPolicy::Resubmitand assertsResubmissionRejected, intent still Submitted, no leg posted, USER_DST unchanged. Oracle: the live TigerBeetle test of the same name (id_already_failed semantics), now exercised against InMemoryLedger in ordinary (non-gated, non-ignored) test runs.developing-today commentedon Nov 7, 2026
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.