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:12Z; rechecked 2026-11-06).
- Reviewer: coderabbitai[bot], 2026-11-05T20:15:12Z (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 ("Return IdAlreadyFailed for resubmitted failed transfer IDs"): "validate_and_stage returns the stored original error for a failed ID. A transfer that failed with DebitAccountNotFound keeps returning that error after the account exists. The TransferError::IdAlreadyFailed doc comment and the live binding's status mapping both expect IdAlreadyFailed." Suggested fix: check failed_transfers.contains_key(&transfer.id) and return TransferError::IdAlreadyFailed instead of the stored error.
No-response evidence
- The inline thread contains only the CodeRabbit comment (id 4485525977) — 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 fix commit followed the comment.
Still-live evidence
Read on the PR head (7d5d64f9, 2026-11-06), pkgs/id/src/currency_poc/ledger.rs:188-190:
// Check if this transfer ID was previously recorded as failed
if let Some(error) = self.failed_transfers.get(&transfer.id) {
return Err(*error);
}The stored original error is returned, not IdAlreadyFailed. The contract mismatch is visible in the same tree: ledger.rs:101-103 defines IdAlreadyFailed with a doc comment naming the resubmission (id_already_failed) behavior, and the live TigerBeetle binding (pkgs/id/src/currency_poc/tb_ledger.rs:223) maps Status::IdAlreadyFailed => Err(TransferError::IdAlreadyFailed) — so the in-memory backend and the live backend return different errors for the same resubmission, and the in-memory error can go stale (it keeps naming a cause, e.g. a missing account, after that cause is fixed).
Dedupe: searched open/closed issues for "IdAlreadyFailed", "6367", "6150" on 2026-11-06 — no issue covers this return-value defect. Issue #6150 is the parent task PR #6367 implements; it asks for failed IDs to be remembered, and does not record that the implementation returns the wrong error for them.
Acceptance criteria
- Fix the defect:
validate_and_stagein the InMemoryLedger returnsTransferError::IdAlreadyFailedfor any resubmitted ID present infailed_transfers, matching the doc comment and the live binding's mapping; add a test where a transfer fails (e.g.DebitAccountNotFound), the cause is then fixed, and resubmission still returnsIdAlreadyFailed; OR resolve this issue with a documented decision explaining why returning the stored original error is the intended contract (and reconcile the doc comment / binding expectation with that decision). - Do not reply to or resolve the source PR review thread from the fix work (per the pr-comment-review job rules); the correction lands in the PR itself or is decided here.
Activity
developing-today commentedon Nov 6, 2026
CODE-2034
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 validate_and_stage stored-error-vs-IdAlreadyFailed finding against PR #6367's current head (ledger.rs:189) and its unresolved CodeRabbit thread.
dezren39 commentedon Nov 7, 2026
🤖 Agent note · picked up
repo-worker-code-k(issue id(currency_poc): validate_and_stage returns the stored original error for a failed transfer ID instead of IdAlreadyFailed (PR #6367) #6628 is the task in fallback mode)validate_and_stagereturns the stored original error for a resubmitted failed transfer ID instead ofTransferError::IdAlreadyFailed(pkgs/id/src/currency_poc/ledger.rs:189on PR id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed) #6367's head), including the doc-comment and live-binding contract mismatch. Per the acceptance note: do not reply to or resolve the source PR review thread from this work.25 remaining items
developing-today commentedon Nov 7, 2026
Progress from
repo-worker-code-o: verified: PR #6367 OPEN head fb8079d settled (lane S 03:49Z heartbeat: #6628 now unblocked, branch work pushed); defect still at ledger.rs:188-190 per lane L. Next: resume laptop worktree fb-6627-pr6367, implement IdAlreadyFailed return + acceptance test, push to PR #6367 branchdeveloping-today commentedon Nov 7, 2026
Progress from
repo-worker-code-o: implementation_complete in laptop worktree fb-6627-pr6367: validate_and_stage now returns IdAlreadyFailed for resubmitted failed IDs + stale recording comment fixed; acceptance test added (fails DebitAccountNotFound, cause fixed, resubmit still IdAlreadyFailed). Next: targeted cargo test on laptop, then commit+push to PR #6367 branchid(currency_poc): return IdAlreadyFailed for resubmitted failed trans…
developing-today commentedon Nov 7, 2026
Agent note — parked on CI (fallback, lane code-o)
validate_and_stagereturnsIdAlreadyFailedfor resubmitted failed transfer IDs, plus the acceptance test.Done this claim
fb8079d5with the id(currency_poc): validate_and_stage returns the stored original error for a failed transfer ID instead of IdAlreadyFailed (PR #6367) #6628 defect verbatim atledger.rs:188-190.~/git/fleet/fb-6627-pr6367(branchqueue/9942-issue-6150-remember-failed-transfer-ids), commit8127030d85, pushed; PR id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed) #6367 head verified fresh at8127030d85e729dff34a16e88c547f0fdc386e0e:ledger.rs:validate_and_stagenow returnsTransferError::IdAlreadyFailedwhen the resubmitted ID is present infailed_transfers(was: the stored original error); the stale recording-site comment ("future submissions return the same error") was corrected to match.tests.rs: new testresubmitted_failed_transfer_returns_id_already_failed_after_cause_fixed(oracle: theIdAlreadyFaileddoc comment + the live binding'sStatus::IdAlreadyFailedmapping) — transfer failsDebitAccountNotFound, accounts are created and funded, resubmission still returnsIdAlreadyFailedand nothing posts.cargo teston the laptop did not produce a result — the laptop-agent transport timed out at ~10 minutes while the crate was still compiling (another lane's cargo test was competing for the laptop CPU); that is a transport cap, not a test failure. CI on the new head is the verification path: checks on8127030d85are QUEUED/pending in the fleet-wide runner backlog (polled ~5 min:basic: proxy port fallbacks+basic: scripts-testpending, CodeRabbit skipping, the id-check matrix not yet reported).Resume condition
When PR #6367's checks on head
8127030d85complete: verify test-unit + cargo-check pass (the fmt/clippy failures on the original head7d5d64f9were pre-existing — compare, do not attribute), then release issue #6628 outcome=done with the PR #6367 link. Do not merge PR #6367 until sibling #6629 also lands on the branch (lane code-s's condition for #6627 applies to the shared PR). Per fallback §5 this shift ends without releasing; the claim goes stale 30 minutes after the park heartbeat and the issue returns to the pool.developing-today commentedon Nov 7, 2026
Progress from
repo-worker-code-o: parked on CI: fix commit 8127030 pushed to PR #6367 branch (validate_and_stage returns IdAlreadyFailed + acceptance test); checks on 8127030 queued in runner backlog. Resume: when PR #6367 checks on 8127030 complete, verify test-unit+cargo-check pass (fmt/clippy failures on old head 7d5d64f pre-existing), then release #6628 done; do not merge PR #6367 until sibling #6629 landsdezren39 commentedon Nov 7, 2026
Picked up by
repo-worker-code-r— 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-rposts progress markers; after 30 minutes of silence any other worker may pick this up.)dezren39 commentedon Nov 7, 2026
Progress from
repo-worker-code-r: claimed: verifying code-o fix commit 8127030 on PR 6367 branch (diff + targeted currency_poc tests); PR merge itself belongs to #6627/#6150dezren39 commentedon Nov 7, 2026
lane-scratch: code-r /tmp/lane-code-r-20261106-2209 task fb-6628
🤖 Agent note · done
validate_and_stageinpkgs/id/src/currency_poc/ledger.rsto returnTransferError::IdAlreadyFailedfor any resubmitted ID infailed_transfers(stored error kept for diagnosis, stale comment corrected) and adds the acceptance test inpkgs/id/src/currency_poc/tests.rs(fail withDebitAccountNotFound, create/fund the accounts, resubmission still returnsIdAlreadyFailed, nothing posts). Targeted tests run on the laptop in worktree fb-6627-pr6367:cargo test --manifest-path pkgs/id/Cargo.toml --lib currency_poc— 51 passed, 0 failed. (A full-suite attempt first hit a laptop disk-full linker failure — /home at 100%, fleet worktree target dirs — not a code failure; the lib suite then passed. Disk state noted in the shift handoff.)dezren39 commentedon Nov 7, 2026
Released by
repo-worker-code-r(outcome: done). fixed in PR #6367 commit 8127030 (validate_and_stage returns IdAlreadyFailed for resubmitted failed IDs + acceptance test); verified by lane code-r: cargo test --lib currency_poc 51 passed 0 failed on laptop; source CodeRabbit thread not replied per issue rules; issue closed completed. PR #6367 merge remains #6627/#6150 scope; #6629 test still separate.