Skip to content

Slice: recover Memory change Inbox events across Host restart #464

Closed

Description

@DoodleBears

Parent

#350

What to build

As a Human who changes a PersonaBot's Memory Repository while DSH is closed, or just before its Host restarts, I want the Bot to receive an actionable memory-change Source Event in its Inbox on the next ordinary turn. The Bot should learn the net changed paths and Git state without a file edit waking it.

#352 establishes the memory-change Source Event and Inbox Admission in a running Host. This slice makes the observation checkpoint durable across Host exit and crash.

Acceptance criteria

  • Persist a per-Repository observation checkpoint owned by Memory Service: repository identity, branch, HEAD, staged/index identity, and bounded content identities for dirty and untracked paths. Keep Git files as current Memory; this record is only a comparison checkpoint, not a second content authority.
  • Once the Host has restored its durable stores, run a bounded startup comparison against that checkpoint and admit the Event to the Bot Inbox without waking the Bot; compare again before the next ordinary turn to cover later edits. Detect net additions, changes, removals, commits, and branch movement, including another edit to a file that was already dirty.
  • In one SQLite transaction, commit the observed memory-change Source Event, its Inbox Admission, and the advanced checkpoint. A retry after a crash cannot lose or duplicate the Event.
  • The Event is visible in the Bot Inbox after startup admission and selected for the next ordinary turn without an independent wake. It carries event identity, observed time, change categories, bounded relative paths, and overflow counts; file bodies and full diffs stay in Git/current files for Agent inspection.
  • Describe offline or interrupted-turn changes as observed net changes with unknown actor; do not assert a Human edited them. Suppress Bot-owned changes at the normal reconcile/abort checkpoint.
  • A fresh Repository with no prior checkpoint establishes its initial baseline without announcing every existing file as a new change. A pending Event remains pending independently of subsequent checkpoint advances.
  • If observation fails or exceeds safe limits, do not advance the checkpoint or silently mark the Event handled; surface a bounded error/repair outcome.
  • Tests cover stop/edit/restart/Inbox-visible-before-turn/next turn, same-dirty-file re-edit, crash before and after atomic commit, quiet restart, Bot-owned edits, branch movement, and untracked files. Verify the installed plugin with a real DSH model.
  • Update the accepted Memory/Inbox architecture decision and ADR-0060 to document the explicit out-of-band, no-wake Inbox Event exception.

Boundary

Comparing durable checkpoints can report only net changes. An edit created and fully reverted while the Host is offline leaves no observable difference; reconstructing each intermediate operation would require an external journal or editor integration.

Blocked by

Activity

  1. added this to the v1.0 milestone on Sep 29, 2026
  2. added
    ready-for-agentFully specified, ready for an AFK agent
    area:backendHost-side implementation
    feature:memoryPersonaBot Memory Repository and Memory Service
    feature:messagingMessaging module and external providers
    scope:tracerHuman-testable implementation slice
    on Sep 29, 2026
  3. DoodleBears commented on Sep 29, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

  4. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Sep 29, 2026
  5. DoodleBears commented on Sep 29, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome

    • Task: codex/local/01a0e86b-16ab-7a01-baf9-e555eec3ea62
    • State: handed-off for Human QA and PR review
    • PR: #473 · Commit: 88c91e8
    • Delivered: per-Bot Git observation checkpoints persist across Host restart; startup scanning atomically writes a net Memory Event, Inbox Admission and new checkpoint without waking an Agent. A failed admission leaves the previous checkpoint for retry, and repeated restarts do not duplicate a pending event.
    • Verification: restart and rollback integration tests, plus a live isolated DSH restart and screenshot in the PR. Remaining: Human QA and merge; the live Profile lacked a model credential for a real Agent reply.
  6. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendHost-side implementationfeature:memoryPersonaBot Memory Repository and Memory Servicefeature:messagingMessaging module and external providersready-for-agentFully specified, ready for an AFK agentscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions