refactor(agent-persistence): remove dead redaction_applied field and stale TODO - #6199
Merged
Merged
Conversation
…stale TODO PersistMessageOutcome::redaction_applied was hardcoded to false at every construction site and read by nothing, since no redaction logic exists in the persistence service. PersistMessageRequest's doc comment separately described an R3 batching design that was never implemented; persistence has always been inline and synchronous, so the panic/cancel data-loss risk it warned about does not currently apply. Closes #5962 Closes #5995
bug-ops
enabled auto-merge (squash)
July 13, 2026 01:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PersistMessageRequest's doc comment carried a stale TODO describing an unimplemented R3 batching design and a pending-request-loss risk that does not exist — persistence is inline and synchronous today (Agent::persist_messagebuilds the request and immediately awaitsPersistenceService::persist_message, no queue/buffer layer). Rewrote the comment to describe actual behavior.PersistMessageOutcome::redaction_appliedfield — hardcoded tofalseat all four construction sites inPersistenceService::persist_messageand read by nothing, since no redaction logic exists in the service. Breaking change to apubstruct, acceptable pre-v1.0.0.Closes #5962
Closes #5995
Test plan
cargo nextest run --config-file .github/nextest.toml -p zeph-agent-persistence -p zeph-core— 1881 passedcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings— cleancargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 13297 passedRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"— clean, intra-doc link resolvesRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— cleancargo test --doc --workspace --features "desktop,ide,server,chat,pdf,scheduler"— all passedcargo +nightly fmt --check— cleangitleaks protect --staged --no-banner --redact— no leaksorigin/main(conflict only in CHANGELOG.md, resolved by keeping both entries — no source touched, so no re-run of the full suite per project policy)