pet.trezy.getCensus

trezy.pet

Schema Diff

+4 -0

From

CID
bafyreiazn6esubw...
Indexed At
2026-08-25 05:48 UTC
View this version

To

CID
bafyreigubnnz6ix...
Indexed At
2026-08-25 19:48 UTC
View this version

Compatibility Analysis

Backward Compatible

Backward compatible. 2 non-breaking changes.

Non-Breaking Changes (2)
  • AddedVertex AddedVertex { vertex_id: "pet.trezy.getCensus:output.rarestBadgeTitle" }
  • AddedEdge AddedEdge { src: "pet.trezy.getCensus:output", tgt: "pet.trezy.getCensus:output.rarestBadgeTitle", kind: "prop", name: Some("rarestBadgeTitle") }

Migration Guidance

Added Elements

  • AddedVertex { vertex_id: "pet.trezy.getCensus:output.rarestBadgeTitle" }

Additional Notes

  • Non-breaking: AddedEdge { src: "pet.trezy.getCensus:output", tgt: "pet.trezy.getCensus:output.rarestBadgeTitle", kind: "prop", name: Some("rarestBadgeTitle") }
1 1
{
2 2
  "$type": "com.atproto.lexicon.schema",
3 3
  "defs": {
4 4
    "main": {
5 5
      "description": "The whole game in a handful of numbers, for /stats. Distinct from pet.trezy.getStats, which reports on ONE pet — this one never looks at an individual animal. Every figure is a plain aggregate over an indexed table, deliberately: the leaderboard pays three queries per pet to score a page, and a census that did the same would pay it for every pet in the game on every load.",
6 6
      "output": {
7 7
        "encoding": "application/json",
8 8
        "schema": {
9 9
          "properties": {
10 10
            "badgesAwarded": {
11 11
              "description": "How many badges have been earned across every player. ⚠ ABSENT IS NOT A FAULT — see `rarestBadge`.",
12 12
              "minimum": 0,
13 13
              "type": "integer"
14 14
            },
15 15
            "coinsSpent": {
16 16
              "description": "Every coin ever spent on a pet, retired ones included. Sums the price recorded on each pet at the moment it was bought, so a later repricing does not rewrite history.",
17 17
              "minimum": 0,
18 18
              "type": "integer"
19 19
            },
20 20
            "error": {
21 21
              "description": "Present INSTEAD of the census when there is no census to send. A stable machine code a client branches on — add codes, never rename them. ⚠ THIS EXISTS BECAUSE THE EMPTY ANSWER IS A REAL SENTENCE: '0 pets, 0 keepers' is exactly what a freshly deployed instance looks like, so an unreadable roster reported as zeros would render an outage as 'nobody plays this game' and look identical to the truth.",
22 22
              "knownValues": [
23 23
                "census-unavailable"
24 24
              ],
25 25
              "type": "string"
26 26
            },
27 27
            "firstPetAt": {
28 28
              "description": "When the oldest pet still on the roster was created — near enough the game's own birthday to print. Absent when there are no pets.",
29 29
              "format": "datetime",
30 30
              "type": "string"
31 31
            },
32 32
            "keepers": {
33 33
              "description": "How many people own at least one pet. ⚠ DISTINCT OWNERS, NOT ROWS. A player with three pets is one keeper, and a census that counted rows would overstate its playerbase by more the better the game did. There is no other way to count players — an account with no pet leaves no record here at all, so this is 'people playing', not 'people signed up'.",
34 34
              "minimum": 0,
35 35
              "type": "integer"
36 36
            },
37 37
            "mealsServed": {
38 38
              "description": "Every `feed` interaction ever recorded, by everyone.",
39 39
              "minimum": 0,
40 40
              "type": "integer"
41 41
            },
42 42
            "message": {
43 43
              "description": "A sentence to show the player, accompanying `error`.",
44 44
              "type": "string"
45 45
            },
46 46
            "pets": {
47 47
              "description": "Living pets — everything on the roster that has not been retired. Absent when `error` is set.",
48 48
              "minimum": 0,
49 49
              "type": "integer"
50 50
            },
51 51
            "rarestBadge": {
52 52
              "description": "The id of the achievement fewest players hold, ties broken by name so it does not change between refreshes. ⚠ ABSENT IS NOT A FAULT, the same rule getDefinitions applies to groups and foods: `trezy_pet_awards` is created by the achievements job, so an instance that has never run one genuinely has no ledger. The census still goes out; a client omits the badge line rather than treating this as an outage.",
53 53
              "type": "string"
54 54
            },
55 55
            "rarestBadgeCount": {
56 56
              "description": "How many players hold `rarestBadge`. Absent whenever that is.",
57 57
              "minimum": 0,
58 58
              "type": "integer"
59 59
            },
60 +
            "rarestBadgeTitle": {
61 +
              "description": "The published name of `rarestBadge` — \"Spent a bit\" rather than `spent-1k`. ⚠ READ ONLY FROM THE PUBLISHER'S RECORDS, because this is text a client prints: the achievement collection is open, so an unfiltered lookup would let any player choose the sentence shown beside \"Rarest badge\". ⚠ ABSENT IS NOT A FAULT: an award outlives its definition and a definition can be published before it is indexed, so a client must fall back to `rarestBadge` rather than treating a missing title as an outage.",
62 +
              "type": "string"
63 +
            },
60 64
            "retired": {
61 65
              "description": "Pets that have been retired. Counted separately rather than dropped: they happened, they were paid for, and the number is more interesting beside the living one than folded into it.",
62 66
              "minimum": 0,
63 67
              "type": "integer"
64 68
            },
65 69
            "species": {
66 70
              "description": "Living pets per species, most populous first, ties broken by name. ⚠ THE ORDER IS PART OF THE ANSWER: /stats draws this as a crowd of sprites, so an unstable sort would rearrange the picture on every refresh. Carries ids, never display names or art — the published pet.trezy.species records are the only source of truth for those, and a client joins them itself.",
67 71
              "items": {
68 72
                "ref": "#speciesCount",
69 73
                "type": "ref"
70 74
              },
71 75
              "type": "array"
72 76
            },
73 77
            "timesPlayed": {
74 78
              "description": "Every `pet` interaction ever recorded. ⚠ THE RECORD TYPE IS `pet` AND THE PLAYER-FACING WORD IS 'played'. The type was named when playing meant pressing a Pet button; the button is a thrown ball now and the stored type was deliberately not migrated. This field is where the two names are reconciled, once.",
75 79
              "minimum": 0,
76 80
              "type": "integer"
77 81
            },
78 82
            "totalInteractions": {
79 83
              "description": "Every activity record of any type, including any this schema does not name. Deliberately not `mealsServed + timesPlayed`: a new interaction type would silently stop being counted by that sum, and this number is meant to mean 'everything anybody has done'.",
80 84
              "minimum": 0,
81 85
              "type": "integer"
82 86
            }
83 87
          },
84 88
          "required": [],
85 89
          "type": "object"
86 90
        }
87 91
      },
88 92
      "type": "query"
89 93
    },
90 94
    "speciesCount": {
91 95
      "properties": {
92 96
        "count": {
93 97
          "minimum": 0,
94 98
          "type": "integer"
95 99
        },
96 100
        "id": {
97 101
          "description": "The species id, matching the `id` on a published pet.trezy.species record.",
98 102
          "type": "string"
99 103
        }
100 104
      },
101 105
      "required": [
102 106
        "id",
103 107
        "count"
104 108
      ],
105 109
      "type": "object"
106 110
    }
107 111
  },
108 112
  "id": "pet.trezy.getCensus",
109 113
  "lexicon": 1
110 114
}

Compare Other Versions

Lexicon Garden

@