Repository navigation
fix(mcp): 不因等值数字的 JSON 写法重排稿件 - #33
Merged
Merged
Conversation
已固定的数值控制 word_spacing=4 与 4.0 运行值相同,但旧实现将 JSON 表示变化视为新设定,新增修订并令已有的局部摆字失效。只对已显式保存、通过原校验的 number 控件识别 f64 相等,保留旧存储表示;保留首次固定默认值、null 清除、不同值、整数校验和实际墨迹更改。 两套真实 stdio 对照及 release 全量冒烟通过:单独等值改写不写库;与墨迹同改时只保存后者,手摆页与纯墨迹对照逐字节相同。用独立页、字体和 seed 复核,基线误差 4763/4336 像素,候选均为 0。无 GitHub CI。
Reviewer's GuideImplementation在原有校验通过后,对已保存的 number 控件比较解析后的数值;若数值相等则保留旧 JSON 表示,避免等值改写触发新修订。
Documentation记录 MCP 数值参数的等值整数与小数写法不会再导致重新排版。
Tests覆盖等值数字保留原表示、数值覆盖的固定与清除,以及无效或越界补丁仍被拒绝的行为。
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Owner
Author
实测复现与判据
|
Owner
Author
建议子集的云端兼容性复验独立工作树把 #33、#32、#29 和 #39、#44、#41、#47 合在一棵本地树
|
SXP-Simon
marked this pull request as ready for review
November 25, 2026 12:04
|
Sorry @SXP-Simon, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 2 days and 6 hours by commenting |
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.
复现
把
word_spacing显式固定为4后再送4.0。两次的有效字距相同,旧版仍写入新修订与编辑记录。若这一页已有手动摆字,旧版还会丢掉当前摆放。反向4.0→4和“等值字距 + 真正改变墨迹”也复现。改动
仅在原校验通过、控件类型为
number、已显式保存且两个解析后的值精确相等时,保留旧 JSON 表示。这会沿用已有的「设定未变化」结果或只应用该批中其余修改。首次显式固定默认值、null清除、真值变化、整数类型校验和已有字形保护规则均不改。验证
Summary by Sourcery
Preserve saved numeric parameter representations when a valid override does not change its effective value.
Bug Fixes:
Tests: