feat(docrevision): send clipped diff text to the change-report narrator

The narrator only received counts, so it could not describe the actual change. Caps keep the full document out and leave the input digest unchanged; the flag stays off.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-20 05:03:31 +00:00
co-authored by Cursor
parent 686f739b19
commit db1706cd24
9 changed files with 198 additions and 28 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ var featureMaturityCatalog = map[string]featureMaturity{
},
"PI_CHANGE_REPORT_NARRATIVE": {
state: implShadow, adapter: adapterDegraded,
reason: "生产输入目前只有 SHA、风险和变更数量,没有具体差异。叙事请求已使用 reasoning profile,运行中的容器尚未切到 --no-tools",
reason: "只读事实已含截断后的差异片段和影响说明,不含整篇文档。开关默认关闭。叙事请求已使用 reasoning profile,运行中的容器尚未切到 --no-tools",
},
}
+1 -1
View File
@@ -149,7 +149,7 @@ func TestFeatures_CoversCatalogAndInjectedValues(t *testing.T) {
}
}
if byKey["PI_CHANGE_REPORT_NARRATIVE"].ImplementationState != "shadow" || byKey["PI_CHANGE_REPORT_NARRATIVE"].AdapterReadiness != "degraded" {
t.Fatalf("narrative readiness must stay degraded while input is incomplete: %+v", byKey["PI_CHANGE_REPORT_NARRATIVE"])
t.Fatalf("narrative readiness must stay degraded while the flag is off and the live runner is not --no-tools: %+v", byKey["PI_CHANGE_REPORT_NARRATIVE"])
}
}