pet.trezy.claimAwards

trezy.pet

Schema Diff

+42 -0

From

CID
bafyreig3kqx6zvt...
Indexed At
2026-08-11 12:46 UTC
View this version

To

CID
bafyreig2ms2e5tw...
Indexed At
2026-08-12 02:42 UTC
View this version

Compatibility Analysis

Breaking Changes Detected

4 breaking changes, 15 non-breaking changes.

Breaking Changes (4)
  • ConstraintAdded ConstraintAdded { vertex_id: "pet.trezy.claimAwards#progress.current", sort: "minimum", value: "0" }
  • ConstraintAdded ConstraintAdded { vertex_id: "pet.trezy.claimAwards#award.target", sort: "minimum", value: "0" }
  • ConstraintAdded ConstraintAdded { vertex_id: "pet.trezy.claimAwards#award.current", sort: "minimum", value: "0" }
  • ConstraintAdded ConstraintAdded { vertex_id: "pet.trezy.claimAwards#progress.target", sort: "minimum", value: "0" }
Non-Breaking Changes (15)
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.claimAwards#award.current" }
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.claimAwards#award.target" }
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.claimAwards#progress" }
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.claimAwards#progress.badge" }
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.claimAwards#progress.current" }
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.claimAwards#progress.target" }
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.claimAwards:output.progress" }
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.claimAwards:output.progress:items" }
  • AddedEdge AddedEdge { src: "pet.trezy.claimAwards#award", tgt: "pet.trezy.claimAwards#award.current", kind: "prop", name: Some("current") }
  • AddedEdge AddedEdge { src: "pet.trezy.claimAwards#award", tgt: "pet.trezy.claimAwards#award.target", kind: "prop", name: Some("target") }
  • AddedEdge AddedEdge { src: "pet.trezy.claimAwards#progress", tgt: "pet.trezy.claimAwards#progress.badge", kind: "prop", name: Some("badge") }
  • AddedEdge AddedEdge { src: "pet.trezy.claimAwards#progress", tgt: "pet.trezy.claimAwards#progress.current", kind: "prop", name: Some("current") }
  • AddedEdge AddedEdge { src: "pet.trezy.claimAwards#progress", tgt: "pet.trezy.claimAwards#progress.target", kind: "prop", name: Some("target") }
  • AddedEdge AddedEdge { src: "pet.trezy.claimAwards:output", tgt: "pet.trezy.claimAwards:output.progress", kind: "prop", name: Some("progress") }
  • AddedEdge AddedEdge { src: "pet.trezy.claimAwards:output.progress", tgt: "pet.trezy.claimAwards:output.progress:items", kind: "items", name: None }

Migration Guidance

Added Elements

  • AddedVertex { vertex_id: "pet.trezy.claimAwards#award.current" }
  • AddedVertex { vertex_id: "pet.trezy.claimAwards#award.target" }
  • AddedVertex { vertex_id: "pet.trezy.claimAwards#progress" }
  • AddedVertex { vertex_id: "pet.trezy.claimAwards#progress.badge" }
  • AddedVertex { vertex_id: "pet.trezy.claimAwards#progress.current" }
  • AddedVertex { vertex_id: "pet.trezy.claimAwards#progress.target" }
  • AddedVertex { vertex_id: "pet.trezy.claimAwards:output.progress" }
  • AddedVertex { vertex_id: "pet.trezy.claimAwards:output.progress:items" }

Additional Notes

  • Breaking: RequiredEdgeAdded { vertex_id: "pet.trezy.claimAwards#progress", src: "pet.trezy.claimAwards#progress", tgt: "pet.trezy.claimAwards#progress.target", kind: "prop", name: Some("target") }
  • Breaking: RequiredEdgeAdded { vertex_id: "pet.trezy.claimAwards#progress", src: "pet.trezy.claimAwards#progress", tgt: "pet.trezy.claimAwards#progress.current", kind: "prop", name: Some("current") }
  • Breaking: RequiredEdgeAdded { vertex_id: "pet.trezy.claimAwards#progress", src: "pet.trezy.claimAwards#progress", tgt: "pet.trezy.claimAwards#progress.badge", kind: "prop", name: Some("badge") }
  • Non-breaking: AddedEdge { src: "pet.trezy.claimAwards#award", tgt: "pet.trezy.claimAwards#award.current", kind: "prop", name: Some("current") }
  • Non-breaking: AddedEdge { src: "pet.trezy.claimAwards#award", tgt: "pet.trezy.claimAwards#award.target", kind: "prop", name: Some("target") }
  • Non-breaking: AddedEdge { src: "pet.trezy.claimAwards:output", tgt: "pet.trezy.claimAwards:output.progress", kind: "prop", name: Some("progress") }
  • Non-breaking: AddedEdge { src: "pet.trezy.claimAwards:output.progress", tgt: "pet.trezy.claimAwards:output.progress:items", kind: "items", name: None }
  • Non-breaking: AddedEdge { src: "pet.trezy.claimAwards:output.progress:items", tgt: "pet.trezy.claimAwards#progress", kind: "ref", name: None }
1 1
{
2 2
  "id": "pet.trezy.claimAwards",
3 3
  "defs": {
4 4
    "main": {
5 5
      "type": "procedure",
6 6
      "output": {
7 7
        "schema": {
8 8
          "type": "object",
9 9
          "required": [
10 10
            "awards"
11 11
          ],
12 12
          "properties": {
13 13
            "error": {
14 14
              "type": "string",
15 15
              "description": "Present instead of a result. `awards-unavailable` means the ledger could not be read, which must NOT be shown as an empty shelf — a caller that took it that way would tell somebody they had earned nothing.",
16 16
              "knownValues": [
17 17
                "awards-unavailable",
18 18
                "no-caller"
19 19
              ]
20 20
            },
21 21
            "awards": {
22 22
              "type": "array",
23 23
              "items": {
24 24
                "ref": "#award",
25 25
                "type": "ref"
26 26
              },
27 27
              "description": "Every badge the caller has earned, oldest first. Present whether or not the repo copy could be written — the ledger is the truth and the record is a publication of it."
28 28
            },
29 29
            "message": {
30 30
              "type": "string"
31 31
            },
32 32
            "written": {
33 33
              "type": "integer",
34 34
              "minimum": 0,
35 35
              "description": "How many repo copies this call wrote. Zero is the ordinary answer on a return visit."
36 +
            },
37 +
            "progress": {
38 +
              "type": "array",
39 +
              "items": {
40 +
                "ref": "#progress",
41 +
                "type": "ref"
42 +
              },
43 +
              "description": "How far along the badges the caller has NOT earned are, one entry each. Earned ones carry the same two numbers on their own entry in `awards` instead, so nothing appears twice. ⚠ MEASURED BY `job.run:games.achievements` IN THE SAME PASS THAT DECIDES WHETHER A BADGE IS MET — earned is `current >= target` and nothing else — so a bar can never disagree with the badge beside it. Absent or empty when the job has not run for this caller yet, which a client must draw as a badge with no bar rather than as zero."
36 44
            }
37 45
          }
38 46
        },
39 47
        "encoding": "application/json"
40 48
      },
41 49
      "description": "Publishes the badges the awards ledger says the caller has earned into the caller's own repo, as `community.lexicon.badge.award` records, and answers with everything they hold. Called on sign-in and after anything that might have earned one. It decides nothing: `job.run:games.achievements` owns that, and this only copies what is already recorded — so calling it twice writes nothing the second time, and calling it can never award anything."
42 50
    },
43 51
    "award": {
44 52
      "type": "object",
45 53
      "required": [
46 54
        "badge",
47 55
        "earnedAt"
48 56
      ],
49 57
      "properties": {
50 58
        "badge": {
51 59
          "type": "string",
52 60
          "description": "The achievement's stable id — `first-pet`, `group-bats`. The same string is the `name` on the badge definition and the rkey of both the definition and the award."
53 61
        },
54 62
        "state": {
55 63
          "type": "string",
56 64
          "description": "Where the repo copy stands. `written` was published by this call, `held` was already published, `unpublished` could not be written — usually because the caller has not granted the collection, which costs them nothing but the portable copy.",
57 65
          "knownValues": [
58 66
            "written",
59 67
            "held",
60 68
            "unpublished"
61 69
          ]
62 70
        },
71 +
        "target": {
72 +
          "type": "integer",
73 +
          "minimum": 0,
74 +
          "description": "See `current`. Absent on both when the job has not measured this badge."
75 +
        },
76 +
        "current": {
77 +
          "type": "integer",
78 +
          "minimum": 0,
79 +
          "description": "Progress toward this badge, for a caller that wants to show a completed set as “6 of 6”. Same numbers as `#progress`, carried here so an earned badge is described in one place."
80 +
        },
63 81
        "earnedAt": {
64 82
          "type": "string",
65 83
          "format": "datetime",
66 84
          "description": "The FIRST moment the ledger saw this as true, not the moment it was published. A badge is a record of a moment; re-running the evaluation never moves this."
67 85
        }
68 86
      }
87 +
    },
88 +
    "progress": {
89 +
      "type": "object",
90 +
      "required": [
91 +
        "badge",
92 +
        "current",
93 +
        "target"
94 +
      ],
95 +
      "properties": {
96 +
        "badge": {
97 +
          "type": "string",
98 +
          "description": "The achievement's stable id."
99 +
        },
100 +
        "target": {
101 +
          "type": "integer",
102 +
          "minimum": 0,
103 +
          "description": "What `current` has to reach. ⚠ ZERO MEANS UNMEASURABLE, NOT COMPLETE — a group whose members failed to load measures `0 of 0`, and a reader treating that as done would show every set finished the moment the catalogue hiccuped."
104 +
        },
105 +
        "current": {
106 +
          "type": "integer",
107 +
          "minimum": 0,
108 +
          "description": "The real quantity, uncapped: coin badges routinely exceed their threshold, and a client that wants a bar clamps it rather than the server lying about the number."
109 +
        }
110 +
      }
69 111
    }
70 112
  },
71 113
  "$type": "com.atproto.lexicon.schema",
72 114
  "lexicon": 1
73 115
}

Compare Other Versions

Lexicon Garden

@