📔 feat: Preserve Owner Text During PII Redaction - #16311
Conversation
|
Review handoff for exact remote head PR 2 adds opt-in text-only interactive redaction, atomic canonical text plus encrypted owner sidecar storage, a tenant/owner-authorized batch view, and a display-only UI context. Normal history, sharing, exports, request execution, and diagnostics do not receive the original. The browser test inspects the actual mock-provider message projection, then exercises owner reload, network retry, sharing, unauthorized retrieval, ciphertext storage, and deletion. Verification: 681 focused tests passed (139 API, 142 data-schemas, 14 filter-schema, 74 client, 312 legacy/controller); the final browser test passed; all four changed TypeScript workspace checks, package builds, and staged static checks passed. The synthetic PII canary was absent from the successful browser-run server log. Invariant self-review covered ingress ordering, initial and fallback writers, persistence failure/admission, retry identity, tenant and owner isolation, canonical/share readers, display-cache invalidation, expiry/deletion, and rollback. No independent review has arrived for this head yet. Explicit limits: the default is unchanged; non-text and alternate ingress retain blocking; no historical migration or bound-secret protection is enabled here. The sidecar shares message deletion/retention. CREDS_KEY rotation without retaining the old key makes prior originals unreadable; canonical filtered content remains usable. Local Lighthouse was attempted before and after UI changes but did not produce a passing result: the initial full-browser launch lacked system libraries and the later audit exceeded the 90-second tool budget. No performance score is claimed. Light/dark screenshots were captured, but GitHub media upload rejected App authentication and they are not attached. CI and fresh review still need to cover this SHA. |
|
Lighthouse CI failed. The last 80 log lines contain the measured budgets and assertion failures. |
|
Review handoff for exact remote head |
|
@codex review the latest head |
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: 5634f3fa08
ℹ️ 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".
|
Review handoff for exact remote head |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28ed3d1ea8
ℹ️ 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".
# Conflicts: # api/server/controllers/agents/__tests__/request.partialDisconnect.spec.js # api/server/controllers/agents/__tests__/request.resumeMetadata.spec.js # client/src/locales/en/translation.json
|
Review handoff for exact remote head |
|
@codex review the latest head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27bd2242a1
ℹ️ 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".
|
Exact-head review handoff: |
|
New exact-head review handoff: |
|
Exact-head review handoff: |
|
Exact-head review handoff: |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22734756b2
ℹ️ 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".
# Conflicts: # api/app/clients/BaseClient.js # api/server/controllers/agents/request.js # api/server/routes/agents/__tests__/abort.spec.js # api/server/routes/agents/index.js # api/server/routes/messages.js # client/src/components/Chat/ChatView.tsx # client/src/locales/en/translation.json # e2e/setup/fake-model.js # packages/data-schemas/src/methods/message.ts
|
Exact-head review handoff: |
|
Exact-head review handoff: |
|
@codex review the latest head, final review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fad416b74e
ℹ️ 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".
|
Head: Integrated Agent/BaseClient/Stop regressions: 461 passed. API and client typechecks passed before the final hook-dependency cleanup. Query/policy regressions, browser build, final checks and independent frozen-head review are running. |
|
Head: Independent review of the preceding head found two P2 defects. Both are fixed here: captured turns without a persistence gate fail before model invocation; screenshots pin the rendered conversation and DOM node across mounting, cloning, encoding and download. No findings rejected. Policy: 220 tests passed. Agent/BaseClient/Stop: 465 passed. Screenshot/owner/export/rendering: 49 passed before the final nullability-only cleanup. API/client types and API/browser builds passed. Browser privacy and safe PNG export: 3 passed. Final UI/static checks, CI, Lighthouse and fresh independent review are being collected. |
|
Head: The preceding independent review found three P2 defects. This head gates automatic extraction on admitted protected persistence, passes exact canonical token trust into memory inspection, and retains server-only token provenance through native fork/duplicate/share copies. Untrusted imports and canonical overwrites strip it; ordinary reads and public/export DTOs exclude it. No findings rejected. Policy/memory: 188 tests passed. Agent/BaseClient/native-copy/import: 628 passed. Mongo privacy/share: 117 passed. API/data-schemas types and builds passed. Real-browser native copies, follow-up model calls, sharing and repeated duplication passed. Final checks, CI and independent review are running. |
|
Head: Carries the memory-admission and native-copy token-provenance fixes from API policy/memory: 188 passed. Agent/BaseClient/copy/import: 628 passed. Mongo message/privacy/share: 305 passed. Changed workspace types, builds and touched-file quality checks passed. Native-copy browser scenario passed. Final-head CI and review are being collected. The prior head passed Lighthouse CI; its review does not cover this new SHA. |
|
Head: Integrated latest dev without rewriting history. Protected admission is now irrevocable across terminal recovery; rejected turns cannot create error history or be revived by a later write. Immediate title inference waits for the same admitted protected persistence, including cancellation and write failure. Merged-head policy/memory/share tests: 388 passed. Agent/BaseClient/recovery/native-copy/import tests: 808 passed. Four shared package builds passed. The real-browser rejected-history regression passed before the dev merge. Final types/static/storage/browser gates, CI and fresh exact-head independent review are running. No findings rejected or current-head clean-review result claimed. |
|
Head: Fixes two P2 findings from the preceding review. Protected persistence waits for every starting root's inspected native input before any root invokes its model. Pre-admission Stop cancels the pending protected writer; ordinary and already-admitted Stop keep their durability behavior. Initial summarization detours fail closed, avoiding model work before admission or parallel-barrier deadlock. Policy/private/admission/memory: 289 tests passed, including real SDK parallel-root and actual callback-manager regressions. Agent/BaseClient/recovery/Stop: 651 passed. API types passed. Final build/static/browser checks, CI and independent exact-head review are running. No findings rejected. |
|
Reviewed head: Independent review completed with no new findings. All supported prior findings are fixed; none rejected. It revalidated the full diff and lifecycle boundaries, with six dependency-free checks. Dependency-backed verification was run by the implementation workflow, not independently by the reviewer. Current-head checks: 940 focused tests, five browser scenarios, API types/build and PR-wide static gates passed. Lighthouse CI passed. Six memory E2E CI shards remain running; no failures. |
|
@codex review the latest head, final review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Opt-in
filters.messages.pii.action: redactfilters fresh text-only interactive Agent turns. Owners can reload encrypted originals through a separate authenticated display endpoint. Default behavior and unsupported ingress remain blocking.Canonical filtered text feeds models, storage, ordinary reads, search, sharing and exports. Originals/ciphertext stay outside those paths and diagnostics.
Mechanism
select: falsesidecars share message deletion/TTL. Domain-separated AES-GCM derived fromCREDS_KEYbinds owner, tenant, conversation, message, revision and canonical text.Scope and rollout
Fresh text-only interactive Agent submissions only. Not included: default-on protection, alternate ingress, files/quotes, edits/regenerations/resumes, bound-secret/background-tool redaction or historical migration. Unsaved denied first turns do not advertise recoverable originals. A fresh protected turn requiring automatic summarization before initial native admission fails closed in this slice; it neither invokes that model early nor deadlocks parallel roots.
A retained valid
CREDS_KEYis required. No previous-key ring: key loss/rotation makes older originals unavailable; canonical history remains usable. Preserve encrypted key backups. Rollback toblockstops new transformations without restoring originals into canonical storage. Older builds may block native copies whose provenance they cannot recognize; they do not gain access to originals. Historical PII and infrastructure request-body capture are not removed.Verification
tsc --noEmit, real API build and PR-wide static checks passed.Integrated
dev@abab0d3c6d48dac3c58538ffa404676b9e477440without rewriting history. Pushed and independently reviewed head:7b9013e45a949e3aa1d44485c79d024d0539baed. Original Codex threads are answered and resolved. All supported independent findings are fixed; current-head review found none. No findings rejected.