feat(sounds): W4 五类固定程序化音效与设备级设置 - #45
Draft
WardLu wants to merge 7 commits into
Draft
Conversation
- ci.yml:导出 DB_URL 到 SHADOW_MATE_TEST_DB_URL,支持共享数据库测试 - test-delete-account-guard.mjs:加载 .env.local 以支持本地共享链路测试 - PULL_REQUEST_TEMPLATE / CONTRIBUTING:按改动范围选择测试层级的最小充分约定
test-shared-db.mjs 改为扫描 supabase/tests/*.sql,而不是只跑 learning_rls_test.sql。growth_loop 的 5 个 pgTAP 文件因此纳入 npm run test:db 与 CI 覆盖(在已应用迁移的实例上实测 6 文件 / 159 项 PASS);共享实例在控制面登记迁移前会如实报 schema 缺失。
重新实现 W4:五类固定程序化音效(action_completed / points_earned / try_again / points_deducted / reward_fulfilled), Web Audio 实时合成、固定配方、每类 2-3 个变体;设备级设置 (总开关、音量、逐事件开关与变体、试听、重置)仅存 localStorage, 不同步云端。接入主流程:加分/扣分/撤销/兑换/兑现;reward_fulfilled 仅在服务端确认“已兑现”后触发。含单元测试与 E2E 测试。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WardLu
force-pushed
the
feat/growth-loop-integration
branch
from
August 17, 2026 15:02
918b99a to
90012c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
重新实现 W4:五类固定程序化音效与设备级设置,全部基于 SHA-4(growth-loop-integration 上的 growth loop 代码)。
src/learning-sounds.js:Web Audio 实时合成,固定配方、无随机;五类事件(action_completed / points_earned / try_again / points_deducted / reward_fulfilled),每类 2–3 个变体;同操作优先级、防叠加、连续点击节流、TTS 冲突静音、AudioContext 不可用时静默降级(绝不影响业务写入)。reward_fulfilled仅在服务端确认“已兑现”后经reconcileConfirmed触发。Test plan
npm run test:unit:133 通过(含 learning-sounds 21 项 + growth-loop-controller 兑现流 3 项)npm run test:e2e:65 通过 / 1 跳过(sounds 7 项全过;piper-dev-server 在网络环境正常时单独通过)npm run check、npm run build、node scripts/check-build.mjs、npm run test:coverage均通过Closes: SHA-6