Skip to content

Slice: conditional persona refresh at compaction boundary #327

Closed

Description

@DoodleBears

Parent

#326

What to build

As a Human who revised PERSONA.md on a long-lived bot, I want the next compaction to pick up the new voice, so that I never need a restart to be heard. As a Human who changed nothing, I want compaction to leave the voice byte-identical.

Acceptance criteria

  • Changed PERSONA.md plus one compaction -> new turns use the new version and the snapshot record advances.
  • Unchanged PERSONA.md plus one compaction -> the snapshot record is untouched.
  • Rest-of-prefix bytes are unchanged across the refresh.
  • The refresh observes existing session compaction events; no new seams.

Blocked by

None (can start immediately; shares no code path with the turn-annotation track).

Activity

  1. added
    ready-for-agentFully specified, ready for an AFK agent
    area:backendHost-side implementation
    feature:memoryPersonaBot Memory Repository and Memory Service
    scope:tracerHuman-testable implementation slice
    on Sep 26, 2026
  2. DoodleBears commented on Sep 26, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: opencode (interactive session, not a DSH Session)
    • Task: opencode/local/2026-09-26-memory-slices
    • Issue scope: conditional persona refresh at compaction boundary
    • Worktree: current checkout, uncommitted, no PR yet
    • Started: 2026-09-26
    • State: active
  3. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Sep 26, 2026
  4. DoodleBears commented on Sep 26, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome

    • Agent: opencode (interactive session) · Task: opencode/local/2026-09-26-memory-slices
    • State: completed (implementation done, uncommitted, no PR - merge decision left to Human)
    • Delivered: ownership.refreshPersonaSnapshot (explicit conditional-rewrite exception to first-write-wins) + MemoryService.refreshPersonaAfterCompaction (compare-then-write, no-op on identical/missing/unowned) + session/event compaction/end trigger in plugin.ts with guarded warn. Verified at runtime that dsh-compaction-basic 0.1.7-rc.2 appends compaction/start|summary|end (absent from its ctx.on typing - widened with comment).
    • Verification: new refresh test green (changed->refreshed, identical->no-op, unowned/wrong-bot->no-op); typecheck/lint clean; full core suite shows only the 23 pre-existing environment failures.
    • Remaining: review, PR; the trigger wiring itself is covered by construction (service tests), consider a plugin-harness test later.
  5. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Sep 26, 2026
  6. DoodleBears commented on Sep 26, 2026

    @DoodleBears
    ContributorAuthor

    Live verification (isolated 0.1.7-rc.2 Host, deepseek-flash, low pressure threshold)

    Snapshot row flipped v1 to v2 with a fresh timestamp exactly at the compaction boundary; the only writer of that row is the compaction/end handler, so the event demonstrably arrived with that exact type string (also confirmed in the dsh-compaction-basic bundle binary; absent from its typings).

    refresh evidence

    Post-compaction question answered CERULEAN-7 from the refreshed snapshot. Identical-content, unowned, and wrong-bot cases assert no-op in unit tests.

    Verdict: PASS. Note: DSH writes no compaction markers to Host stdout; DB row + behavior are the observable proxies.

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 Serviceready-for-agentFully specified, ready for an AFK agentscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions