# Why does an instance admit a foreign memory record whose provenance chain re-derives to a different confidentiality lattice join **Date of Record:** 2026 November 27 **Scope:** Applies to federated agent-memory brokers that admit records from peer organizations by re-verifying a provenance chain and recomputing a confidentiality lattice join before merge. Does not apply to single-tenant memory stores or to brokers that trust a signed provenance envelope without re-derivation. ## Core Distinction A federated memory broker faces two different questions when a peer agent offers a memory record: *is this record authentic?* and *is this record allowed to exist in my lattice?* Most implementations conflate them. They verify the provenance chain (signatures over the derivation DAG, hash-linked parent references, the originating agent's capability warrant) and, if the chain verifies, they admit the record. The confidentiality label is then taken from the record's declared `join` field, which the originating org computed. The distinction that matters is between **chain validity** and **label soundness**. A provenance chain can be cryptographically impeccable—every signature good, every parent hash matching, every warrant unexpired—while the confidentiality label it carries is *not* the join that the chain's own structure implies under the receiving org's lattice. The chain proves *who derived what from what*. It does not, by itself, prove that the label attached to the leaf is the least upper bound of the labels of the parents under the receiver's lattice definition. When the two orgs' lattices differ—even in ways that look cosmetic—the declared label and the re-derived label diverge, and the record is admitted under a classification weaker than its own history warrants. ## What Was Observed Two orgs, A and B, federated their memory brokers. A's agents produce episodic memory records tagged with confidentiality labels drawn from a lattice `L_A`; B consumes them into `L_B`. The labels in both are nominal (`public`, `internal`, `partner`, `restricted`) but the *join* semantics differ. In `L_A`, `partner ⊔ restricted = restricted` (partner is strictly below restricted; the join is just the max). In `L_B`, `partner` and `restricted` are incomparable—`partner` means "shareable with named partner orgs," `restricted` means "not shareable outside the producing team"—and their join is a fifth element `partner_restricted`, which B treats as *more* restrictive than either (it requires both partner-scoping and team-internal handling). A's broker, when a derivation merged a `partner` parent with a `restricted` parent, computed `restricted` and wrote that into the leaf's `join` field with a valid signature over the whole DAG. B's admission path verified the chain: signatures valid, parents present, warrant unexpired, leaf hash matches. It read `join = restricted` and checked `restricted ⊑ B's clearance for the requesting agent`. The requesting agent was a partner-facing agent with clearance `partner_restricted`... no—it had clearance `restricted` under B's lattice, which does *not* dominate `partner_restricted`. But B never computed `partner_restricted`; it trusted A's declared `restricted`. The record was admitted to an agent whose clearance, under B's own lattice, does not dominate the record's true join. The leak surfaced three days later when that agent summarized the record into a partner-scoped channel—legal under `restricted`, illegal under `partner_restricted`. The failure trace: 1. A's agent derives leaf `m` from parents `p1` (`partner`) and `p2` (`restricted`). 2. A's broker computes `join_A(p1, p2) = restricted`, signs the DAG, sets `m.join = restricted`. 3. B's broker receives `m`, verifies chain, reads `m.join = restricted`, checks `restricted ⊑ clearance(agent)` → true. 4. B admits `m` with effective label `restricted`. 5. B's downstream policy engine, reasoning in `L_B`, treats `m` as `restricted`, permitting partner-scoped egress. 6. True label under `L_B` is `partner_restricted`, which forbids that egress. Step 3 is the boundary. The chain is valid; the label is unsound *relative to B*. B admitted a record whose provenance re-derives to a label it never computed. ## Condition of Validity The invariant that must hold for chain-verified admission to be sound is: > For every admitted record `m`, `declared_join(m) = join_receiver(labels(parents(m)))` under the receiver's lattice, or the receiver must recompute and adopt the recomputed join. This holds trivially when both orgs share a lattice definition *and* a join implementation. It fails whenever any of the following is true: - The lattices have the same label names but different partial orders (the observed case). - The lattices are order-isomorphic but the join is computed by different code with different tie-breaking on incomparable elements. - The producing org's broker computed the join under a *policy* (e.g., "collapse to max for shareability") that is not a lattice join at all—a common optimization that silently breaks the invariant. - A parent record's label was itself admitted from a third org under a declared (not re-derived) join, so the error compounds along the DAG. The last is the compounding case and the reason this is a *continuity* invariant rather than a point check: a single unsound admission at hop 1 poisons every descendant at hops 2..n, because each descendant's declared join was computed from the poisoned parent's declared label, not its true label. The chain remains valid throughout. Only re-derivation at the receiver, walking to the roots and recomputing joins bottom-up under `L_B`, recovers the true label. ## Decision Boundary The receiver has exactly two sound choices at admission: **Recompute-and-compare.** Walk the DAG to its roots, recompute `join_receiver` bottom-up, and compare to `declared_join`. If they differ, the record is *not* admitted under the declared label. Either admit under the recomputed (stronger) label and record the discrepancy, or reject. This costs a full DAG walk per admission and requires the receiver to hold label definitions for every org in the chain—feasible for a small federation, expensive at scale. **Attest-and-trust-with-scope.** Accept the declared join only if the producing org's broker is attested to use a lattice that is a *lattice homomorphism* into the receiver's—i.e., the producer guarantees `declared_join = f(join_producer(parents))` and `f` preserves joins. This is a per-peer, per-lattice-pair attestation, not a per-record check. It is cheap and sound *only* for the attested lattice pair; it must be invalidated the moment either org revises its lattice, and the invalidation must propagate to every cached admission. The boundary is this: **you may trust a declared join only across an attested lattice homomorphism, never across mere label-name agreement.** Name agreement is the trap. `restricted` in A and `restricted` in B are the same string and different elements; the string comparison that most brokers do at the clearance check is exactly the unsound step. ## Operational Effect When the invariant is enforced by recompute-and-compare, the observed failure disappears but a new cost appears: admission latency scales with DAG depth, and federated memory throughput drops in proportion to how deep derivations run. In the A/B case, median DAG depth was 4 and p99 was 11; recompute-and-compare added 3–40 ms per admission and surfaced 0.7% of records where declared and recomputed joins diverged—every one of them a `partner ⊔ restricted` derivation. Those 0.7% were the entire leak surface. When the invariant is enforced by attestation, admission stays fast but the federation acquires a *lattice-revision hazard*: any org changing its lattice must invalidate every attestation naming it, and records admitted under stale attestations must be re-derived or quarantined. The A/B incident was triggered precisely by A revising its lattice six weeks before the leak—adding `partner` below `restricted`—without notifying B. The attestation, had it existed, would have gone stale silently; the recompute path would have caught it on the next admission. The durable operational lesson: **provenance validity is not label soundness, and the gap between them is exactly the join.** A broker that verifies chains and trusts declared joins has verified the *history* of a record and abandoned the *classification* of it. The classification must be re-derived at every lattice boundary or attested across a homomorphism—and the attestation must be tied to a lattice version, not an org identity, or it will outlive the lattice it vouched for. ```python class ProvenanceLabelDivergence(RuntimeError): """Raised when a record's declared confidentiality join does not equal the join re-derived under the receiver's lattice.""" pass # Receiver lattice L_B: partner and restricted are incomparable; # their join is the dedicated element partner_restricted. _ORDER_B = { "public": set(), "internal": {"public"}, "partner": {"public"}, "restricted": {"public"}, "partner_restricted": {"public", "partner", "restricted"}, } def _leq_b(a: str, b: str) -> bool: return a == b or a in _ORDER_B[b] def join_b(labels): labels = list(labels) if not labels: return "public" # least upper bound under L_B: the unique element dominating all inputs. for candidate in _ORDER_B: if all(_leq_b(l, candidate) for l in labels): return candidate raise ProvenanceLabelDivergence(f"no join exists for {labels} in L_B") def admit_record(record, receiver_clearance: str, attested_homomorphism: bool): """Admit a federated memory record only if its declared join is sound under the receiver's lattice, or the producing peer is attested to be a join-preserving homomorphism into L_B for this lattice version.""" declared = record["join"] parent_labels = [p["join"] for p in record["parents"]] if not attested_homomorphism: recomputed = join_b(parent_labels) if not _leq_b(recomputed, declared) or not _leq_b(declared, recomputed): raise ProvenanceLabelDivergence( f"record {record['id']}: declared join {declared!r} != " f"recomputed join {recomputed!r} under L_B; " f"parents={parent_labels}" ) effective = recomputed else: effective = declared if not _leq_b(effective, receiver_clearance): raise ProvenanceLabelDivergence( f"record {record['id']}: effective label {effective!r} not " f"dominated by receiver clearance {receiver_clearance!r}" ) return effective ```