Skip to content

FIX Preserve TAP score and response lineage - #2450

Merged
Roman Lutz (romanlutz) merged 4 commits into
microsoft:mainfrom
romanlutz:romanlutz-daily-audit-2026-08-21
Aug 22, 2026
Merged

FIX Preserve TAP score and response lineage#2450
Roman Lutz (romanlutz) merged 4 commits into
microsoft:mainfrom
romanlutz:romanlutz-daily-audit-2026-08-21

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

TAP can reuse surviving nodes across depths. If a later scorer fails, stale per-turn state could leave an earlier score attached to the node while result construction returned the conversation's later, unscored response. This made the reported response and score describe different turns.

This change resets outcome state before each reused-node execution, rejects empty objective-score results, and excludes failed reused nodes from pruning. Result construction now resolves the assistant response identified by the selected score, including original_prompt_id lineage used by duplicated TAP branches, instead of blindly returning the final conversation message.

The updated docstrings clarify that TAP selects the highest-scoring eligible node on the current frontier, retains the prior valid selection if a later frontier fails completely, and then resolves that already-selected score to its exact response.

Tests and Documentation

Added regression coverage for later scorer failures, empty objective-score results, pruning failed reused nodes, terminal score-response identity, and duplicated-conversation lineage.

Validated the multi-turn attack suite (372 passed), affected scenario tests (101 passed), Ruff, type checking, commit hooks, and git diff --check. JupyText was not applicable.

Copilot AI added 3 commits August 21, 2026 01:34
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 46481822-e245-4210-bff5-eb1ba1fc0e9b
@hannahwestra25 hannahwestra25 self-assigned this Aug 21, 2026
Comment thread pyrit/executor/attack/multi_turn/tree_of_attacks.py
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 46481822-e245-4210-bff5-eb1ba1fc0e9b
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Aug 22, 2026
Merged via the queue into microsoft:main with commit 9c8953c Aug 22, 2026
54 checks passed
@romanlutz
Roman Lutz (romanlutz) deleted the romanlutz-daily-audit-2026-08-21 branch August 22, 2026 02:08
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