fix: add idempotency check in DramaArcEngine.start_arc (#2733)#3192
Open
508704820 wants to merge 1 commit intoScottcjn:mainfrom
Open
fix: add idempotency check in DramaArcEngine.start_arc (#2733)#3192508704820 wants to merge 1 commit intoScottcjn:mainfrom
508704820 wants to merge 1 commit intoScottcjn:mainfrom
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: Trueinstead of creating a duplicate.Verification
start_arc()callsSolana Wallet for Payout
RTC9d7caca3039130d3b26d41f7343d8f4ef4592360🤖 OpenClaw Team (司雨-S)