Skip to content

FIX: Preserve iterative image state in Crescendo#2188

Merged
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-investigate-modality-feedback
Jul 15, 2026
Merged

FIX: Preserve iterative image state in Crescendo#2188
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-investigate-modality-feedback

Conversation

@romanlutz

@romanlutz romanlutz commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Fix Crescendo modality feedback so original seed media is attached only until the first accepted live response. Later turns now edit the last accepted generated image, including after refusals and backtracking, while concrete one-shot prompts are not replayed indefinitely.

This also distinguishes an unset next_message override from an explicitly cleared one, exposes the actual per-turn input mode to the adversarial prompt using the same turn-aware routing as objective message construction, moves gradual image disclosure into the shared image-generation prompt, and refreshes the modality-feedback notebook with a live three-turn run.

The executed notebook demonstrates:

  1. Turn 1 receives both original seed images with input_mode=seed_media.
  2. Turn 2 receives only Turn 1's generated image.
  3. Turn 3 receives only Turn 2's generated image.

Tests and Documentation

  • Added regression coverage for explicit next_message=None, copied contexts, concrete and placeholder seed retries, prepended history, last-accepted-image routing, turn-aware input modes, and exhausted backtrack limits.
  • Ran Ruff formatting and lint checks across the changed attack and documentation surfaces.
  • Ran 661 unit tests across attack core, components, and multi-turn strategies on the current PR head.
  • Executed 8_modality_feedback.ipynb live, normalized it with repository hooks, and verified strict Jupytext round trips with its paired Python source.

Consume seed media only after an accepted live response, route retries from the last accepted image, and distinguish cleared next-message overrides from unset values.

Move gradual image disclosure into the shared Crescendo prompt and refresh the modality-feedback notebook with a live iterative run.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 28a92a08-f250-435a-b5c3-0715fe214cc9
@rlundeen2 rlundeen2 self-assigned this Jul 14, 2026
Comment thread pyrit/executor/attack/multi_turn/crescendo.py Outdated
Comment thread pyrit/executor/attack/multi_turn/crescendo.py Outdated
Copilot AI added 2 commits July 14, 2026 20:42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rack

Address review feedback: reuse the existing factory instead of
hand-constructing the placeholder MessagePiece, so there is a single
source of truth for what a placeholder looks like.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@romanlutz romanlutz added this pull request to the merge queue Jul 15, 2026
Merged via the queue into microsoft:main with commit 158a748 Jul 15, 2026
53 checks passed
@romanlutz romanlutz deleted the romanlutz-investigate-modality-feedback branch July 15, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants