Skip to content

V37 Gate 7: Conversation Persistence Privacy#117

Merged
geraldarthurdavis merged 1 commit into
version/v37from
v37/gate-7-conversation-persistence-redaction
May 24, 2026
Merged

V37 Gate 7: Conversation Persistence Privacy#117
geraldarthurdavis merged 1 commit into
version/v37from
v37/gate-7-conversation-persistence-redaction

Conversation

@geraldarthurdavis

Copy link
Copy Markdown
Contributor

Summary

  • Adds the package-owned ConversationPersistencePrivacyRedaction canon source, generated artifact, exports, generator, and gate checker.
  • Redacts conversation message content, attachment metadata, pipeline execution payloads, stream metadata, and persistence error logs before durable storage.
  • Adds source-safe persistence privacy UI controls, docs, workflow wiring, and focused tests.

Validation

  • pnpm run generate:v37-conversation-persistence-privacy-redaction
  • node --test --test-force-exit packages/protocol/test/conversation-persistence-privacy-redaction.test.js
  • pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/conversations/tests/privacy.test.ts --runInBand --forceExit
  • pnpm --dir uapi exec jest tests/api/conversationPersistencePrivacyRedaction.test.ts tests/conversationPersistencePrivacyPanel.test.tsx --runInBand
  • BITCODE_RUN_UAPI_ROUTE_TESTS=1 pnpm run check:v37-gate7
  • pnpm --filter @bitcode/api build
  • pnpm -C uapi exec tsc --noEmit --pretty false
  • pnpm --filter @bitcode/protocol test
  • pnpm -C uapi run lint
  • bash scripts/check-import-casing.sh
  • bash scripts/find-uppercase-raw-promptparts.sh
  • node scripts/check-bitcode-spec-family.mjs --version V37 --mode draft --current-target V36
  • node scripts/check-v37-gate1-conversations-roadmap-opening.mjs --skip-branch-check
  • node scripts/check-v37-gate2-conversation-session-route-history-contracts.mjs --skip-branch-check
  • node scripts/check-v37-gate3-conversation-stream-event-contracts.mjs --skip-branch-check
  • node scripts/check-v37-gate4-conversation-writing-workspace.mjs --skip-branch-check
  • node scripts/check-v37-gate5-conversation-source-selector.mjs --skip-branch-check
  • node scripts/check-v37-gate6-conversation-terminal-handoff.mjs --skip-branch-check
  • node scripts/check-v37-gate7-conversation-persistence-privacy-redaction.mjs --skip-branch-check
  • git diff --check
  • git diff --cached --check

@vercel

vercel Bot commented May 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
engi-uapi Ready Ready Preview, Comment May 24, 2026 4:44pm

@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: a99c89d249

ℹ️ 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 on lines +114 to +116
if (PROTECTED_CONTEXT_RE.test(redacted)) {
redactionApplied = true;
redacted = redacted.replace(PROTECTED_CONTEXT_RE, '[redacted:conversation-persistence-protected-context]');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Redact every protected-context match in persisted text

redactConversationPersistenceText only replaces the first protected-context match because PROTECTED_CONTEXT_RE is used without a global replacement path. If a message contains multiple protected markers (for example both raw prompt and later protected source segments), only the first marker is masked and subsequent protected segments remain in the stored payload, which weakens the privacy guarantee this gate introduces.

Useful? React with 👍 / 👎.

Comment on lines +199 to +208
const retentionPosture =
visibilityTier === 'operator_only'
? 'operator_audit_only'
: visibilityTier === 'organization_visible'
? 'durable_organization_visible'
: visibilityTier === 'buyer_visible'
? 'buyer_rights_visible'
: visibilityTier === 'reviewer_visible'
? 'reviewer_limited_visible'
: 'durable_user_visible';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Map public visibility to ephemeral retention posture

buildConversationPersistenceEnvelope accepts visibilityTier: 'public' but falls through to 'durable_user_visible' because the retention mapping omits a public branch. This produces durable retention metadata for a tier that should be route-local/ephemeral (as already modeled in the UI helper), so any caller that sets public will emit the wrong persistence policy in envelope proofs and downstream audits.

Useful? React with 👍 / 👎.

Adds package-owned ConversationPersistencePrivacyRedaction canon source and generated artifact.

Redacts conversation message content, attachment metadata, and execution payloads before durable storage.

Wires source-safe persistence privacy UI, tests, docs, and gate/canon workflow validation.
@geraldarthurdavis
geraldarthurdavis force-pushed the v37/gate-7-conversation-persistence-redaction branch from 5d02a61 to ca3154c Compare May 24, 2026 16:43
@geraldarthurdavis
geraldarthurdavis merged commit 1f7a2f0 into version/v37 May 24, 2026
29 checks passed
@geraldarthurdavis
geraldarthurdavis deleted the v37/gate-7-conversation-persistence-redaction branch May 24, 2026 16:59
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.

1 participant