[econ] debugging challenges

This commit is contained in:
Devin Zuczek
2026-08-25 14:44:08 -04:00
parent 5cb2cbf967
commit f6d92ec1e1
4 changed files with 298 additions and 135 deletions
+9 -8
View File
@@ -248,10 +248,11 @@ rotation to differ.
| `FallbackGiftName` | `"4-Star Box"` | Shown when the client can't resolve `Gift` into a name. |
| `ChallengeThemeString` | a designer quote | Free text carried through from the captured rotation; a theme note, not a rendered UI string as far as we can tell. |
**The frozen clock:** `ServerTime` (Mar 31) sits _inside_ `StartAt`…`EndAt` (Mar 25 → Apr 1),
about a day before the end, and the file is static — so the client always sees an active
rotation with a ~1-day countdown rather than an expired one. If you edit the window, move
`ServerTime` inside the new one too, or the challenges may render as already over.
**The frozen clock:** `ServerTime` sits _inside_ `StartAt`…`EndAt`, about a day before the
end, and the file is static — so the client always sees an active rotation with a ~1-day
countdown rather than an expired one (the captured week: Mar 31 inside Mar 25 → Apr 1). If
you edit the window, move `ServerTime` inside the new one too, or the challenges may render
as already over.
### A challenge entry
@@ -279,10 +280,10 @@ scene allow-list (`ct: 7`, subroom `UnitySceneId`s) or a session variable (`ct:
`won`). The server never evaluates any of it — the client does, and posts the tree back with
its own count written in.
**Reading or writing one? See `.agents/weekly-challenge-config/SKILL.md`** — the full
grammar, the two idioms the file uses, how to resolve a scene guid to a room, the shared
scenes that make a challenge complete in more rooms than you meant (`Soccer` and `Stadium`
are one scene), and an authoring checklist.
**Reading or writing one? See `.agents/skills/weekly-challenge-config/SKILL.md`** — the full
node-type enum, the event types and session variables a predicate can match, the named scene
constants (including the shared scenes that make a challenge complete in more rooms than you
meant — `Soccer` and `Stadium` are one scene), the three idioms, and an authoring checklist.
### The `Gift` block
+3 -3
View File
@@ -1985,9 +1985,9 @@ describe('econ endpoints', () => {
test('completing enough of the rotation grants its gift, once', async () => {
// The live rotation, so this follows whatever static/weekly-challenge.json holds.
const { ids, report } = await finishTheRotation('74')
// The whole point of the threshold: the gift lands before the set is finished (the
// published week is five challenges for three).
expect(REQUIRED_FOR_GIFT).toBeLessThan(ids.length)
// The threshold can't ask for more than the week publishes: a five-challenge week asks
// for three, and a rotation of three or fewer asks for all of them.
expect(REQUIRED_FOR_GIFT).toBeLessThanOrEqual(ids.length)
for (const id of ids.slice(0, REQUIRED_FOR_GIFT - 1)) {
expect((await report(id)).status).toBe(200)
}
+14 -38
View File
@@ -1,48 +1,24 @@
{
"ChallengeMapId": 17,
"ChallengeMapId": 19,
"CompletedRequired": false,
"StartAt": "2026-03-25T21:00:00",
"EndAt": "2026-04-01T21:00:00",
"ServerTime": "2026-03-31T14:42:54.2754728Z",
"StartAt": "2026-08-19T21:00:00",
"EndAt": "2026-09-26T21:00:00",
"ServerTime": "2026-08-25T14:42:54.2754728Z",
"Challenges": [
{
"ChallengeId": 37,
"Name": "CompleteJT",
"Config": "{\"ct\":1,\"c\":true,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"6d5eea4b-f069-4ed0-9916-0e2f07df0d03\"},{\"l\":\"4078dfed-24bb-4db7-863f-578ba48d726b\"}]}]}],\"t\":1,\"cc\":1}",
"Description": "Complete ^TheRiseOfJumbotron quest",
"Tooltip": "Vanquish Jumbotron in the Rise of Jumbotron quest!",
"ChallengeId": 1,
"Name": "Debug2AIGoldenTrophy",
"Config": "{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[5]},{\"ct\":7,\"vs\":[{\"l\":\"91e16e35-f48f-4700-ab8a-a1b79e50e51b\"}]}]}],\"t\":2}",
"Description": "Defeat 2 enemies in ^GoldenTrophy",
"Tooltip": "Go to ^GoldenTrophy and take out 2 goblins.",
"Complete": false
},
{
"ChallengeId": 38,
"Name": "CompleteBloodMoon",
"Config": "{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":9,\"vs\":[true],\"v\":\"won\"},{\"ct\":7,\"vs\":[{\"l\":\"49cb8993-a956-43e2-86f4-1318f279b22a\"}]}]}",
"Description": "Complete the ^Crescendo quest",
"Tooltip": "Vanquish Dracula in the Crescendo of the Blood Moon quest!",
"Complete": false
},
{
"ChallengeId": 44,
"Name": "Complete10PaintballGames",
"Config": "{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"e122fe98-e7db-49e8-a1b1-105424b6e1f0\"},{\"l\":\"a785267d-c579-42ea-be43-fec1992d1ca7\"},{\"l\":\"ff4c6427-7079-4f59-b22a-69b089420827\"},{\"l\":\"380d18b5-de9c-49f3-80f7-f4a95c1de161\"},{\"l\":\"58763055-2dfb-4814-80b8-16fac5c85709\"},{\"l\":\"65ddbb48-5a01-4e3e-972d-e5c7419e2bc3\"}]}]}],\"t\":10}",
"Description": "Complete 10 games in ^Paintball",
"Tooltip": "Go to ^Paintball and finish 10 games across any maps.",
"Complete": false
},
{
"ChallengeId": 49,
"Name": "Complete5Charades",
"Config": "{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"a673712c-877f-4749-b69a-4a4c6310d545\"},{\"l\":\"4078dfed-24bb-4db7-863f-578ba48d726b\"}]}]}],\"t\":5}",
"Description": "Complete 5 Charades games",
"Tooltip": "Finish 5 games in ^3DCharades.",
"Complete": false
},
{
"ChallengeId": 63,
"Name": "Complete3SpillwayGames",
"Config": "{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"380d18b5-de9c-49f3-80f7-f4a95c1de161\"}]}]}],\"t\":3}",
"Description": "Complete 3 games of Paintball: Clear Cut",
"Tooltip": "Go to ^Paintball.Clearcut and finish 3 games.",
"ChallengeId": 2,
"Name": "Debug2AIJumbotron",
"Config": "{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[5]},{\"ct\":7,\"vs\":[{\"l\":\"acc06e66-c2d0-4361-b0cd-46246a4c455c\"}]}]}],\"t\":2}",
"Description": "Defeat 2 enemies in ^TheRiseOfJumbotron",
"Tooltip": "Go to ^TheRiseOfJumbotron and take out 2 enemies.",
"Complete": false
}
],