Eve library

PRIV-001 evidence pack — sensitive prompt and run data governance

Evidence

Revision 1

On this page

Status: repository-complete / closed. The repository now has one canonical, executable sensitive-data policy; metadata-only prompt, learner, source, feedback, direction, and artifact descriptors; tenant-bound V9 cache identity; actual authenticated encryption at V1's durable snapshot boundary; and audited break-glass, subject export/deletion, legal-hold, backup-purge, and incident-evidence controls. This closure does not claim a deployed KMS, production vault, backup purge worker, legal-hold authority, or completed production data-subject request.

Work-package charter#

  • Task ID: PRIV-001
  • Owner: cross-version privacy, security, persistence, and runtime maintainers; implementation owner: Elikem Agudogo
  • Accountable product: shared V1–V9 autonomous-content privacy and runtime governance plane, with V1 durable autonomy, V6 cognition, and V9 lesson generation as the invoked integrations
  • Priority: P1
  • Target milestone: 2026-07-15 SOTA gap-closure program
  • Risk tier: high sensitive-data disclosure, tenant-isolation, cryptographic-integrity, retention/deletion, and privileged-access risk
  • Dependencies: RUN-001 run/artifact identity and OBS-001 metadata-only tracing; V1 durable autonomy storage; V6 governed runs; V9 Prometheus generation/cache; managed envelope keys, durable metadata/audit storage, identity/approval, retention/backup, legal-hold, incident, and data-subject operations for production use
  • Affected schemas and content slots: sensitive-data governance schema version 1 and the prompt, source, likeness, voice, learner-data, private-memory, human-feedback, standing-direction, and generated-artifact classes; V1 protected snapshot version 1; V6 run-start event metadata; V9 wonder/learner/source descriptors and tenant-bound lesson cache/ledger identity. No raw body was added to a trace, event, or ledger.
  • Linked task IDs: PRIV-001, OBS-001, RUN-001, and OPS-003
  • Audit finding: V6 run events hashed the combined prompt but had no canonical data-class policy; V9 learner/source context and cache identity were not tenant-governed; V1 persisted its full review/learning snapshot as plaintext; and the repository had no shared retention, deletion, legal-hold, backup, audited break-glass, or incident-evidence control surface.
  • Repository objective: make metadata-only representation the default, apply one explicit policy to every named sensitive class, encrypt the actual V1 durable body, tenant-partition V9 context/cache identity, and make rare body access privileged, short-lived, dual-approved, one-time, and auditable.
  • Rollout strategy: additive canonical contracts and descriptors; fail closed when durable V1 storage lacks a 32-byte key and key-version reference; migrate the legacy singleton only into its designated oshun-system tenant.
  • Rollback strategy: revert source commit e155aa7f2ef852e550028506b0dba38513821809 after safely migrating any newly encrypted V1 snapshots back through an explicitly authorized operator path.
  • Evidence-pack location: this file.

Closure matrix#

Ledger requirement Closure proof
Default traces to metadata, hashes, typed references, and bounded redacted previews rather than full bodies SensitiveDataDescriptor permits only hash-only, typed-reference, bounded-redacted-preview, or encrypted-body-reference representations. High-risk likeness, voice, learner, and private-memory classes never preview. The metadata guard normalizes Unicode/key separators, rejects common raw-body aliases, and rejects descriptor-spoof attempts. V6 run-start events and V9 result context retain descriptors and character/count metadata, never bodies.
Define collection, purpose, encryption, access, tenant isolation, retention, deletion, legal hold, audit, and incident policy for every named class SENSITIVE_DATA_POLICIES covers prompt, source, likeness, voice, learner data, private memory, human feedback, standing direction, and generated artifacts. Every policy fixes allowed purposes, prohibited secondary use, authenticated envelope encryption, tenant/data-class key scope, least privilege, deny-and-audit cross-tenant behavior, body/metadata/backup windows, cryptographic shred, exact-record holds, body-free audit, and metadata-only incident evidence.
Apply policy to V6 full-prompt events, V9 learner/source context, and V1 review/learning snapshots V6 replaces its ad hoc combined prompt hash with distinct prompt/system descriptors and asserts the event is metadata-only. V9 inventories wonder, complete learner context, and grounded source context, and partitions cache keys by tenant while ledgering only a tenant hash. V1 encrypts the actual full durable snapshot containing artifacts, feedback, learner state, and standing direction using AES-256-GCM with tenant/key/inventory/time-bound authenticated data.
Privileged, audited break-glass retrieval only where replay or incident response truly requires bodies SensitiveDataGovernanceController admits only authorized_replay by a replay operator or incident_response by a privacy responder. It requires a ticket, reason, two distinct non-requester approvals, incident reference where applicable, and expiry no later than 15 minutes. Grants are requester/tenant bound and consumed before the asynchronous vault read, preventing concurrent replay.
Test redaction bypass, cross-tenant access, export/deletion, backup retention, and incident evidence handling Canonical contract tests cover Unicode/control redaction bypass, normalized raw-body keys, descriptor spoofing, tenant denial/audit, subject-scoped export and shred, backup deadlines/purge, exact-record legal hold, metadata-only incident evidence, break-glass expiry/reuse/concurrency, and body-free audit. V1 tests add ciphertext/body absence, wrong tenant/key, ciphertext/inventory/time tamper, malformed base64, fail-closed configuration, and safe legacy migration.

Canonical policy and representation boundary#

The contract makes metadata_only the collection default and permits body collection only for a declared class-specific purpose. Secondary use is prohibited. Structured values are canonicalized before SHA-256 hashing, so object/map/set insertion order cannot create false identities. Descriptors retain:

  • tenant, subject, record, class, purpose, and versioned policy references;
  • content SHA-256 and byte count;
  • an optional typed reference or bounded redacted preview;
  • an optional encrypted body reference plus algorithm and key reference; and
  • body and metadata expiry timestamps.

Previews are normalized with NFKC, control/bidi separators are removed, common tokens/secrets, email, government-ID, payment-card, and phone forms are redacted, and output is bounded to 16–240 characters. Likeness, voice, learner data, and private memory always fall back to hash/reference-only metadata.

Before anything is admitted to logs or audit, assertSensitiveMetadataOnly rejects prompt/system/body/content/text/plaintext/critique/direction/transcript, audio/voice/likeness/memory/feedback/source/learner/artifact body aliases. The guard normalizes full-width Unicode and punctuation and does not trust an object merely because it resembles a descriptor.

Collection, encryption, access, and tenant isolation#

SensitiveDataGovernanceController is the executable policy coordinator. Its vault port requires tenant, data class, record identity, and canonical associated data during seal/open, plus tenant-bound primary destruction and backup purge. A deployment adapter must provide authenticated envelope encryption; descriptors and audit never receive plaintext.

Every access path checks tenant scope. Cross-tenant break-glass attempts are denied and audited without returning a body. Subject exports select only the exact tenant/subject and require either that data subject's identity or a tenant privacy administrator. Subject deletion cryptographically shreds each unheld primary body, records the exact held/deleted record sets, and schedules the class policy's backup deadline.

Break-glass is intentionally narrower than ordinary service processing:

text
replay operator + authorized_replay       ─┐
                                           ├─ ticket + reason + 2 independent approvals
privacy responder + incident_response     ─┘  + <=15m + tenant/requester binding
                                               └─ one body read, atomically consumed

No other purpose or role can create a grant. Missing approvals, self-approval, role/purpose substitution, expiry, reuse, requester substitution, deletion, and tenant substitution fail closed.

Data class Body days Metadata days Maximum backup purge days
Prompt 7 365 30
Source 30 365 30
Likeness 30 2,555 30
Voice 30 2,555 30
Learner data 30 365 30
Private memory 30 365 30
Human feedback 90 730 30
Standing direction 365 730 30
Generated artifact 90 730 30

All policies require deletion on purpose/body expiry, primary cryptographic shred, backup expiry, and no retained body after deletion. The controller tracks primary-deleted versus fully-deleted state and reports overdue backup purges. A legal hold requires non-empty authority and case references and suspends deletion only for the exact held tenant/record; it never weakens access rules.

Audit covers collection, denial, grant, body read, subject export/deletion, backup confirmation, hold placement/release, and incident export. Audit records contain actor/role, tenant, typed record/subject references, purpose, reason, ticket/incident references, outcome, and time—never a body. Incident evidence removes even redacted previews and returns only descriptors plus the applicable audited chain. Retrieving a body during response still requires the normal dual-approved break-glass path.

V1, V6, and V9 application#

V1 durable review and learning snapshots#

wireDurableAutonomyPlane now accepts mandatory privacy configuration and stores each plane under its tenant scope. The complete operational snapshot is serialized and encrypted with AES-256-GCM before the durable store sees it. Authenticated data binds the schema version, store key, tenant, key reference, protection timestamp, and body-free inventory; ciphertext, metadata-inventory, or retention-time tampering fails authentication.

The inventory hashes the full encrypted container and separately hashes review artifacts, human feedback, learner state, and standing direction. It contains no body. Startup with a durable database fails closed unless OSHUN_AUTONOMY_SNAPSHOT_KEY_BASE64 is canonical base64 for exactly 32 bytes and OSHUN_AUTONOMY_SNAPSHOT_KEY_REF identifies the managed key version. The pre-policy plaintext singleton can migrate only into oshun-system; another tenant is rejected, and the plaintext row is removed only after the protected write succeeds.

V6 full-prompt run events#

AgentRunManager no longer emits its ad hoc combined prompt/system digest. Instead, it creates separate canonical prompt and standing-direction descriptors, retains only prompt/system character counts, declares rawBodiesRetained: false, and applies the metadata-only assertion before the event enters the run envelope. Tests place a recognizable private prompt in the run and prove it is absent from serialized event detail.

V9 learner and grounded-source context#

Every forge request now requires a non-empty tenant ID. The result inventories the wonder prompt; the complete profile/mastery/flow/retrieval context; and the grounded concepts, claims, and computed values as hash/typed-reference descriptors. Both blocked and passing results retain the same body-free inventory. Compile, preview-provenance, education-evaluation identity, and cache keys all include the tenant partition. Generation-ledger entries retain only tenantIdSha256, and identical content from two tenants cannot share a cache entry.

Adversarial fixture matrix#

Fixture Result
Secret uses zero-width/control separators or full-width field names Normalization exposes it; preview/body guard redacts or rejects it.
Object adds descriptor marker fields around a raw body Raw body is still detected; descriptor spoof fails.
Learner, memory, likeness, or voice requests a preview Descriptor remains hash/reference only.
One break-glass request has one approval, self-approval, wrong role/purpose, missing incident/ticket/reason, or excessive expiry Grant is denied and audited where record access occurred.
Two callers race one valid grant Grant is consumed before vault I/O; exactly one read succeeds.
Requester, tenant, key reference, ciphertext, inventory, or protection time is substituted Access/authentication fails closed.
Subject requests another subject or tenant Export/deletion is denied or returns only the exact authorized scope.
One subject record is under legal hold Only that record is retained; sibling records are shredded.
Backup deadline passes without confirmation Record appears in the overdue purge report until confirmed.
Incident evidence is exported after a body read Evidence contains hashes/refs and grant/read audit events, never plaintext or preview.
Legacy V1 singleton is seen by a non-system tenant Migration is rejected and the source row remains intact.
Two tenants forge identical V9 content Cache keys differ; each descriptor stays in its tenant.

Automated verification#

Current admitted refresh#

The current refresh ran against repository commit a1b0de763f239d02fb770ecdcadf092866a4ef53 with lockfile SHA-256 08b055786e9b8a6104d5313601d7eef3205dedcf395066fd9a8264c9859d690f on host app-dev-server, Ubuntu 24.04.4 LTS, Linux 6.8.0-134-generic x86_64. The relevant toolchain was Node.js v24.15.0, pnpm 10.25.0, TypeScript 6.0.3, and Vitest 4.1.7.

No live model/provider, customer body, production vault/KMS key, deployed retention or backup worker, legal-hold authority, incident responder, human approval, or production data-subject request was used. Encryption keys, bodies, vaults, approvals, and receipts in the tests are scoped fixtures and are never represented as production privacy evidence.

UTC interval Exit Exact command and result
2026-07-29T11:54:23.546Z–2026-07-29T11:54:24.411Z 0 pnpm exec vitest run --config libs/contracts/vitest.config.ts libs/contracts/src/run-protocol/sensitive-data-governance.spec.ts --maxWorkers=1 — policy, metadata/redaction, tenant, break-glass, export/deletion, hold, backup, incident, and adversarial tests passed 11/11
2026-07-29T11:54:29.304Z–2026-07-29T11:54:30.952Z 0 pnpm exec vitest run --config libs/iris/agents/core/vite.config.ts libs/iris/agents/core/src/agentic/agent-run.test.ts --maxWorkers=1 — governed V6 run metadata and control tests passed 9/9
2026-07-29T11:54:37.361Z–2026-07-29T11:54:45.631Z 0 pnpm exec vitest run --config libs/v9/prometheus/vitest.config.ts --maxWorkers=1 — tenant-bound V9 pipeline/cache/provenance tests passed 8/8
2026-07-29T11:54:53.481Z–2026-07-29T11:55:08.257Z 0 pnpm exec vitest run --config apps/oshun/bff/vitest.config.ts apps/oshun/bff/src/agentic/autonomy-bindings/plane-persistence-privacy.test.ts apps/oshun/bff/src/agentic/autonomy-bindings/autonomy-plane-e2e.test.ts apps/oshun/bff/src/agentic/autonomy-route.test.ts --maxWorkers=1 — 3 files, encrypted V1 persistence/route/E2E tests passed 25/25
2026-07-29T11:55:19.960Z–2026-07-29T11:55:34.751Z 0 pnpm exec tsc -p libs/contracts/tsconfig.lib.json --noEmit
2026-07-29T11:55:34.753Z–2026-07-29T11:55:46.187Z 0 pnpm exec tsc -p libs/iris/agents/core/tsconfig.lib.json --noEmit
2026-07-29T11:55:46.189Z–2026-07-29T11:56:04.233Z 0 pnpm exec tsc -p libs/v9/prometheus/tsconfig.json --noEmit
2026-07-29T11:56:04.235Z–2026-07-29T11:56:23.361Z 0 pnpm exec tsc -p apps/oshun/bff/tsconfig.eval003.json --noEmit

The admitted current suites passed 53/53 value assertions and all four task-scoped typechecks:

  • Unit/schema/contract: all nine data classes, purposes, representation limits, retention/deletion/backup rules, legal hold, audit, incident evidence, break-glass authority, and tenant scope are executable assertions.
  • Integration: V6 run events, V9 pipeline/cache/provenance, and V1's actual durable autonomy adapter consume the canonical privacy boundary.
  • Adversarial/negative: Unicode/redaction bypass, descriptor spoofing, forbidden previews, missing/self/wrong-role approvals, concurrent grant reuse, tenant/requester/key/ciphertext/inventory/time substitution, unauthorized export/deletion, overdue backup, body-bearing incident evidence, unsafe legacy migration, and cross-tenant cache reuse fail for their intended reasons.
  • Repository E2E: the V1 BFF runs a complete autonomy cycle through protected persistence and route handling; ciphertext and authenticated metadata survive the invoked boundary. This is not represented as a deployed KMS, vault, privacy workflow, or production receipt.

UI/accessibility automation, screenshots/media probes, mobile/Unreal automation, production performance/load testing, and a deployed E2E are inapplicable to this evidence-only refresh and the underlying privacy/runtime change. No rendered surface, media artifact, mobile flow, Unreal asset, live provider, or production network boundary changed.

Historical implementation verification#

At source publication, the owning packages passed 4,350/4,350 non-duplicated tests:

Surface Result
Canonical contracts full package 4,115/4,115
Iris agents-core full package 208/208
V9 Prometheus full package 8/8
V1 BFF privacy, autonomy-plane integration, and route suites 19/19

Final post-rebase exact-source suites passed 32/32 tests: 11 canonical privacy tests, 9 V6 run-manager tests, 8 V9 pipeline tests, and 4 V1 protected persistence tests. Contracts, Iris agents-core, V9 Prometheus, the current BFF privacy slice, and the repository-defined full BFF ratchet all typechecked; the ratchet reported zero new app-owned errors. Current contracts emitted build and BFF production bundle passed, as did the Iris emitted build. Explicit ESLint over all 12 changed TypeScript files passed with zero warnings. Prettier and git diff --check passed.

Representative commands:

text
pnpm exec vitest run --config libs/contracts/vitest.config.ts --maxWorkers=1
pnpm exec vitest run --config libs/iris/agents/core/vite.config.ts --maxWorkers=1
pnpm exec vitest run --config libs/v9/prometheus/vitest.config.ts --maxWorkers=1
pnpm exec vitest run --config apps/oshun/bff/vitest.config.ts \
  apps/oshun/bff/src/agentic/autonomy-bindings/plane-persistence-privacy.test.ts --maxWorkers=1
pnpm exec vitest run --config apps/oshun/bff/vitest.config.ts \
  apps/oshun/bff/src/agentic/autonomy-bindings/autonomy-plane-e2e.test.ts --maxWorkers=1
pnpm exec vitest run --config apps/oshun/bff/vitest.config.ts \
  apps/oshun/bff/src/agentic/autonomy-route.test.ts --maxWorkers=1
pnpm exec tsc -p libs/contracts/tsconfig.lib.json --noEmit
pnpm exec tsc -p libs/iris/agents/core/tsconfig.lib.json --noEmit
pnpm exec tsc -p libs/v9/prometheus/tsconfig.json --noEmit
pnpm exec tsc -p apps/oshun/bff/tsconfig.eval003.json --noEmit
NODE_OPTIONS=--max-old-space-size=5120 node tools/typecheck/ratchet.mjs \
  --app apps/oshun/bff --tsconfig tsconfig.typecheck.json
pnpm exec tsc -p libs/contracts/tsconfig.lib.json
pnpm exec esbuild src/server.ts --bundle --platform=node --format=esm \
  --target=node22 --outfile=dist/server.js --sourcemap             # apps/oshun/bff
pnpm exec eslint <all 12 changed TypeScript files> --no-ignore --max-warnings=0
pnpm exec prettier --check <all changed TypeScript/JSON files>
git diff --check

Bounded verification notes#

  • Before the 2026-07-29 focused refresh, the host had 15 GiB RAM, 31 GiB swap, 11 GiB available memory, and 16 GiB free disk. An unrelated checkout's long-running Vitest worker and this checkout's Nx daemon were active, so no broad contracts/workspace matrix, full BFF ratchet, or production build was started. The four focused suites and four typechecks ran serially; available memory remained at 11 GiB during the BFF typecheck.
  • The host had 15 GiB RAM and 31 GiB swap with competing long-lived Codex and Nx processes. Checks ran serially. The complete 182-file contracts run was supervised at intervals no longer than 30 seconds; available memory remained above the 2 GiB stop threshold.
  • Full contracts emitted the existing missing libs/contracts/src/index.js.map source-map warning and passed all 4,115 tests.
  • The repository-defined BFF typecheck ratchet ran with a 5 GiB heap ceiling, stayed above the memory stop gate, and reported zero new app-owned errors. A separate unratcheted full BFF tsc probe completed with hundreds of existing cross-workspace Arete/Yemaya and other baseline diagnostics; the current PRIV-owned slice typechecks cleanly and the production bundle builds.
  • The source commit used HUSKY=0 only after the relevant full/focused tests, typechecks, builds, strict lint, formatting, and diff checks passed. This avoided the known small-host-unsafe hook path that launches hundreds of workspace typechecks in parallel.
  • origin/main advanced through unrelated build/configuration commits. The source rebased without a PRIV file conflict. The binary lockfile conflict was resolved from the protected stash stage, restoring exact Git blob a37431842e330b3a06b030947c25bebdc72bc2b1; it remains unstaged. All 32 focused tests passed again on the published source.
  • Generated Cargo locks and libs/urania/ were not staged.
  • No customer UI, PWA, admin, mobile, Unreal, or visual behavior changed. Frontend skill, Playwright, mobile automation, screenshots, and Unreal verification were inapplicable.

Artifact identity#

Artifact SHA-256
Canonical sensitive-data policy/controller adebd94e70ee9b0028b23a672e4a3bf67e38cba80a95b73937783fa3a4f54b4e
Canonical adversarial contract tests 2c5941e7ccb8348a472f3cf1fcc79646a44741806a1ad65319d2cf32d64b6cb4
V6 governed run manager 1c8d89645d9681a1eca5198b9702e6f55589a61df4332654e8e94cc0e7eae2ed
V9 governed forge pipeline 52d20e2dc066880532ecabf6405cd15985c7b5e1da3429e14dfe661a6b5e134a
V9 tenant-bound compiler/cache 7e9dd3bffaa2a2b8cbd3afe5b98303a7d7cd67790ba121659c3c3d741a19c654
V1 encrypted durable persistence 4ea782f92753eafbb0e8f80912dfc9d772da1bb6a3b7473b99f4de87352c8296
V1 privacy persistence tests 372ea89fcea4661ff86b60d06a82e32489f22515c20d20b3c8d95b800d566e4e

These hashes identify current source at the admitted refresh commit. Later V6 durability/control and V1 restart-safe authority/usage persistence work invalidated three original hashes; the current 53 tests and four typechecks cover the integrated source. Governing versions are sensitive-data governance schema 1 and V1 protected snapshot version 1; V1 uses AES-256-GCM with a tenant/key/version/inventory/time-bound authenticated envelope. No prompt, model/provider, canon, release policy, or quality-rubric version changed in this evidence refresh.

Release, human-authority, blocker, and generated-status disposition#

  • The repository verdict is repository-complete / closed for PRIV-001. Production privacy readiness remains unavailable without managed keys, durable policy/audit state, access identity, retention and backup execution, legal/incident authority, and real data-subject workflow receipts.
  • Break-glass requires two distinct non-requester approvals; holds, incidents, deletion/export, key operation, and production rollout require their owning human/operator authorities. Publishing this repository contract does not itself require those decisions. No reviewer identity, signature, approval, hold, incident, deletion, export, or backup receipt is fabricated here.
  • Remaining external dependencies are a deployed KMS/vault, approved secret delivery, durable audit/metadata storage, retention and backup workers, identity/approval systems, privacy responders, legal-hold authority, and production DSAR/incident operations. Fixtures cannot discharge them.
  • No generated capability/status artifact advertises a production privacy deployment or completed receipt. The completed-work-package admission verifier derives only this checked task's evidence-pack presence and identity; no generated green deployment claim was hand-edited for this refresh.

Scope and remaining deployment seams#

  • The canonical controller is an executable coordination/control contract with a vault port and in-memory reference state. Deployment must bind it to a durable metadata/audit store, managed tenant/data-class envelope keys, access identity, backup lifecycle, retention scheduler, legal authority, and incident/data-subject workflows.
  • V1 now protects the actual repository persistence boundary. Its environment variable must be populated from an approved secret manager; the repository does not represent a checked-in key or a live KMS operation as evidence.
  • V6 and V9 deliberately do not retain prompt/source/learner bodies in their events or ledgers. If a deployment decides replay truly requires a body, it must collect that body through the governed vault path and accept its short retention and break-glass rules; no silent fallback exists here.
  • Backup purge confirmation and legal/incident/DSAR receipts are real operator evidence. Fixtures prove enforcement behavior but are not production receipts.

Publication identity#

  • Source commit: e155aa7f2ef852e550028506b0dba38513821809
  • Source publication tip: e155aa7f2ef852e550028506b0dba38513821809
  • Closure evidence commit referenced by the ledger: ed8aa03040a645714c6e14affad162d1abb37570
  • Current-lineage equivalent closure commit: ca488d65ab7e5a5658c550cfc5b2cbd3607f3f67 (same evidence tree after rebase)
  • Current refresh source commit: a1b0de763f239d02fb770ecdcadf092866a4ef53
  • Current refresh evidence commit: this evidence-only publication commit; the immutable identity is the Git commit containing this file.