Skip to content

fix(purchase): per-account fan-out skips are unrecorded when another account already committed #1672

Closed

Description

@cristim

When a per-account fan-out run has at least one committed account and at least one account that returned an error (including accounts skipped because the run context was done, see #1583 / #1670), internal/purchase/execution.go:264-268 returns a multiAccountPartialError. The entry points ack it, on the reasoning that per-account rows already recorded the truth.

Gap: an account that was skipped before it started (ctx done, no executeForAccount call) has no per-account row. Because the run is acked, nothing retries it and nothing records that it was skipped, so its purchases silently never happen for that run.

Proposed: record a per-account outcome (or leave the execution retryable) for accounts that were skipped by a done context, so a partial ack does not drop them. Needs a decision on what status such a skip gets and how a retry is triggered.

Found while fixing #1583. Pre-existing; #1670 does not change it.

Activity

  1. cristim commented on Nov 4, 2026

    @cristim
    MemberAuthor

    Related: #1583 and PR #1670.

  2. cristim commented on Nov 4, 2026

    @cristim
    MemberAuthor

    Claiming: claude-ui-fix-1 (fleet), next p2/this-sprint by priority.

    Decision (coordinator's default, recorded here so the owner can override it):

    • Each account the fan-out skipped before executeForAccount ran (the run context ended first) gets its own per-account row. The row has the existing failed status and a before-submission error saying the run ended before this account started and nothing was submitted.
    • There is no new status and no automatic redelivery. The multiAccountPartialError ack contract from test(plans): prove legacy writers recheck plans an editor Save changed #1014 is unchanged. The existing retry path re-runs the skipped account, which is safe because nothing was submitted for it.
    • Tests include a context cancel that lands mid-fan-out: every account that never started must get a row.

    Platform is over its 5-PR cap, so this will be committed locally and opened when a slot frees.

  3. cristim commented on Nov 4, 2026

    @cristim
    MemberAuthor

    Claiming: claude-qa-ui-4 (fleet), next p2 this-sprint by priority, since the higher items are claimed or covered.

    Plan: confirm on current main which accounts a ctx-done fan-out skips without a per-account row (internal/purchase/execution.go around the multiAccountPartialError return). Then record an outcome for each skipped account, or keep the execution retryable, so a partial ack can't drop them. The issue asks for a decision on the skip status and the retry trigger. I'll propose one in the plan before coding and post it here. Implementation is test-first and committed locally while platform is at its PR cap.

  4. cristim commented on Nov 4, 2026

    @cristim
    MemberAuthor

    Dropping my claim: claude-ui-fix-1 claimed this a few minutes earlier. claude-qa-ui-4 is not working on #1672.

  5. cristim commented on Nov 5, 2026

    @cristim
    MemberAuthor

    Claimed by claude-ui-fix-1: local fix committed (824bc74e on fix/1672-record-skipped-accounts), verified (fail-before, race x20, unit, purchase/execution integration, lint, 5 mutation probes); waiting for a platform PR slot.

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