Repository navigation
fix(cloud): restore learning_save_state RPC target (v1.9.1) - #184
Merged
Merged
Conversation
…ersistence (v1.9.1) Since v1.7.0 the client called learning_save_state_v3, which was never migrated to shared Supabase, so every signed-in cloud save returned 404. Point saves back at the deployed learning_save_state (the v3 compressed archive is plain JSONB it already accepts) and drop p_write_protocol. Add a contract test that checks the RPC name and parameters against supabase/migrations so mocked E2E routes cannot hide a missing function.
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.
问题
自 v1.7.0(
27ef161)起,客户端调用learning_save_state_v3,但共享 Supabase 中从未迁移该函数。生产环境所有已登录家庭的云端保存都返回 404,跨设备同步失效。本机记录不受影响(local-first)。修复
learning_save_state(p_profile_id, p_state, p_expected_version);v3 压缩归档是普通 JSONB,现有函数直接接受,无需改 schema。p_write_protocol参数。tests/unit/cloud-rpc-contract.test.js:按supabase/migrations校验函数名和参数,防止 E2E mock 掩盖缺失的数据库函数。Release-impact gate
production-impact:需要生产发布并在 sm.shadow.wang 验收云端保存返回 200。db-migration)。learning_save_state_v3与learning_record_activity_event幂等哈希问题另行在 Shadow Portal 控制面提案。验证
npm run check、npm run test:fast:69 个文件 / 647 个测试通过node scripts/run-e2e.mjs --project=chromium tests/e2e/cloud.spec.js:63 个测试通过