From 7ad8d1220229e0e85ca7a78ecd2243e8f922d0e8 Mon Sep 17 00:00:00 2001 From: jeffyxu Date: Thu, 2 Jul 2026 15:33:21 +0800 Subject: [PATCH 1/2] fix(digest): use English output and remove per-user rankings The digest command now defaults to English for all labels and removes individual user rankings to avoid exposing personal metrics. Co-Authored-By: Claude Opus 4.6 --- src/digest.ts | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/digest.ts b/src/digest.ts index 2dee95d..8764200 100644 --- a/src/digest.ts +++ b/src/digest.ts @@ -401,14 +401,14 @@ export async function generateDigest(options: GlobalOptions): Promise { // Learnings const { recent: recentLearnings, total: totalLearnings } = await getRecentLearnings(repoPath); if (recentLearnings.length > 0) { - console.log(`📚 本周新增 Learnings: ${recentLearnings.length} 篇`); + console.log(`📚 New Learnings This Week: ${recentLearnings.length}`); for (const learning of recentLearnings) { console.log(` • ${learning.title}`); } console.log(''); } if (totalLearnings > 0) { - console.log(`📊 知识库总量: ${totalLearnings} 篇 learnings`); + console.log(`📊 Knowledge base total: ${totalLearnings} learnings`); console.log(''); } @@ -436,18 +436,14 @@ export async function generateDigest(options: GlobalOptions): Promise { // Session autonomy — Human Intervention metric (Issue #34) const interventions = summarizeInterventions(teamStats); if (interventions) { - console.log('🤖 会话自主性 (Human Intervention):'); + console.log('🤖 Session Autonomy (Human Intervention):'); console.log( - ` 团队均值: ${interventions.avgPerSession.toFixed(2)} 次干预/会话 ` + - `(${interventions.totalSessions} 会话, ${interventions.totalInterventions} 次干预)`, + ` Team avg: ${interventions.avgPerSession.toFixed(2)} interventions/session ` + + `(${interventions.totalSessions} sessions, ${interventions.totalInterventions} interventions)`, ); console.log( - ` 分解: 中断 ${interventions.interrupt} · 拒绝 ${interventions.toolReject} · 纠偏 ${interventions.correction}`, + ` Breakdown: interrupt ${interventions.interrupt} · reject ${interventions.toolReject} · correction ${interventions.correction}`, ); - console.log(' 干预率排行 (高 → 低, 越低自主性越强):'); - for (const r of interventions.ranked.slice(0, 10)) { - console.log(` • ${r.username}: ${r.rate.toFixed(2)}/会话 (${r.total} 次 / ${r.sessions} 会话)`); - } console.log(''); } @@ -455,17 +451,13 @@ export async function generateDigest(options: GlobalOptions): Promise { const conversation = summarizeConversation(teamStats); if (conversation) { const t = conversation.tokens; - console.log('💬 对话量与 Token 用量:'); - console.log(` 人工对话总轮数: ${conversation.totalPrompts} 次`); + console.log('💬 Conversation & Token Usage:'); + console.log(` Total human prompts: ${conversation.totalPrompts}`); console.log( - ` Token 总量: ${formatTokenCount(conversation.totalTokens)} ` + - `(输入 ${formatTokenCount(t.input)} · 输出 ${formatTokenCount(t.output)} · ` + - `缓存读 ${formatTokenCount(t.cacheRead)} · 缓存写 ${formatTokenCount(t.cacheCreation)})`, + ` Total tokens: ${formatTokenCount(conversation.totalTokens)} ` + + `(input ${formatTokenCount(t.input)} · output ${formatTokenCount(t.output)} · ` + + `cache read ${formatTokenCount(t.cacheRead)} · cache write ${formatTokenCount(t.cacheCreation)})`, ); - console.log(' Token 用量排行 (高 → 低):'); - for (const r of conversation.ranked.slice(0, 10)) { - console.log(` • ${r.username}: ${formatTokenCount(r.tokens)} tokens (${r.prompts} 轮对话)`); - } console.log(''); } From 1c8b95956ad2762497aa043d7de1b93c567e3ff7 Mon Sep 17 00:00:00 2001 From: jeffyxu Date: Thu, 2 Jul 2026 15:45:37 +0800 Subject: [PATCH 2/2] fix(e2e): update scope-isolation test to match English output The pull command already outputs English but the E2E assertion still expected the old Chinese string. Co-Authored-By: Claude Opus 4.6 --- src/__tests__/scope-isolation-e2e.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/scope-isolation-e2e.test.ts b/src/__tests__/scope-isolation-e2e.test.ts index 0d4adaa..c348fda 100644 --- a/src/__tests__/scope-isolation-e2e.test.ts +++ b/src/__tests__/scope-isolation-e2e.test.ts @@ -21,7 +21,7 @@ const CLI = path.join(ROOT, 'dist', 'index.js'); const PROJECT_TITLE = 'Project Deployment Timeout Fix'; const USER_TITLE = 'User Deployment Timeout Fix'; -const SKIP_MSG = '检测到 project scope,已跳过 user scope'; +const SKIP_MSG = 'project scope detected, skipped user scope'; interface RunResult { code: number | null;