pet.trezy.getDiagnostics
Schema Diff
+15 -1
Compatibility Analysis
Backward Compatible
Backward compatible. 6 non-breaking changes.
Non-Breaking Changes (6)
- AddedVertex AddedVertex { vertex_id: "pet.trezy.getDiagnostics#config.dayLengthSeconds" }
- AddedVertex AddedVertex { vertex_id: "pet.trezy.getDiagnostics#config.sleepWindows" }
- AddedVertex AddedVertex { vertex_id: "pet.trezy.getDiagnostics:output.sleepingInteractions" }
- AddedEdge AddedEdge { src: "pet.trezy.getDiagnostics#config", tgt: "pet.trezy.getDiagnostics#config.dayLengthSeconds", kind: "prop", name: Some("dayLengthSeconds") }
- AddedEdge AddedEdge { src: "pet.trezy.getDiagnostics#config", tgt: "pet.trezy.getDiagnostics#config.sleepWindows", kind: "prop", name: Some("sleepWindows") }
- AddedEdge AddedEdge { src: "pet.trezy.getDiagnostics:output", tgt: "pet.trezy.getDiagnostics:output.sleepingInteractions", kind: "prop", name: Some("sleepingInteractions") }
Migration Guidance
Added Elements
AddedVertex { vertex_id: "pet.trezy.getDiagnostics#config.dayLengthSeconds" }AddedVertex { vertex_id: "pet.trezy.getDiagnostics#config.sleepWindows" }AddedVertex { vertex_id: "pet.trezy.getDiagnostics:output.sleepingInteractions" }
Additional Notes
- Non-breaking: AddedEdge { src: "pet.trezy.getDiagnostics#config", tgt: "pet.trezy.getDiagnostics#config.dayLengthSeconds", kind: "prop", name: Some("dayLengthSeconds") }
- Non-breaking: AddedEdge { src: "pet.trezy.getDiagnostics#config", tgt: "pet.trezy.getDiagnostics#config.sleepWindows", kind: "prop", name: Some("sleepWindows") }
- Non-breaking: AddedEdge { src: "pet.trezy.getDiagnostics:output", tgt: "pet.trezy.getDiagnostics:output.sleepingInteractions", kind: "prop", name: Some("sleepingInteractions") }
1
1
{
2
2
"$type": "com.atproto.lexicon.schema",
3
3
"defs": {
4
4
"config": {
5
5
"properties": {
6
6
"activePetCap": {
7
7
"type": "integer"
8
8
},
9
+
"dayLengthSeconds": {
10
+
"description": "The published game day length this instance is reading, in real seconds.",
11
+
"type": "integer"
12
+
},
13
+
"sleepWindows": {
14
+
"description": "How many sleep windows the published config carries, so the reader can tell a present-but-empty table from one that failed to read.",
15
+
"minimum": 0,
16
+
"type": "integer"
17
+
},
9
18
"stageMoneyCap": {
10
19
"type": "integer"
11
20
},
12
21
"starterGrantCap": {
13
22
"type": "integer"
14
23
}
15
24
},
16
25
"required": [],
17
26
"type": "object"
18
27
},
19
28
"grant": {
20
29
"properties": {
21
30
"amount": {
22
31
"type": "integer"
23
32
},
24
33
"grantedAt": {
25
34
"type": "string"
26
35
}
27
36
},
28
37
"required": [
29
38
"amount"
30
39
],
31
40
"type": "object"
32
41
},
33
42
"main": {
34
43
"description": "Everything the server knows about the CALLER's own game state. Read-only; writes nothing.\n\nTakes no input at all, and that is the security model: with no `did` parameter there is no way to ask about anybody else, so cross-account access is impossible by construction rather than gated by a check that could later be loosened.\n\nA PROCEDURE rather than a query for one concrete reason: HappyView enforces authentication on procedures at the transport, so an unauthenticated call gets a 401 and this script never runs, and `caller_did` is therefore guaranteed to be set. A query would receive `caller_did` too — it is `string?` in the query globals — but a Lua script cannot set its own HTTP status (src/error.rs:143 maps every raise to 500), so a query could only answer an anonymous caller with a 200 carrying an error, or a 500. The 401 has to come from the transport.\n\nIt exists because diagnosing a stuck pet took an admin log, four greps and a chain of inference off two public endpoints. The ledger, the grant and the index are the three things that disagree in practice, and none of them was observable. This reports what each says and lets the reader compare, rather than deciding who is right.",
35
44
"output": {
36
45
"encoding": "application/json",
37
46
"schema": {
38
47
"properties": {
39
48
"config": {
40
49
"description": "The caps as this instance actually reads them, not as the record on disk says.",
41
50
"ref": "#config",
42
51
"type": "ref"
43
52
},
44
53
"did": {
45
54
"description": "The caller, echoed back. Always the authenticated DID — there is no way to ask about another account.",
46
55
"type": "string"
47
56
},
48
57
"error": {
49
58
"description": "Reserved. Every failure this script can have is per-store and reported through `unreadable` instead, because a diagnostic that answers nothing is less useful than one that answers what it could reach and names what it could not.",
50
59
"knownValues": [
51
60
"unreadable"
52
61
],
53
62
"type": "string"
54
63
},
55
64
"grant": {
56
65
"description": "The starter grant row, absent when the player never had one.",
57
66
"ref": "#grant",
58
67
"type": "ref"
59
68
},
60
69
"message": {
61
70
"type": "string"
62
71
},
63
72
"money": {
64
73
"ref": "#money",
65
74
"type": "ref"
66
75
},
67
76
"pets": {
68
77
"description": "Every row in the pet ledger for this player, retired ones included, each paired with whether the index has the matching record. A row with indexed=false is the state that made a pet invisible and unrecoverable on 2026-07-30.",
69
78
"items": {
70
79
"ref": "#pet",
71
80
"type": "ref"
72
81
},
73
82
"type": "array"
74
83
},
75
84
"rejections": {
76
85
"description": "Rejection rows by reason. A stale row here is what put a false accusation in front of a player once, so seeing them matters.",
77
86
"items": {
78
87
"ref": "#reasonCount",
79
88
"type": "ref"
80
89
},
81
90
"type": "array"
82
91
},
92
+
"sleepingInteractions": {
93
+
"description": "How many of the caller's activity records landed inside their species' published sleep window. A non-zero value is a bug in createInteraction or resolveFeeding — the only two things that can mint a signed activity record — and is NEVER evidence that the player forged anything. Absent, rather than zero, when the sleep config or the activity store could not be read; check `unreadable`.",
94
+
"minimum": 0,
95
+
"type": "integer"
96
+
},
83
97
"unreadable": {
84
-
"description": "Which stores could not be read on this call, by name: pet-ledger, pet-index, grants, wallet-record, highwater, rejections, game-config. NOT cosmetic — every absent value elsewhere in this answer is ambiguous until you have read this. An unreadable pet-index would otherwise make every pet look un-indexed, which is the exact wrong conclusion to hand somebody debugging a missing pet.",
98
+
"description": "Which stores could not be read on this call, by name: pet-ledger, pet-index, grants, wallet-record, highwater, rejections, game-config, sleep-config, sleeping-interactions. NOT cosmetic — every absent value elsewhere in this answer is ambiguous until you have read this. An unreadable pet-index would otherwise make every pet look un-indexed, which is the exact wrong conclusion to hand somebody debugging a missing pet.",
85
99
"items": {
86
100
"type": "string"
87
101
},
88
102
"type": "array"
89
103
},
90
104
"wallet": {
91
105
"ref": "#wallet",
92
106
"type": "ref"
93
107
}
94
108
},
95
109
"required": [],
96
110
"type": "object"
97
111
}
98
112
},
99
113
"type": "procedure"
100
114
},
101
115
"money": {
102
116
"description": "The balance decomposed, so an unexpected number can be attributed instead of guessed at. balance = collected + granted - spent, and every term is reported because two of them being wrong in opposite directions looks exactly like both being right.",
103
117
"properties": {
104
118
"balance": {
105
119
"type": "integer"
106
120
},
107
121
"collected": {
108
122
"type": "integer"
109
123
},
110
124
"granted": {
111
125
"type": "integer"
112
126
},
113
127
"spent": {
114
128
"type": "integer"
115
129
}
116
130
},
117
131
"required": [],
118
132
"type": "object"
119
133
},
120
134
"pet": {
121
135
"properties": {
122
136
"active": {
123
137
"type": "boolean"
124
138
},
125
139
"createdAt": {
126
140
"type": "string"
127
141
},
128
142
"indexed": {
129
143
"description": "Whether happyview_records holds the record this ledger row claims. False means the game cannot see a pet it believes the player owns. ABSENT means the index could not be read, which is not the same as false — check `unreadable` before concluding anything from its absence.",
130
144
"type": "boolean"
131
145
},
132
146
"name": {
133
147
"type": "string"
134
148
},
135
149
"price": {
136
150
"type": "integer"
137
151
},
138
152
"retired": {
139
153
"type": "boolean"
140
154
},
141
155
"species": {
142
156
"type": "string"
143
157
},
144
158
"uri": {
145
159
"format": "at-uri",
146
160
"type": "string"
147
161
}
148
162
},
149
163
"required": [
150
164
"uri"
151
165
],
152
166
"type": "object"
153
167
},
154
168
"reasonCount": {
155
169
"properties": {
156
170
"count": {
157
171
"type": "integer"
158
172
},
159
173
"reason": {
160
174
"type": "string"
161
175
}
162
176
},
163
177
"required": [
164
178
"reason",
165
179
"count"
166
180
],
167
181
"type": "object"
168
182
},
169
183
"wallet": {
170
184
"properties": {
171
185
"highwaterCollected": {
172
186
"description": "The high-water total, which is what a repair rebuilds from.",
173
187
"type": "integer"
174
188
},
175
189
"highwaterLastUpdated": {
176
190
"type": "string"
177
191
},
178
192
"recordCollected": {
179
193
"description": "The collected total the indexed wallet record carries, when there is one.",
180
194
"type": "integer"
181
195
},
182
196
"recordIndexed": {
183
197
"description": "Whether the player's pet.trezy.wallet record is in the index.",
184
198
"type": "boolean"
185
199
},
186
200
"recordLastUpdated": {
187
201
"type": "string"
188
202
}
189
203
},
190
204
"required": [
191
205
"recordIndexed"
192
206
],
193
207
"type": "object"
194
208
}
195
209
},
196
210
"id": "pet.trezy.getDiagnostics",
197
211
"lexicon": 1
198
212
}