pub.techne.draft.provenancePolicy

The provenance ALGEBRA: whose signature makes a record of a type count, wherever it lives (the firehose, or any space). Each record type with a rule publishes a companion {collection}.provenance document (defs.main: {type: provenancePolicy, rule}) holding one of these. The document's NSID is derived from the collection's, like {spaceType}.policy, so an adopted lexicon we don't own (community.lexicon.calendar.rsvp) gets one without being edited. A provenance rule never decides who may READ a record (that is the space policy); it decides whether the record says what it says. Fail-closed: a document whose rule this evaluator does not know, or that does not parse, gives its type no rule. Lives OUTSIDE the codegen roots (provenance-lexicons/), beside space-lexicons/. The evaluator is techne-lexicon-check's provenance module.

Details · defs
Kinddefs
Authoritydraft.techne.pub
Commit rev3n3iob7mscw2u
Indexed
cid bafyreia67gn5dbu3wtfrwmyhvdybbdqftwinepxaygktachwbpahi6c5tm

Checks

Valid
  • unlimited-string defs.objectAuthority.properties.fieldNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.objectAuthorityOrRole.properties.fieldNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.vouchedWriter.properties.labelsNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "authorIsAuthority": {
      "description": "The author is the authority by construction: the record lives in the authority's own repo and names no object (a collective's membership records). Placed in a space, the author must also pass that space's write policy.",
      "type": "object"
    },
    "objectAuthority": {
      "description": "Counts only when the author is the authority (the repo DID) of the object the record is about.",
      "properties": {
        "field": {
          "description": "The body field holding the object: an AT-URI string or a strongRef (its uri). `$space` names the space the record is placed in instead (a share's object is its placement; the body carries none).",
          "type": "string"
        }
      },
      "required": [
        "field"
      ],
      "type": "object"
    },
    "objectAuthorityOrRole": {
      "description": "Counts when the author is the object's authority, or holds at least minRole in the collective that is, at the time this version was first seen: directly, or through one member collective, where the lower of the two roles counts.",
      "properties": {
        "field": {
          "description": "As objectAuthority's field.",
          "type": "string"
        },
        "minRole": {
          "maximum": 32767,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "field",
        "minRole"
      ],
      "type": "object"
    },
    "self": {
      "description": "Counts from whoever wrote it: a first-person record about the author's own stance (an RSVP, a connection, an evaluation, a block).",
      "type": "object"
    },
    "vouchedWriter": {
      "description": "Counts when the author holds a live credential from an admin writer over the author's own pub.techne.draft.publisher/self declaration. An admin writer is the reader's root (for the commons, COMMONS_ROOT_DID), or an operator one of the root's pub.techne.draft.operator records names for a period holding when the reader first saw that version of the credential. The credential is a pub.techne.draft.credential in its issuer's own repo naming that declaration and its current CID. It is revoked by a pub.techne.draft.credentialRevocation at its `revocation` address (in the issuer's repo), or at the same rkey in the root's repo (the root can revoke an operator's credential). The declaration must list the collection in `writes`. An edited declaration has another CID and counts for nothing until an admin writer re-issues; a revocation withdraws every record the author wrote, past ones included (trust is read at read time). The list of accounts is data (declarations and credentials), so adding one is never a release. The chain check is techne-lexicon-check's chain module, with the issuer and both revocation addresses supplied by the reader.",
      "properties": {
        "labels": {
          "description": "The body field holding the label values the record assigns (a verdict's `values`). With it, the declaration must also mark no curator (its `writes` lacks pub.techne.draft.provenance), and the record counts for each value the declaration lists in `labels` and for no other; with none listed it does not count.",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "description": "The provenance ALGEBRA: whose signature makes a record of a type count, wherever it lives (the firehose, or any space). Each record type with a rule publishes a companion {collection}.provenance document (defs.main: {type: provenancePolicy, rule}) holding one of these. The document's NSID is derived from the collection's, like {spaceType}.policy, so an adopted lexicon we don't own (community.lexicon.calendar.rsvp) gets one without being edited. A provenance rule never decides who may READ a record (that is the space policy); it decides whether the record says what it says. Fail-closed: a document whose rule this evaluator does not know, or that does not parse, gives its type no rule. Lives OUTSIDE the codegen roots (provenance-lexicons/), beside space-lexicons/. The evaluator is techne-lexicon-check's provenance module.",
  "gaps": [
    {
      "collections": [
        "pub.techne.draft.rsvpNote"
      ],
      "enforcedIn": "crates/regenos-appview/src/xrpc/event_joins.rs get_event_joins",
      "reason": "It relates two records (the note and an RSVP that must exist). The algebra reads one record's author and one of its fields; it has no leaf that requires another record.",
      "rule": "A note counts only beside the author's own RSVP to the same beacon."
    },
    {
      "collections": [
        "pub.techne.draft.circleBeacon"
      ],
      "enforcedIn": "crates/beacon-app/src/circles.rs circle_beacon_uris",
      "reason": "Expressible as objectAuthority{field: beacon}, but today a provenance document also makes its collection a claim_index claim (the ingest paths read claims::claim_authz(collection).is_some() as 'is a claim'), and a circle beacon is placed content, not a claim. It gets its document once that test reads the claim projection instead.",
      "rule": "A circle beacon counts only when its author lit the beacon it names."
    },
    {
      "collections": [
        "org.hypercerts.funding.receipt"
      ],
      "enforcedIn": "lexicons:check/src/decide.rs trusted (ABOUT)",
      "reason": "An adopted lexicon (hypercerts) with no `subject`: what it is about sits in four fields, any of them a union of text, a DID or a strongRef. The generic reading treats a record with no `subject` as a source record, and the algebra has no leaf over a union of parties.",
      "rule": "A funding receipt is an assertion about the parties it names, not a source record: it counts from its author when its `from`, `to`, `via` and `for` name at least one record (`uri`) or account (`did`) and every one they name is the author's own; otherwise only when the commons root endorses its author for the collection. A free-text party (`#text`) names nothing; any other party is not the author's own."
    },
    {
      "collections": [
        "pub.techne.draft.evaluation"
      ],
      "enforcedIn": "lexicons:check/src/provenance.rs withheld",
      "reason": "A rule over the record's value and placement, not over whose signature it carries; the algebra has no value or placement leaf.",
      "rule": "A negative evaluation never counts from public placement."
    },
    {
      "collections": [
        "pub.techne.draft.approval"
      ],
      "enforcedIn": "lexicons:check/src/provenance.rs withheld",
      "reason": "A rule over the record's value, not over whose signature it carries.",
      "rule": "Only a confirmed approval counts; denials and waitlists stay operational state."
    },
    {
      "collections": [
        "pub.techne.draft.block"
      ],
      "enforcedIn": "lexicons:check/src/provenance.rs withheld",
      "reason": "A rule over placement, not over whose signature it carries.",
      "rule": "A public block never counts; a block lives only in its author's personal space."
    },
    {
      "collections": [
        "pub.techne.draft.verification"
      ],
      "enforcedIn": "lexicons:check/src/provenance.rs withheld",
      "reason": "A rule over the record key, not over whose signature it carries; the algebra reads the author and the body only.",
      "rule": "A verification counts only at rkey = its subject DID."
    },
    {
      "collections": [
        "pub.techne.draft.accessRule"
      ],
      "enforcedIn": "crates/regenos-appview/src/services/access.rs rule",
      "reason": "A rule over the record's placement and a field compared to its author (the space it names must be the author's), and acting on it is a service's choice, not whether the record counts; the algebra has no placement leaf.",
      "rule": "An access rule is acted on (reconciled into shares) only when it is placed in its owner's personal space and names a space its owner is the authority of."
    },
    {
      "collections": [
        "community.lexicon.calendar.event",
        "pub.techne.draft.place",
        "pub.techne.draft.org",
        "pub.techne.draft.statement"
      ],
      "enforcedIn": "crates/regenos-read/src/trust.rs curated_sql",
      "reason": "Not the vouchedWriter rule: these are source types anyone may write and every such record counts as a source, so the type gets no provenance document. Being curated is a second reading of a record told by its author's curator role and its sidecar, which no leaf reads.",
      "rule": "A record counts as curated only when its author holds a live credential from an admin writer (the commons root, or an operator the root names) over a publisher/self declaration that makes it a curator of the collection (writes the collection and pub.techne.draft.provenance), and its provenance sidecar is live. For an org or a statement the commons curator makes a curated copy only from a source version whose author the root endorses for that collection, and a statement carrying `locations` only about an org; an event's or a place's comes from any author."
    },
    {
      "collections": [
        "pub.techne.draft.statement"
      ],
      "enforcedIn": "crates/regenos-appview/src/xrpc/queries.rs curated_admits",
      "reason": "A rule over the claim's author compared to its subject's author and over the root's endorsement, read where the location rows are kept, not a leaf over the statement's own body.",
      "rule": "A statement's `locations` claim about a record counts in the curated where view only when its author is the subject's author or a writer the commons root endorses for statements (the vouchedWriter shape with no curator role or provenance sidecar); a curated copy of a statement is read by the curated rule above."
    },
    {
      "collections": [
        "pub.techne.draft.retirement"
      ],
      "enforcedIn": "crates/regenos-read/src/trust.rs retirement_counts",
      "reason": "A rule over the record key, and over its writer being an admin writer itself (the root, or named by the root's operator record when the version was first seen), with no declaration or credential; vouchedWriter reads only a credential over the author's declaration, so no leaf says it. The curator applies the same rule over the runner's records (crates/regenos-rules/src/curator/clusters.rs retired_dids).",
      "rule": "A retirement counts only at rkey = its subject, and only when its writer is an admin writer: the commons root, or an operator the root names (pub.techne.draft.operator) whose period held when the reader first saw that version of the retirement. Each counts on its own: the root's stands whatever an operator does with its own, and a retirement ends only when its writer deletes it."
    },
    {
      "collections": [
        "pub.techne.draft.operator"
      ],
      "enforcedIn": "crates/regenos-read/src/trust.rs operator_holds_sql",
      "reason": "A rule over the record key and the repo it is in; no leaf reads either.",
      "rule": "An operator record counts only in the commons root's repo, at rkey = its `subject` or `{subject}-*`, naming `subject` an operator for validFrom <= t < validUntil (a missing bound is open; a malformed one holds nothing)."
    },
    {
      "collections": [
        "pub.techne.draft.region"
      ],
      "enforcedIn": "not read yet: coverage is regenos_read::areas::SUPPORTED_AREAS today; the first reader is the coverage step (location spec, step 2)",
      "reason": "A rule over the repo it is in; no leaf reads it.",
      "rule": "A region record counts only in the commons root's repo, naming `operator` the holder of `area` for validFrom <= t < validUntil (a missing bound is open)."
    },
    {
      "collections": [
        "pub.techne.draft.beaconSpot"
      ],
      "enforcedIn": "crates/beacon-app/src/beacon_spot.rs overlay_exact_spots",
      "reason": "It relates the spot to the beacon whose space holds it and the event that beacon goes to; no leaf reads another record, and a provenance document would make the collection a claim.",
      "rule": "A beacon spot counts only when its author is the authority of the beacon space that holds it and `event` names the event that beacon is going to."
    },
    {
      "collections": [
        "pub.techne.draft.beaconSpotV2"
      ],
      "enforcedIn": "not read yet: its reader moves with its writer; crates/beacon-app/src/beacon_spot.rs overlay_exact_spots reads beaconSpot today",
      "reason": "It relates the spot to the beacon whose space holds it and the event that beacon goes to; no leaf reads another record, and a provenance document would make the collection a claim.",
      "rule": "A beacon spot counts only when its author is the authority of the beacon space that holds it and `subject` names the event that beacon is going to."
    },
    {
      "collections": [
        "pub.techne.draft.identity.linkRedemption"
      ],
      "enforcedIn": "crates/regenos-appview/src/identity/link_release.rs release_now",
      "reason": "The trigger is a platform-held hook row; no leaf reads it.",
      "rule": "A receipt in its redeemer's personal space; grants nothing itself: a link grant is released only from the link_redemptions row the identity PDS reported (signed linkRedeemed hook)."
    },
    {
      "collections": [
        "pub.techne.draft.verdict"
      ],
      "enforcedIn": "crates/regenos-appview/src/registry/request.rs decide_in",
      "reason": "Operators decide type requests on the commons operator page, so the decision is a rule over the writer being an admin writer itself, with no declaration or credential; vouchedWriter reads only a credential over the author's declaration and its labels, so no leaf says it.",
      "rule": "A `declined` verdict on a type request (its subject a pub.techne.draft.registry.typeRequest at its current CID) declines the request only when its author is an admin writer: the commons root, or an operator the root names whose period held when the verdict was first seen. A verdict that counts under verdict.provenance from any other writer does not decline a request."
    },
    {
      "collections": [
        "pub.techne.draft.tagFeedback"
      ],
      "enforcedIn": "commons:rules/src/runner.rs Runner::feedback_about",
      "reason": "It relates the record to other records (the subject's cluster membership, the author's other feedback); no leaf reads another record. A provenance document would also make the collection a claim_index claim, and feedback is not a claim.",
      "rule": "Tag feedback counts from its author (a first-person stance about a tag they saw), except from the publisher of the curated record it names or of any source record in that record's cluster or a cluster merged into it (its host). One counts per author, subject and tag: the newest by rkey, whatever its verdict, so a newer one withdraws an older. A person's records past their 50th of one day (the date their createdAt names, as written, in rkey order among their live records about any subject) are ignored, as if never written. It counts at any version of its subject, and on the survivor once its subject is merged. It never decides anything: it has the commons features rule ask the tag's questions again."
    },
    {
      "collections": [
        "pub.techne.draft.registry.typeRequest"
      ],
      "enforcedIn": "crates/regenos-appview/src/registry/request.rs decide_in",
      "reason": "The platform writes the request in its own registry repo and keeps the row it wrote; the approval joins the credential to that row, so the record's own provenance is the registry's by construction and no leaf is read for it.",
      "rule": "A type request is approved by an admin writer's live credential (pub.techne.draft.credential) whose `subject` is the registry's DID and whose `record` and `cid` pin the request; the request it approves is read from the platform's own request row (the registry's record standing in for itself), not re-read under typeRequest.provenance."
    }
  ],
  "id": "pub.techne.draft.provenancePolicy",
  "lexicon": 1
}