Skip to content

Preserve pinned content across digest refolds #36

Description

@coderabbitai

Summary

Redesign durable pinned-message handling for digest refolds.

DigestRequest::pinned currently carries Vec<Sequence>. On a second or later fold, a pinned sequence can refer to a row that is already covered by ChannelDigest. The request contains only the unstructured prior digest and new rows in (after, through]. A stateless Digester therefore cannot recover the pinned row content and can omit it when it rewrites the digest.

Required process

Follow the repository convention for a payload-shape change:

  1. Write or update a specification in docs/specs/.
  2. Create a linked, implementation-ordered plan in docs/plans/.
  3. Implement the redesign in a later change.

Required implementation scope

  • Define a durable sequence-to-content representation for desk-visible pinned rows.
  • Carry that representation through ChannelDigest and DigestRequest.
  • Update digest-folding logic in crates/tinyhivemind/src/digest/mod.rs to preserve pinned material from both:
    • rows newly folded in the current request; and
    • rows already covered by the prior ChannelDigest.
  • Update deterministic wire-shape tests for the changed payload.
  • Document serialization, visibility, ordering, and privacy constraints.

Affected areas

  • crates/tinyhivemind/src/digest/types.rs
  • crates/tinyhivemind/src/digest/mod.rs
  • Digest tests and deterministic wire-shape tests
  • docs/specs/
  • docs/plans/

Acceptance criteria

  • A specification defines the durable pinned-content contract and its privacy constraints.
  • An implementation plan orders the work from tests through API and serialization changes.
  • A pin to a desk-visible row survives a first fold and a later refold.
  • A later DigestRequest provides the digester enough content to retain pins that are no longer in messages.
  • Private pinned rows do not leak into digest data.
  • The wire representation is deterministic and covered by regression tests.

Backlinks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions