You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(merge): surgical integration of upstream volcengine#1159 — 4 files
The initial merge of upstream 'Feature/memory opt' (volcengine#1159) auto-merged a
unified operations schema into utils/uri.py and utils/content.py while our
TAKE DEV choice left memory_updater.py / extract_loop.py expecting the
old split schema. Runtime smoke test revealed cascading API mismatches:
- 'ResolvedOperations' has no 'write_operations' (AttributeError)
- serialize_with_metadata() arg order mismatch (TypeError on write)
- LLM output validation would fail on missing reasoning/edit_overview_uris
fields (upstream commented them out in schema_model_generator)
Two parallel analysis agents (arch map of volcengine#1159 + call-graph audit) both
converged on: TAKE DEV for schema-breaking changes, KEEP upstream for
purely-additive improvements. This commit is the resulting minimal diff.
Reverted to dev (schema-breaking bits):
- utils/uri.py: ResolvedOperations keeps write_operations/edit_operations
split (load-bearing for brain-hardening _MERGE_ON_COLLISION_TYPES)
- utils/content.py: serialize_with_metadata(content, metadata) positional
signature matches all 5 call sites (memory_updater x2, memory_type_registry
x1, content_write x2 — upstream's new content_write also uses this form)
- schema_model_generator.py: uncommented 'reasoning' and 'edit_overview_uris'
Pydantic field definitions — extract_loop.py:196 requires both
Patched to bridge upstream additive + dev signature:
- memory_type_registry.py::initialize_memory_files — render content_template
inline with jinja2, then call dev's serialize_with_metadata(rendered,
metadata) instead of upstream's serialize_with_metadata(metadata,
content_template=, extract_context=)
Kept upstream wins untouched (already in merged state, fully additive):
- MemoryTypeRegistry.initialize_memory_files() method (volcengine#1159)
- MemoryTypeRegistry.__init__(load_schemas=True) auto-loading
- ExtractContext.get_year/get_month/get_day helpers (used by events.yaml)
- openviking/telemetry/tracer.py module
- compressor_v2 v2_lock_retry config + tracer (volcengine#1275)
- merge_op/base.py get_first_replace() helper
- merge_op/patch.py None-handling branch
- MemoryField.init_value
- soul.yaml / identity.yaml prompt templates
- events.yaml year/month/day folder structure
- AGFS Rust binding (volcengine#1221) — confirmed active at runtime
Smoke test result (conv-26 session_1, qwopus-4b, temp=0.1):
Written: 3, Edited: 0, Deleted: 0, Errors: 0
4 memories total (2 entities, 1 episode, 1 other)
Historical baseline variance range: 4-10 memories, median ~6.
Result within normal LLM variance.
Co-Authored-By: claude-flow <ruv@ruv.net>
0 commit comments