Context
The selected T/R/U shape requires Memory Core to own neutral source identity and lifecycle. Local single-user bootstrap may equate subject and tenant only when that deployment mode is explicit.
This is one fully closeable PR leaf under Epic #15145. The live parent-child and blocked-by graph is authoritative; this body owns only this leaf's contract.
The Problem
A connector-owned registry, tenantRepos[], KB SourceRegistry, or AiConfig leaf cannot preserve neutral identity across connector replacement, repository rename, grant rotation, and hosted tenancy. Authentication or MCP tool tier also does not confer source-admin authority.
The Architectural Reality
This is a dedicated Memory-Core operational table/service, not a Native Edge Graph ontology and not ai/services/knowledge-base/source/SourceRegistry.mjs. New service placement under ai/services/memory-core/ matches MailboxService.mjs; every table read/write must reapply a server-authoritative tenant/source predicate because GraphService RLS does not protect new tables.
The Agent OS structure map was run on 2026-07-14. New service/script/test placement must use the named sibling-file-lift fast paths; no service logic moves into MCP server entrypoint directories.
The Fix
Implement stable server-owned sourceInstanceId, canonical provider host/resource kind/provider object identity, mutable display locator, connector/grant attestations without secrets, lifecycle REQUESTED -> PROVISIONED -> ACTIVE -> REVOKED, monotonically fenced registrationEpoch, and an explicit local single-user bootstrap path.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback / Edge Case |
Docs |
Evidence |
| Source registration row |
Discussion #15139 R/T |
Tenant-private neutral identity with lifecycle and epoch |
Unknown/revoked source refuses admission |
Service JSDoc + operator schema |
Lifecycle, rename, revocation, RLS tests |
| Local bootstrap |
Option U |
Subject equals tenant only in explicit local-single-user mode |
Hosted/ambiguous mode refuses |
Deployment docs |
Local-vs-hosted authorization tests |
| Provider identity |
OQ3/OQ9 |
Stable provider object identity is separate from slug, grant, delivery, cursor, and batch ids |
Rename updates display route without forking identity |
Contract docs |
Rename/grant-rotation fixtures |
Decision Record impact
Depends on ADR 0036; aligned with ADR 0015 and ADR 0019; creates no graph ontology.
Decision Record
Required: ADR 0036. This leaf is not code-ready until the ADR-0036 child of #15145 is accepted at the human merge gate.
Discussion Criteria Mapping
| Upstream graduated criterion |
This leaf's executable contract |
| OQ3 |
Creates server-owned sourceInstanceId and keeps mutable/provider/retry identities distinct. |
| OQ8 |
Enforces tenant/source RLS on every dedicated-table read/write; never shared/team visible. |
| OQ9 R/T/U |
Implements neutral lifecycle and explicit local bootstrap; V/X remain unavailable. |
Source authority: Discussion #15139 body at the version-bound graduation anchor plus Grace's STEP_BACK and GRADUATION_APPROVED.
Acceptance Criteria
Out of Scope
Provider acquisition, event admission, tenant self-service, tenant-role inference, connector secrets, or AiConfig registration.
Avoided Traps
Do not reuse the KB SourceRegistry, tenantRepos[], static GitOps config, global Neo roster, MCP admin, or mutable slug as authority.
Related
Origin Session ID: 837ad74b-c2d2-413d-9aab-b7165a93a82a
Handoff Retrieval Hints
community sourceInstanceId registration epoch tenant RLS
Discussion 15139 R T U W source lifecycle
Creation Freshness
Creation duplicate sweep: immediately before filing at 2026-07-14T05:30:01.676Z, checked the latest 20 open issues and last 30 all-state A2A messages. The independent broader audit at 2026-07-14T05:13:00Z covered open and closed issues, pull requests, A2A, ADRs, and code; no equivalent owner or foreign claim existed.
Context
The selected T/R/U shape requires Memory Core to own neutral source identity and lifecycle. Local single-user bootstrap may equate subject and tenant only when that deployment mode is explicit.
This is one fully closeable PR leaf under Epic #15145. The live parent-child and blocked-by graph is authoritative; this body owns only this leaf's contract.
The Problem
A connector-owned registry,
tenantRepos[], KB SourceRegistry, or AiConfig leaf cannot preserve neutral identity across connector replacement, repository rename, grant rotation, and hosted tenancy. Authentication or MCP tool tier also does not confer source-admin authority.The Architectural Reality
This is a dedicated Memory-Core operational table/service, not a Native Edge Graph ontology and not
ai/services/knowledge-base/source/SourceRegistry.mjs. New service placement underai/services/memory-core/matchesMailboxService.mjs; every table read/write must reapply a server-authoritative tenant/source predicate because GraphService RLS does not protect new tables.The Agent OS structure map was run on 2026-07-14. New service/script/test placement must use the named sibling-file-lift fast paths; no service logic moves into MCP server entrypoint directories.
The Fix
Implement stable server-owned
sourceInstanceId, canonical provider host/resource kind/provider object identity, mutable display locator, connector/grant attestations without secrets, lifecycleREQUESTED -> PROVISIONED -> ACTIVE -> REVOKED, monotonically fencedregistrationEpoch, and an explicit local single-user bootstrap path.Contract Ledger Matrix
Decision Record impact
Depends on ADR 0036; aligned with ADR 0015 and ADR 0019; creates no graph ontology.
Decision Record
Required: ADR 0036. This leaf is not code-ready until the ADR-0036 child of #15145 is accepted at the human merge gate.
Discussion Criteria Mapping
Source authority: Discussion #15139 body at the version-bound graduation anchor plus Grace's STEP_BACK and GRADUATION_APPROVED.
Acceptance Criteria
sharedEntityorvisibility:'team'and contain no provider secret.Out of Scope
Provider acquisition, event admission, tenant self-service, tenant-role inference, connector secrets, or AiConfig registration.
Avoided Traps
Do not reuse the KB SourceRegistry,
tenantRepos[], static GitOps config, global Neo roster, MCPadmin, or mutable slug as authority.Related
Origin Session ID: 837ad74b-c2d2-413d-9aab-b7165a93a82a
Handoff Retrieval Hints
community sourceInstanceId registration epoch tenant RLSDiscussion 15139 R T U W source lifecycleCreation Freshness
Creation duplicate sweep: immediately before filing at 2026-07-14T05:30:01.676Z, checked the latest 20 open issues and last 30 all-state A2A messages. The independent broader audit at 2026-07-14T05:13:00Z covered open and closed issues, pull requests, A2A, ADRs, and code; no equivalent owner or foreign claim existed.