Repository navigation
Description
Is your feature request related to a problem? Please describe.
PyRIT now requires Python >=3.11 (currently <3.15), and Ruff targets py311. We can use Python 3.11 features consistently across supported versions, simplify older compatibility patterns, and improve typing, diagnostics, and async lifecycle management. Some features are already partially adopted; the opportunities below are investigations, not instructions to replace every existing pattern.
Describe the solution you'd like
How to participate: ONE opportunity at a time
2026-11-20 restructuring: the remaining open items now live in dedicated issues — #4504 (P311-01,
typing.Self), #4505 (P311-02,TypedDict), #4506 (P311-03,assert_never), #4507 (P311-11, gather cleanup), #4508 (P311-17,StrEnum), #4509 (P311-22,get_prompt_scoresbatching fix) — each with a maintainer-side scope assessment and candidate inventory. Claim and contribute on the dedicated issue (claim by comment first; the first commenter may open a PR). This tracker is the frozen historical record: the claim tables and deadlines below are no longer updated, and P311-07, P311-12, P311-23 and P311-24 are closed as no-change after maintainer-side sweeps (comments below).
Claim exactly ONE checklist item at a time by commenting on this issue thread with its ID (for example, P311-01) and a short description of what you intend to investigate. Do not start multiple items or claim a bundle. Wait for confirmation here before treating the item as reserved. Claims are processed in comment order, and this issue is checked approximately every three hours.
- You must open a PR within five days (120 hours) of your claim comment. The table below records the due date. If no PR is opened by then, the claim expires, the item becomes available, and your issue assignment is removed if you have no other active contribution on this issue. You can claim it again if it is still available.
- Opening a PR within the deadline retains your claim while that PR is active. You cannot claim another item until your current PR is merged or the current contribution is explicitly released/closed.
- Link this issue and the item ID in your PR description. Keep the PR focused on that one opportunity. Follow repository instructions and add relevant behavior/type-checking coverage.
- Investigate first. Preserve public contracts and intended behavior. If a feature is not a good fit, explain why on this thread rather than forcing a change. An investigation can conclude that no code change is appropriate.
- A PR opened without a prior claim will be highlighted to Roman Lutz (@romanlutz). If the item is unclaimed, we can link the PR and assign the item to its author. If someone else has already claimed it or another PR overlaps, Roman Lutz (@romanlutz) will assess how to proceed; no existing claim will be displaced automatically.
- Checkboxes mean completed, not claimed. Check an item only after its PR is merged, or after a maintainer explicitly accepts a no-change investigation. Ownership and PR links are tracked separately below.
Opportunity checklist
Typing
- P311-01: Extend
typing.Selfadoption. Investigate older same-concrete-class factories and fluent APIs, such aspyrit/common/yaml_loadable.py:YamlLoadable.from_yaml_file. Replace bound-TypeVar boilerplate only where it really modelsSelf; retain independent generic parameters. Merged scope: #3194 covers YAML/seed and scorer-metrics loaders, strategy-context copying, and technique collections, with type-regression coverage. Additional merged scope: #3201 covers the threeMessagefactories andAtomicAttackIdentifier.build, including subclass type-regression tests. Additional merged scope: #3266 coversSeedDataset.from_dict,MessageScorable.from_message, andContentScorable.from_message, with subclass runtime andassert_typecoverage and unchanged validation. Additional merged scope: #3383 coversAttackTechniqueSeedGroup.from_system_promptandfrom_messages, with unchangedclsconstruction/validation and subclass runtime/assert_typecoverage. Additional merged scope: #3411 coversMessagePiece.adversarial_placeholderwith unchangedclsconstruction and subclass runtime/assert_typecoverage. Additional merged scope: #3470 coversTagQuery.all,any_of, andnone_of, with subclass runtime/assert_typecoverage and unchanged predicates/validation. Additional merged scope: #3520 coversScenarioRunSizeEstimate.unavailable, preservingclsconstruction, unavailable status, defaults, dataset/limit handling and validation, with subclass runtime/assert_typeand input/default coverage. Additional merged scope: #3529 coversHarmDefinition.from_yaml, with subclass runtime/assert_typecoverage and unchanged YAML loading, path resolution, field conversion, source-path recording and validation. Additional merged scope: #3577 annotatesJsonResponseConfig.from_metadatawithSelfand adds subclass runtime/assert_typecoverage; the factory runtime body, schema parsing, defaults, validation and metadata round trips are unchanged. Additional merged scope: #3626 annotatesWebSearchConfig.from_metadatawithSelf, with subclass runtime/assert_typecoverage of absent and explicit policies. Construction, read-onlyMappinginputs, default/disabled/required modes, frozen/extra-forbid validation, errors, non-mutation and metadata/JSON round trips are unchanged. Additional merged scope: #3779 annotatesAdversarialPrompts.from_metadatawithSelf | Noneand adds base/subclass runtime andassert_typechecks, absent-association cases, read-only mapping, non-mutation, JSON round-trip and validation coverage. The factory body and seed semantics are unchanged. Additional merged scope: #3823 annotatesAttackResultMetadata.from_metadatawithSelfand adds subclass runtime/assert_typecoverage. Its factory body, defaults, unknown-role fallback, invalid-position handling and parent-linkage separation are unchanged. Additional merged scope: #3884 annotatesTokenUsage.from_metadatawithSelf | Noneand checks subclass construction and static optional narrowing. Its factory body, absent-metadataNone, counter filtering, extra counters and metadata round trips are unchanged. Additional merged scope: #3897 annotatesRequestTraceContext.from_metadatawithSelf | Noneand checks subclass construction, optional narrowing, absent metadata and input non-mutation. Its runtime factory body, trace validation and metadata semantics are unchanged. Further merged contribution: #3992 completes subclass-preservingSelf | Nonetyping forToolExecutionMetadata.from_metadata; runtime factory behavior is unchanged, with focused subclass/type and non-mutation coverage. Additional merged scope: #3999 annotatesSeedIdentifier.from_seedwithSelfand adds base/subclass runtime andassert_typecoverage. The final merged factory still delegates tocls.of(...); its executable body, behavioral parameter projection, hashes, promoted fields and serialization are unchanged. Additional merged scope: #4064 annotatesGCGDataConfig.from_json/from_json_fileandGCGConfig.from_json/from_json_file/_from_dictinpyrit/executor/promptgen/gcg/config.pywithSelf, with subclass runtime andassert_typecoverage for JSON and file entry points. The existingclsconstruction, parsing, validation, defaults, nested configuration types and errors are unchanged. Slai.life (@huong8373tt-beep)'s reservation is released. No further focused case is identified here; propose a concrete subclass-preserving factory or fluent-API gap before claiming more work. The broad opportunity remains unchecked pending maintainer acceptance. Preserve fixed-baseTagQuery.__and__/__or__andComponentIdentifier.with_eval_hash, independent generics and factories such asSeedPrompt.from_value_with_required_parametersthat can return an existing base input. → Broken out to MAINT: remaining typing.Self adoption — inventory and split plan (P311-01, from #3166) #4504; claim and contribute there, not here. - P311-02: Improve dictionary contracts with
TypedDict,Required, andNotRequired. Investigate internal metadata/provider payloads currently typed asdict[str, Any]. Distinguish absent keys from nullable values.RawAnalyticsProfilealready provides prior art. Do not replace Pydantic runtime validation. Merged scope: #4106 types the Docker build-info payload inpyrit/backend/routes/version.pywithBuildInfo:source,commit,modifiedanddisplayareNotRequired, andcommitalso permits explicitNonefrom PyPI/no-commit Docker builds. JSON loading, warning fallback and absent-displaypackage-version fallback remain unchanged; tests pin optional-key annotations and nullable-commit route behavior. B Sainath Reddy (@Sainath-Reddy7)'s reservation is released. No further focused case is identified here; propose a concrete metadata/provider dictionary with stable keys and a meaningful absent-versus-nullable contract before claiming more work. The broad opportunity remains unchecked pending maintainer acceptance. → Broken out to MAINT: remaining TypedDict contracts for stable-key internal payloads (P311-02, from #3166) #4505; claim and contribute there, not here. - P311-03: Add exhaustive dispatch checks with
assert_never/Never. Investigate closed enum/union dispatch for outcomes, states, modalities, or capabilities so added cases surface during type checking. Apply only where handling is genuinely exhaustive, not to intentionally open extension points. Merged scope: #3441 makesAttackStrategy._log_attack_outcomeexhaustive acrossAttackOutcome, preserving existing log messages and rejecting unknown values. Additional merged scope: #3456 explicitly handlesScenarioResultView.CONVERSATIONSand guards both CLI dispatchers withassert_never, preserving HTML full-report override, default view, limits and lazy imports. Additional merged scope: #3472 makesAttackResultAnalytics._optionexhaustive for all fourAttackAnalyticsValueKindmembers, preserving display labels and stored keys, with an actual-source enum-extension type regression. Additional merged scope: #3504 explicitly handles all threePuzzleTypemembers inPuzzledConverter.convert_asyncand adds anassert_neverguard with a runtime regression. Constructor validation, crossword fallback, RNG behavior, Unicode handling, clues and output are preserved. Additional merged scope: #3601 covers all fiveCodeAttackConverter._encodeencodings with a type-onlyassert_neverguard, preserving the runtime invalid-stateValueError, constructor validation, template pairing and output. Per-encoding, invalid-state and actual-source type checks cover the change. Additional merged scope: #3654 adds an exhaustiveassert_neverguard for the validatedRepeatTokenConvertermode dispatch, preserving its string-Literal API,Nonedefaulting tosplit, validation errors/messages, punctuation, spacing, output and identifiers. The unreachable fallback uses the existing coverage exclusion pattern; changed-line coverage passed at 100%. Additional merged scope: #3797 makesPromptShieldTarget._input_parserexhaustive for its three declared Literal values with aTYPE_CHECKING-onlyassert_never. Shared parsing preserves forced-field early returns,Noneand unknown-runtime-field fallback, and trailing document text; a regression covers the fallback. Additional merged scope: #3830 makesHumanLabeledDataset.from_csventry construction exhaustive forMetricsType.HARMandMetricsType.OBJECTIVE, with a type-onlyassert_never. CSV parsing, validation and the unknown-runtime-value objective fallback are preserved. Additional merged scope: #3924 makesScorerEvaluator.from_scorerconstructor selection exhaustive for bothMetricsTypemembers with a type-only guard. Omitted-type inference, explicit overrides and the historical unknown-runtime-value harm fallback are preserved. The final merged tests include the actual factory source checked against current and extended enums, addressing the coverage gap. Additional merged scope: #3998 makesTargetConfiguration.ensure_can_handleexhaustive forUnsupportedCapabilityBehaviorRAISE/ADAPTwith a type-only guard. Native-support and configured-normalizer early returns, missing-policy handling, error messages and the historical runtime fallback are preserved. The final tests check the actual method source against current and extended enums for Python 3.11/3.12, so removing the guard is detected. B Sainath Reddy (@Sainath-Reddy7)'s reservation is released. Additional merged scope: #4045 makesScorerEvaluator.run_evaluation_asyncexhaustive for all threeRegistryUpdateBehaviormembers with a type-only guard. Existing cache-reuse and registry-write policies, including the historical out-of-enum runtime fallback, are preserved. The final tests check the actual evaluator source against current and extended enums and require a failure at this dispatch'sassert_never. Lanre Shittu (@Shizoqua)'s reservation is released. No further concrete case is identified here; propose a genuinely closed dispatch gap before claiming more work. The broad opportunity remains unchecked. Keep open string, custom-callable and provider-extension dispatch unchanged. → Broken out to MAINT: remaining assert_never exhaustive-dispatch guards — inventory and batches (P311-03, from #3166) #4506; claim and contribute there, not here. - P311-04: Add type-regression checks with
assert_type. Investigate registry factories, generic results, decorators, and subclass-returning APIs. Ensure checks run through the type checker;assert_typeis not a runtime assertion. Additional merged scope: #3625 addsassert_type(results, list[int])forgather_with_cleanup_asyncand checks ordered values intests/unit/test_async_utils.py. The canonicalmake tycheckstests/unit; the generic helper, public signature and cancellation/cleanup behavior are unchanged. Additional merged scope: #3686 adds concrete and protocol-consumerassert_typechecks forDefaultInstanceRegistry[T].get,get_entryandget_all_instances, retainingT | None,RegistryEntry[T] | Noneandlist[RegistryEntry[T]]. Present/missing retrieval, identity and sorted order are checked; the protocol consumer uses a helper parameter to avoid concrete assignment narrowing. Production signatures and runtime behavior are unchanged. Additional merged scope: #3770 adds fourassert_typechecks for the raw singleton-factory results ofSlowConstructingRegistryandOtherSlowConstructingRegistrybefore runtime narrowing. Identity, subclass isolation, synchronization, timeouts and cleanup are preserved; production signatures and behavior are unchanged. Assessment: sufficiently addressed for this selective opportunity. Existing CI-checked coverage now protects generic gather results, concrete and protocol instance-registry retrieval, and subclass-returning factories including this singleton case. Controlled annotation regressions fail these checks. The bounded assessment found no additional worthwhile typing case to prescribe; this is not an exhaustive audit or a requirement to add assertions to every registry/generic API. The separate backend timing-test change in TEST: Assert Registry.get_registry_singleton return types (P311-04) #3770 is CI-reliability work, not P311-04 scope. Its traversal-oracle caveat does not reopen the completed typing case. - P311-05: Investigate
LiteralStringat static-template boundaries. Consider developer-authored SQL or command templates where the type checker can enforce the distinction. Confirm checker support. This is not runtime sanitization and never replaces parameterized SQL. Investigation report: Slai.life (@huong8373tt-beep) submitted a bounded no-change report on SQL/command static-template boundaries and checker enforcement. The contributor withdrew the reservation. ✅ Accepted as no-change by the maintainer on 2026-11-18 (acceptance with checker-claim correction): ty does flagstr→LiteralStringin production code, so the no-change stands on the structural findings alone. - P311-06: Investigate
TypeVarTuple/Unpackfor variadic types. Look for a concrete heterogeneous-tuple or numerical/multimodal API that benefits. Do not add variadic complexity without a real need or assume this automatically checks NumPy shapes. Features standardized after 3.11 still need compatible backports. Investigation report: Slai.life (@huong8373tt-beep) submitted a bounded no-change report on heterogeneous tuple/multimodal variadic contracts. The contributor withdrew the reservation. ✅ Accepted as no-change by the maintainer on 2026-11-18 (acceptance). - P311-07: Investigate generic
TypedDict/NamedTuplecontainers. Identify payload containers whose content type should be parameterized. GenericTypedDictin analytics result analysis provides existing prior art. Merged focused scope: #4053 parameterizesTechniqueTokenResolutionandresolve_technique_tokensinpyrit/scenario/core/technique_tokens.pyby the concrete scenario technique enum, withassert_typeand runtime coverage. Resolution behavior and dataclass fields are unchanged. This is generic dataclass typing, not a new genericTypedDictorNamedTuple;TechniqueTokencontains only strings and needs no type parameter. Existingpyrit/analytics/result_analysis.py::_AnalysisResultremains genericTypedDictprior art. The contributor reservation is released. ✅ Closed as no-change on 2026-11-20 after a maintainer-side sweep (details): no remaining container has a justified payload-type relationship; remainingAny/objectfields are mixed-type by design.
Async execution and diagnostics
- P311-08: Enrich propagated exceptions with
BaseException.add_note. Add useful execution, technique, dataset, or conversation context while preserving exception types and tracebacks. Notes appear in formatted tracebacks, notstr(error). Exclude secrets and sensitive prompt content. Merged scope: #3175 adds dataset/provider notes to concurrent provider-fetch failures. Additional merged scope: #3277 adds scenario and atomic-attack names to caught worker-pool exceptions inScenario._execute_atomic_attacks_parallel_async, preserving the original exceptions and existing single/grouped failure behavior. Regression coverage checks grouped notes and single-failure identity. Additional merged scope: #3281 labels cached-backend and analytics close failures inclose_services_async, preserving the original exceptions, cancellation and single/grouped behavior. Additional merged scope: #3333 adds safe static phase notes for scenario-service shutdown and memory disposal inRuntimeLifecycle._shutdown_runtime_async. Existing notes, original exception identity/type, cleanup order, cancellation and single/grouped behavior remain intact. Additional merged scope: #3351 adds safe static session-release, active-client-stop and failed-startup-client-stop notes inGitHubCopilotTarget._cleanup_owned_resources_async, with regression coverage for phase labels and original errors. Complete: the identified dataset/provider, scenario-worker, backend service-close, runtime-shutdown and Copilot-cleanup context gaps are addressed. Current-code assessment found no further concrete, worthwhile propagation-context gap requiring another contribution for this item. Other examined groups already describe their operation or preserve ordered/chained causes; this is not a requirement to annotate every exception. Retain original exception identity/type/tracebacks, prior notes, cancellation, cleanup/retry ownership and single/grouped behavior; never add secrets or sensitive prompt content. - P311-09: Use scoped operation timeouts with
asyncio.timeout. Investigate multi-await operations that should share one timeout scope instead of restarting a timeout for every step. Existing analytics, objective-generation, observation, and A2A usage provides prior art. Preserve cancellation and cleanup behavior. Merged scope: #3205 gives each Copilot receive loop one overall budget across streamed messages, with separate handshake/response budgets and cancellation/cleanup coverage. Completed: #3239 givesWebSocketTarget._initialize_connection_asyncone separate receive budget across all discarded initial messages, with aggregate-budget and cancellation/connection-cleanup coverage. Initialization sends, restoration, and normal responses retain their separate scopes. Current timeout-site assessment found no further worthwhile shared-budget migration: remainingwait_forcalls bound individual operations, explicitly per-attempt probes, or already use a shared remaining deadline. Do not mechanically replace those calls. - P311-10: Propagate absolute deadlines with
asyncio.timeout_at. Investigate nested operations/retries that should share one monotonic-clock deadline. Distinguish operation deadlines from per-step timeouts and keep cleanup semantics explicit. Merged scope: #3610 bounds_run_invocation_asyncinpyrit/_code_execution/docker_client.pywithasyncio.timeout_at(deadline)during shielded Docker client startup and passes that same monotonic deadline into invocation handling. Capture and attached-client waiting already deducted elapsed time before this change; the new bound is startup. Startup-specific errors and cleanup ownership remain intact. Assessment: sufficiently addressed; no further worthwhile production migration was demonstrated in the inspected current timeout/retry surfaces. Existing A2A polling, WebSocket initialization, Copilot receive streaming and objective-generation execution already use shared scoped budgets, while QueryControl already computes one absolute deadline. Preserve independently bounded control commands and cancellation/container/workspace cleanup outside the expired invocation budget. The added test checks deadline wiring; behavioral expiry/cancellation regression coverage is an optional test follow-up, not an additional production migration or active reservation. - P311-11: Investigate structured concurrency with
asyncio.TaskGroup. Identify parent-scoped child tasks with appropriate fail-fast semantics. The message-send service already uses it. It is not a blanketgatherreplacement or a concurrency limiter: sibling cancellation and exception shapes differ. Preserve ordered results and the deliberate cancellation/cleanup behavior inpyrit/common/task_utils.py. Merged scope: #3959 covers_AnthropicModelWrittenEvalsDataset._fetch_dataset_async: ordered file fetches now use an awaited owned task containing a TaskGroup. First-error identity and caller cancellation are preserved, including the Python 3.11/3.12 internal-cancellation-count regression; failure and outer cancellation drain async siblings. File/cache writes already running in threads cannot be interrupted. Further merged scope: #3980 coversConverter._convert_token_regions_asyncusing the existinggather_with_cleanup_asynchelper, not a new TaskGroup migration. Failed or externally cancelled selected-region conversions drain async siblings while preserving result order, original errors and caller cancellation counts. File writes already running in threads remain non-interruptible. Víctor Fernández Ayllón (@vayllon301)'s reservation is released. No further focused case is identified here; propose a concrete remaining gap before claiming more work. The broad structured-concurrency opportunity remains unchecked pending maintainer acceptance. → Broken out to MAINT: fail-fast gather fan-outs should drain siblings via gather_with_cleanup_async (P311-11, from #3166) #4507; claim and contribute there, not here. - P311-12: Investigate
ExceptionGroup/except*handling. Preserve multiple failures and, where useful, handle matching subsets without losing other errors. Groups already exist in scenario execution and service shutdown. Carefully assess public exception contracts and cancellation (BaseExceptionGroup). Focused contribution merged: #3983 preserves shutdown errors and disposal for mixed groups, propagates live-apply cancellation groups, retains secondary Anthropic fetch failures as notes, and includes nested child failures and explicit causes in scenario diagnostics. Ordinary-error output and the original Anthropic exception contract remain unchanged, with focused regression coverage. Muhammad Waqar Anwar (@WaqarAnwar)'s reservation is released. ✅ Closed as no-change on 2026-11-20 after a maintainer-side sweep (details): all group-producing paths preserve failures; no reachable gap beyond the merged FIX: Preserve failures in exception group handling (P311-12) #3983 scope. - P311-13: Investigate explicit task context with
asyncio.create_task(..., context=...). Identify background operations that need selected tracing/execution ContextVars or a clean context. Default task creation already copies the current context; do not change it gratuitously. Investigation reported: @WaqarAnwar's findings report no current production bug and an execution-context carryover risk when a scheduled run fails in its own task rather than an attack worker. The report used a mock scenario and did not inspect every task creation call; this is not an independently verified production reproducer. A clean context for each scheduled run remains a proposed option, not a requirement. ✅ Accepted as a point-in-time no-change investigation by the maintainer on 2026-11-18 (acceptance; ContextVar census and preserve-on-exception behavior independently verified). - P311-14: Investigate
asyncio.Runnerfor synchronous entry points. Consider multiple top-level calls sharing one managed loop/context in a shell or lifecycle harness. This does not permit nested loops inside an already-running notebook event loop. Preserve resource and loop ownership. Investigation reported by Slai.life (@huong8373tt-beep) (reservation released): Report finds no justified Runner change in the one-shot scan/migration CLIs, persistent shell loop, synchronous embedding facade or platform-specific browser-authentication loop. ✅ Accepted as no-change by the maintainer on 2026-11-18 (acceptance; all four surfaces independently verified). No mechanical substitution is requested.
Standard-library simplifications
- P311-15: Parse project TOML with
tomllib. Investigate replacing the version-extraction regex inbuild_scripts/stamp_compatibility.pywith structured access toproject.version. Preserve validation/provenance behavior.tomllibreads TOML; it does not write it. Completed: #3208 replaces the version regex with structuredproject.versionparsing and covers table ordering, quoting, invalid metadata, and provenance errors. - P311-16: Simplify ISO timestamp parsing. Investigate removing trailing-
Zcompatibility rewrites, such as_RemoteDatasetLoader._parse_datetime, because 3.11 parses validZtimestamps directly. Preserve timezone and accepted-input contracts. Do not edit immutable historical Alembic revisions merely for cleanup. Completed: #3176 removes the active loader shim and preserves invalid/non-string fallback behavior. Post-merge search found no other actionable ISO-parsing compatibility shims inpyritorbuild_scripts; the remaining rewrite in historical migrationd7e9f1a3b5c6is intentionally immutable. - P311-17: Assess
enum.StrEnumfor appropriate enums. It is already used for harm categories and message-send models. Existingstr, Enummigrations can changestr(member)and formatting, and Ruff's automatic replacement is deliberately disabled. Focus on cases where string behavior is intended and compatibility is understood. Merged scope: #3850 migratesConversationRetryReasontoStrEnum.str()and formatting intentionally now returnjson_parsinginstead of the class-qualified name; members, equality/hash/repr, JSON, value lookup and theConversationRetrymodel remain compatible. Additional merged scope: #4126 migratesSeedOrigininpyrit/models/seeds/seed_origin.pytoStrEnum. String conversion/formatting intentionally return its existing values; all five values, repr, equality/hash, JSON/schema and persisted-seed reconstruction are preserved, with focused enum and raw-storage round-trip coverage. Goutham Mahesh (@GouthamMahesh)'s reservation is released. Remaining investigation candidate:ScenarioResultViewinpyrit/cli/_cli_args.pystill usesstr, Enumspecifically for argparse round trips. Check CLI help/choices, formatting and saved argument compatibility before proposing a migration; this is not a finding that conversion is safe or necessary. The broad item remains unchecked and available for a bounded investigation. Do not blanket-convert existing string enums. → Broken out to MAINT: StrEnum — fix the four observable cases; optional batch for the rest (P311-17, from #3166) #4508; claim and contribute there, not here. - P311-18: Investigate atomic regex groups and possessive quantifiers. Consider
(?>...),*+, or++in a concrete scorer/parser pattern with unnecessary backtracking on large model outputs. Measure behavior and performance; these constructs change matching semantics and are not a universal regex-safety fix. Merged scope: #3702 uses atomic groups and whole-flag-token guards inShellCommandOutputScorer's destructivermbranch. Historical detection cases and malformed/repeated-input regressions preserve the tested heuristic behavior; measured long-input families scale approximately linearly. Assessment: sufficiently addressed for this concrete opportunity. The actual squash and assessed current code have identical scorer/test files. This is not a proof for every regex/input or a requirement to migrate every pattern; retain command-separator behavior,/tmpexclusion and whole flag tokens. The scorer evaluates text, not shell execution. Additional merged scope: #3764 adds multiline Markdown-image detection with possessive scanner patterns and a CommonMark block parser. Reference normalization, code/HTML context, custom-pattern opt-out and bounded malformed-input regressions are covered. The actual merged scorer/tests and dependency files are unchanged in assessed current main. Existing regex matching is retained, so this is not complete CommonMark equivalence or a globally linear scorer claim. It does not change the completed shell assessment or require a blanket migration. The earlier unclaimed item overlap remains in the historical row; no reservation was retroactively granted. Additional merged scope: #3687 deliberately uses possessive shell-word/option scans and atomic operand alternatives while changing command-substitution detection semantics. Twelve checked-in malformed-input shapes time regex search below 0.5 seconds and separately check the public false verdict. This is supplemental performance-bounded use, not a semantics-preserving migration or a second completion. The inherited destructive-shell atomic pattern is unchanged and remains counted under FIX: Make ShellCommandOutputScorer destructive-shell regex linear time #3702. The merged shell scorer and dedicated tests match assessed current main; the general regex tests later changed default-pattern identity assertions separately. Shell-oracle and growth results in the PR are author-reported, not independently rerun here, and do not establish global linearity or atomic-versus-nonatomic equivalence. No blanket migration or new reservation is needed. - P311-19: Investigate
hashlib.file_digestfor whole-file hashes. Consider classifier artifact verification or other complete-file checks. Keep blocking I/O off async paths. Do not replace bounded evidence-reading loops that enforce budgets/cancellation and retain content. Merged scope: #3392 streams the two classifiercompute_dataset_hashes()helpers through binaryhashlib.file_digesthandles, preserving SHA-256 values and dictionary order; multi-buffer regression tests cover current file contents. Assessment: sufficiently addressed. Keep_load_training_rows()hashing the same bytes it subsequently parses; keepLocalFileSurfaceSource._read_entrybounded/cancellable with retained evidence. Async serializer hashing supports storage backends that may be remote, memory media hashing reuses copied content, andFileDocumentStorage._compute_versionreceives bytes already in memory. No further worthwhile direct whole-file replacement identified; do not add synchronous local-file reads to async storage paths. - P311-20: Investigate
inspect.getmembers_staticfor safe introspection. Identify registry inspection that should avoid invoking descriptors/properties. It intentionally bypasses dynamic lookup and lazy exports, so verify the discovery contract before adoption. Merged scope: #3531 statically inspectsdiscover_in_directorymodules, resolves only explicitly declared missing__all__exports dynamically, and logs failed declared exports without losing other classes. Registration-outcome tests cover declared lazy exports with/without__dir__, unrelated dynamic names and failed exports; the earlier lazy-export regression is addressed. Additional merged scope: #3580 statically inspectsInitializerRegistry._module_defined_initializersfor single-file discovery and custom scripts, with targeted resolution of declared lazy exports. Own-module, base-class and abstract filters remain intact. Best-effort discovery logs failed declared exports; strict script loading and custom-script validation still reject them. Registration and strict/best-effort entry-point regressions cover these contracts. Assessment: the registry inspection opportunity is sufficiently addressed by fix: use static member discovery in registry inspection #3531 and FIX avoid dynamic attribute evaluation in single-file initializer discovery #3580; no further worthwhile blanket migration was found. KeepRegistry._discover's intentional lazy-export materialization dynamic.
SQLite-specific memory opportunities
These must stay in the SQLite-specific memory/driver layer and preserve portable SQL Server behavior. Check what SQLAlchemy/aiosqlite exposes before choosing an implementation.
- P311-21: Improve SQLite error handling using extended error codes/names. Analytics already checks
sqlite_errorcodefor plainSQLITE_BUSY. Investigate other real cases where structured codes are preferable to error-message matching, including distinctions such as stale snapshots. Completed scope: #3893 adds the driver'ssqlite_errorcode/sqlite_errornameas deduplicated exception notes on propagated SQLite analytics failures, making distinctions such asSQLITE_BUSY_SNAPSHOTvisible. Plain-BUSY retry policy, exception identity/messages and non-SQLite behavior are unchanged. The current bounded memory-handler survey found no worthwhile remaining message-based SQLite classification to replace; existing structured-code and domain-state handling stays intact. This completes the implemented diagnostics case, not a new retry policy or blanket database migration, and does not retroactively accept the earlier no-change proposal. - P311-22: Investigate SQLite connection
getlimit/setlimit. Identify a real need for connection-level runtime limits and how limits interact with pooling and workloads. Avoid arbitrary limits that break existing behavior. Current focused case (claimed by Pedro Holanda (@AoiUltramar)): investigate SQLite runtime bind-variable limits and the conservative batching constants inMemoryInterfaceandMemorySession. The proposal and preliminary benchmark are not accepted implementation evidence. Verify limits on the actual pooled connection rather than assuming a separate probe connection represents it, preserve Azure SQL behavior, and report reproducible pinned-environment measurements before proposing a capped SQLite-only change or no-change conclusion. Investigation update: Earlier report; follow-up no-change conclusion. The contributor withdraws the proposed 2000-bind SQLite batch after a second pinned-environment run did not reproduce the earlier API-level improvement. They report pooled connection limits of 32766 variables and 1000 expression depth, and an end-to-end expression-depth failure when increasing the shared cap. Maintainer review 2026-11-18 (push-back): the withdrawal of the 500→2000 bump is accepted (independently re-checked), but a plain no-change is not — a small capped PR is requested: boundjson_batch_sizein_execute_get_prompt_scorestomin(_MAX_BIND_VARS, 500) - 1and add a >1000-IDget_prompt_scoresregression test, fixing a likely live Azure SQL parameter-cap failure (~3998 parameters vs the 2100 cap). The item stays open for that PR. → Broken out to FIX: bound get_prompt_scores JSON batching to the parameter cap (P311-22, from #3166) #4509; claim and contribute there, not here. - P311-23: Investigate SQLite custom window functions. Assess whether an actual analytics use case benefits from
create_window_function, with SQLite runtime support, driver integration, and portability considered. Prefer existing SQL when sufficient. ✅ Closed as no-change on 2026-11-20 after a maintainer-side sweep (details): existing windowed SQL uses portable SQLAlchemy.over(...); no analytics path benefits from a SQLite-only registered window function. - P311-24: Investigate incremental SQLite BLOB I/O. Assess whether any actual large-BLOB storage path benefits from
blobopen. Do not redesign media storage just to use this API; a no-change conclusion may be appropriate. ✅ Closed as no-change on 2026-11-20 after a maintainer-side sweep (details): no binary columns exist; media bytes are streamed to disk/Azure Blob Storage and the DB stores paths, soblobopenhas no target. - P311-25: Investigate SQLite database serialization/deserialization. Assess a concrete snapshot/test/export use case for
serialize/deserialize, including runtime availability, memory cost, concurrency, and driver boundaries. Investigation report: Shawn Russ (@shawnrruss) submitted a no-change report comparingserialize/deserializesnapshot restore with the existing migrated-templatebackup()reset intests/unit/conftest.py. ✅ Accepted as no-change by the maintainer on 2026-11-18 (acceptance; the visibility matrix was independently reproduced).
Claim and PR tracking
The tracker is authoritative for per-item ownership; GitHub issue assignees are the aggregate set of active contributors. Available items have no active tracker row. Preserve released/expired rows as history when updating the tracker. Table frozen 2026-11-20: per-item claims now live on the dedicated issues linked above.
| Item | Contributor | Claim comment / source | Claimed on | PR due | PR | Status |
|---|---|---|---|---|---|---|
| P311-25 | Shawn Russ (@shawnrruss) | Claim comment | 2026-11-18 | 2026-11-23 | None | ✅ No-change report accepted by maintainer 2026-11-18; item complete; reservation released |
| P311-17 | Goutham Mahesh (@GouthamMahesh) | Claim comment | 2026-11-10 | 2026-11-15 | #4126 | ✅ PR merged 2026-11-10; SeedOrigin case complete; reservation released |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-08 | 2026-11-13 | #4064 | ✅ PR merged 2026-11-09; focused GCG JSON factory typing complete; reservation released |
| P311-05 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-08 | 2026-11-13 | None | Released by contributor on 2026-11-08; ✅ no-change report accepted by maintainer 2026-11-18 (with checker-claim correction); item complete |
| P311-06 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-08 | 2026-11-13 | None | Released by contributor on 2026-11-08; ✅ no-change report accepted by maintainer 2026-11-18; item complete |
| P311-07 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-08 | 2026-11-13 | #4053 | ✅ PR merged 2026-11-08; focused generic resolution typing complete; reservation released |
| P311-03 | Lanre Shittu (@Shizoqua) | Claim comment | 2026-11-07 | 2026-11-12 | #4045 | ✅ PR merged 2026-11-08; registry-update dispatch and typing regression complete; reservation released |
| P311-02 | B Sainath Reddy (@Sainath-Reddy7) | Claim comment | 2026-11-07 | 2026-11-12 | #4106 | ✅ PR merged 2026-11-09; Docker build-info optional/nullable contract complete; reservation released |
| P311-14 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-06 | 2026-11-11 | None yet | Released by contributor on 2026-11-08; ✅ no-change report accepted by maintainer 2026-11-18; item complete |
| P311-22 | Pedro Holanda (@AoiUltramar) | Claim comment | 2026-11-06 | 2026-11-11 | None | Expired 2026-11-11; reservation released 2026-11-15; 2000-bind withdrawal accepted by maintainer 2026-11-18; plain no-change not accepted — capped json_batch_size PR with >1000-ID regression test requested; item open |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-06 | 2026-11-11 | #3999 | ✅ PR merged 2026-11-06; focused SeedIdentifier factory typing complete; reservation released |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-05 | 2026-11-10 | #3992 | ✅ PR merged 2026-11-06; ToolExecutionMetadata factory typing complete; reservation released; SeedIdentifier factory case available |
| P311-03 | B Sainath Reddy (@Sainath-Reddy7) | Claim comment | 2026-11-05 | 2026-11-10 | #3998 | ✅ PR merged 2026-11-06; capability-behavior dispatch and typing regression complete; reservation released |
| P311-12 | Muhammad Waqar Anwar (@WaqarAnwar) | Claim comment | 2026-11-05 | 2026-11-10 | #3983 | ✅ PR merged 2026-11-06; focused exception-group investigation complete; reservation released |
| P311-11 | Víctor Fernández Ayllón (@vayllon301) | Claim comment | 2026-11-05 | 2026-11-10 | #3980 | ✅ PR merged 2026-11-06; selected-region sibling cleanup complete; reservation released |
| P311-11 | Muhammad Waqar Anwar (@WaqarAnwar) | Claim comment | 2026-11-04 | 2026-11-09 | #3959 | ✅ PR merged 2026-11-05; focused Anthropic file-fetch case complete; reservation released; selected-region converter case available |
| P311-03 | B Sainath Reddy (@Sainath-Reddy7) | Claim comment | 2026-11-04 | 2026-11-09 | #3924 | ✅ PR merged 2026-11-05; focused ScorerEvaluator dispatch and typing regression complete; reservation released; capability-behavior case available |
| P311-17 | Julio César Suástegui (@juliosuas) | Claim comment | 2026-11-04 | 2026-11-09 | None | Expired 2026-11-09; no matching PR opened within five days; SeedOrigin investigation available |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-03 | 2026-11-08 | #3897 | ✅ PR merged 2026-11-04; focused RequestTraceContext factory complete; reservation released; ToolExecutionMetadata case available |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-03 | 2026-11-08 | #3884 | ✅ PR merged 2026-11-03; focused TokenUsage factory complete; reservation released; RequestTraceContext case available |
| P311-17 | Julio César Suástegui (@juliosuas) | Claim comment | 2026-11-02 | 2026-11-07 | #3850 | ✅ PR merged 2026-11-03; focused ConversationRetryReason case complete; reservation released; SeedOrigin investigation available |
| P311-03 | Muhammad Waqar Anwar (@WaqarAnwar) | Claim comment | 2026-11-02 | 2026-11-07 | #3830 | ✅ PR merged 2026-11-03; dataset-entry dispatch complete; reservation released; evaluator dispatch available |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-11-02 | 2026-11-07 | #3823 | ✅ PR merged 2026-11-03; metadata factory typing complete; reservation released; TokenUsage case available |
| P311-02 | XY (@XY-code1) | Claim comment | 2026-11-02 | 2026-11-07 | None yet | Expired 2026-11-07; no PR within five days; reservation released; prior GitHub assignment unavailable |
| P311-21 | B Sainath Reddy (@Sainath-Reddy7) | Claim comment | 2026-11-01 | 2026-11-06 | #3893 | ✅ PR merged 2026-11-04; SQLite codes/names diagnostics assessed complete; reservation released; earlier survey retained as background |
| P311-18 | Jaafer Rahmani (@bIackr0se) | PR opened without prior claim | 2026-10-31 | N/A; not assigned | #3764 | ✅ PR merged 2026-11-02; Markdown-image scope complete; historical unclaimed overlap with #3702 retained; no reservation granted |
| P311-18 | Muhammad Waqar Anwar (@WaqarAnwar) | PR opened without prior claim | 2026-10-31 | N/A; PR already open | #3702 | ✅ PR merged 2026-11-01; destructive-shell scope complete; reservation released; prior GitHub assignment unavailable |
| P311-03 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-31 | 2026-11-05 | #3797 | ✅ PR merged 2026-11-02; PromptShield dispatch complete; reservation released; dataset-entry dispatch available |
| P311-03 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-29 | 2026-11-03 | #3654 | ✅ PR merged 2026-10-31; RepeatToken dispatch complete; reservation released; PromptShield parser available |
| P311-04 | Muhammad Waqar Anwar (@WaqarAnwar) | Request comment | 2026-11-01 | N/A; not assigned | #3770 | ✅ PR merged 2026-11-01; singleton checks complete; no active reservation; opened while #3702 active (historical one-item conflict) |
| P311-04 | mehmetl33t | Claim comment | 2026-10-30 | 2026-11-04 | #3686 | ✅ PR merged 2026-10-31; instance-registry checks complete; reservation released; singleton-factory checks available |
| P311-04 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-29 | 2026-11-03 | #3625 | ✅ PR merged 2026-10-29; gather result-type check complete; reservation released; instance-registry type checks available |
| P311-01 | Julio César Suástegui (@juliosuas) | Claim comment | 2026-11-01 | 2026-11-06 | #3779 | ✅ PR merged 2026-11-02; adversarial-prompts factory complete; reservation released; attack-result metadata factory available |
| P311-01 | Julio César Suástegui (@juliosuas) | Request comment | 2026-10-28 | 2026-11-02 | #3626 | ✅ PR merged 2026-10-31; WebSearchConfig factory complete; reservation released; adversarial-prompts factory available |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim, withdrawal | 2026-10-29 | N/A | None | Withdrawn 2026-10-29 before assignment; no reservation |
| P311-10 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-28 | 2026-11-02 | #3610 | ✅ PR merged 2026-10-29; Docker sandbox invocation deadline complete; opportunity complete; reservation released |
| P311-20 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-27 | 2026-11-01 | #3580 | ✅ PR merged 2026-10-28; single-file inspection complete; opportunity complete; reservation released |
| P311-03 | Julio César Suástegui (@juliosuas) | Claim comment | 2026-10-27 | 2026-11-01 | #3601 | ✅ PR merged 2026-10-28; CodeAttack encoding dispatch complete; reservation released; RepeatToken mode dispatch available |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-26 | 2026-10-31 | #3577 | ✅ PR merged 2026-10-27; JSON response factory complete; reservation released; web-search policy factory available |
| P311-20 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-25 | 2026-10-30 | #3531 | ✅ PR merged 2026-10-26; directory discovery complete; reservation released; single-file initializer inspection available |
| P311-01 | Julio César Suástegui (@juliosuas) | Claim comment | 2026-10-25 | 2026-10-30 | #3529 | ✅ PR merged 2026-10-26; HarmDefinition factory complete; reservation released; JSON response factory available |
| P311-01 | Niladri Das (@bniladridas) | Claim comment | 2026-10-24 | 2026-10-29 | #3520 | ✅ PR merged 2026-10-25; run-size estimate factory complete; HarmDefinition factory available, reservation released |
| P311-03 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-24 | 2026-10-29 | #3504 | Closed without merging 2026-10-25; reopened 2026-10-26; ✅ PR merged 2026-10-26; puzzle dispatch complete; reservation released; CodeAttack encoding dispatch available |
| P311-03 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-23 | 2026-10-28 | #3472 | ✅ PR merged 2026-10-23; analytics option-kind dispatch complete; puzzle dispatch available, reservation released |
| P311-01 | Julio César Suástegui (@juliosuas) | Claim comment | 2026-10-22 | 2026-10-27 | #3470 | ✅ PR merged 2026-10-23; TagQuery factory family complete; run-size estimate factory available, reservation released |
| P311-03 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-22 | 2026-10-27 | #3456 | ✅ PR merged 2026-10-23; CLI result-view dispatch complete; analytics option dispatch available, reservation released |
| P311-03 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-21 | 2026-10-26 | #3441 | ✅ PR merged 2026-10-22; AttackOutcome logging complete; CLI view dispatch available, reservation released |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-21 | 2026-10-26 | #3411 | ✅ PR merged 2026-10-21; placeholder factory complete; further TagQuery family available, reservation released |
| P311-01 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-20 | 2026-10-25 | #3383 | ✅ PR merged 2026-10-21; factory family complete; remaining MessagePiece case available, reservation released |
| P311-19 | ARJUN K (@arjun-k047) | Claim comment | 2026-10-20 | 2026-10-25 | #3392 | ✅ PR merged 2026-10-20; P311-19 complete; reservation released |
| P311-08 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-19 | 2026-10-24 | #3351 | ✅ PR merged 2026-10-20; opportunity complete; reservation ended |
| P311-08 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-19 | 2026-10-24 | #3333 | ✅ PR merged 2026-10-19; contribution complete; Copilot cleanup-phase investigation available, reservation released |
| P311-08 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-17 | 2026-10-22 | #3281 | ✅ PR merged 2026-10-19; contribution complete; runtime-shutdown phase context remains available, reservation released |
| P311-08 | Slai.life (@huong8373tt-beep) | Claim comment | 2026-10-16 | 2026-10-21 | #3277 | ✅ PR merged 2026-10-17; contribution complete; service-shutdown context remains available, reservation released |
| P311-01 | 成功したナイロンカエル (@vito233) | Claim comment | 2026-10-16 | 2026-10-21 | #3266 | ✅ PR merged 2026-10-17; contribution complete; further model factory cases available, reservation released |
| P311-09 | Aizen__28 (@Yudeeswaran) | Claim comment | 2026-10-15 | 2026-10-20 | #3239 | ✅ PR merged 2026-10-16; opportunity complete; reservation ended |
| P311-15 | Shivam Maurya (@shivampwm2020) | Claim comment | 2026-10-14 | 2026-10-19 | #3208 | ✅ PR merged 2026-10-14; opportunity complete; reservation ended |
| P311-01 | Kushal Talati (@kushaltalati) | Claim comment | 2026-10-14 | 2026-10-19 | #3201 | ✅ PR merged 2026-10-14; contribution complete; further model factory cases available, reservation released |
| P311-09 | Aizen__28 (@Yudeeswaran) | Claim comment | 2026-10-14 | 2026-10-19 | #3205 | ✅ PR merged 2026-10-14; contribution complete; initialization timeout investigation available, reservation released |
| P311-01 | Kushal Talati (@kushaltalati) | Claim comment | 2026-10-13 | 2026-10-18 | #3194 | ✅ PR merged 2026-10-14; contribution complete; remaining cases available, reservation released |
| P311-08 | Aizen__28 (@Yudeeswaran) | Claim comment | 2026-10-13 | 2026-10-18 | #3175 | ✅ PR merged 2026-10-13; contribution complete; remaining cases available, reservation released |
| P311-16 | Kushal Talati (@kushaltalati) | Claim comment | 2026-10-13 | 2026-10-18 | #3176 | ✅ PR merged 2026-10-13; opportunity complete; reservation ended |
| P311-04 | Roman Lutz (@romanlutz) | Historical PR, opened before this issue; no claim | N/A | N/A | #3064 | ✅ PR merged; prior art covers part of the opportunity; remaining cases available |
Describe alternatives you've considered, if relevant
Keep existing implementations when they already express the required behavior clearly. Avoid a repo-wide modernization sweep: each contributor investigates and opens a focused PR for ONE opportunity at a time. Separate changes within an item should remain cohesive; coordinate here before splitting or expanding scope.
Additional context
- Python 3.11 release notes
- Article motivating this inventory
- Existing adoption includes
datetime.UTC,Self,NotRequired, genericTypedDict,StrEnum,TaskGroup, timeouts, exception groups, and SQLite extended error codes. - Better traceback locations and interpreter improvements arrive automatically on 3.11+; they do not need modernization PRs, and model-call performance is often network-bound.
typing.override,typing.TypeAliasType, thetype Alias = ...statement, andclass Foo[T]syntax are 3.12+, not 3.11. Keep neededtyping_extensionsimports while supporting 3.11.- Other 3.11 APIs such as
dataclass_transformcan be considered when there is a concrete fitting abstraction, but should not motivate new abstractions on their own.
Activity
romanlutz commentedon Oct 13, 2026
Roman Lutz (@romanlutz): P311-04 has related work in #3064, which opened on 2026-10-09 at 22:00:12 UTC, before this tracking issue existed, and merged on 2026-10-13 at 07:06:53 UTC. There was no prior claim here, so this is historical overlap, not a contributor bypassing the new claim rule.
That PR adds
assert_typechecks for retry helpers and async task return types, and brings the unit tests into themake tycheck. It partially addresses the type-regression opportunity. I am linking it as prior art but leaving P311-04 unchecked and available pending your assessment of the remaining scope. No duplicate claim exists and no new assignment is needed for the already-merged PR.Yudeeswaran commentedon Oct 13, 2026
Claiming P311-08 (
BaseException.add_note).I’ll investigate dataset-fetch failure propagation in
SeedDatasetProvider.fetch_datasets_async(pyrit/datasets/seed_datasets/seed_dataset_provider.py). Providers are fetched concurrently, and a failing provider’s exception may propagate without identifying the dataset (e.g., “SeedDataset cannot be empty”).I plan to add diagnostic context using
add_note(), including the dataset name and provider class, while preserving the original exception type and traceback.I’ll add a regression test to verify that the original exception is preserved and that the diagnostic note contains the expected dataset and provider information, without exposing prompt content or other sensitive data.
romanlutz commentedon Oct 13, 2026
Assigning P311-08 to you Aizen__28 (@Yudeeswaran).
kushaltalati commentedon Oct 13, 2026
Claiming P311-16 (Simplify ISO timestamp parsing).
I'll remove the .replace("Z", "+00:00") workaround in _parse_datetime since Python 3.11 handles it natively. Historical Alembic revisions will remain untouched. I'll preserve timezone and accepted-input contracts and update test coverage.
romanlutz commentedon Oct 13, 2026
Assigning P311-16 to you Kushal Talati (@kushaltalati). Linked #3176 and Aizen__28 (@Yudeeswaran)'s #3175 in the table.
romanlutz commentedon Oct 13, 2026
Post-merge assessment for P311-08: #3175 is merged and successfully covers dataset/provider context on concurrent dataset-fetch failures. Thank you Aizen__28 (@Yudeeswaran); your contribution is complete and your reservation is released, so you may claim another opportunity.
The broader exception-note opportunity remains unchecked and available. I assessed the merged diff and current main at
20b35221c514b7f0898caac12f14b71631889027and added two concrete follow-up cases to the checklist:Scenario._run_atomic_attacks_parallel_async: caught errors are stored without their atomic-attack association before aggregation. Safe scenario/atomic-group notes could identify which concurrent operation failed without logging seed text.close_services_async: exception notes could identify which close operation produced each grouped shutdown error.These are focused investigations, not instructions to annotate every exception. Preserve cancellation, exception identities/types, group contracts, and sensitive-data boundaries. Claim exactly one opportunity on this thread before starting.
kushaltalati commentedon Oct 13, 2026
PR #3176 is approved with all CI checks passing. Once merged, I would like to claim P311-01 (Extend typing.Self adoption).
I plan to investigate adopting typing.Self across classmethod factories and fluent methods (such as YamlLoadable.from_yaml_file and Seed.from_yaml_file) while preserving independent generic parameters.
romanlutz commentedon Oct 13, 2026
P311-16 is complete with #3176. No other active ISO-parsing workarounds remain; the historical migration stays unchanged. Assigning P311-01 to you Kushal Talati (@kushaltalati) now that #3176 is merged.
248 remaining items
shawnrruss commentedon Nov 19, 2026
P311-25 result: keep the current SQLite test-fixture reset (no PR).
I compared snapshot restore with the existing migrated-template
sqlite3.Connection.backup()intests/unit/conftest.pyatb6969d6.Reproduce the visibility difference with Python and SQLite builds that expose
serializeanddeserialize:Observed keeper/fresh-reader counts: backup
1/1, direct1/0, staged1/1. To repeat the timing on the real fixture, use the migratedsqlite_templatefor both paths and pass an adapter exposingbackup(destination)tosqlite_instance. Serialize once per worker for the staged path and time fixture entry through teardown; the run warmed up 30 fixtures per path and alternated order across 21 paired batches of 32 fixtures per path in each process.I recommend closing this item as no change if the evidence meets the acceptance bar. No fixture or production code was changed. The investigation used AI assistance.
romanlutz commentedon Nov 19, 2026
Thanks Shawn Russ (@shawnrruss). I've linked your report under P311-25. Its no-change conclusion remains pending maintainer acceptance, so the item stays unchecked. Your reservation stays recorded until 2026-11-23 unless you release it sooner.
romanlutz commentedon Nov 19, 2026
P311-05 accepted — the item stays no-change and comes off the open list. One correction for the record: the checker probe doesn't hold up. ty flags passing a plain
strto aLiteralStringparameter in 0.0.96, 0.0.97 (what was locked at the time), and the current 0.0.99, andinvalid-argument-typeis enabled for production code in our ty config — it's only ignored undertests/unit/**and the HuggingFace target, so the probe likely ran under one of those ignore paths. The no-change conclusion stands on the structural findings, which I verified: the memory backends'text()fragments interpolate only internal structure with data values bound, Docker execution is exec-style over an allowlisted tuple, and there is no developer-authored SQL/command template boundary whereLiteralStringmodels a real contract without redesigning the builders. Checking it off.romanlutz commentedon Nov 19, 2026
P311-06 accepted. I spot-checked the candidate classes against main: the fixed heterogeneous tuples are stable fixed-arity returns where variadics add nothing, and multimodal content is an open
MessagePiecesequence with no static positional shape to preserve. No variadic contract worth introducing today. Checking the item off.romanlutz commentedon Nov 19, 2026
P311-13 accepted — thanks for the careful trace. I verified the census (exactly 18 ContextVars in
pyrit/at your report date) and the deliberate preserve-on-exception behavior of the execution context. Two notes for the record: #4024 has since switched queued-run launches tocreate_task(..., context=caller_principal_context(...))— a context copy with the caller principal replaced, not a cleanContext(), so the carryover you describe is still theoretically possible in the fail-in-own-task case and your proposed fix remains the right shape if we ever need it; and the repo is at 26 ContextVars now, so newer vars are outside this sweep. Neither changes the no-change conclusion for current behavior. Checking it off.romanlutz commentedon Nov 19, 2026
P311-14 accepted. I verified all four surfaces on main: one-shot
asyncio.runin the scan/migrate CLIs, the shell's persistent background-thread loop withrun_coroutine_threadsafe, the per-call sync embedding facade, and the deliberate Proactor loop for Playwright on Windows. None of them has a multi-call lifecycle thatRunnerimproves without inventing a new ownership contract. Checking the item off.romanlutz commentedon Nov 19, 2026
P311-22: I'm accepting the withdrawal of the 500→2000 bump — your second run matches my own re-check (raw execute+fetch for 10k IDs is ~8-9 ms at either batch size on my machine; the cost is sorting and ORM loading, not binding), and I reproduced the expression-depth failure near 1000 OR terms. Good, careful follow-up.
But the no-change conclusion drops the Azure finding from your first report, and that one looks real on current main:
_execute_get_prompt_scoressizes its JSON batches from_MAX_BIND_VARS - 1in shared code, Azure's_MAX_BIND_VARSis 2000, and each OR term carries two bound parameters under pyodbc (the JSON path repeats per term), so a full batch is ~3998 parameters against SQL Server's 2100 cap —get_prompt_scoreswith more than ~1050 IDs should fail there today, no cap change required. So instead of closing this as no-change, I'd like the small capped PR you originally sketched: boundjson_batch_sizetomin(_MAX_BIND_VARS, 500) - 1and add the >1000-IDget_prompt_scoresregression test you suggested. SQLite behavior is untouched (its bound is already 499); the win is the Azure fix. No live Azure instance needed — the parameter arithmetic plus the regression test on SQLite covers it. The item stays open for that PR.romanlutz commentedon Nov 19, 2026
P311-25 accepted. I reproduced your visibility matrix exactly on a different platform (Windows, SQLite 3.50.4): backup 1/1, direct 1/0, staged 1/1 — direct
deserializegenuinely breaks fresh-connection visibility on the shared-cache in-memory database, which rules it out for thesqlite_instancefixture, and the staged variant has no reason to beat plainbackup(). The current template-backup reset intests/unit/conftest.pystays. Checking the item off — thanks for the unusually reproducible write-up.romanlutz commentedon Nov 21, 2026
P311-07 closed as no-change after a maintainer-side sweep: every TypedDict/NamedTuple was enumerated and none has a payload field where a type parameter would preserve a real producer-consumer type relationship — the remaining
Any/objectfields are mixed-type by design. #4053's generic dataclass and the_AnalysisResultprior art already cover the genuine cases. Checking the item off. (One-liner spotted in passing:_ScoringEvidence.scorer_identifiercan be annotatedComponentIdentifier | None— fine to ride along in any analytics change.)romanlutz commentedon Nov 21, 2026
P311-12 closed as no-change after a maintainer-side sweep: every group-producing path (message-send TaskGroup, scenario partial failures, attack-strategy groups, lifecycle shutdown) was traced to a handler that preserves all failures, and no site would benefit from
except*— nothing peels subsets. The only residue is a theoretical mixed-group path in Copilot shielded cleanup with no realistic trigger; not worth a change. Checking the item off — #3983 covered the real gaps.romanlutz commentedon Nov 21, 2026
P311-23 closed as no-change after a maintainer-side sweep: all windowed computation already uses standard SQLAlchemy
.over(...)(portable to Azure SQL), the one Python-side median in assert-policy metrics runs over hydrated objects with ordering semantics that don't fit SQL, and we've previously moved away from window ranking for performance (see the anti-join note inmemory_interface).create_window_functionis SQLite-only and would break backend parity for no measured benefit. Checking the item off.romanlutz commentedon Nov 21, 2026
P311-24 closed as no-change after a maintainer-side sweep: PyRIT keeps no BLOBs in SQLite — media bytes go to disk (
DiskStorageIO) or Azure Blob Storage, already chunk-streamed, and the DB stores only paths; there are no binary columns inmemory_models.py.blobopenhas no target without a storage redesign the item explicitly rules out. Checking the item off.romanlutz commentedon Nov 21, 2026
Restructuring, final state of this tracker: 19 of 25 items are complete (checklist above), and the six still-open items have moved to dedicated issues, each with a maintainer-side scope assessment and candidate inventory:
typing.Selfadoption (3-PR split plan)TypedDictcontractsassert_neverguards (4 batches)gathercleanup (one small PR)StrEnum(4 observable fixes + optional batch)get_prompt_scoresbatching fixClaim on the dedicated issue by comment; the first commenter may open a PR. P311-07, P311-12, P311-23 and P311-24 are closed as no-change after maintainer-side sweeps (comments above). Pedro Holanda (@AoiUltramar): the capped fix requested earlier now lives in #4509, where you have first claim.
Closing this tracker — it stays as the historical record. Thanks to everyone who worked through the checklist.