FEAT: Shared sending core - #2804
Merged
Roman Lutz (romanlutz) merged 6 commits intoSep 25, 2026
Merged
Roman Lutz (romanlutz) merged 6 commits into
Roman Lutz (romanlutz) merged 6 commits into
Conversation
Move the existing preparation, converter, dispatch and metadata helpers with their tests. Keep AttackService as the synchronous response facade. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Share FIFO admission and execution limits across manual sends and store-only appends. Preserve normalizer persistence, join memory writes on cancellation, and merge current converter metadata under the exclusive send slot. Keep the existing synchronous API with explicit 409 and 429 admission responses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Retain upstream converter provenance and media persistence behavior in the extracted sender, and relocate the matching tests with it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Serialize complete metadata updates per attack without serializing provider calls. Keep the metadata guard through cancellation cleanup and use CentralMemory consistently across the facade, sender, and normalizer. Add real-memory race and shared-memory regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Richard Lundeen (richlundeen)
approved these changes
Sep 24, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Roman Lutz (romanlutz)
enabled auto-merge
September 25, 2026 05:27
Use existing target-level pacing instead of whole-send exclusion. Guard shared converter instances only during actual conversion through an optional PromptNormalizer context. Keep conversation reservations through synchronous response assembly and cover concurrency, cancellation, and error cleanup with regression tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Implements phase 2 only of the approved n-send split plan, building on the atomic conversation branching merged in #2740.
MessageSendService.AttackServiceremains a thin synchronous response adapter, andPromptNormalizerretains conversion and request/response persistence responsibilities.send=falsewrites. Conflicting conversation use returns 409; full admission returns 429. Failures and cancellation release ownership, with offloaded writes joined before release.CentralMemoryconsistently across the facade, sender, and normalizer rather than permitting a sender-only memory override that could split persistence across stores.POST /api/attacks/{id}/messagesstill waits for execution and returns the existing attack/conversation response shape. Store-only context roles, stored-error status, multipart ordering and lineage, preconverted-piece filtering, legacy converter inputs, response conversion, and target validation are preserved. Main-branch merges preserve converter-stage provenance, independent original/converted-media persistence, and the newer normalizer behavior.No asynchronous submission/status API, batch/count/repetition support, background registry, frontend changes, schema migrations, or dependency changes are included in the PR diff.
Reviewability and line accounting: the behavior-preserving extraction is isolated in
ce95635b1(+2,015/-1,920 across five files), before scheduler behavior inf3041476a.5788d18abfixes metadata ordering and memory ownership. The latest update merges main at005a8d836in5d6a89c, then addresses the two inline review comments in8572f1c88(+483/-124 across nine files).The complete PR touches 12 files, +4,068/-2,491 against that main baseline. This is not a claim of a line-count reduction or 4,068 lines of new implementation.
Relocation counts compare paired function ranges against the merged-main baseline, normalizing indentation and test-owner names. Remaining lines include new coordination and regressions as well as imports, class headers, fixtures, adapter wiring, and edits to existing code; they are not all new production logic. Existing sending tests move with their owner instead of being duplicated in the facade suite.
Tests and Documentation
ty check pyrit, and commit hooks pass.