Skip to content

fix: prevent false forget receipts and redaction resurrection#5

Open
NeerajCodz wants to merge 1 commit into
mainfrom
codex/propose-fix-for-security-vulnerability
Open

fix: prevent false forget receipts and redaction resurrection#5
NeerajCodz wants to merge 1 commit into
mainfrom
codex/propose-fix-for-security-vulnerability

Conversation

@NeerajCodz

Copy link
Copy Markdown
Contributor

Motivation

  • The runtime forget_memory path reported successful receipts for derivative backends it never touched, which could mislead callers into believing redaction/deletion had been propagated.
  • The consolidate_session flow re-ingested full session transcripts with a deterministic ID, allowing previously redacted or soft-deleted memories to be resurrected as active plaintext records.
  • Used the rust-best-practices skill to ensure changes are minimal and idiomatic.

Description

  • Updated forget_memory in src/runtime/governance.rs to keep the canonical postgres receipt as ok but mark derivative backend receipts (qdrant, neo4j, redis, s3) with status: "not_implemented" so the API no longer falsely claims propagation.
  • Hardened consolidate_session in src/runtime/consolidation.rs to compute the deterministic consolidation memory_id before ingestion and return Err(CoreError::InvalidInput) if an existing memory with that ID exists and its status is not Active, preventing re-creation of forgotten/redacted memories.
  • Changes are limited to src/runtime/governance.rs and src/runtime/consolidation.rs and preserve existing behavior where applicable while removing misleading receipts and blocking unsafe re-ingestion.

Testing

  • Ran cargo test -p nextral --lib --quiet and all library tests passed (11 passed, 0 failed).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant