Skip to content

fix(privacy): close the remaining Codex P1 gaps after #522 merged - #537

Merged
ScriptedAlchemy merged 4 commits into
codex/tracedecay-total-redesign-planfrom
cursor/at-rest-purge-and-batch-evidence-d808
Aug 19, 2026
Merged

fix(privacy): close the remaining Codex P1 gaps after #522 merged#537
ScriptedAlchemy merged 4 commits into
codex/tracedecay-total-redesign-planfrom
cursor/at-rest-purge-and-batch-evidence-d808

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Follow-up to the Codex P1 review on #522, which merged into codex/tracedecay-total-redesign-plan before all findings were fully settled. This PR closes the gaps that remain on the base.

P1 dispositions on the merged base

  1. Purge superseded secret payloads during remediation — the merged rescan quarantines every detector hit (terminal payload-access transition, secure store-level erase). What remained open is the reviewer's stated invariant for ordinary curation updates: a correction commit against a dirty legacy fact still left the original plaintext in memory_v2_assertion_payloads (and its FTS backing). This PR enforces it in the store: after a correction commits, every superseded payload row is re-evaluated under the one canonical sanitizer; rows the detector would refuse or rewrite are securely deleted in the same transaction (the FTS delete trigger scrubs the index), while clean history stays readable for as-of reads. A missing payload row on a superseded assertion is now an accepted replay state.
  2. Split remediation into bounded curation batches — landed in the merged feat(privacy): rescan at-rest LCM store bytes under the current detector #522 (one bounded curation commit per 64-fact read page). What remained open is its behavioral evidence: the 257-hit test seeded facts with 257 sequential adds, which is quadratic under per-write graph publication and ran ~407 s — past the CI nextest terminate ceiling (10 s × 36). This PR seeds the bulk through one store-level curation Add batch (a clean anchor fact supplies the reviewed evidence reference each curation add requires), cutting the two remediation tests to ~3.6 s total while strengthening the assertions (clean-anchor count, per-batch facts_removed sum, zero secret-bearing payload rows at rest).
  3. Bind project-scoped reads to the selected project — fully landed in the merged feat(privacy): rescan at-rest LCM store bytes under the current detector #522: DashboardApplicationRuntime::for_project_root rebinds the daemon transport to the selected project's exact root and build_selected_project_state fails closed when rebinding is impossible, covered by selected_project_runtime_rebinds_to_the_selected_root. Verified present on the base; no further change is needed, so this PR carries none.

Changes

  • crates/tracedecay-runtime-core/src/store/memory/crud/commands.rs — purge detector-flagged superseded payload rows inside the correction commit.
  • crates/tracedecay-runtime-core/src/store/memory/crud/commit.rs — accept a purged superseded payload row as consistent during assertion replay verification.
  • crates/tracedecay-runtime-core/src/store/memory/crud/{mod,project}.rs — expose the shared payload wire builder to the commit path.
  • crates/tracedecay-runtime-core/src/store/memory/crud/tests.rs — pin that a clean superseded payload row survives an ordinary update.
  • src/daemon/privacy_remediation.rs — batch-seeded over-capacity rescan fixture with tightened assertions.

Verification

  • cargo test -p tracedecay-runtime-core --lib store::memory — store suite including the new retention test.
  • cargo test -p tracedecay --lib daemon::privacy_remediation — both remediation journeys (quarantine + erase, over-capacity batching) in ~3.6 s.
Open in Web Open in Cursor 

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 69354d2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review August 19, 2026 22:30
@ScriptedAlchemy
ScriptedAlchemy force-pushed the cursor/at-rest-purge-and-batch-evidence-d808 branch from 835ab90 to 0d062af Compare August 19, 2026 22:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 835ab90916

ℹ️ 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".

Comment thread crates/tracedecay-runtime-core/src/store/memory/crud/commands.rs Outdated
Comment thread crates/tracedecay-runtime-core/src/store/memory/crud/commands.rs Outdated
Comment thread crates/tracedecay-runtime-core/src/store/memory/crud/commit.rs Outdated
@ScriptedAlchemy
ScriptedAlchemy force-pushed the cursor/at-rest-purge-and-batch-evidence-d808 branch 3 times, most recently from d0ef4b4 to 84faac8 Compare August 19, 2026 22:51
@ScriptedAlchemy
ScriptedAlchemy force-pushed the cursor/at-rest-purge-and-batch-evidence-d808 branch from 84faac8 to 9426c27 Compare August 19, 2026 23:03
cursoragent and others added 3 commits August 19, 2026 16:11
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@ScriptedAlchemy
ScriptedAlchemy force-pushed the cursor/at-rest-purge-and-batch-evidence-d808 branch from 9426c27 to 309f82a Compare August 19, 2026 23:11
@ScriptedAlchemy
ScriptedAlchemy merged commit fa9c631 into codex/tracedecay-total-redesign-plan Aug 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants