From 956679cac2d413ec97e6128ab7559f4e5647d2e6 Mon Sep 17 00:00:00 2001 From: Helian Nuits Date: Wed, 25 Nov 2026 01:56:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(crates/panache-mcp):=20=E6=8C=87?= =?UTF-8?q?=E6=98=8E=E7=85=A7=E7=89=87=E4=B8=8A=E5=A2=A8=E8=BF=B9=E8=BE=B9?= =?UTF-8?q?=E7=BC=98=E7=9A=84=E6=9F=94=E5=8C=96=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 背景:照片复盘已有原尺寸裁图和墨迹控件,但阴影、墨迹偏淡与真正的边缘过锐并不是同一问题,文字客户端也可能无效拉取裁图。 解决手段:只在照片复盘回执增加条件说明。边缘确实比附近痕迹锐利时才考虑小幅柔化;同区域对照细笔和对比度,没图不代替人判断。 收益:两组真实文字客户端负例均从两次调用降到一次且无写入;两组实际柔化任务仍完成原对照。未改变渲染或已有参数。 --- CHANGELOG.md | 1 + crates/panache-mcp/src/review.rs | 1 + crates/panache-mcp/tests/review_comparison.py | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea1959c..215def3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - MCP 调参兼容直接指定控件或按控件组提交。 - 可用 `PANACHE_MCP_PRESERVE_REVIEWS=1` 在改稿和打印期间保留原有检查记录。 - MCP 在多节稿件的逐页复盘中提示节号和节内页码,方便从中断处继续核对。 +- MCP 照片复盘区分边缘过锐与阴影、墨色偏淡,提示如何在同一区域核对小幅柔化。 - MCP 可按稿件版本、节号和页码只读找回已存的整页复盘;缺少记录时明确返回空结果。 - MCP 客户端指南增加只翻旧检查记录的工具选择和调用示例。 - MCP 查旧检查单时可按新增原文定位上一版,并按该版实际排版查询指定节的末页。 diff --git a/crates/panache-mcp/src/review.rs b/crates/panache-mcp/src/review.rs index 50646d8a..a7bb1875 100644 --- a/crates/panache-mcp/src/review.rs +++ b/crates/panache-mcp/src/review.rs @@ -308,6 +308,7 @@ pub fn page( if draft.paper.is_some() { let mut appearance = json!({ "inspect":"Compare the strokes with nearby photographed marks for edge softness, contrast and size, and with the available writing space for letter size. Baseline offsets only measure placement. If images are unavailable, ask the user to inspect the crop before judging appearance.", + "ink_edge_guidance":"Keep the current ink if it already looks suitable or the user wants it unchanged. If the user reports overly sharp edges, or a visible native crop shows strokes sharper than comparable nearby photographed marks, inspect the ink controls and consider a small increase in ink_softness. Compare the same region before and after, including fine strokes and contrast; keep the original if the result is worse or uncertain. A dark shadow or faint ink alone is not evidence that softness is needed. Without images, ask the user to inspect the crop; do not claim a visual judgment.", "controls":"describe_controls with draft_id, revision and group: ink (ink #RRGGBB, ink_opacity %, ink_softness and ink_thickness in paper-space px); layout (font_size in paper-space px); typography (font).", "after_edit":"Review the edited revision. Use the same region with compare_revision for paper/before/after crops. If text reflowed onto different pages, inspect each revision separately." }); diff --git a/crates/panache-mcp/tests/review_comparison.py b/crates/panache-mcp/tests/review_comparison.py index 4e67e5c1..bacb5482 100644 --- a/crates/panache-mcp/tests/review_comparison.py +++ b/crates/panache-mcp/tests/review_comparison.py @@ -61,6 +61,12 @@ async def unruled_artwork(client, directory, call): ]) whole = (await call(client, "preview_handwriting", **key, view="review")).structuredContent appearance = whole["photo_appearance"] + guidance = appearance["ink_edge_guidance"] + assert all(term in guidance for term in ( + "Keep the current ink", "visible native crop", "ink_softness", + "same region before and after", "fine strokes and contrast", + "dark shadow or faint ink alone", "Without images", "do not claim a visual judgment", + )) args = appearance["preview_arguments"] assert args["revision"] == 2 and args["draft_id"] == key["draft_id"] assert "ink_softness" in appearance["controls"] From 35f758202b45948918bbb1c2d0cea1fff717abb0 Mon Sep 17 00:00:00 2001 From: Helian Nuits Date: Wed, 25 Nov 2026 10:48:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix(panache-mcp):=20=E7=BC=A9=E7=9F=AD?= =?UTF-8?q?=E7=85=A7=E7=89=87=E5=A2=A8=E8=BF=B9=E5=A4=8D=E7=9B=98=E5=9B=9E?= =?UTF-8?q?=E6=89=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 背景: 照片复盘的固定长引导会同时出现在两种回执表示中。 解决手段: 在回执保留试调条件和同区域核对动作,把例子移入中文说明。用真实 SDK 验证照片、非照片、裁图和只读旧复盘。 收益: 合成照片夹具完整回执少 840 字节,同时保持什么时候试调和怎么检查的约束。仅统计回执字节,不折算 token。 --- crates/panache-mcp/README.md | 4 +- crates/panache-mcp/src/review.rs | 6 +-- crates/panache-mcp/tests/context_metrics.py | 32 +++++++++++++--- crates/panache-mcp/tests/review_comparison.py | 38 +++++++++++++++---- 4 files changed, 64 insertions(+), 16 deletions(-) diff --git a/crates/panache-mcp/README.md b/crates/panache-mcp/README.md index 78535f34..c1a24da9 100644 --- a/crates/panache-mcp/README.md +++ b/crates/panache-mcp/README.md @@ -116,7 +116,9 @@ cargo build --locked --release -p panache-mcp 作业表可用正文横线设置参考线,将同一页的课程、姓名等字块分别定位。若侧栏印字自下往上读,将原字块的左上、右上、右下、左下四角依次投到侧栏的左下、左上、右上、右下。复查时按栏核对读向、印字和留给老师的评分区。`changed_pixels_outside_reference` 也会计入正文参考区外有意填写的表头和侧栏,应结合这些栏位解读。 -如果字像贴在照片上,在照片整页复查的 `photo_appearance` 中取 `preview_arguments` 再调用一次 `preview_handwriting`。有页内文字基线样本时,这组参数会给出该版本一处字迹附近的原像素底纸和成品裁图;也可以自己圈选。对照邻近印字或横线的边缘清晰度、墨色深浅,再看字号与可写空间是否相称。用 `describe_controls` 指定稿件、版本和 `ink`、`layout` 或 `typography` 参数组可查当前值。正文的柔化和粗细以投影前纸面像素为单位,透明度用百分比。仅修改墨迹组参数时会保留已完成的单字移位和透视调整;更换字体、字号或参考线后应在新版本重新检查选区。改一版后,对同一选区加入 `compare_revision` 比较。只有文字结果的客户端可转述测量,请用户看图判断观感。 +如果字像贴在照片上,先分清是墨迹边缘过锐,还是纸面光照、阴影或墨色对比造成的观感。例如,纸面右侧有阴影,但用户认为笔画已经合适,就保留原样。如果用户明确指出笔画边缘过锐,或原尺寸成品裁图中的笔画边缘确实比附近可比的实拍印字或横线更锐,可以用 `describe_controls` 查该稿该版本的 `ink` 组,小幅提高 `ink_softness` 试一版。用户要求保留墨迹时,直接沿用原版。 + +需要核对时,照片整页复盘的 `photo_appearance.preview_arguments` 可直接交给 `preview_handwriting`。有页内文字基线样本时,会返回字迹附近的原尺寸底纸和成品裁图,也可以自己圈选。试调后在新版本沿用原选区,用 `compare_revision` 指向旧版本,对照底纸、改前和改后三张实际裁图:底纸用来看原有阴影和印记,两张成品用来看细笔是否糊掉、对比度是否下降。效果变差或拿不准就保留原版。只有文字回执时,请用户看裁图判断。字号与可写空间是否相称可另查 `layout` 或 `typography` 组。正文的柔化和粗细以投影前纸面像素为单位,透明度用百分比;只改墨迹组参数会保留已有的单字移位和透视调整。更换字体、字号或参考线后,应在新版本重新检查选区。 `tune_handwriting(font_path=…)` 会把本机 TTF/OTF 随稿保存。可用返回的字体标识在同一稿内切回该字体。墨迹组的 `transparent_background` 控制原尺寸 PNG 预览和 ZIP,PDF 保留纸张。透明稿复盘会把墨迹放回底纸,方便判断实际可读性。 diff --git a/crates/panache-mcp/src/review.rs b/crates/panache-mcp/src/review.rs index a7bb1875..e48a3037 100644 --- a/crates/panache-mcp/src/review.rs +++ b/crates/panache-mcp/src/review.rs @@ -307,10 +307,10 @@ pub fn page( metadata["next_step"] = json!(next); if draft.paper.is_some() { let mut appearance = json!({ - "inspect":"Compare the strokes with nearby photographed marks for edge softness, contrast and size, and with the available writing space for letter size. Baseline offsets only measure placement. If images are unavailable, ask the user to inspect the crop before judging appearance.", - "ink_edge_guidance":"Keep the current ink if it already looks suitable or the user wants it unchanged. If the user reports overly sharp edges, or a visible native crop shows strokes sharper than comparable nearby photographed marks, inspect the ink controls and consider a small increase in ink_softness. Compare the same region before and after, including fine strokes and contrast; keep the original if the result is worse or uncertain. A dark shadow or faint ink alone is not evidence that softness is needed. Without images, ask the user to inspect the crop; do not claim a visual judgment.", + "inspect":"Compare contrast and size with photographed marks. Check letter size against writing space. Baselines measure placement only. Without images, ask the user to inspect the crop.", + "ink_edge_guidance":"Keep ink if requested or suitable. Only try slightly more ink_softness if the user reports overly sharp strokes or a native crop shows sharper stroke edges than comparable nearby marks. Shadow or faint ink alone is insufficient.", "controls":"describe_controls with draft_id, revision and group: ink (ink #RRGGBB, ink_opacity %, ink_softness and ink_thickness in paper-space px); layout (font_size in paper-space px); typography (font).", - "after_edit":"Review the edited revision. Use the same region with compare_revision for paper/before/after crops. If text reflowed onto different pages, inspect each revision separately." + "after_edit":"Use compare_revision for paper/before/after crops of the same region. Check fine strokes and contrast; keep the original if worse or unsure. After page reflow inspect each revision separately." }); if let Some(region) = detail_region(baselines, (w, h), params.font_size) { appearance["preview_arguments"] = json!({ diff --git a/crates/panache-mcp/tests/context_metrics.py b/crates/panache-mcp/tests/context_metrics.py index 69dcf66a..c142da7a 100644 --- a/crates/panache-mcp/tests/context_metrics.py +++ b/crates/panache-mcp/tests/context_metrics.py @@ -17,9 +17,12 @@ from mcp_client import call +def json_size(value): + return len(json.dumps(value, ensure_ascii=False, separators=(",", ":")).encode()) + + def size(result): - wire = result.model_dump(mode="json", by_alias=True, exclude_unset=True) - return len(json.dumps(wire, ensure_ascii=False, separators=(",", ":")).encode()) + return json_size(result.model_dump(mode="json", by_alias=True, exclude_unset=True)) async def run(command): @@ -35,9 +38,8 @@ async def run(command): tools = await c.list_tools() names = {t.name for t in tools.tools} metrics = {"tools": len(names), "tools_list_bytes": size(tools)} - data = base64.b64encode( - (Path(__file__).parent / "fixtures" / "ruled.png").read_bytes() - ).decode() + paper = Path(__file__).resolve().parent / "fixtures" / "ruled.png" + data = base64.b64encode(paper.read_bytes()).decode() md = "排版试稿\n![纸张](data:image/png;base64," + data + ")\n复查结尾。" draft = ( await call( @@ -81,6 +83,26 @@ async def run(command): metrics["layout_image_blocks"] = sum( b.type == "image" for b in layout.content ) + if "annotate_review" in names: + plain = await call(c, "preview_handwriting", **key, view="review") + metrics["plain_review_bytes"] = size(plain) + photo = await call( + c, "save_section", markdown="春风又绿江南岸。", paper_path=str(paper), + style={"font": "志莽行书.ttf", "seed": 42}, + ) + photo_id = photo.structuredContent["draft_id"] + review = await call( + c, "preview_handwriting", draft_id=photo_id, revision=1, view="review", + ) + metrics["photo_review_bytes"] = size(review) + if "photo_appearance" in review.structuredContent: + metrics["photo_appearance_bytes"] = json_size(review.structuredContent["photo_appearance"]) + await call(c, "save_section", draft_id=photo_id, expected_revision=1, markdown="第二节") + archive = await call( + c, "read_section", draft_id=photo_id, view="review", + review_id=review.structuredContent["review_id"], + ) + metrics["archived_photo_review_bytes"] = size(archive) print(json.dumps(metrics, ensure_ascii=False)) diff --git a/crates/panache-mcp/tests/review_comparison.py b/crates/panache-mcp/tests/review_comparison.py index bacb5482..f845a202 100644 --- a/crates/panache-mcp/tests/review_comparison.py +++ b/crates/panache-mcp/tests/review_comparison.py @@ -2,6 +2,7 @@ import base64 import io +import json import sqlite3 import struct import zlib @@ -42,6 +43,12 @@ def chunk(tag, data): ] +def assert_no_photo_guidance(receipt): + texts = [part.text for part in receipt.content if part.type == "text"] + for text in [json.dumps(receipt.structuredContent), *texts]: + assert "photo_appearance" not in text and "ink_edge_guidance" not in text + + async def unruled_artwork(client, directory, call): path = directory / "unruled.png" paper = Image.new("RGB", (1100, 640), "#eee5d8") @@ -59,20 +66,26 @@ async def unruled_artwork(client, directory, call): {"row": 0, "left": [100, 180], "right": [650, 170]}, {"row": 5, "left": [70, 450], "right": [700, 440]}, ]) - whole = (await call(client, "preview_handwriting", **key, view="review")).structuredContent + receipt = await call(client, "preview_handwriting", **key, view="review") + whole = receipt.structuredContent appearance = whole["photo_appearance"] + assert json.loads(receipt.content[0].text.splitlines()[0])["photo_appearance"] == appearance guidance = appearance["ink_edge_guidance"] + assert sum(part.text.count(guidance) for part in receipt.content if part.type == "text") == 1 assert all(term in guidance for term in ( - "Keep the current ink", "visible native crop", "ink_softness", - "same region before and after", "fine strokes and contrast", - "dark shadow or faint ink alone", "Without images", "do not claim a visual judgment", + "Keep ink if requested or suitable", "Only try slightly more ink_softness", + "user reports overly sharp strokes", "native crop", "sharper stroke edges", + "comparable nearby marks", "Shadow or faint ink alone is insufficient", + )) + assert "ask the user to inspect the crop" in appearance["inspect"] + assert all(term in appearance["after_edit"] for term in ( + "compare_revision", "same region", "fine strokes and contrast", "keep the original if worse or unsure", )) args = appearance["preview_arguments"] assert args["revision"] == 2 and args["draft_id"] == key["draft_id"] assert "ink_softness" in appearance["controls"] - archived = await call(client, "read_section", **key, view="review", review_id=whole["review_id"]) - assert "photo_appearance" not in archived.structuredContent["evidence"] crop = await call(client, "preview_handwriting", **args) + assert_no_photo_guidance(crop) x, y, w, h = crop.structuredContent["crop_bounds"] assert crop.structuredContent["crop_image_size"] == [w, h] and max(w, h) <= 900 assert crop.structuredContent["after"]["region"]["ink_pixels"] > 0 @@ -106,6 +119,17 @@ def images(result): assert ImageStat.Stat(new_delta).sum[0] < ImageStat.Stat(old_delta).sum[0] finished = after + # The stored revision now predates all three edits. A separate connection observes any commit. + with closing(sqlite3.connect(directory / "drafts.sqlite3")) as db: + version = db.execute("PRAGMA data_version").fetchone() + archived = await call(client, "read_section", **key, view="review", review_id=whole["review_id"]) + assert db.execute("PRAGMA data_version").fetchone() == version + record = archived.structuredContent + assert record["review_id"] == whole["review_id"] and record["revision"] == 2 + assert record["evidence"] == whole["evidence"] + assert all(item.type == "text" for item in archived.content) + assert_no_photo_guidance(archived) + async def check_filtered_history(client, call, draft_id): key = {"draft_id": draft_id} @@ -394,7 +418,7 @@ async def incompatible(draft_id, before, after, reason): preset = (await call(client, "save_section", markdown="字", style={"seed": 13})).structuredContent preset_id = preset["draft_id"] plain = await call(client, "preview_handwriting", draft_id=preset_id, view="review") - assert "photo_appearance" not in plain.structuredContent + assert_no_photo_guidance(plain) await call(client, "tune_handwriting", draft_id=preset_id, expected_revision=1, changes={"paper": "grid"}) await incompatible(preset_id, 1, 2, "different_reference_paper") await call(client, "tune_handwriting", draft_id=preset_id, expected_revision=2, changes={"width": 800}) From 4ed020789d71bb4ff1ee39f49f9cfaa136cc6576 Mon Sep 17 00:00:00 2001 From: SXP-Simon Date: Wed, 25 Nov 2026 18:15:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(crates/panache-mcp):=20=E6=8C=89?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8C=87=E5=AE=9A=E8=8C=83=E5=9B=B4=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E7=85=A7=E7=89=87=E5=AD=97=E8=BF=B9=E6=9F=94=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 背景:整页照片检查只提到整稿柔化,用户只要求改一行时,模型可能连带改动其它行。 解决手段:提示模型按范围选择单字或整稿工具,复看用户点名保留的区域,文字模式交代观察来源,并同步使用说明和回归断言。 收益:模型在选择工具时能区分一行和整篇,也能向用户说明保留原样的依据。 --- crates/panache-mcp/README.md | 4 ++-- crates/panache-mcp/src/review.rs | 6 +++--- crates/panache-mcp/tests/review_comparison.py | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/panache-mcp/README.md b/crates/panache-mcp/README.md index c1a24da9..fb6955b4 100644 --- a/crates/panache-mcp/README.md +++ b/crates/panache-mcp/README.md @@ -116,9 +116,9 @@ cargo build --locked --release -p panache-mcp 作业表可用正文横线设置参考线,将同一页的课程、姓名等字块分别定位。若侧栏印字自下往上读,将原字块的左上、右上、右下、左下四角依次投到侧栏的左下、左上、右上、右下。复查时按栏核对读向、印字和留给老师的评分区。`changed_pixels_outside_reference` 也会计入正文参考区外有意填写的表头和侧栏,应结合这些栏位解读。 -如果字像贴在照片上,先分清是墨迹边缘过锐,还是纸面光照、阴影或墨色对比造成的观感。例如,纸面右侧有阴影,但用户认为笔画已经合适,就保留原样。如果用户明确指出笔画边缘过锐,或原尺寸成品裁图中的笔画边缘确实比附近可比的实拍印字或横线更锐,可以用 `describe_controls` 查该稿该版本的 `ink` 组,小幅提高 `ink_softness` 试一版。用户要求保留墨迹时,直接沿用原版。 +如果字像贴在照片上,先分清是墨迹边缘过锐,还是纸面光照、阴影或墨色对比造成的观感。例如,纸面右侧有阴影,但用户认为笔画已经合适,就保留原样。如果用户明确指出笔画边缘过锐,或原尺寸成品裁图中的笔画边缘确实比附近可比的实拍印字或横线更锐,可以小幅柔化试一版。比如用户说“只改第一行,第二行保留”,用 `preview_handwriting(view=layout)` 找到第一行对应的字,再用 `adjust_glyphs` 的 `softness` 只调这些字。只有用户要调整整份稿子时,才用 `tune_handwriting` 的 `ink_softness`。用户要求保留墨迹时,直接沿用原版。 -需要核对时,照片整页复盘的 `photo_appearance.preview_arguments` 可直接交给 `preview_handwriting`。有页内文字基线样本时,会返回字迹附近的原尺寸底纸和成品裁图,也可以自己圈选。试调后在新版本沿用原选区,用 `compare_revision` 指向旧版本,对照底纸、改前和改后三张实际裁图:底纸用来看原有阴影和印记,两张成品用来看细笔是否糊掉、对比度是否下降。效果变差或拿不准就保留原版。只有文字回执时,请用户看裁图判断。字号与可写空间是否相称可另查 `layout` 或 `typography` 组。正文的柔化和粗细以投影前纸面像素为单位,透明度用百分比;只改墨迹组参数会保留已有的单字移位和透视调整。更换字体、字号或参考线后,应在新版本重新检查选区。 +需要核对时,照片整页复盘的 `photo_appearance.preview_arguments` 可直接交给 `preview_handwriting`。有页内文字基线样本时,会返回字迹附近的原尺寸底纸和成品裁图,也可以自己圈选。试调后在新版本沿用原选区,用 `compare_revision` 指向旧版本,对照底纸、改前和改后三张实际裁图:底纸用来看原有阴影和印记,两张成品用来看细笔是否糊掉、对比度是否下降。如果用户点名第二行要保留,也对照第二行的改前和改后。效果变差或拿不准就保留原版。只有文字回执时,把用户观察到的情况说清楚,例如“你觉得边缘已经合适”;还需要目视判断时,请用户看裁图。字号与可写空间是否相称可另查 `layout` 或 `typography` 组。正文的柔化和粗细以投影前纸面像素为单位,透明度用百分比;只改墨迹组参数会保留已有的单字移位和透视调整。更换字体、字号或参考线后,应在新版本重新检查选区。 `tune_handwriting(font_path=…)` 会把本机 TTF/OTF 随稿保存。可用返回的字体标识在同一稿内切回该字体。墨迹组的 `transparent_background` 控制原尺寸 PNG 预览和 ZIP,PDF 保留纸张。透明稿复盘会把墨迹放回底纸,方便判断实际可读性。 diff --git a/crates/panache-mcp/src/review.rs b/crates/panache-mcp/src/review.rs index e48a3037..c7ad33a6 100644 --- a/crates/panache-mcp/src/review.rs +++ b/crates/panache-mcp/src/review.rs @@ -307,10 +307,10 @@ pub fn page( metadata["next_step"] = json!(next); if draft.paper.is_some() { let mut appearance = json!({ - "inspect":"Compare contrast and size with photographed marks. Check letter size against writing space. Baselines measure placement only. Without images, ask the user to inspect the crop.", - "ink_edge_guidance":"Keep ink if requested or suitable. Only try slightly more ink_softness if the user reports overly sharp strokes or a native crop shows sharper stroke edges than comparable nearby marks. Shadow or faint ink alone is insufficient.", + "inspect":"Compare contrast and size with photographed marks. Check letter size against writing space. Baselines measure placement only. Without images, credit the user's observations; ask the user to inspect the crop if visual evidence is needed.", + "ink_edge_guidance":"Keep ink if requested or suitable. Only soften if the user reports overly sharp strokes or a native crop shows sharper stroke edges than comparable nearby marks. Shadow or faint ink alone is insufficient. For selected words or lines, get their glyph IDs from layout and use adjust_glyphs softness. For the whole draft, use tune_handwriting ink_softness. Start small.", "controls":"describe_controls with draft_id, revision and group: ink (ink #RRGGBB, ink_opacity %, ink_softness and ink_thickness in paper-space px); layout (font_size in paper-space px); typography (font).", - "after_edit":"Use compare_revision for paper/before/after crops of the same region. Check fine strokes and contrast; keep the original if worse or unsure. After page reflow inspect each revision separately." + "after_edit":"Use compare_revision for paper/before/after crops of the same region. Also compare any area the user explicitly asked to preserve. Check fine strokes and contrast; keep the original if worse or unsure. After page reflow inspect each revision separately." }); if let Some(region) = detail_region(baselines, (w, h), params.font_size) { appearance["preview_arguments"] = json!({ diff --git a/crates/panache-mcp/tests/review_comparison.py b/crates/panache-mcp/tests/review_comparison.py index f845a202..3ffbd6b5 100644 --- a/crates/panache-mcp/tests/review_comparison.py +++ b/crates/panache-mcp/tests/review_comparison.py @@ -73,11 +73,15 @@ async def unruled_artwork(client, directory, call): guidance = appearance["ink_edge_guidance"] assert sum(part.text.count(guidance) for part in receipt.content if part.type == "text") == 1 assert all(term in guidance for term in ( - "Keep ink if requested or suitable", "Only try slightly more ink_softness", + "Keep ink if requested or suitable", "user reports overly sharp strokes", "native crop", "sharper stroke edges", "comparable nearby marks", "Shadow or faint ink alone is insufficient", + "get their glyph IDs from layout", "adjust_glyphs softness", + "For the whole draft, use tune_handwriting ink_softness", )) assert "ask the user to inspect the crop" in appearance["inspect"] + assert "credit the user's observations" in appearance["inspect"] + assert "compare any area the user explicitly asked to preserve" in appearance["after_edit"] assert all(term in appearance["after_edit"] for term in ( "compare_revision", "same region", "fine strokes and contrast", "keep the original if worse or unsure", ))