Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 17, 2025

PyRIT 0.10.0 removed DuckDB support, making SQLite the only memory backend. This adds planning documentation for FoundryScenario integration that reflects this breaking change.

Files Added

  • spec.md: Technical specification for FoundryScenario integration

    • Version header targeting PyRIT 0.10.0
    • Concise SQLite-only implementation section (15 lines vs previous 50+ line comparison)
    • Breaking change alert for Phase 1 implementation
    • Code examples using initialize_pyrit(memory_db_type=SQLITE)
  • progress.md: Progress tracker and design decisions

    • Design decisions table clarifying SQLite as only option
    • Breaking change blocker documenting required migration in _red_team.py line 222
    • Implementation roadmap and risk assessment

Breaking Change Documented

Current code uses initialize_pyrit(memory_db_type=DUCK_DB) which no longer exists:

# Current (broken in PyRIT 0.10.0+)
from pyrit.common import initialize_pyrit, DUCK_DB
initialize_pyrit(memory_db_type=DUCK_DB)

# Required migration
from pyrit.common import initialize_pyrit, SQLITE
db_path = os.path.join(self.output_dir, "pyrit_memory.db")
initialize_pyrit(memory_db_type=SQLITE, memory_db_path=db_path)

This is documentation-only; code changes will be addressed in Phase 1 implementation.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • scanning-api.github.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Update spec.md and progress.md: Concise SQLite section reflecting PyRIT 0.10.0

Update both documentation files to reflect that DuckDB was removed in PyRIT 0.10.0 and simplify the SQLite justification section.

Changes Required

1. Update spec.md Header

Add version clarity at the top:

# PyRIT FoundryScenario Integration - Technical Specification v2.0

**Last Updated:** 2025-12-17  
**Status:** Planning Complete  
**Owner:** Azure AI Evaluation Team  
**Target PyRIT Version:** 0.10.0

> **Note:** This specification targets PyRIT 0.10.0, which removed DuckDB support. SQLite is now the only supported memory backend.

2. Replace "Why SQLite for PyRIT Memory?" Section

Current: Long comparison section (50+ lines) justifying SQLite over DuckDB

Replace with this concise section:

## PyRIT Memory: SQLite (v0.10.0+)

**PyRIT 0.10.0 removed DuckDB support.** SQLite is now the only supported memory backend.

### Implementation

```python
from pyrit.common import initialize_pyrit, SQLITE

# In RedTeam.__init__() or ScenarioManager.__init__()
db_path = os.path.join(self.output_dir, "pyrit_memory.db")
initialize_pyrit(memory_db_type=SQLITE, memory_db_path=db_path)

Memory Retrieval

When retrieving results from PyRIT memory:

from pyrit.memory import CentralMemory

# CentralMemory uses the SQLite backend configured during initialization
memory = CentralMemory.get_memory_instance()

# Query by labels (stored in SQLite)
message_pieces = memory.get_message_pieces(
    labels={"risk_category": risk_category.value}
)

Note: CentralMemory.get_memory_instance() returns the singleton instance that uses the SQLite backend configured during initialize_pyrit().


#### 3. Update progress.md Design Decisions

Update the table in progress.md:

**Before:**
```markdown
| Use SQLite over DuckDB | Production-ready, ACID guarantees, PyRIT best practice | 2025-12-17 |

After:

| Use SQLite memory | Only option in PyRIT 0.10.0+ (DuckDB removed) | 2025-12-17 |

4. Update Breaking Change Note in progress.md

Add to "Current Blockers/Challenges" section:

4. **Breaking Change in PyRIT 0.10.0:**
   - **Issue:** Current code uses `initialize_pyrit(memory_db_type=DUCK_DB)` which no longer exists
   - **Location:** `_red_team.py` line ~234
   - **Fix Required:** Change to `initialize_pyrit(memory_db_type=SQLITE, memory_db_path=db_path)`
   - **Impact:** High - must be addressed before Phase 1 implementation

5. Update Migration Strategy in spec.md

Add note in Phase 1 section about the breaking change:

### ⬜ Phase 1: Implementation (Week 1-2)

**Breaking Change Alert:** Current `_red_team.py` uses `initialize_pyrit(memory_db_type=DUCK_DB)` which was removed in PyRIT 0.10.0. Must update to SQLite before implementing FoundryScenario.

**Core Files to Create:**
...

Success Criteria

  1. ✅ Removed 50+ line SQLite vs DuckDB comparison
  2. ✅ Replaced with concise 15-line "SQLite only" section
  3. ✅ Added version note at top of spec.md
  4. ✅ Updated design decisions table in progress.md
  5. ✅ Added breaking change note in blockers section
  6. ✅ All references to "choosing SQLite" replaced with "using SQLite (only option)"

Files to Update

  • sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/spec.md
  • sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/progress.md

Notes

  • This is a documentation-only update (no code changes)
  • Reflects accurate state of PyRIT 0.10.0 (DuckDB removed)
  • Makes specification more concise and focused
  • Identifies breaking change in current codebase that must be fixed

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: slister1001 <103153180+slister1001@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation for PyRIT 0.10.0 removal of DuckDB Add PyRIT 0.10.0 SQLite migration documentation for FoundryScenario integration Dec 17, 2025
Copilot AI requested a review from slister1001 December 17, 2025 21:23
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.

2 participants