[GH-ISSUE #1126] [Issue]: LTM extraction rejects durable character outcomes as timeline events #576

Closed
opened 2026-10-20 17:28:43 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @Promansis on GitHub.

Summary

Long-Term Memory extraction can reject valid durable character memories as event_shaped_character_fact. The server uses English verb heuristics to hard-drop character facts in facts, core, or profile, so weaker models lose lasting abilities, roles, possessions, and developments when they phrase them in past-tense narrative.

This is related to closed issue #907, but extends the problem: #907 preserved several durable wording cases while retaining a heuristic hard rejection. The remaining behavior is reproducible for valid durable outcomes such as Mara learned to read the observatory script.

Affected package

long-term-memory (packages/long-term-memory), source extraction and evidence-unit validation.

Expected behavior

The extraction pipeline should divide responsibilities appropriately:

  • The extraction prompt should classify semantic meaning and, when supported, separate a historical event from its durable character outcome.
  • Code should enforce structural and safety invariants such as schema shape, source evidence, identity, scope, valid sections, link targets, and event-graph closure.
  • Ambiguous natural-language event shape should not be hard-dropped by a lexical heuristic. It should remain reviewable and prevent low-risk auto-apply when appropriate.

For example, a source stating Mara learned to read the observatory script. may support:

  • timeline_event / event: Mara learned to read the observatory script.
  • character_fact / abilities: Mara can read the observatory script.

The second unit should only be emitted when the source establishes the durable outcome, and it should link to the first with the applicable causal relation.

Actual behavior

The validator currently hard-rejects character_fact candidates in ordinary character sections when their text contains event-like verbs. The current durable assertion exception is narrow.

Examples observed with the current validator:

Candidate text Result
Mara learned to read the observatory script. Dropped as event_shaped_character_fact
Mara discovered she could read the observatory script. Dropped as event_shaped_character_fact
Mara carries the observatory key. Dropped as event_shaped_character_fact
Mara returned to the observatory. Dropped as event_shaped_character_fact
Mara acquired the observatory key. Kept
Mara became the observatory keeper. Kept
Mara was promoted to captain. Kept

The dropped candidate is not merely a malformed event. In several cases it is the only representation of a durable character ability or state, so the memory is lost before review.

Steps to reproduce

  1. Use Long-Term Memory source extraction with a source containing a durable character outcome expressed in past-tense narrative, for example Mara learned to read the observatory script.
  2. Use a model or fixture that emits the claim as a character_fact with sectionKey: "facts" and claimKind: "static".
  3. Inspect the extraction diagnostics or review queue.
  4. Observe event_shaped_character_fact and the missing character memory.

The current extraction graph regression already demonstrates the hard rejection for ordinary scene-shaped character facts. A focused probe against the same validator reproduces the false rejection for the durable examples above.

Environment

  • Marinara Engine version: 2.4.1 compatibility lane; local neighboring checkout used for regression execution
  • Package version: 1.3.29
  • Install type: source / local package regression
  • OS + version: Linux
  • Browser or app shell: Not applicable to the server extraction reproduction

Logs, screenshots, or video

No private chat data or credentials included. Focused baseline results:

Long-Term Memory extraction graph regression: passed
Long-Term Memory extraction reliability regression: passed
Long-Term Memory local-character regression: passed

Additional context

Relevant implementation paths:

  • packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-validation.ts
  • packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/constants.ts
  • tests/long-term-memory-extraction-graph.regression.ts

Suggested scope for one fix:

  • Keep structural and trust-boundary validation as hard failures.
  • Downgrade the event-shape heuristic to a review warning rather than deleting the candidate.
  • Ensure the warning forces review and prevents low-risk auto-apply.
  • Strengthen the extraction prompt with explicit character sections and event-versus-durable-outcome examples.
  • Add regression coverage for both ordinary scene actions and durable outcomes.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1126 Originally assigned to: @Promansis on GitHub. ## Summary Long-Term Memory extraction can reject valid durable character memories as `event_shaped_character_fact`. The server uses English verb heuristics to hard-drop character facts in `facts`, `core`, or `profile`, so weaker models lose lasting abilities, roles, possessions, and developments when they phrase them in past-tense narrative. This is related to closed issue #907, but extends the problem: #907 preserved several durable wording cases while retaining a heuristic hard rejection. The remaining behavior is reproducible for valid durable outcomes such as `Mara learned to read the observatory script.` ## Affected package `long-term-memory` (`packages/long-term-memory`), source extraction and evidence-unit validation. ## Expected behavior The extraction pipeline should divide responsibilities appropriately: - The extraction prompt should classify semantic meaning and, when supported, separate a historical event from its durable character outcome. - Code should enforce structural and safety invariants such as schema shape, source evidence, identity, scope, valid sections, link targets, and event-graph closure. - Ambiguous natural-language event shape should not be hard-dropped by a lexical heuristic. It should remain reviewable and prevent low-risk auto-apply when appropriate. For example, a source stating `Mara learned to read the observatory script.` may support: - `timeline_event` / `event`: `Mara learned to read the observatory script.` - `character_fact` / `abilities`: `Mara can read the observatory script.` The second unit should only be emitted when the source establishes the durable outcome, and it should link to the first with the applicable causal relation. ## Actual behavior The validator currently hard-rejects `character_fact` candidates in ordinary character sections when their text contains event-like verbs. The current durable assertion exception is narrow. Examples observed with the current validator: | Candidate text | Result | | --- | --- | | `Mara learned to read the observatory script.` | Dropped as `event_shaped_character_fact` | | `Mara discovered she could read the observatory script.` | Dropped as `event_shaped_character_fact` | | `Mara carries the observatory key.` | Dropped as `event_shaped_character_fact` | | `Mara returned to the observatory.` | Dropped as `event_shaped_character_fact` | | `Mara acquired the observatory key.` | Kept | | `Mara became the observatory keeper.` | Kept | | `Mara was promoted to captain.` | Kept | The dropped candidate is not merely a malformed event. In several cases it is the only representation of a durable character ability or state, so the memory is lost before review. ## Steps to reproduce 1. Use Long-Term Memory source extraction with a source containing a durable character outcome expressed in past-tense narrative, for example `Mara learned to read the observatory script.` 2. Use a model or fixture that emits the claim as a `character_fact` with `sectionKey: "facts"` and `claimKind: "static"`. 3. Inspect the extraction diagnostics or review queue. 4. Observe `event_shaped_character_fact` and the missing character memory. The current extraction graph regression already demonstrates the hard rejection for ordinary scene-shaped character facts. A focused probe against the same validator reproduces the false rejection for the durable examples above. ## Environment - Marinara Engine version: `2.4.1` compatibility lane; local neighboring checkout used for regression execution - Package version: `1.3.29` - Install type: source / local package regression - OS + version: Linux - Browser or app shell: Not applicable to the server extraction reproduction ## Logs, screenshots, or video No private chat data or credentials included. Focused baseline results: ```text Long-Term Memory extraction graph regression: passed Long-Term Memory extraction reliability regression: passed Long-Term Memory local-character regression: passed ``` ## Additional context Relevant implementation paths: - `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-validation.ts` - `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/constants.ts` - `tests/long-term-memory-extraction-graph.regression.ts` Suggested scope for one fix: - Keep structural and trust-boundary validation as hard failures. - Downgrade the event-shape heuristic to a review warning rather than deleting the candidate. - Ensure the warning forces review and prevents low-risk auto-apply. - Strengthen the extraction prompt with explicit character sections and event-versus-durable-outcome examples. - Add regression coverage for both ordinary scene actions and durable outcomes. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:28:43 +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#576
No description provided.