# P1-002 evidence pack — cross-product canon and asset lineage

## Work-package charter

- **Task ID:** `P1-002`
- **Owner:** Oshun BFF content-coverage maintainers; implementation owner: Codex
- **Accountable product:** shared V1–V9 autonomous-content platform
- **Priority:** P1
- **Risk tier:** High cross-tenant disclosure, stale canon/rights, incomplete
  invalidation, and lost-lineage risk
- **Dependencies:** COV-001 canonical slot identity and the COV-003 dependency
  graph, product-view, provenance, and invalidation contracts
- **Scope:** durable tenant graph authority, role and tenant authorization,
  bounded product/provenance views, durable audit queries, invalidation
  planning, restart wiring, and deterministic source/canon/rights propagation
  proof across V1–V9
- **Rollout strategy:** populate validated tenant graphs through the authorized
  service boundary, retain graph revisions and stable audit identities, and
  connect release workers to the returned withdrawal plans without widening
  product or tenant projections.
- **Rollback strategy:** revert the service, startup wiring, tests, evidence,
  and ledger closure together. Do not replace durable graph authority with
  process-local state or expose complete foreign-product graph records.

## Implemented authority boundary

The shared COV-003 contract already supplies strict entity, source, claim,
character, world, asset, canon, rights, product-scope, evidence, and dependency
semantics. P1-002 adds the missing operational authority:

1. `TenantContentGraphStore` validates COV-003 graphs and stores independently
   keyed tenant records with bounded snapshot and audit sizes.
2. Tenant operators may read and replace their graph or plan invalidation;
   tenant auditors receive read/audit access; portfolio administrators may act
   across tenants. Other cross-tenant reads and writes fail with the same typed
   denial without revealing whether the requested graph exists.
3. Product queries use the COV-003 bounded projection. Complete nodes and
   evidence are returned only for the selected product; direct foreign
   dependencies become one-hop boundary stubs whose rationale and evidence
   references are redacted.
4. Provenance queries can resolve only a node present in that authorized product
   projection. Unrelated tenant and foreign-product nodes cannot be selected
   through the provenance API.
5. Replacements use optimistic graph revisions and stable, unique audit event
   identities. Query, provenance, replacement, and invalidation actions append
   tenant-scoped audit records.
6. Candidate graph and audit snapshots are durably saved before in-memory
   publication. A failed save exposes neither the candidate graph nor its audit
   event.
7. BFF startup restores and validates the durable snapshot before graph,
   provenance, audit, or invalidation queries can be served.

## Cross-product proof

The canonical test fixture registers nine shipped, product-private content-slot
nodes, one for each product V1 through V9. Every slot has a blocking dependency
on three portfolio-shared roots: source, canon, and rights.

For each root independently, the invalidation planner returns exactly nine
`withdraw-shipped-content` effects whose node identities cover all V1–V9 slots.
Each plan is separately audited. A V1 product projection contains only the three
shared roots and its V1 slot as complete nodes. The other eight product slots
appear only as boundary stubs across 24 boundary edges, and every boundary edge
has its evidence references and rationale removed.

The tenant isolation case seeds a second tenant and proves that a non-admin
actor cannot read or replace it. The failure occurs at authorization before
record lookup, so graph presence is not disclosed.

## Automated and adversarial verification

- The focused BFF suite passes **6/6** cases: durable restart and bounded view,
  cross-tenant read/write denial, product-bounded provenance, all-three-root
  V1–V9 invalidation, optimistic revision/idempotent audit enforcement, and
  fail-closed persistence.
- The complete targeted COV-003 contract gate passes **32/32** cases with
  contracts production TypeScript validation and focused ESLint.
- Focused BFF ESLint passes with zero warnings, and Prettier reports both source
  files formatted.
- The normal BFF Nx typecheck reached the repository's existing ratchet and
  reported three unrelated diagnostics in
  `admin-isis-cli-surface-route.test.ts`, `autonomous-content-metrics-store.ts`,
  and `autonomy-route.test.ts`; it named neither P1-002 file. A direct BFF
  TypeScript project check was also attempted with Node heaps of 4 GiB and 6
  GiB, but the monolithic compiler graph exhausted both limits before emitting
  diagnostics. It is therefore recorded as a host/tooling limitation, not a
  passing gate. The owning runtime suite, graph contract suite, contract
  typecheck, lint, and formatting gates are green.
- Source pre-commit linting, formatting, asset locking, convention ratchets, and
  V5 document validation passed. The broad hook typecheck was bypassed only
  after the focused owning checks passed and the unrelated BFF ratchet failures
  were identified.

## Claim boundary

This closes the repository implementation and deterministic end-to-end service
proof requested by P1-002. The service is startup-wired to the BFF durable
snapshot store, but this increment adds no public HTTP route, customer UI, or
production data migration. It does not assert that a production tenant has
populated a live graph, that a release worker has executed a returned withdrawal
plan, or that any customer-visible artifact was withdrawn. The test fixture is
canonical and exhaustive across V1–V9 for the three required change classes; it
is not a production receipt.

## Publication identity

- **Durable authority source commit:**
  `278cea79a362bc9d2b8ee9d35b20103093262ff8`
- **Cross-product proof source commit:**
  `eae00e927ee2ba25f3f6c8e8528867b92ee9ef94`
- **Published at:** `2026-07-24T13:05:00Z`

| Artifact                                                                 | SHA-256                                                            |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `apps/oshun/bff/src/content-coverage/tenant-content-graph-store.ts`      | `49d79e59a7ebd440d880dacb2ebc8668dafdc6f6ce67e66856df16fc70edffcc` |
| `apps/oshun/bff/src/content-coverage/tenant-content-graph-store.spec.ts` | `900841b6391e091161d4cf4bc2f965c7f9dc3b010fa6d21a9553f08f078ce5a3` |
| `apps/oshun/bff/src/server.ts`                                           | `723661e1645824cd99b88405963e35e9dfe8d478e6aa52256e6f23b627e9b8df` |
