Skip to content

A memory waits in its own words - #735

Open
WaylandYang wants to merge 3 commits into
devfrom
feat/a-memory-waits-in-its-own-words
Open

WaylandYang wants to merge 3 commits into
devfrom
feat/a-memory-waits-in-its-own-words

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Follows #731 (0044 cut 1). Memory documents (remember in chat and over MCP, decisions 0015 and 0018) now go through the open extraction path like every other document. Their statements still wait for a person's nod; what waits is an open statement in the document's own words, and the nod writes it as one. This removes the last reason the typed extraction path is entered, so that path can be deleted next.

Ledger (migration 0062)

pending_facts gains phrase, qualifiers (role-keyed, value or entity), time_words (verbatim words with their char offset), quote_start, quote_end. rejected_facts gains phrase, so a rejection blocks only that phrase between the same pair, not every statement between them.

Store

  • pending::Proposal carries phrase, qualifiers, time_words, quote_span. With a phrase, "already asserted" looks at live open rows (layer = 'open' AND phrase = …); the pending and rejected checks include the phrase.
  • pending::confirm with a phrase writes through graph::insert_open_statement, add_evidence_located, add_statement_qualifier and time_mentions::record. No relation_types lookup and no temporal reconcile: an open statement has no predicate and no place on the world axis yet. attested_at comes from the document date only for doc_time_source IN ('content', 'source') (Upload time is used as the document date in extraction #714); a memory log has 'none', so it is null.
  • pending::reject records the phrase.

Server

extraction::run hands every document to run_open when the base's flag is on; run_open takes the proposer and an await_nod flag. For a memory document it skips the opening block (one episode per chunk), does not record name evidence or extra names before the nod, and proposes each statement with its qualifiers, located time words and quote span instead of writing it. The pending event fires once when something was queued, as before.

Web

The pending card shows the phrase in the italic slot that used to hold the model's own word, the verbatim time words instead of a computed range, and the qualifiers as small role: value pills. The "no relation in ontology" chip is not shown for an open statement: on this path that is the normal case, not a defect. Strings: pendingOwnWords (en, zh).

Tests

  • New a_pending_statement_keeps_the_documents_words (connected): propose an open statement with a qualifier and a time word from a real memory episode; for_chunk returns them; second proposal is AlreadyPending; confirm writes an open facts row (no predicate, no valid_*), evidence with proposed_predicate = phrase and offsets, one qualifier row, one time mention whose offset reproduces the words in chunks.text; the queue empties; AlreadyAsserted afterwards; a rejection blocks only its own phrase.
  • Existing a_fact_awaits_a_nod, an_agent_can_record, no_predicate_still_shows, an_open_statement_keeps_the_documents_words pass unchanged in behaviour.
  • Smoke on a fresh database: remember over MCP with a write token → two pending statements ("moved its headquarters to" with the time words "15 March 2026" at the right offset; "named" with the qualifier title: chief operating officer) → nod → an open fact with its time mention; the other stays pending.

Not in this change

Deleting the typed extraction path (next PR); the pending card's layer marker beyond the phrase; interpretation of time words (0045).

🤖 Generated with Claude Code

WaylandYang and others added 3 commits September 16, 2026 22:36
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant