改造前: consent_version 硬编码 't12-web-mvp-v1' / consent_scope 硬编码 改造后: 从 Settings 读取,可通过环境变量覆盖 - GAOKAO_CONSENT_VERSION (默认 privacy-policy-v2026.06-draft) - GAOKAO_CONSENT_SCOPE_PORTAL (默认 web-self-service-order-intake) - GAOKAO_CONSENT_SCOPE_CHANNEL_PREFIX (默认 channel-intake) 实现: - Settings 新增 consent_version / consent_scope_portal / consent_scope_channel_prefix - web_public._render_info_page 改为从 settings 取默认值 - orders.create_order 改为从 settings 取默认值 升级隐私政策时: - 更新 docs/PRIVACY_POLICY_DRAFT.md 版本号 - 设置环境变量 GAOKAO_CONSENT_VERSION=new-version - 无需改代码,老订单保留历史版本 测试: - test_create_order_uses_settings_consent_version 锁定新行为 - dev-verify: 1292 passed / coverage / ruff / mypy 全绿
28 KiB
28 KiB