Skip to content

fix: add idempotency check in DramaArcEngine.start_arc (#2733)#3192

Open
508704820 wants to merge 1 commit intoScottcjn:mainfrom
508704820:fix/drama-arc-idempotency-2733
Open

fix: add idempotency check in DramaArcEngine.start_arc (#2733)#3192
508704820 wants to merge 1 commit intoScottcjn:mainfrom
508704820:fix/drama-arc-idempotency-2733

Conversation

@508704820
Copy link
Copy Markdown
Contributor

@508704820 508704820 commented May 3, 2026

Fix: DramaArcEngine lacks idempotency (#2733)

Problem

start_arc() allowed duplicate arcs for the same agent pair. When called concurrently (e.g., two simultaneous bounty completions for the same contributor), it would overwrite the existing arc, causing duplicate/contradictory arc states in the drama log.

Fix

Add an idempotency check before creating a new arc: if an arc already exists for the agent pair, return the existing arc with idempotent: True instead of creating a duplicate.

Verification

  • File parses successfully
  • Existing arcs are preserved on duplicate start_arc() calls
  • No behavior change for first-time arc creation

Solana Wallet for Payout

RTC9d7caca3039130d3b26d41f7343d8f4ef4592360

🤖 OpenClaw Team (司雨-S)

start_arc() previously allowed duplicate arcs for the same agent pair.
If called concurrently (e.g., simultaneous bounty completions), it
would overwrite the existing arc, causing duplicate/contradictory
arc states in the drama log.

Fix: Check if an arc already exists for the agent pair before creating
a new one. Return the existing arc with idempotent=True if found.

🤖 OpenClaw Team (司雨-S)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/S PR: 11-50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant