[GH-ISSUE #2018] [Issue]: Long-Term Memory: one "event-shaped character fact" warning holds a whole hands-off draft, and habit verbs set it off #1873

Closed
opened 2026-11-07 16:37:17 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/2018

Originally assigned to: @Promansis on GitHub.

Summary

In a hands-off mode ("Save safe memories for me"), one event_shaped_character_fact warning sets the draft's reviewRequired. Hands-off then skips every mutation in that draft, including low-risk timeline, world and other character items. The warning also fires on plainly durable facts. Its verb list includes habit and possession verbs (uses, keeps, holds, wears, carries), and it matches a past-tense backstory verb anywhere in the section text.

Advanced Memory scene recaps (1.5.20) are dense, backstory-heavy summaries, so nearly every recap trips the check. In one real chat, 3 of 5 recap drafts saved nothing in hands-off mode because of a single flagged line each. 22 low-risk items waited for review.

Affected package

long-term-memory

Expected behavior

  • A flagged character fact waits for review on its own. The other low-risk mutations in the same draft are saved, as they already are for a medium-risk relationship (a draft with 7 low-risk items and 1 relationship saves the 7).
  • Habit and possession wording such as "Mara keeps a journal of every case" or "Mara uses a driver named Ivo" is not flagged.

Actual behavior

  • diagnosticsRequireExtractionReview (extraction/evidence-unit-extraction.ts) lists event_shaped_character_fact. That sets draft.reviewRequired, and drafts/reconciliation.ts (if (draft.reviewRequired && options.autoApplyLowRiskOnly)) skips all mutations.
  • EVENT_SHAPED_CHARACTER_FACT_PATTERN (extraction/evidence-unit-validation.ts) matched these durable lines: "…was once kidnapped and went through a debrief", "…keeps a folder of screenshots…", "…uses a driver named…", "…recently returned from several years abroad".

Steps to reproduce

  1. Set a chat's Long-Term Memory to "Save safe memories for me" and import Advanced Memory scene recaps (or let extraction run).
  2. Have a recap where one character fact reads like "Mara keeps a journal of every case".
  3. Open Review. The whole draft is pending and nothing from it was saved. Its diagnostics show one event_shaped_character_fact warning.

Environment

  • Marinara Engine version: 2.5.1 (cb8ae38dd), capability API 1.391
  • Package version: long-term-memory 1.5.27
  • Install type: source
  • OS + version: Windows 11 (10.0.26200)
  • Browser or app shell: browser

Logs, screenshots, or video

Draft accounting from the affected chat: 5 recap drafts. 1 was fully auto-applied (7/7). 1 was partly applied (7/8; the relationship waits). 3 applied 0, each with one or two event_shaped_character_fact warnings and every mutation at risk low, confidence 0.9.

Additional context

History: #907 (#908) added the durable-assertion escape. #1126 (#1129) turned the drop into a review warning. 1.4.5 (#1237) made the warning block low-risk auto-apply for the whole draft. Hands-off (#1980) and the Advanced Memory import (#1964) now expose it on almost every recap.

Minimal fix

Scope: Long-Term Memory server only, one patch release. No storage format, client or Engine change.

  1. Hold only the flagged item. In extraction/evidence-unit-validation.ts, riskForEvidenceUnit(unit) returns "medium" when isEventShapedCharacterFact(unit) is true, so the compiled mutation carrying that unit is medium risk (the compiler's maxRisk over units already propagates it). Remove "event_shaped_character_fact" from diagnosticsRequireExtractionReview in extraction/evidence-unit-extraction.ts, so the warning no longer sets draft-level reviewRequired. Keep the warning diagnostic itself. The other codes in that list stay draft-level.
  2. Drop habit and possession verbs. Remove uses?|holds?|keeps?|wears?|carries? from EVENT_SHAPED_CHARACTER_FACT_PATTERN. Leave the other verbs and the durable-assertion escape as they are; do not add new phrasing exceptions.

Regression (tests/long-term-memory-extraction-graph.regression.ts):

  • Change the case at ~line 1484 ("event-shaped character facts must block low-risk auto-apply"). With applyLowRisk: true, a draft holding one event-shaped character fact plus one low-risk world fact applies the world fact. The event-shaped mutation stays pending at risk medium, the warning is still emitted, and draft.reviewRequired is false.
  • Update the truncated-diagnostics matrix at ~line 2040–2100 for the event signal so it matches the new rule (the flagged mutation is held and the rest apply). Keep the borrowed and control expectations, and the requiresReview-before-truncation proof at ~line 1928 for the codes that still gate the draft.
  • Add one assertion that "Mara keeps a journal of every case." under facts produces no event_shaped_character_fact warning.

Non-goals: rewording the review card's "Low / 90% confidence" chip (risk vs confidence), other diagnostics' draft-level gating, and the verb list beyond the five habit verbs.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/2018 Originally assigned to: @Promansis on GitHub. ## Summary In a hands-off mode ("Save safe memories for me"), one `event_shaped_character_fact` warning sets the draft's `reviewRequired`. Hands-off then skips **every** mutation in that draft, including low-risk timeline, world and other character items. The warning also fires on plainly durable facts. Its verb list includes habit and possession verbs (`uses`, `keeps`, `holds`, `wears`, `carries`), and it matches a past-tense backstory verb anywhere in the section text. Advanced Memory scene recaps (1.5.20) are dense, backstory-heavy summaries, so nearly every recap trips the check. In one real chat, 3 of 5 recap drafts saved nothing in hands-off mode because of a single flagged line each. 22 low-risk items waited for review. ## Affected package long-term-memory ## Expected behavior - A flagged character fact waits for review on its own. The other low-risk mutations in the same draft are saved, as they already are for a medium-risk relationship (a draft with 7 low-risk items and 1 relationship saves the 7). - Habit and possession wording such as "Mara keeps a journal of every case" or "Mara uses a driver named Ivo" is not flagged. ## Actual behavior - `diagnosticsRequireExtractionReview` (`extraction/evidence-unit-extraction.ts`) lists `event_shaped_character_fact`. That sets `draft.reviewRequired`, and `drafts/reconciliation.ts` (`if (draft.reviewRequired && options.autoApplyLowRiskOnly)`) skips all mutations. - `EVENT_SHAPED_CHARACTER_FACT_PATTERN` (`extraction/evidence-unit-validation.ts`) matched these durable lines: "…was once kidnapped and **went** through a debrief", "…**keeps** a folder of screenshots…", "…**uses** a driver named…", "…recently **returned** from several years abroad". ## Steps to reproduce 1. Set a chat's Long-Term Memory to "Save safe memories for me" and import Advanced Memory scene recaps (or let extraction run). 2. Have a recap where one character fact reads like "Mara keeps a journal of every case". 3. Open Review. The whole draft is pending and nothing from it was saved. Its diagnostics show one `event_shaped_character_fact` warning. ## Environment - Marinara Engine version: 2.5.1 (cb8ae38dd), capability API 1.391 - Package version: long-term-memory 1.5.27 - Install type: source - OS + version: Windows 11 (10.0.26200) - Browser or app shell: browser ## Logs, screenshots, or video Draft accounting from the affected chat: 5 recap drafts. 1 was fully auto-applied (7/7). 1 was partly applied (7/8; the relationship waits). 3 applied 0, each with one or two `event_shaped_character_fact` warnings and every mutation at risk `low`, confidence 0.9. ## Additional context History: #907 (#908) added the durable-assertion escape. #1126 (#1129) turned the drop into a review warning. 1.4.5 (#1237) made the warning block low-risk auto-apply for the whole draft. Hands-off (#1980) and the Advanced Memory import (#1964) now expose it on almost every recap. ## Minimal fix Scope: Long-Term Memory server only, one patch release. No storage format, client or Engine change. 1. **Hold only the flagged item.** In `extraction/evidence-unit-validation.ts`, `riskForEvidenceUnit(unit)` returns `"medium"` when `isEventShapedCharacterFact(unit)` is true, so the compiled mutation carrying that unit is medium risk (the compiler's `maxRisk` over units already propagates it). Remove `"event_shaped_character_fact"` from `diagnosticsRequireExtractionReview` in `extraction/evidence-unit-extraction.ts`, so the warning no longer sets draft-level `reviewRequired`. Keep the warning diagnostic itself. The other codes in that list stay draft-level. 2. **Drop habit and possession verbs.** Remove `uses?|holds?|keeps?|wears?|carries?` from `EVENT_SHAPED_CHARACTER_FACT_PATTERN`. Leave the other verbs and the durable-assertion escape as they are; do not add new phrasing exceptions. Regression (`tests/long-term-memory-extraction-graph.regression.ts`): - Change the case at ~line 1484 ("event-shaped character facts must block low-risk auto-apply"). With `applyLowRisk: true`, a draft holding one event-shaped character fact plus one low-risk world fact applies the world fact. The event-shaped mutation stays pending at risk `medium`, the warning is still emitted, and `draft.reviewRequired` is false. - Update the truncated-diagnostics matrix at ~line 2040–2100 for the `event` signal so it matches the new rule (the flagged mutation is held and the rest apply). Keep the `borrowed` and `control` expectations, and the `requiresReview`-before-truncation proof at ~line 1928 for the codes that still gate the draft. - Add one assertion that "Mara keeps a journal of every case." under `facts` produces no `event_shaped_character_fact` warning. Non-goals: rewording the review card's "Low / 90% confidence" chip (risk vs confidence), other diagnostics' draft-level gating, and the verb list beyond the five habit verbs. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:37:17 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1873
No description provided.