Files
codex/codex-rs/ext/guardian-v2/BUILD.bazel
T
felixxia-oai 624b45c4dc Run Guardian conversation classifiers concurrently and preserve action order (#52061)
## Why

A conversation classifier waiting for preparation or full response completion can block newer classifications. Concurrent reviews also need to prevent a later action's evidence or low-risk score from being reused for an earlier action.

## What changed

- Run conversation classifications independently, forking the latest compatible completed history from an earlier action. Only a valid completion with a newer action index can replace retained history.
- Keep admission and observation ordering atomic, and hold capacity permits through full response completion.
- Reject cached low-risk scores from later actions for tool-linked approvals, including initial approval checks.
- Track originating tool-call IDs separately from approval display IDs, preserving stdin write provenance and excluding synthetic MCP elicitation IDs from tool ordering.

## Testing

Add regression coverage for delayed preparation, capacity admission, out-of-order completion, cancellation, invalid retained output, and history snapshots. Exercise pending approval ordering in both `snapshot` and `conversation` modes, and verify linked and unlinked MCP elicitation provenance.

GitOrigin-RevId: 097476ccb3b8718369a69f55c3c39132f7f1a4c1
2026-10-08 10:42:28 +00:00

15 lines
453 B
Python

load("//:defs.bzl", "codex_rust_crate")
# Core's context-adapter unit tests compile the same setup function with their Config type.
exports_files(
["src/sync_reviewer/reviewer_config.rs"],
visibility = ["//codex-rs/core:__pkg__"],
)
codex_rust_crate(
name = "guardian-v2",
crate_name = "codex_guardian_v2",
extra_binaries = ["//codex-rs/code-mode-host:codex-code-mode-host"],
test_data_extra = glob(["src/**/snapshots/**"]),
)