FIX Atomic branch persistence - #2740
Merged
Roman Lutz (romanlutz) merged 4 commits intoSep 23, 2026
Merged
Roman Lutz (romanlutz) merged 4 commits into
Roman Lutz (romanlutz) merged 4 commits into
Conversation
Persist prepared histories, conversation metadata, identifiers, and attack membership in one transaction. Serialize branching and promotion with a portable parent-row UPDATE guard, and integrate existing create/promote operations without changing the send path. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve a missing source conversation's target from its attack before atomically persisting an empty branch. Compare registered target identifiers by canonical identity so version-only differences do not reject nested copies, while real target changes remain conflicts. Add real-memory regressions for first sends after empty branching and nested branching across PyRIT versions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adrian Gavrila (adrian-gavrila)
left a comment
Contributor
There was a problem hiding this comment.
Looks great!
Roman Lutz (romanlutz)
enabled auto-merge
September 23, 2026 02:23
Adrian Gavrila (adrian-gavrila)
approved these changes
Sep 23, 2026
Preserve the branching regression import alongside main's shared-pagination test imports. Keep both test suites and the existing atomic branching changes intact. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Roman Lutz (romanlutz)
deleted the
romanlutz-n-send-phase-1-branching
branch
September 23, 2026 17:06
Spencer Schoenberg (spencrr)
approved these changes
Sep 24, 2026
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.
Description
Branch creation previously persisted copied history separately from attack membership. A failure could leave orphaned copies, and concurrent branch additions or promotion could overwrite conversation references. This makes those operations atomic as phase 1 of the n-send split plan.
UPDATEbefore reading membership. This avoids relying onSELECT FOR UPDATE, which does not provide the required protection on SQLite.original_prompt_idlineage.Scope: two implementation files and two test files. Existing single-send code and fixtures are unchanged. No sending API, scheduler, asynchronous/repeat-send infrastructure, frontend, schema migration, or dependency changes are included.
Tests and Documentation
MockPromptTarget, with no remote model calls.JupyText: N/A, no notebooks changed.