Skip to content

refactor(agent-persistence): remove dead redaction_applied field and stale TODO - #6199

Merged
bug-ops merged 1 commit into
mainfrom
fix/5962-persistence-stale-todo-dead-field
Jul 13, 2026
Merged

refactor(agent-persistence): remove dead redaction_applied field and stale TODO#6199
bug-ops merged 1 commit into
mainfrom
fix/5962-persistence-stale-todo-dead-field

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 13, 2026

Copy link
Copy Markdown
Owner

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_message builds the request and immediately awaits PersistenceService::persist_message, no queue/buffer layer). Rewrote the comment to describe actual behavior.
  • Removed the dead PersistMessageOutcome::redaction_applied field — hardcoded to false at all four construction sites in PersistenceService::persist_message and read by nothing, since no redaction logic exists in the service. Breaking change to a pub struct, 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 passed
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings — clean
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins — 13297 passed
  • RUSTFLAGS="-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 resolves
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked — clean
  • cargo test --doc --workspace --features "desktop,ide,server,chat,pdf,scheduler" — all passed
  • cargo +nightly fmt --check — clean
  • gitleaks protect --staged --no-banner --redact — no leaks
  • Rebased onto origin/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)

…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
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes refactor Code refactoring without functional changes size/S Small PR (11-50 lines) labels Jul 13, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 13, 2026 01:32
@bug-ops
bug-ops merged commit 14dca24 into main Jul 13, 2026
43 checks passed
@bug-ops
bug-ops deleted the fix/5962-persistence-stale-todo-dead-field branch July 13, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation refactor Code refactoring without functional changes rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

1 participant