Skip to content

add the offline reflection engine and the privacy strip rule - #1117

Open
vyagh wants to merge 2 commits into
journal-view-switchfrom
journal-offline-reflection
Open

add the offline reflection engine and the privacy strip rule#1117
vyagh wants to merge 2 commits into
journal-view-switchfrom
journal-offline-reflection

Conversation

@vyagh

@vyagh vyagh commented Aug 16, 2026

Copy link
Copy Markdown
Member

Two commits:

  1. reflection.py: the offline reflection engine: Jo's question banks, session storage, and the acceptance bar for turns.
  2. model.strip_private: reflections, next_steps and moment snaps are cleared on writes to external volumes. In-place rewrites on the entry's own volume keep them (_rewrites_entry_in_place, eight tests); backups keep everything.

Independent of the view PRs; stacked on #1111 for ordering only.

  • Jo's only memory: the opener may echo the entry title (child-typed) or the newest caption. Once, never mid-conversation.
  • sugar-datastore PR (keep snaps and reflections out of the search index sugar-datastore#30) should land first, or reflection words
    become searchable in the Journal.
  • request_turn's title/description/next_steps are unread offline: the seam for a later server layer.
  • The category table and turn_acceptable overlap sugar-ai deliberately: zero third-party deps offline, and gettext strings reach translators.

221 journal tests (101 engine, 8 privacy); discovery needs the stack's tests/journal/init.py.
New files in Makefile.am and POTFILES.in.
Series notes in #1111.

vyagh added 2 commits August 17, 2026 04:03
Question banks, session storage and merge rules for the
Journal's reflection talk. Fully offline; no server code in
this commit.
A copy leaving the Journal, or moving between volumes, never
carries the child's talk with Jo - the serialized conversation,
the captured next step, and the moment snapshots all strip; only
a rewrite of an entry on its own volume keeps what its sidecar
already holds. The
gate is named rather than inline so it can be pinned by tests:
a sibling volume sharing a name prefix, a datastore id that is
not a path, and a vanished file all strip.
The datastore backup path is untouched: a child's own backup
keeps the talk.
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