fix: 补全 CLI 提交题配置 - #8
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Taste Rating:好品味
Linus-Style Analysis: 改动以单一构造函数集中 submission 配置,补齐 canonical 契约字段,并使禁用文字输入与 requireText 保持一致;实现直接且不改变既有 CLI 参数语义。新增测试覆盖默认完整配置和关键联动分支。
[RISK ASSESSMENT]
- [Overall PR]
⚠️ 风险评估:🟢 低。仅新增固定的 API 配置字段和纯函数测试;无依赖、凭证或协议路径变更。
VERDICT:
✅ 值得合并:核心逻辑正确,且 PR 描述提供了 Preview 真实创建与检查的端到端验证。
KEY INSIGHT:
将完整 submission 配置收敛到一个构造函数,可避免 CLI 与前端契约再次因字段遗漏而漂移。
此审查由 AI 代理(OpenHands)代表用户生成。
Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/MizzenAI/mizzen-cli/actions/runs/31392012526
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.
问题\n\nCLI 创建 submission 题时只写入部分
submissionConfig。Study Check 按前端 canonical 契约读取requireText等字段时会触发 KeyError,Open API 对外表现为 502。\n\n## 修改\n\n- CLI 创建 submission 题时写入与前端一致的完整配置\n- 禁用文字输入时同步关闭requireText\n- 增加最小契约测试\n\n## 验证\n\n-bun test(11 passed)\n-bun run typecheck\n-bun run bundle\n- Preview main 真实创建 submission 题后执行interview check,不再返回 502;测试题已删除