Repository navigation
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 1
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 445d678432
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CommandCode::STMT_EXECUTE | ||
| | CommandCode::STMT_SEND_LONG_DATA | ||
| | CommandCode::STMT_RESET | ||
| | CommandCode::STMT_FETCH => { | ||
| Ok(command.captured_statement_id.is_some_and(|statement_id| { | ||
| prepared | ||
| .get(&command.connection_id) | ||
| .is_some_and(|statements| statements.contains(&statement_id)) | ||
| })) |
There was a problem hiding this comment.
Clear stale prepared IDs after connection reset
When --read-only processes a captured connection that prepares a SELECT with ID N, receives COM_RESET_CONNECTION, and then reuses N for a write prepare/execute, this branch still finds N because the map is only cleared on QUIT. The capture side explicitly clears its prepared-statement state on reset (pkg/sqlreplay/capture/capture.go:404-405), so the later write STMT_EXECUTE is incorrectly counted as replayable under read-only mode. Clear the per-connection prepared state on reset (and other session-reset commands) and remove an existing ID when its replacement prepare is not read-only.
Useful? React with 👍 / 👎.
| if bytes[index] != b'"' { | ||
| return Err("expected quoted audit parameter".to_owned()); | ||
| } |
There was a problem hiding this comment.
Support single-quoted audit-plugin parameters
A valid audit-plugin EXECUTE_PARAMS value can decode to a list such as ['KindInt64 1']: the existing Go decoder explicitly accepts both quote types before unquoting each parameter (pkg/sqlreplay/cmd/audit_log_plugin.go:400-412). This parser requires every list element to begin with ", so such captures abort the dry run instead of producing the same prepared execute command as the Go replayer.
Useful? React with 👍 / 👎.
445d678 to
c431d5a
Compare
|
@bb7133: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What is changed
This draft advances the standalone Rust owner for CP-REPLAYER (#1320) without changing the SQL-serving binary or claiming production cutover.
tiproxy-replayercomposition root which currently accepts dry-run onlyfs,s3,gcs,azblob,oss, andcosKindBytesReview hardening
The second exact head addresses the independent semantic review:
command_ordinalto ordering, resume frontiers, checkpoint schema, and input identity2026-12-01Honest scope boundary
This is a foundation-only draft and does not close #1320. The following remain intentionally fail-closed or deferred:
tiproxy-replayerrejects service mode, backend execution, dynamic input, wait-on-EOF, and SQL output in this slice.Supply-chain exception disclosure
The workspace is pinned to Rust 1.89 and Tokio 1.47.1. OpenDAL 0.53.3 is therefore used for the required provider set; its signer graph currently carries
RUSTSEC-2023-0071,RUSTSEC-2026-0194, andRUSTSEC-2026-0195. OpenDAL 0.58 resolves the quick-xml advisories but requires Rust 1.91.The exceptions are explicitly synchronized across cargo-audit, cargo-deny, and the repository-owned exception ledger with owner
@bb7133, rationale, and expiry2026-12-01. Exposure in this draft is bounded to an operator-run dry-run binary with trusted storage endpoints; backend and service modes fail closed. The OpenDAL/toolchain upgrade is required before enabling either deferred mode.Verification
make rust-testmake rust-lintcargo test -p replayer-core --lockedtests/replayer/differential/run.sh(Go/Rust equality + mutation detected)python3 rust/ci/check_vulnerability_exceptions.pyAudit dependencies and policy(cargo-audit + cargo-deny + exception ledger)git diff --checkIssue: #1320