pet.trezy.claimAwards
Schema Diff
+42 -0
Compatibility Analysis
Breaking Changes Detected
3 breaking changes, 13 non-breaking changes.
Breaking Changes (3)
- RequiredEdgeAdded RequiredEdgeAdded { vertex_id: "pet.trezy.claimAwards#progress", src: "pet.trezy.claimAwards#progress", tgt: "pet.trezy.claimAwards#progress.current", kind: "prop", name: Some("current") }
- RequiredEdgeAdded RequiredEdgeAdded { vertex_id: "pet.trezy.claimAwards#progress", src: "pet.trezy.claimAwards#progress", tgt: "pet.trezy.claimAwards#progress.target", kind: "prop", name: Some("target") }
- RequiredEdgeAdded 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 Changes (13)
- 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: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 }
- AddedEdge AddedEdge { src: "pet.trezy.claimAwards:output.progress:items", tgt: "pet.trezy.claimAwards#progress", kind: "ref", 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.current", kind: "prop", name: Some("current") }
- 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.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
"$type": "com.atproto.lexicon.schema",
3
3
"defs": {
4
4
"award": {
5
5
"properties": {
6
6
"badge": {
7
7
"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.",
8
8
"type": "string"
9
9
},
10
+
"current": {
11
+
"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.",
12
+
"minimum": 0,
13
+
"type": "integer"
14
+
},
10
15
"earnedAt": {
11
16
"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.",
12
17
"format": "datetime",
13
18
"type": "string"
14
19
},
15
20
"state": {
16
21
"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.",
17
22
"knownValues": [
18
23
"written",
19
24
"held",
20
25
"unpublished"
21
26
],
22
27
"type": "string"
28
+
},
29
+
"target": {
30
+
"description": "See `current`. Absent on both when the job has not measured this badge.",
31
+
"minimum": 0,
32
+
"type": "integer"
23
33
}
24
34
},
25
35
"required": [
26
36
"badge",
27
37
"earnedAt"
28
38
],
29
39
"type": "object"
30
40
},
31
41
"main": {
32
42
"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.",
33
43
"output": {
34
44
"encoding": "application/json",
35
45
"schema": {
36
46
"properties": {
37
47
"awards": {
38
48
"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.",
39
49
"items": {
40
50
"ref": "#award",
41
51
"type": "ref"
42
52
},
43
53
"type": "array"
44
54
},
45
55
"error": {
46
56
"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.",
47
57
"knownValues": [
48
58
"awards-unavailable",
49
59
"no-caller"
50
60
],
51
61
"type": "string"
52
62
},
53
63
"message": {
54
64
"type": "string"
55
65
},
66
+
"progress": {
67
+
"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.",
68
+
"items": {
69
+
"ref": "#progress",
70
+
"type": "ref"
71
+
},
72
+
"type": "array"
73
+
},
56
74
"written": {
57
75
"description": "How many repo copies this call wrote. Zero is the ordinary answer on a return visit.",
58
76
"minimum": 0,
59
77
"type": "integer"
60
78
}
61
79
},
62
80
"required": [
63
81
"awards"
64
82
],
65
83
"type": "object"
66
84
}
67
85
},
68
86
"type": "procedure"
87
+
},
88
+
"progress": {
89
+
"properties": {
90
+
"badge": {
91
+
"description": "The achievement's stable id.",
92
+
"type": "string"
93
+
},
94
+
"current": {
95
+
"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.",
96
+
"minimum": 0,
97
+
"type": "integer"
98
+
},
99
+
"target": {
100
+
"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.",
101
+
"minimum": 0,
102
+
"type": "integer"
103
+
}
104
+
},
105
+
"required": [
106
+
"badge",
107
+
"current",
108
+
"target"
109
+
],
110
+
"type": "object"
69
111
}
70
112
},
71
113
"id": "pet.trezy.claimAwards",
72
114
"lexicon": 1
73
115
}