Memory write operations silently dropped by resolution policy (page_id_type_mismatch) — affects routine session-commit extraction
Environment
- OpenViking v0.5.2.1, macOS arm64 native deployment (launchd), local vectordb backend
- VLM: MiniMax-M3.1-Flash (reasoning: low); embedding: volcengine hybrid (
doubao-embedding-vision-251215, dense+sparse),sparse_weight: 0.5 - Multiple AI agents commit sessions and issue concurrent
findqueries continuously against the same tenant
Symptom 1 — consolidation reports 0/0/0 while all proposals are silently dropped
ov compile --to viking://user/Geeson/memories/entities --skill memory completes with total_adds/updates/deletes = 0/0/0 and errors: [], but the server log shows every proposed operation was skipped by the resolution policy:
openviking.session.memory.memory_updater - WARNING - [trace 68379cf3...] Skipping memory operation by resolution policy: memory_type=entities page_id=8 reason_code=page_id_type_mismatch
openviking.session.memory.extract_loop - WARNING - [trace 68379cf3...] Skipping delete with type-mismatched replacement page_id: delete_page_id=7, replacement_page_id=8
Reproduced twice back-to-back (run 1: 2 proposals skipped; run 2: 3 proposals skipped, page_ids 1/5/6). The final result is indistinguishable from a genuinely clean library.
Symptom 2 — routine session-commit extraction is affected too (production impact)
The same skip fires during normal session-commit memory extraction, not only compile. Daily occurrence counts from our server log (Oct 16 → Oct 30):
10-16:1 10-17:8 10-18:14 10-19:34 10-20:6 10-21:6
10-22:2 10-23:9 10-24:21 10-25:8 10-26:7 10-27:10
10-28:4 10-29:23 10-30:5 total: 158
This means memory updates extracted from committed sessions are being silently discarded in production on a daily basis.
Symptom 3 — suspicious coverage
The proposals referenced page_ids 1–10 while the target memory type contains 517 files — suggesting the model-visible page set is far smaller than the full domain (possibly related to #6795).
Model-dependence note
Running the identical consolidation command with a different VLM (qwen3.8-flash) produced zero skips (and zero proposals under the same conservative instruction), while MiniMax-M3.1-Flash reproducibly proposes cross-type page references that all get dropped. The policy behaves as documented; the combination of cross-type page references + silent dropping is what makes the feature untrustworthy in production.
Requests
- Persist skipped operations in the task result (currently only
adds/updates/deletes/errorsare returned — skipped ops leave no durable record and cannot be audited). Includereason_code,page_id, and the resolved URI/type. - Clarify page-map scoping for single-type compile: should cross-type pages be exposed to the model at all? If yes, operations targeting them should not be silently classified as mismatches.
- Any guidance on making MiniMax-M3.1-Flash behave (prompt/schema hints), or on a supported path for cross-type consolidation.
Sanitized logs (full WARNING lines with trace_ids, daily distribution, A/B runs) available on request.
The "0/0/0 with errors: [] while every proposal was dropped" result is the dangerous part here, more than the policy itself. A clean library and a write path that refused everything shouldn't look the same. We ran into the same design question in our own memory-ingestion pipeline (LLM proposes → rules route/validate → writer applies). Here's what we settled on, since it maps closely to your requests 1 and 2.
1. A rejection is a terminal state, never a log line. Every proposed unit gets a durable row, and rejected is one of its states, with a machine-readable reason:
state TEXT NOT NULL CHECK (state IN
('queued','merged','judged','writing','written','rejected','deferred','failed_poison', ...)),
action TEXT, reason TEXT, -- e.g. destination_mismatch, untyped, already_exists
decision TEXT -- JSON: every card answer the LLM gave, so it can be replayed
On top of that there's a daily rollup keyed by (day, source, state, reason, rules_digest). Over the last ~24h our ledger shows 669 written / 509 rejected / 152 deferred, and the rejections break down by reason (speculative 222, not_atomic 85, already_exists 76, ...). If one reason spikes (like your page_id_type_mismatch going 1 → 34/day), it shows up in the rollup instead of as WARNING noise. Including rules_digest in the key also tells you whether a spike started with a model change or a rule change, which would separate your MiniMax vs qwen A/B automatically.
2. Don't drop a type mismatch. Reroute it once, then reject loudly. Our equivalent of your mismatch is a proposal whose target doesn't fit its declared type/destination. Instead of skipping, the pipeline asks the router for the correct destination once:
if reroute_to and not hard_failures and reroutes == 0:
current = reroute_answer(current, reroute_to, ...)
reroutes += 1
continue # re-validate against the new destination
if reroute_to and reroutes >= 1:
return _decision(unit_id, "reject", "reject", "destination_mismatch", ...)
The cap of one reroute matters. Without it, a model that keeps proposing cross-type targets (your MiniMax case) loops. With it, the outcome is either "written to the right type" or "rejected with destination_mismatch and the full LLM answer persisted for audit". Silent loss isn't possible.
3. Separate defer from reject. Some refusals aren't the model's fault, for example when the target section doesn't exist yet or the project is ambiguous. Those go to deferred with backoff and are retried, and only after N attempts do they become failed_poison. Symptom 3 (the model only sees page_ids 1–10 of 517) sounds like it could fall into this bucket: the proposal may be reasonable, but the model-visible page map is too narrow for it.
For a minimal change to OpenViking: returning skipped: [{reason_code, page_id, resolved_uri, resolved_type}] alongside adds/updates/deletes, and counting skips in the task's top-line summary, would already make the 0/0/0 case impossible to misread.
Ingestion with an auditable ledger, where every LLM-proposed memory write ends as written, rejected, or deferred, is how memory works in SwarmAI. Discussion: Context as a Living System — the WRITE path
The silent part is the actual defect — the run is indistinguishable from a clean one. We hit the same shape on 0.5.4.1 from a different root cause (content/write on a URI containing spaces lands on a slug double: content/read shows the new text, search keeps the old), and the only thing that caught it was an external diff, never the tool's own reporting.
Mitigation that has held up: keep the whole memory tree in git, and make the commit script diff the tree against HEAD before committing. Any file that changed or vanished without a matching operation in the run's own bill fails the commit, so "silent for a month" becomes "visible in the same commit". Two of the four cards our last ov compile removed were caught that way.
For triage, three counters per run are enough to separate the two holes:
Skipping memory operation by resolution policywarnings,delete_idsin the model output,- files actually removed on disk.
If the last two differ you have the accounting hole from #7504; if the first is non-zero while the bill says 0/0/0 you have this one.
Might be worth a single-type compile test with one entities page and one page of another type in the candidate set. Check which IDs the model actually sees, then see if it behaves differently when only the entities IDs are exposed. That should show whether page-map scope explains the MiniMax skips without touching the write checks.