Describe the bug
remember drops a negated correction as a duplicate of the opposite statement. After storing Production deployment is allowed, storing Production deployment is not allowed returns action: "skipped" and diff_suggestion: "DUPLICATE". Subsequent recall still returns only the affirmative statement.
These are synthetic statements, not an actual deployment request. Both writes use maximum importance (--imp 5), and the store contains only these test inputs.
To reproduce
With mnemon 0.2.8 on PATH:
export MNEMON_DATA_DIR="$(mktemp -d)"
export MNEMON_STORE=negation-repro
export MNEMON_EMBED_ENDPOINT=http://127.0.0.1:1
mnemon remember 'Production deployment is allowed' --cat decision --imp 5
mnemon remember 'Production deployment is not allowed' --cat decision --imp 5
mnemon recall 'Production deployment'
Actual behavior
The first write returns action: "added". Relevant fields from the second write:
{
"action": "skipped",
"content": "Production deployment is not allowed",
"diff_suggestion": "DUPLICATE"
}
Recall returns one result, with content: "Production deployment is allowed". Every command exits successfully. The correction was never inserted.
Expected behavior
An affirmative statement and its negation must not be treated as the same fact. Preserve the correction and expose the contradiction for deliberate resolution. Keeping both, as the existing CONFLICT path does, would be safer than silently skipping the new statement.
An exact repetition should still deduplicate; a regression test should distinguish exact repetition from a change in polarity.
Environment
- mnemon
0.2.8, official darwin_arm64 release; archive SHA-256 verified against the release checksums.
- macOS 26.6.2, Apple Silicon.
- Fresh synthetic store, direct CLI calls, no LLM host integration or embeddings.
- The relevant source files also match master at
9c8e760e0143f5d66b5d57609a60e1c4e620da96.
Additional context
Likely cause
This is a remaining false-duplicate case after the related work in #23, #25, and #84. It is different from the earlier false-CONFLICT problem on unrelated scientific text. Simply adding a broad not conflict trigger back would risk reintroducing that issue; the duplicate check needs to preserve meaning-bearing differences.
Workaround
Repeating the two writes in another fresh store with --no-diff retains both statements, and recall returns both. This avoids this particular loss, but leaves contradiction resolution to the caller and disables automatic deduplication.
Validation scope: direct CLI reproduction only; no code changes or full test-suite run.
Describe the bug
rememberdrops a negated correction as a duplicate of the opposite statement. After storingProduction deployment is allowed, storingProduction deployment is not allowedreturnsaction: "skipped"anddiff_suggestion: "DUPLICATE". Subsequent recall still returns only the affirmative statement.These are synthetic statements, not an actual deployment request. Both writes use maximum importance (
--imp 5), and the store contains only these test inputs.To reproduce
With mnemon 0.2.8 on
PATH:Actual behavior
The first write returns
action: "added". Relevant fields from the second write:{ "action": "skipped", "content": "Production deployment is not allowed", "diff_suggestion": "DUPLICATE" }Recall returns one result, with
content: "Production deployment is allowed". Every command exits successfully. The correction was never inserted.Expected behavior
An affirmative statement and its negation must not be treated as the same fact. Preserve the correction and expose the contradiction for deliberate resolution. Keeping both, as the existing
CONFLICTpath does, would be safer than silently skipping the new statement.An exact repetition should still deduplicate; a regression test should distinguish exact repetition from a change in polarity.
Environment
0.2.8, officialdarwin_arm64release; archive SHA-256 verified against the release checksums.9c8e760e0143f5d66b5d57609a60e1c4e620da96.Additional context
Likely cause
Tokenizefiltersnotandnoas stopwords, so the two example sentences have identical token sets.classifySuggestionreturnsDUPLICATEfor token similarity above 0.9 before checking negation. The small length increase in this example does not qualify as an extension.rememberskips insertion for that classification.This is a remaining false-duplicate case after the related work in #23, #25, and #84. It is different from the earlier false-CONFLICT problem on unrelated scientific text. Simply adding a broad
notconflict trigger back would risk reintroducing that issue; the duplicate check needs to preserve meaning-bearing differences.Workaround
Repeating the two writes in another fresh store with
--no-diffretains both statements, and recall returns both. This avoids this particular loss, but leaves contradiction resolution to the caller and disables automatic deduplication.Validation scope: direct CLI reproduction only; no code changes or full test-suite run.