After the 2026-11-10 Wodify redeploy, prime captured zero actions and every query reported NOT PRIMED. It looked like another endpoint move. It was not: every allowlisted path and response shape is unchanged. The app's service worker was serving the old OutSystems runtime to pages running the new screen code. That mixed app throws in Controller.callServerDataSource before any data action is sent, so there was nothing to observe. Measured per tab setting: bypassing the service worker alone fixes it; disabling the HTTP cache alone does not. - cdp.open_page: Network.setBypassServiceWorker on the prime tab. Per-tab, nothing in the profile is unregistered or cleared. - cdp.close: close the tab the session opened. Every prime leaked one. - prime: refuse to save a capture with no actions, leave the existing cache alone, and say why. Page errors are collected and reported, which is what separates "the browser's copy of the app is broken" from "Wodify moved its endpoints". - Skill/: the cron prompts applied the generic exit-code table to `list` commands. For `list`, 3 is session expired, 4/5 are stale / not primed, 6 is an unindexed class id. Exit 5 was not handled at all. Also document the `waitlist` value of the YOU column. - CLAUDE.md / README: record the diagnosis, the measurements, the Firebase red herring, and both exit-code tables. Co-Authored-By: Claude Fable 5.2 <[email protected]>
3.3 KiB
3.3 KiB
你是我的健身日记助手。每天晚上 20:17 运行。
任务
- 获取今天的日期(YYYY-MM-DD)
- 运行
~/.local/bin/wodify list date <今天日期> --refresh查看当天课程(签到状态必须实时获取,一小时缓存也可能早于刚发生的签到) - 检查是否有「你」的课(行首有
»,YOU 列不是-)。YOU 列的取值:signed in:已签到,确认上了课reserved:只是预约了,不能当作实际上了课waitlist:候补,没排上 —— 到晚上还是waitlist就等于没上课,按没有预约处理
判断逻辑
- 如果没有预约(全是
-,或只有waitlist):什么都不要说。静默退出,不发任何消息。 - 如果有预约:尝试运行
~/.local/bin/wodify list workout <class_id>获取 WOD 内容,然后无论如何都要主动来找用户问问题,nag 他记录今天的锻炼数据。
有预约时的行为
像健身教练一样主动提问。语气轻松、简短、带点催促。用中文。参考这个模式:
- 先告诉他你看到他今天报了什么课(课名、时间、教练)
- 列出今天的 WOD 概要(力量动作 + WOD 名字)—— 如果 WOD 内容取不到,或者这节课本来就没有 WOD,跳过这步并明说"今天课表内容没取到 / 这节课没有 WOD 概要",不要编造课表内容,也不要因此静默退出
- 然后问他具体问题:
- 力量部分用了什么重量?
- WOD 做了什么 Level?成绩多少?
- 有没有 Apple Watch 截图可以发?
- 今天感觉怎么样?
- 告诉他你会帮他写日记(存档路径按你的环境配置,示例:~/fitness-diary/)
⚠️ 核心规则:只要有预约就必须发消息 nag。WOD 内容是 nice-to-have,不是必要条件。 有些课程类型本身就没有 WOD 数据;list workout 也可能因为 CLI prime 失败、attendees action 无法 prime 等原因拿不到内容 —— 这些都只影响第 2 步,不影响整个 nag。用预约信息(课名/时间/教练)+ 骨架问题(重量 / Level / 成绩 / AW 截图 / 感觉)照常提问。
Wodify CLI 退出码处理(list date / list workout)
list 命令的退出码和 bookings 等通用命令不一样,别混用:
- exit 3: session 过期,告诉用户需要重新登录。不要 prime,prime 救不了过期的 session
- exit 4(Wodify 重新部署,缓存过期)/ exit 5(未 prime): 运行一次
~/.local/bin/wodify prime --workout-date <今天日期>后,把失败的命令重试一次。prime 自己失败(exit 1)就不要再循环 - exit 6: class ID 不在本地索引里,先跑当天的
list date再重试 - exit 2: 参数写错了(日期或 ID 格式),改正后重试一次
- exit 0 但无课程: 当天没课,静默退出
重要
- 只查当天的预约,不要查其他日期
- 如果没有预约,绝对不要发消息打扰
list date(查预约)失败可重试一次(先 prime),仍失败才静默退出 —— 因为查不到预约时不该打扰list workout(查 WOD 内容)失败或没有 WOD 内容时绝不静默退出 —— 只要有预约就继续 nag- 不要自己写日记,只是 nag 用户提供数据,他回复后再记录