Skip to content

fix: Status 选项重交清值地雷——已一致时跳过(坑6) - #20

Merged
guanlili merged 1 commit into
mainfrom
fix/status-resubmit-wipe
Nov 10, 2026
Merged

guanlili merged 1 commit into
mainfrom
fix/status-resubmit-wipe

Conversation

@guanlili

Copy link
Copy Markdown
Owner

Why now / 问题

用户问「已接入项目如何升级到新版 skill」,答案=重跑 new-project.sh。但沙盒实测发现:重跑会重新提交 Status 的 singleSelectOptions,按坑 6 该 mutation 会清空全部条目的 Status 已选值——即对有账目的仓库执行升级会把整板 Status 擦掉。此前所有重跑都发生在空板上,从未暴露。

沙盒复现(Project #16):记账 Status=已完成 → 重跑 → 值被清;修复后重跑 → 值保留。

Alternatives considered

  • 升级后用 fill-field 补回 Status:能恢复但属于事后擦屁股,且用户不会察觉被清 → 必须从根上不重交
  • 比对选项时排序容忍手动重排:过度设计,GitHub 保持提交顺序,join 原序比对覆盖真实场景

Verification

Checklist

  • python3 -m unittest discover -s tests 本地全绿
  • bug 修复附带会先红后绿的单测
  • CHANGELOG.md 已更新

@guanlili
guanlili merged commit d0b54ca into main Nov 10, 2026
2 checks passed
@guanlili
guanlili deleted the fix/status-resubmit-wipe branch November 10, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant