Skip to content

fix(agent-core-v2): keep session titles for skill-opening sessions - #5618

Merged
liruifengv merged 5 commits into
mainfrom
fix/skill-session-title
Nov 27, 2026
Merged

liruifengv merged 5 commits into
mainfrom
fix/skill-session-title

Conversation

@liruifengv

@liruifengv liruifengv commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Requirement or Bug

无关联 issue(内部反馈 bug)。

在 Desktop / Web 中,如果新会话的第一条消息是直接调用 skill(例如 /skill:review、仅选择 skill pill 而没有额外文本,或调用方传入了空的 metadata.display_text),左侧会话列表的会话名会是空白;即使初始标题落成了 skill 名字面量,首轮结束后也不会自动生成 AI 标题,手动点击「生成标题」同样提示不可用。对这类会话执行 fork 时,新会话的初始标题和 lastPrompt 也会为空。

本 PR 在核心层(packages/agent-core-v2,不改前端)修复这两点:当 display_text 为空或没有额外自然语言文本时,统一回退为 /skillName args(多 skill 为 /skillA args /skillB),保证新建和 fork 的初始 title / lastPrompt 不为空;同时把用户主动调用的 skill 纳入标题摘要(不包含展开后的 <skill-loaded> 指令),使首轮结束后能结合 assistant 回复生成 AI 标题。

Bug Reproduction Steps

  1. 在工作区新建会话,首条消息直接调用一个 skill,不带额外自然语言文本(例如直接输入 /skill:review 回车;或通过 KAP/SDK 调用 activateSkill 并传 metadata: { display_text: '' },或调用 promptWithSkills 传仅空白文本)。
  2. 当 display_text 为空串或 bundled 输入仅为空白时,核心层不会写入 title 和 lastPrompt,Desktop/Web 左侧会话列表该行标题为空白,刷新后甚至会因 hasPrompt 过滤从列表中消失。
  3. 等待首轮对话结束,或在重命名输入框中点击「生成标题」:标题不会更新(标题生成返回 no_input)。
  4. 对该会话执行 fork:切片推导出的 lastPrompt 为 undefined,fork 出的新会话初始标题同样为空。

Root Cause

这是针对根因的修复,而非前端兜底或绕过。问题出在 packages/agent-core-v2 的两条标题链路上:

  1. 初始元数据写入被空 display_text 短路。
    promptMetadataTextFromContentParts 在 clientMetadata 每条都带字符串 display_text 时,直接返回其清洗结果(这是有意设计,防止 <browser_capture> 等内部序列化内容进入标题)。当 display_text 为 '' 或纯空白时,清洗结果为 undefined,applyPromptMetadataUpdate 收到 undefined 后直接返回。因此 promptMetadataTextFromSkill 准备好的 /skillName args 没有机会生效,promptWithSkills 在输入仅空白时也一样。fork 路径 forkTurnSlice.promptMetadataFromInput 使用了同样的旧写法。
  2. 标题摘要把 skill 开场消息排除在外。
    AgentTitlePromptSourceService 只把 origin.kind === 'user' 视为用户提示词,而直接 /skill 产生的消息 origin.kind 是 'skill_activation',被整条跳过;bundled skills 剔除 skill 激活块后,若没有剩余文本或有效 display_text,用户侧摘要也是 undefined。排除 message.content 原本是为了避免展开后的 <skill-loaded> 指令全文进入标题请求,但副作用是纯 skill 会话在 first_turn / user_prompts / digest 三种模式下全部返回 no_input。
flowchart TD
    A[用户主动调用 skill] --> B[首条消息写入 / fork 切片]
    A --> C[首轮结束后生成 AI 标题]
    B --> D{display_text 非空?}
    D -- 是 --> E[使用脱敏后的 display_text]
    D -- 否 --> F[回退 /skillName args]
    E --> G[写入非空 title 与 lastPrompt]
    F --> G
    C --> H{消息来源}
    H -- user-slash skill_activation --> I[取 display_text 或 /skillName args]
    H -- bundled skills 且无剩余文本 --> F
    H -- model-tool / plugin_command --> J[不纳入标题摘要]
    I --> K[与该轮 assistant 最终回复配对]
    F --> K
    K --> L[请求 chat_title 生成标题]
Loading

Code Changes

核心思路:在核心层定义唯一的 skill 用户侧文本表示——优先使用非空且脱敏后的 display_text,否则回退到 /skillName args(多 skill 按顺序拼接)——并同时用于「首条消息初始元数据写入」「fork 切片元数据推导」和「AI 标题摘要提取」三处。只有用户主动触发(user-slash)的 skill 才进入标题摘要,且不读取展开后的 <skill-loaded> 指令;前端不做任何改动。

 packages/agent-core-v2/src/features/skill/prompt.ts
+  skillCommandLabel(name, args)                  # 统一 "/name" / "/name args" 格式
   promptMetadataTextFromSkill(input)
-    promptMetadataTextFromContentParts([{ text: "/name args" }], clientMetadata)
+    promptMetadataTextFromContentParts([], clientMetadata) ?? sanitize(skillCommandLabel(...))
+  promptMetadataTextFromBundledSkills(input)
+    promptMetadataTextFromContentParts(input.input, clientMetadata) ?? sanitize(join(skillCommandLabel))

 调用方接线
   skillService.activate ───────────────────────► promptMetadataTextFromSkill
   skillService.promptWithSkills
-    ───────────────────────────────────────────► promptMetadataTextFromContentParts(input.input, clientMetadata)
+    ───────────────────────────────────────────► promptMetadataTextFromBundledSkills
   forkTurnSlice.promptMetadataFromInput
-    skill_activation ──────────────────────────► 私有 slashCommandText + 无回退提取
+    skill_activation ──────────────────────────► promptMetadataTextFromSkill
+    bundled 无剩余文本 ────────────────────────► skillCommandLabel 回退(plugin_command 仍用 slashCommandText)

 packages/agent-core-v2/src/session/sessionTitle/agentTitlePromptSourceService.ts
-  isNaturalLanguagePrompt: 仅 origin 为空或 origin.kind === 'user'
+  isUserTitlePrompt:      额外纳入 skill_activation && trigger === 'user-slash'
   promptMetadataTextFromUserMessage
+    skill_activation → promptMetadataTextFromSkill(不读 message.content)
+    bundled 无剩余文本 → skillCommandLabel 回退

promptMetadataTextFromSkill 第一步向 promptMetadataTextFromContentParts 传空数组 [],是为了只读取并脱敏 display_text:当 display_text 缺失、为空或纯空白时返回 undefined,再显式回退到 skillCommandLabel,不会把任何内部序列化 XML 当作标题。fork 路径复用同一组函数,消除了 internal/forkTurnSlice.ts 中与本 PR 同构的平行实现,同时修掉了 fork 时的空标题问题;plugin_command 不属于本次 skill 范畴,继续使用原有的私有 slashCommandText。

关键决策:

决策 选择 没选 理由
空标题兜底放在哪一层 核心层统一回退 /skillName args 前端侧栏渲染时兜底 核心层同时把 title 和 lastPrompt 落盘,避免刷新后被 hasPrompt 过滤,且 REST、SDK、fork 各入口行为一致(已与需求方确认不做前端兜底)
skill_activation 的摘要来源 display_text 或 skillName + skillArgs 直接读取 message.content message.content 首段是展开后的 <skill-loaded> 指令全文,直接送入标题请求既冗长又偏离用户输入
fork 路径是否一并接入 复用 promptMetadataTextFromSkill / skillCommandLabel 保留 forkTurnSlice 私有实现 提 PR 前重复实现自查发现 forkTurnSlice 存在同构逻辑和相同的空标题 bug,经需求方确认合并到同一实现

阅读指南:

  1. packages/agent-core-v2/src/features/skill/prompt.ts:看统一的 skillCommandLabel 及单/多 skill 的空值回退规则。
  2. packages/agent-core-v2/src/session/sessionTitle/agentTitlePromptSourceService.ts:看哪些消息进入标题摘要,以及 skill 开场如何与该轮 assistant 回复配对。
  3. packages/agent-core-v2/src/features/skill/skillService.ts 与 packages/agent-core-v2/src/project/sessionLifecycle/internal/forkTurnSlice.ts:初始写入与 fork 切片的接线,可略读。
  4. 测试文件与 .changeset/(@moonshot-ai/agent-core-v2、kimi-code-app、@moonshot-ai/kimi-code、kimi-code 四条 patch):回归用例与发版条目,可略读(覆盖明细见下文折叠块)。

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
activateSkill(/skill 直接激活)且 display_text 为空串/纯空白时的初始 title / lastPrompt 清洗结果为 undefined,跳过写入;title 为 ''、lastPrompt 为 undefined 回退为脱敏后的 /skillName args,titleKind 为 replaceable desktop 与 web 用户、通过 KAP 操控的外部 AI Agent 与机器人、SDK 调用方、VS Code 扩展用户 无(修复空标题 bug)
promptWithSkills 仅有空白文本或空 display_text 时的初始 title / lastPrompt 不写入 title / lastPrompt 回退为 /skillA args /skillB desktop 与 web 用户、TUI 交互用户、KAP 外部调用方、SDK 调用方 无
skill 开场会话首轮后的自动标题(first_turn)、手动「生成标题」(digest)与 SDK 默认 user_prompts skill_activation 被排除,纯 skill 会话返回 no_input,只保留字面量标题,不生成 AI 标题 以 display_text 或 /skillName args 作为 user 摘要,与该轮 assistant 最终文本一起请求 chat_title 生成标题 默认开启 autoSessionTitle 的 desktop 与 web 用户、TUI 交互用户(tui.toml 的 auto_session_title)、调用 generateSessionTitle 的 KAP/SDK 调用方 设置 auto_session_title = false(或 TUI tui.toml)可关闭自动生成;用户自定义标题(custom)在非 force 下仍不会被覆盖
纯 bundled skills(剔除 skill 块后无剩余文本且无有效 display_text)在标题摘要中的 user 文本 undefined,该轮不进标题请求 /skillA args /skillB 通过 KAP/SDK 发送纯 skill 组合并生成标题的调用方 无
fork 会话切片点为 skill_activation(空 display_text)或纯 bundled skills 时的 lastPrompt / 初始标题 undefined,fork 出的会话标题为空 /skillName args 或 /skillA args /skillB 在 desktop/web、TUI、KAP/SDK 中 fork skill 开场会话的用户,含旧版本写入的 wire 记录 无
文本开场会话首轮运行中通过 activateSkill 插入 skill 后的标题摘要 skill_activation 被忽略:first_turn 不在该插话处截断,仍取首轮最终 assistant 回复;该 skill 也不进入 user_prompts / digest user-slash skill 与普通用户消息一样作为边界:若插话前已有 assistant 文本则取该文本,若首轮尚未输出文本则 first_turn 仅含 user 文本;同时该 skill 进入 user_prompts / digest(经评审讨论,不额外引入基于 wire 的同回合插话续接判定) 首轮运行中调用 /skill 的 desktop/web、TUI、KAP/SDK 用户 无(仅影响该边界场景下首轮标题请求的上下文,初始标题仍不为空)
普通文本会话、非空 display_text 的初始标题与摘要、模型自主调用 Skill 工具(model-tool / nested-skill)、plugin_command、自定义标题保护 现有行为 不变:新增条件只命中此前返回 undefined 或被跳过的输入;model-tool 与 plugin_command 仍被排除;未改任何 .md 提示词、配置默认值或 wire/state 格式 所有现有客户端、provider 方言与历史会话数据 N/A

受影响模块与测试覆盖:

  • 行 1、行 2:features/skill/prompt.ts、features/skill/skillService.ts —— test/features/skill/prompt.test.ts(空/空白 display_text 回退、非空 display_text 优先与敏感信息脱敏、bundled 正常文本保留)与 test/features/skill/activateSkill.test.ts(使用 testkit 假模型验证真实 activate / promptWithSkills 落盘的 title / lastPrompt / titleKind)。
  • 行 3、行 4、行 6、行 7:session/sessionTitle/agentTitlePromptSourceService.ts —— test/session/sessionTitle/agentTitlePromptSourceService.test.ts(user-slash 与 assistant 回复配对、在下一条用户或 user-slash skill 消息处截断首轮、display_text 优先与空值回退、纯 bundled 回退、model-tool 与 plugin_command 仍返回空)、test/session/sessionTitle/titleExcerpt.integration.test.ts(真实 context memory 下的 skill 开场与纯 skill 块摘要)、test/session/sessionTitle/sessionTitleService.test.ts(自定义标题保护、no_input 边界不变)。
  • 行 5、行 6:project/sessionLifecycle/internal/forkTurnSlice.ts —— test/project/sessionLifecycle/forkTurnSlice.test.ts(context.append_message 与 turn.prompt 两种记录形态、空 display_text 回退、非空 display_text 优先、纯 bundled 回退)。
  • 测试断言调整说明:agentTitlePromptSourceService.test.ts 中原「仅含斜杠激活时不返回标题提示词」的用例,按本次新契约更新为「user-slash skill 返回 /compact 且不暴露展开指令,plugin_command 与 model-tool 仍不返回」。该文件不属于根 AGENTS.md 列出的守护契约文件,且此变化已列入上表行 3。
验证命令与结果(含平台说明)

在 macOS(本机)基于最新 origin/main(1f91363eb6)实际运行:

  • pnpm exec vitest run --reporter=agent packages/agent-core-v2/test/features/skill/ packages/agent-core-v2/test/session/sessionTitle/ packages/agent-core-v2/test/agent/prompt/promptMetadataText.test.ts packages/agent-core-v2/test/project/sessionLifecycle/:21 个测试文件通过,272 通过、1 个原有 skip(新增用例在修复前均已验证会因空标题/空摘要失败)。
  • pnpm exec vitest run --reporter=agent packages/kap-server/test/skills.test.ts packages/kap-server/test/prompts.test.ts packages/kap-server/test/sessions.test.ts:3 个文件、271 条全部通过(于 82489e796b 运行,后续仅移除了 agent-core-v2 标题摘要内的插话续接判定)。
  • pnpm exec tsc -p packages/agent-core-v2/tsconfig.json --noEmit:通过。
  • pnpm lint:0 退出(本地旧构建目录 apps/kimi-code/dist-web 因上游将忽略项改名为 web-dist 而暴露,验证时临时挪开后已原样恢复;提交内容本身注释检查、oxlint、导入边界及全部守卫均通过)。
  • pnpm run check:duplication 1f91363eb6:通过,无新增重复。

未验证项:未在 Windows / Linux 本地运行(本次仅涉及纯 TypeScript 字符串格式化与条件过滤,不涉及路径分隔符、子进程、shell 或终端输入);未跑真实界面录屏(未改前端代码)。

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d075f9b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@moonshot-ai/kimi-code Patch
@moonshot-ai/agent-core-v2 Patch
kimi-code-app Patch
kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T06:48:48.023815Z 7e6902e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@d075f9b
npx https://pkg.pr.new/@moonshot-ai/kimi-code@d075f9b

commit: d075f9b

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8533bc96c9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82489e796b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0a9107396

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e6902e800

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +153 to +155
if (!isUserTitlePrompt(message)) return false;
if (message.origin?.kind !== 'skill_activation' || continuationIds === undefined) return true;
return message.id === undefined || !continuationIds.has(message.id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep bundled skill steers inside the opening turn

When an SDK or KAP caller invokes promptWithSkills(..., { steerIfActive: true }) during the opening turn, AgentSkillService sends the bundled prompt as a continuation whose origin is kind: 'user' with skillActivations. This condition nevertheless treats it as the next turn regardless of its continuation ID, so if the steer arrives before the first assistant text, firstTurnExcerpt() stops there and title generation again receives no assistant excerpt. Apply the wire continuation classification to bundled skill prompts as well as direct skill_activation messages.

AGENTS.md reference: AGENTS.md:L111-L115

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

经评估本次不修:steerIfActive: true 下 bundled skill 插话早于首个 assistant 文本到达属于 SDK/KAP 主动插话的边界场景,若要覆盖需把续接判定扩展到 origin.kind === "user" 的普通续接 prompt,超出本 PR 修复「以 skill 开头的会话标题为空」的范围,暂不在此处改动。


private turnContinuationPromptIds(): ReadonlySet<string> | undefined {
let hasTurnPrompts = false;
const ids = new Set<string>();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match continuation state to prompt occurrences

When a caller reuses a completed prompt ID for a later direct skill activation, an earlier in-turn activation leaves that ID in this global set. Prompt IDs are explicitly reusable correlation IDs, so isNextTurnPrompt() also classifies the later new-turn skill with the same ID as a continuation; a delayed, retried, or manually forced first_turn title request then spans into the later turn and selects its assistant reply instead of the opening turn's reply. Track continuation by prompt occurrence or turn segment rather than global ID membership.

AGENTS.md reference: AGENTS.md:L111-L115

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

经评估本次不修:跨回合复用同一个 promptId 属于调用方自定义 correlation ID 的极端场景,按出现次数或 turn 分段跟踪续接状态会增加额外复杂度,本次保持现有的 promptId 集合判定,暂不处理。

@@ -0,0 +1,5 @@
---
'@moonshot-ai/agent-core-v2': patch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add the SDK and KAP release entries

The changed core paths are part of both public surfaces: @moonshot-ai/kap-server routes delegate skill submission, title generation, and session forks to them, while the published @moonshot-ai/kimi-code-sdk bundles agent-core and exposes the same operations. Because neither package appears in the added changesets, the SDK will not be versioned and published with this fix, and the externally visible KAP behavior change will have no owning-package version or changelog entry. Add patch entries for both packages.

AGENTS.md reference: AGENTS.md:L169-L170

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本次不补这两个包的 changeset:

  1. packages/kap-server 和 packages/node-sdk(@moonshot-ai/kimi-code-sdk)均为 "private": true,不独立发布到 npm,最终随 CLI(@moonshot-ai/kimi-code)和桌面端(kimi-code-app)打包发布,这两个产品包本 PR 已补充 changeset。
  2. packages/kap-server 的路由与公开协议契约本次没有改动。
  3. .changeset/config.json 配置了 updateInternalDependencies: "patch",且两者均以 workspace:^ 依赖 @moonshot-ai/agent-core-v2,发版时 changesets 会自动联动升级内部依赖版本。

@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 7e6902e800

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@liruifengv
liruifengv merged commit 26c2240 into main Nov 27, 2026
24 checks passed
@liruifengv
liruifengv deleted the fix/skill-session-title branch November 27, 2026 07:19
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Dec 2, 2026
`bun scripts/upstream-ledger.mjs --refresh` at upstream/main 4eb2919
added 126 rows, so every open upstream commit and every PR it references
now has a ledger row: 0/596, down from 125 at 8bf8ba3 and 126 at the
fetched tip. The refresh only reads `upstream/main ^ main`, so the three
release-2.6.2 commits named by the mission (MoonshotAI#4875/MoonshotAI#4905/MoonshotAI#4922) gained
rows with the refresh's row shape.

Settled with live probes in this tree:

- ported: MoonshotAI#5533 (docs 2.8.1 changelog), MoonshotAI#4875 (registry search_url and
  feedback_url plus the feedback service), MoonshotAI#4905 (Kimi upload status
  validation in packages/core), MoonshotAI#4922 (swarm task events in
  sessionTaskFeed), MoonshotAI#5438 (unload only declared dynamic tools), MoonshotAI#5592
  (dynamic tool replacement order), MoonshotAI#5595 (append-log known length),
  MoonshotAI#5573 (skill roots for every work dir), MoonshotAI#5576 (date reminder cwd
  comparison), MoonshotAI#5618 (session titles for skill openers), MoonshotAI#5638 (frozen
  loop tool baseline), MoonshotAI#5626 (legacy turn-input origins)
- partial: MoonshotAI#5505 (processLiveness source and consumers present; the
  upstream unit test file was never carried), MoonshotAI#5571 (program-resume and
  OSC 7577 present; the upstream test helper was never carried), MoonshotAI#5532
  (gitService half present; fsService still leaks the environment lease
  at fsService.ts:1133 and :1267), MoonshotAI#5557 (app-client icon registry kept;
  the move to app-ui was never carried)
- not-applicable: MoonshotAI#4655 (upstream reverted auto review in MoonshotAI#5649), MoonshotAI#5333
  (PLAYBOOK:111 deliberate flat experimental flags)

M39's "likely present" list was checked, not trusted: MoonshotAI#5438 is present
(upstream test passes), MoonshotAI#5487 is not (nativeStartSettleMs/leg.nativeSettled
absent), MoonshotAI#5635 is not (ToolsSettled absent), MoonshotAI#5429 needs a visual probe.
The remaining 194 pending rows stay open with their reasons; no feature
was ported and no upstream-drift allowlist entry was added.

Verification: verify -> 332 closed rows, 332 carry every file of their
PR; 317 probes pass, 2 foreign-runner skips, 0 fail; a second verify is
byte-identical (ledger sha256 cbf53638...). Probe tests 29 pass; bun run
lint and node scripts/checks/ratchet.mjs green.
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.

2 participants