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:
- Write or update a specification in
docs/specs/.
- Create a linked, implementation-ordered plan in
docs/plans/.
- 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
Summary
Redesign durable pinned-message handling for digest refolds.
DigestRequest::pinnedcurrently carriesVec<Sequence>. On a second or later fold, a pinned sequence can refer to a row that is already covered byChannelDigest. The request contains only the unstructured prior digest and new rows in(after, through]. A statelessDigestertherefore 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:
docs/specs/.docs/plans/.Required implementation scope
ChannelDigestandDigestRequest.crates/tinyhivemind/src/digest/mod.rsto preserve pinned material from both:ChannelDigest.Affected areas
crates/tinyhivemind/src/digest/types.rscrates/tinyhivemind/src/digest/mod.rsdocs/specs/docs/plans/Acceptance criteria
DigestRequestprovides the digester enough content to retain pins that are no longer inmessages.Backlinks