Summary
PR #262's digest-backed channel-memory design depends on stable source handles in the current Phase 1 channel-awareness surface. The raw awareness feed currently renders lines as timestamp + author + text, which is not enough provenance for a later digest block to round-trip to exact Discord messages when several authors post in the same minute or reports are chunked.
Implement the prerequisite as a tight Phase 1 follow-up before building the channel-memory adapter.
Motivation
Digest-backed awareness must be source-backed. A derived block can only be trustworthy if it points back to exact retained channel messages and the retrieval tools can fetch those exact messages. Timestamp-only references are ambiguous in busy Discord channels and make the Phase 2 digest design unsafe.
Scope
- Emit a stable source handle for each message in
channel-awareness output.
- Use the existing Discord message ID when available; format it with the channel ID so the handle is unambiguous across channels.
- Keep
channel-awareness as kind=raw_window; this issue does not implement raw_window+digest.
- Ensure
search_channel_context and get_channel_messages expose the same stable handle in retrieval results or metadata, without removing the existing id / channel_id fields.
- Preserve current cursorized
channel-context behavior unless the implementation chooses to share the same formatter safely.
- Update provider-visible examples/tests so future digest work can cite
channel_id/message_id and retrieve exact source.
Constraints
- No new public pod YAML surface.
- No LLM work or channel-memory adapter in this issue.
- Channel ACLs remain enforced by the existing generated allowlist and claw-wall service token path.
- Keep the output readable for models; the source handle should be compact and mechanically parseable.
- Public docs/issues should stay generic and not reference named downstream deployments or agents.
Acceptance Criteria
- Unit tests show
channel-awareness includes stable handles for raw messages.
- Retrieval tool tests show exact message lookup returns the same handle used by awareness provenance.
- Existing channel-context cursor tests keep passing.
- A spike test path verifies the claw-wall Docker image surfaces stable handles after Discord backfill. A fake Discord spike is the minimum; a real Discord pod spike is required before considering the Phase 2 channel-memory work proven.
git diff --check and the relevant Go test packages pass.
Related
Summary
PR #262's digest-backed channel-memory design depends on stable source handles in the current Phase 1 channel-awareness surface. The raw awareness feed currently renders lines as timestamp + author + text, which is not enough provenance for a later digest block to round-trip to exact Discord messages when several authors post in the same minute or reports are chunked.
Implement the prerequisite as a tight Phase 1 follow-up before building the channel-memory adapter.
Motivation
Digest-backed awareness must be source-backed. A derived block can only be trustworthy if it points back to exact retained channel messages and the retrieval tools can fetch those exact messages. Timestamp-only references are ambiguous in busy Discord channels and make the Phase 2 digest design unsafe.
Scope
channel-awarenessoutput.channel-awarenessaskind=raw_window; this issue does not implementraw_window+digest.search_channel_contextandget_channel_messagesexpose the same stable handle in retrieval results or metadata, without removing the existingid/channel_idfields.channel-contextbehavior unless the implementation chooses to share the same formatter safely.channel_id/message_idand retrieve exact source.Constraints
Acceptance Criteria
channel-awarenessincludes stable handles for raw messages.git diff --checkand the relevant Go test packages pass.Related
examples/channel-memorywith SQLite source retention and derived sparse blocks.