Exact source used by this build. SHA-256: d7f4f58f0e88caee5a525ab9074a28f1b2c32d6cde78bda9467c8acf6c18f052.
1 # Festivals and community implementation report
2
3 ## Integration into main
4
5 See [the integration-2 report](../../../../../docs/w3-integration2-report.md)
6 for current validation and the full file audit. The branch report below is
7 historical. Admission keeps time running; the main event freezes the calendar
8 when all connected players participate. Injected elapsed time drives real fishing
9 and contest expiry exactly once. Festival fishing now uses the ordinary rod,
10 water, bite and minigame path with verified catch scoring. The weather owner
11 applies festival sunshine before soil watering and the animal bowl preview.
12 Layouts remain tied to current authored POIs, including a validated fishing bank.
13
14 Four numbered seasonal festivals provide calendar admission, POI-based layout
15 overlays, finite seasonal shops, egg collection, fishing, judged display and
16 target contests. Festival attendance and scores are per player; stock, collected
17 eggs and the judged display are shared. The calendar freezes when every connected
18 player attends. Contest timers continue through injected real elapsed time.
19 Attendees retain their entry time in the festival HUD. Leaving returns to the
20 farm at 22:00, or preserves a later shared time to prevent rewinding the day.
21 Regular shops and homes close on festival dates; the player's farm home remains
22 accessible. Admission and reward replay are checked by the authority.
23
24 The community system implements 3 rooms, 10 choose-N bundles, four repairs,
25 25 museum donations (14 minerals and 11 artifacts), a 102-slot shared display,
26 14 museum milestone thresholds, five collection categories, 40 shipping catalog
27 slots and 12 achievements. Both players can contribute partial quantities to
28 one requirement. Rewards are shared, claimed once, and retained if backpacks
29 are full. Room repairs update both access authorization and visible map metadata.
30 The greenhouse repair enables year-round soil at the existing farm ruin.
31
32 See [community integration](../community/README.md) for the authoritative
33 donation intents, seeded artifact acquisition, and trusted mine, treasure,
34 fish, cooking and crafting producer hooks.
35
36 ## Validation
37
38 Final `bun run check`:
39
40 ```text
41 184 pass
42 0 fail
43 6283 expect() calls
44 Ran 184 tests across 40 files. [55.59s]
45 Validated 14 content domains: 12 crops, 86 items, and 8 Tiled areas.
46 ```
47
48 `bun run --cwd apps/client build` succeeds (221 modules; the existing Vite
49 large-chunk warning remains). `git diff --check` passes.
50
51 `bun test apps/server/test/festivals-community.test.ts` passes: 3 tests,
52 29 assertions. The production FarmWorld authority, authentication, intent
53 dispatch, scoped patches and SQLite checkpoints run behind two real TCP
54 WebSocket clients. Cloudflare socket/storage adapters and wall time are supplied
55 by the harness. Fixtures are installed before joins; subsequent gameplay uses
56 server intents and alarms. The tests cover:
57
58 - Both players donating to the same requirement, completing a room, crossing
59 its repaired gate, and persisting completion.
60 - A running clock with one attendee, a frozen clock with both, synchronized
61 collection, festival purchases, farm return and resumed time.
62 - Shared museum donations, duplicate rejection without item loss, display
63 rearrangement, and one-time milestone claims.
64
65 The full check also passes the existing local workerd transport tests. An
66 earlier run failed two stale fixed registration expectations and lost a
67 live-runtime socket while files were changing; those expectations were updated
68 and the final full run used stable files.
69
70 ## Shared changes
71
72 - `packages/sim/src/systems/index.ts`, `packages/content/src/domains/index.ts`
73 and `apps/client/src/systems/index.ts`: register the owned systems/domains;
74 sim helpers follow the existing public re-export pattern. Contextual festival
75 and community interaction runs before the inventory tool fallback.
76 - `packages/sim/src/systems/registry.ts`: generic elapsed-time hooks, clock
77 pause predicates, intent/access guards, repair access and crop-season
78 capabilities. These extension points keep feature rules in their own folders.
79 - `packages/sim/src/clock.ts`: deliver elapsed time to activities while the
80 calendar is frozen.
81 - `packages/sim/src/systems/movement/index.ts`: consult generic access guards
82 along sampled movement paths and at destinations; honor repaired routes.
83 - `packages/sim/src/systems/farming/index.ts`: consult the generic season
84 exception when planting and growing restored greenhouse crops.
85 - `packages/content/test/domains.test.ts` and
86 `apps/client/src/core/registry.test.ts`: update the two fixed registration
87 expectations for the added domains/systems.
88
89 No production server, protocol, scene coordinator, inventory, item helper,
90 skill implementation, map source or dependency configuration was changed.
91
92 ## Scope limits and TBD slots
93
94 - Fishing uses timed cast/reel controls; shooting uses timed target taps.
95 Full rod/slingshot physics are future integration work. Festival prizes use
96 currency. Numerical references: [egg hunt](https://wiki.stardewvalley.net/Egg_Festival),
97 [judging and targets](https://stardewvalleywiki.com/Stardew_Valley_Fair),
98 [fishing contest](https://stardewvalleywiki.com/Festival_of_Ice).
99 - Fish, cooking and crafting collections expose trusted producer hooks and
100 typed catalog slots. Those separate producer systems are absent from this
101 checkout. Shipping and museum tracking operate automatically.
102 - All 25 museum items can appear in seeded artifact spots so this restoration
103 loop is playable before mine/treasure producers are integrated. Later museum
104 milestones and achievements retain parity thresholds beyond MVP counts.
105 - The greenhouse is a restored soil patch on the farm map and retains outdoor
106 weather behavior.
107 - Controls have at least 44px hit targets (48px in the new menus), scrolling
108 dialogs and a scrolling museum grid. Phone screenshots were not obtained:
109 Playwright's Chrome process aborted with SIGABRT, and computer use exposed
110 no browser automation surface. Responsive layout still needs device review.
111 - Names and descriptions remain `TBD` for all four festivals, four festival
112 items, three rooms, ten bundles, four repairs, 25 museum items and twelve
113 achievements. No dialogue or lore was written. Every new visual has a
114 manifest key; original procedural placeholders use the project's existing
115 CC0 dedication.
116
117 Changes are uncommitted, as instructed by the project. No Git write, deployment,
118 login, credential operation, push or history change was attempted. No new
119 runtime dependency was added.
120
121 ## Files changed
122
123 ```text
124 apps/
125 client/
126 src/core/registry.test.ts
127 src/systems/index.ts
128 src/systems/community/{index,model}.ts
129 src/systems/festivals/{index,model}.ts
130 test/community-model.test.ts
131 test/festivals-model.test.ts
132 server/test/festivals-community.test.ts
133 packages/
134 content/
135 data/community/community.json
136 data/festivals/festivals.json
137 data/items/{community,festivals}.json
138 src/domains/index.ts
139 src/domains/community/{index,schema}.ts
140 src/domains/festivals/{index,schema}.ts
141 test/domains.test.ts
142 test/community-content.test.ts
143 test/festivals-content.test.ts
144 sim/
145 src/clock.ts
146 src/systems/{index,registry}.ts
147 src/systems/farming/index.ts
148 src/systems/movement/index.ts
149 src/systems/community/{index.ts,README.md}
150 src/systems/festivals/{index.ts,README.md}
151 test/community-restoration.test.ts
152 test/festivals-extension.test.ts
153 test/festivals-system.test.ts
154 ```
155