# BaoLife — Hunt + Fix the Next Dead/Inert Gameplay Mechanic — PROGRESS

**Goal:** Find + fix the next highest-leverage broken/unwired/declawed core gameplay mechanic (compounding the career-progression find), proven-to-fire + verified. Secondary: does meaningful money have a meaningful spend loop?

**Status:** ✅ DONE — `full_outcome_complete: true`. Online weekly romance beats + GPA drift wired (parity with offline), proven-to-fire, suite green (143 files / 1683 tests / 0 failed). **Working-tree only — awaiting Craig deploy decision.**

**Baseline:** HEAD `cfce8943` (economy shipped at `db3dd13b`). Tests green: 142 files / 1679 / 0 failed. tsc clean.

## Why this slice

The just-shipped `baolife-economy` fix found that career progression was **completely dead in production** — the legacy→v2 migration silently dropped the salary-raise mechanic. One unplugged core system is rarely the only one, and shipping inert advertised features is the worst pre-release failure. So: hunt the same vein for the next broken mechanic and fix the biggest confirmed gap.

## Hard constraints (carry-over)

- Verify a "dead" mechanic is expected/advertised (not intentionally cut) before wiring it.
- Do NOT touch the avatar WIP (`avatar.ts`, `avatarLibrary.*`, `Player.ts` DiceBear, ios `MainCharacterView`/`QuickStatsCard`).
- Never edit legacy `ws/`. Mirror loop changes online + offline.
- Diamonds/IAP + reward economy must stay safe.
- After every change: `cd server && npx tsc --noEmit` then `npx vitest run` — green, >= 1679.
- iOS priority; Android parity. No deploy unless Craig asks.

## Task log

| Task | Type | Status | Summary |
|------|------|--------|---------|
| T001 | Scout | done | Found same class as career bug: online weekly tick missing offline subsystems |
| T002 | Judge | done | Verified; **fix = online romance beats + GPA parity**; excluded moods/decay (double-apply) |
| T003 | Worker | done | Wired both calls (player-char, once/week, try/catch); proof-it-fires test |
| T999 | PM | done | ✅ COMPLETE — full_outcome_complete: true (PM re-ran tsc + full suite + diff review) |

## ✅ FINAL — goal complete (uncommitted, awaiting deploy decision)

**What's fixed (working tree):** Connected (online) players now get the **weekly 5% random romance events** and **student GPA drift** that previously only ran for offline players — wired into `PlayerSession.processWeekTick`, player-character, once/week, parity-exact with the offline `GameEngine` path. Excluded `handleMoods` + weekly affinity decay (already handled online — would double-apply).

**Verified (PM re-ran):** tsc clean; full suite **143 files / 1683 tests / 0 failed** (4 new proof-it-fires tests that fail if the wiring is removed). Only `PlayerSession.ts` + `PlayerSession.weekly.test.ts` changed; avatar WIP untouched.

**Owner action:** NOT committed/deployed by design. Flagged follow-up (separate small bug): `onGraduation(this, level)` at `PlayerSession.ts:727` omits `gpa`, so the `straight_a` achievement can't fire online.

## Finding — online weekly tick was incomplete

The online weekly tick (`PlayerSession.processWeekTick`) ran only finances + job (the latter just added in the career fix), while the offline `GameEngine.handleWeeklyUpdates` runs 5 subsystems. The Judge verified each against all online cadences:
- **EXCLUDE** `handleMoods` (happiness already moves online via v2 event effects + hourly survival) and **weekly affinity/familiarity decay** (online `updateAge` already decays affinity; offline per-NPC loop double-applies). Mirroring either = regression.
- **FIX** `processWeeklyRelationshipEvents` — the **5% random romance beats fire offline-only** (connected players never get them; headline system) + cheap parity mirror of `handleEducation` (GPA drift).
- **Flagged follow-up (not this slice):** `onGraduation(this, level)` at PlayerSession.ts:727 omits `gpa`, so the `straight_a` achievement can't fire online.

## Receipts / notes

- T001/T002 receipts: see state.yaml.
