{
  "format": "vercy-model-allocation-candidate/v1",
  "contourId": "EM-TEC-01",
  "proposedName": "Source Repository",
  "modelId": null,
  "registryId": null,
  "allocationState": "unassigned",
  "decision": "NEW MODEL CANDIDATE",
  "canonicalPublishable": false,
  "candidateRevision": 3,
  "identityTest": {
    "stableIdentity": "A governed Source Repository remains identifiable across provider migration, locator or namespace change, default-branch change, product bindings, stewardship transfer and archival.",
    "versionIdentity": "Repository governance, ownership, locator and access changes append effective-dated records; source revisions retain native immutable identity.",
    "independentLifecycle": [
      "proposed",
      "provisioned",
      "active",
      "read-only",
      "archived",
      "retired"
    ],
    "lifecycleEvents": [
      "transferred",
      "forked",
      "migrated",
      "tombstoned"
    ],
    "mastership": "source-code management or engineering platform authority"
  },
  "boundary": {
    "owns": [
      "stable repository identity",
      "effective hosting locators",
      "ownership and stewardship periods",
      "branch and tag alias namespace",
      "access-policy references",
      "status, transfer, archival, retirement and tombstone history",
      "repository-level fork provenance"
    ],
    "references": [
      {
        "target": "WM-SFT-001",
        "purpose": "Software Products using the repository; cardinality governed by profile"
      },
      {
        "target": "WM-SFT-007",
        "purpose": "components and packages linked to paths and revisions"
      },
      {
        "target": "WM-SFT-008",
        "purpose": "build inputs under a pending profile-side relation"
      },
      {
        "target": "WM-SFT-009",
        "purpose": "derived deployment provenance through WM-SFT-008 release and artifact lineage",
        "relationKind": "derived-only"
      },
      {
        "target": "WM-SFT-012",
        "purpose": "SBOM source provenance"
      }
    ],
    "excludes": [
      "product, component or package identity",
      "build, release or artifact lifecycle",
      "deployment or runtime state",
      "source bytes or secrets",
      "IAM grants and credentials",
      "SBOM document identity"
    ]
  },
  "objects": {
    "SourceRepository": {
      "identity": [
        "sourceRepositoryId"
      ],
      "required": [
        "status"
      ],
      "optional": [
        "defaultBranchRef",
        "visibilityClass",
        "forkSourceRepositoryRef",
        "successorRef"
      ]
    },
    "RepositoryOwnershipPeriod": {
      "identity": [
        "sourceRepositoryId",
        "effectiveFrom",
        "stewardRef"
      ],
      "required": [
        "ownerRef",
        "stewardRef",
        "effectiveFrom"
      ],
      "optional": [
        "effectiveTo",
        "authorityRef"
      ]
    },
    "RepositoryStatusPeriod": {
      "identity": [
        "sourceRepositoryId",
        "effectiveFrom"
      ],
      "required": [
        "status",
        "effectiveFrom"
      ],
      "optional": [
        "effectiveTo",
        "eventRef",
        "reasonRef"
      ]
    },
    "RepositoryTombstone": {
      "identity": [
        "sourceRepositoryId"
      ],
      "required": [
        "retiredAt",
        "lastResolvableRevisionRef",
        "nonReuseMarker"
      ],
      "optional": [
        "successorRef",
        "reasonRef"
      ]
    },
    "RepositoryRevision": {
      "identity": [
        "sourceRepositoryId",
        "revisionId"
      ],
      "required": [
        "nativeRevision",
        "digestAlgorithm",
        "contentDigest",
        "committedAt",
        "provenanceRef"
      ],
      "optional": [
        "parentRevisionRefs",
        "signatureRef",
        "treeDigest"
      ],
      "digestSemantics": "contentDigest is the authoritative digest under digestAlgorithm; treeDigest is optional provider-native tree evidence and never substitutes without the same named algorithm."
    },
    "RepositoryLocator": {
      "identity": [
        "sourceRepositoryId",
        "locatorId",
        "effectiveFrom"
      ],
      "required": [
        "locatorId",
        "providerRef",
        "locator",
        "effectiveFrom"
      ],
      "optional": [
        "effectiveTo",
        "redirectRef",
        "protocol",
        "mirrorRole"
      ]
    },
    "RepositoryReference": {
      "identity": [
        "sourceRepositoryId",
        "referenceName",
        "effectiveFrom"
      ],
      "required": [
        "referenceKind",
        "targetRevisionRef",
        "effectiveFrom"
      ],
      "optional": [
        "effectiveTo",
        "protected",
        "policyRef"
      ]
    }
  },
  "invariantRules": [
    {
      "id": "EM-TEC-01.SR-01",
      "text": "Source Repository identity is independent of hosting URL, provider, namespace locator, default branch and associated Software Product; host and namespace exist only in effective RepositoryLocator records."
    },
    {
      "id": "EM-TEC-01.SR-02",
      "text": "A fork or independently governed mirror receives a distinct repository identity and records forkSourceRepositoryRef to its source."
    },
    {
      "id": "EM-TEC-01.SR-03",
      "text": "Hosting migration appends effective RepositoryLocator records without rewriting repository or native source-revision identity; concurrent locators use distinct locatorId values."
    },
    {
      "id": "EM-TEC-01.SR-04",
      "text": "Each immutable RepositoryRevision records nativeRevision, digestAlgorithm, authoritative contentDigest, commit time and provenance and is never replaced in place."
    },
    {
      "id": "EM-TEC-01.SR-05",
      "text": "Branch and tag references are mutable aliases and never satisfy reproducible input without resolution to an immutable RepositoryRevision."
    },
    {
      "id": "EM-TEC-01.SR-06",
      "text": "Repository access policy grants no product, runtime, release or deployment authority by implication."
    },
    {
      "id": "EM-TEC-01.SR-07",
      "text": "Repository records and projections contain no credential, private key, token, secret or reversible secret representation."
    },
    {
      "id": "EM-TEC-01.SR-08",
      "text": "Transfer, archive and retirement append RepositoryStatusPeriod history and preserve revision resolution and provenance."
    },
    {
      "id": "EM-TEC-01.SR-09",
      "text": "Ownership and stewardship changes append RepositoryOwnershipPeriod records and never mutate immutable revisions."
    },
    {
      "id": "EM-TEC-01.SR-10",
      "text": "A retired repository has one RepositoryTombstone, remains resolvable through lastResolvableRevisionRef and its sourceRepositoryId is never recycled."
    }
  ],
  "holds": [
    "No registry identifier is allocated or guessed.",
    "Repository-to-component and build-input relations are unapproved and remain profile-side holds.",
    "Canonical base completion, rights controls, package conversion and live conformance remain pending."
  ],
  "publicationStatement": "Research candidate only; not canonically publishable, installable, allocated or verified."
}
