Skip to content

fix(session): repair session skill patch merge - #4202

Open
ousugo wants to merge 1 commit into
volcengine:mainfrom
ousugo:fix/session-skill-patch-merge-schema
Open

fix(session): repair session skill patch merge#4202
ousugo wants to merge 1 commit into
volcengine:mainfrom
ousugo:fix/session-skill-patch-merge-schema

Conversation

@ousugo

@ousugo ousugo commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bind session-skill patch merging to the dedicated enabled session_skills schema and registry while preserving the external skills policy type
  • materialize PATCH operations against existing SKILL.md content before producing policy updates
  • preserve skill loader state, frontmatter metadata, and transaction leases throughout the Trainer → Optimizer → Updater → SkillProcessor write path
  • add regression coverage for both new and existing skills using the real session-skill training pipeline

Root Cause

When session skill extraction produced a gradient, PatchMergePolicyOptimizer passed memory_type="skills" to PatchMergeContextProvider.

The provider resolved that name against the default memory registry, where the legacy skills schema is disabled. This caused:

ValueError: Memory schema not found or disabled: skills

before SkillPolicyUpdater could write the generated SKILL.md.

Session skills use a separate enabled session_skills schema and registry, so the optimizer now receives an explicit schema binding for that extraction model.

Validation

  • Ruff passed for all changed Python files
  • 15 targeted regression tests passed
  • git diff --check upstream/main...HEAD passed
  • merge-tree validation against the latest upstream/main completed without conflicts
  • real new-skill and existing-skill Trainer → Optimizer → Updater → SkillProcessor paths are covered

Closes #4186

@ousugo
ousugo force-pushed the fix/session-skill-patch-merge-schema branch from 80cc016 to 7e6b2f9 Compare August 27, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[Bug]: Session skill extraction resolves against disabled legacy skills schema

1 participant