Skip to content

Update ADR docs to reflect profile message system#569

Merged
yewreeka merged 1 commit intodevfrom
jarod/update-adr-profile-messages
Mar 10, 2026
Merged

Update ADR docs to reflect profile message system#569
yewreeka merged 1 commit intodevfrom
jarod/update-adr-profile-messages

Conversation

@yewreeka
Copy link
Copy Markdown
Contributor

@yewreeka yewreeka commented Mar 10, 2026

Updates ADR documentation to reflect the profile message system migration (PRs #529, #552, #556, #562).

Changes

ADR 005 — Full rewrite from "Profile Storage in Conversation Metadata" to "Member Profile System":

  • ProfileUpdate and ProfileSnapshot XMTP content types with protobuf schema
  • Profile resolution precedence (ProfileUpdate > ProfileSnapshot > appData > none)
  • Snapshot triggers (group creation, addMembers, invite acceptance)
  • Message-primary reads with gap-fill from appData
  • Typed metadata (MetadataValue oneof with string/number/bool)
  • JoinRequest content type for carrying profile during invite flow
  • MemberKind enum for agent identification
  • Encrypted avatar references via EncryptedProfileImageRef
  • Migration phases (1-2 complete, 3 future)
  • Updated file references to ConvosProfiles/ConvosInvites packages

Cross-reference updates (ADRs 001, 002, 003, 004, 007, 009):

  • ADR 001: 8KB limit note — profiles no longer compete for appData space
  • ADR 009: Context updated to reference ProfileUpdate as transport for encrypted avatars
  • All: ADR 005 reference text updated to new title

Note

Update ADR docs to reflect the profile message system replacing appData-based profile storage

  • Rewrites ADR 005 from appData-based profile storage to a message-based system using two new XMTP content types: ProfileUpdate (self-authored) and ProfileSnapshot (bulk, sent on group creation or member join).
  • Defines protobuf schemas for the new types, including MemberKind, typed metadata via map<string, MetadataValue>, and EncryptedProfileImageRef for avatars.
  • Updates cross-references in ADRs 001–004, 007, and 009 to reflect the new title ('Member Profile System') and clarify that profiles no longer share appData space.
  • Documents a three-phase migration: dual-write, message-primary reads, and eventual stop of appData profile writes.

Macroscope summarized 754f629.

@yewreeka yewreeka marked this pull request as ready for review March 10, 2026 17:25
Copy link
Copy Markdown
Contributor Author


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link
Copy Markdown

claude Bot commented Mar 10, 2026

Claude finished @yewreeka's task —— View job


ADR Documentation Review — Approved ✅

Excellent documentation update reflecting the migration to message-based profiles. The rewrite of ADR 005 and cross-reference updates are comprehensive and accurate.


Summary

This PR successfully updates ADR documentation to reflect the profile message system migration (PRs #529, #552, #556, #562). The changes are documentation-only with no code quality, security, or performance concerns.

Key Changes:

  • ADR 005: Complete rewrite from appData-based to message-based profile system
  • Cross-references: Updated ADRs 001, 002, 003, 004, 007, 009 to reference new profile system

Code Quality — Excellent

Strengths:

  • Clear, comprehensive technical documentation
  • Well-structured sections with logical flow
  • Consistent terminology throughout
  • Good use of code examples, tables, and flow diagrams
  • Proper cross-referencing between ADRs

Minor Suggestions:

  1. ADR 005:93 — Consider adding a note about performance characteristics of scanning 500 messages:

    `ProfileSnapshotBuilder` scans up to 500 messages (descending) to resolve profiles for all current members, using this precedence.

    Suggestion: Add context like "typically completes in <100ms for most conversations"

  2. ADR 005:200 — The JoinRequest section feels slightly disconnected. Consider adding a subheading:

    -### 10. Join Request Content Type
    +### 10. Related Content Types
    +
    +#### JoinRequest (`convos.org/join_request` v1.0)
  3. ADR 001:180 — Good update, but consider being more specific:

    -- **8KB Metadata Limit:** XMTP appData field constrains amount of metadata (tags, expiration). Profiles were moved to dedicated XMTP messages (see ADR 005), freeing significant appData space.
    +- **8KB Metadata Limit:** XMTP appData field constrains metadata (invite tags, expiration, image encryption keys). Profiles moved to XMTP messages (see ADR 005), freeing ~60-80% of typical appData usage.

Technical Accuracy — Correct

Protocol Details:

  • Protobuf schemas match implementation in ConvosProfiles/Proto/profile_messages.proto
  • Profile resolution precedence (ProfileUpdate → ProfileSnapshot → appData → none) is correct
  • Migration phases accurately described (1-2 complete, 3 future)
  • File paths and references are accurate

Architecture:

  • Correctly describes self-authored ProfileUpdate preventing spoofing
  • Snapshot triggers (group creation, addMembers, invite acceptance) are accurate
  • Gap-fill semantics for backward compatibility properly explained
  • MemberKind enum and typed metadata documented correctly

No Technical Issues Found


Cross-Reference Updates — Consistent

All ADR updates correctly reference the new profile message system:

ADR Change Status
001 8KB limit note, updated title reference ✅ Accurate
002 Updated title in cross-reference ✅ Accurate
003 Updated title in cross-reference ✅ Accurate
004 Updated title in cross-reference ✅ Accurate
007 Updated title and context reference ✅ Accurate
009 Expanded context with ProfileUpdate transport detail ✅ Accurate

ADR 009 Enhancement:
The addition of context about ProfileUpdate/ProfileSnapshot is particularly valuable:

Profile avatars are transmitted via ProfileUpdate and ProfileSnapshot messages (see ADR 005) 
as `EncryptedProfileImageRef` references.

Documentation Quality — High

Clarity:

  • Technical concepts explained clearly for implementers
  • Good balance of high-level overview and implementation details
  • Privacy implications well-documented

Completeness:

  • All major aspects covered (write flow, read flow, encryption, migration)
  • Related files section is comprehensive and accurate
  • Consequences section honestly discusses trade-offs

Consistency:

  • Terminology consistent across all ADRs
  • Formatting follows established patterns
  • Cross-references use consistent naming

Security Considerations — Appropriate

The documentation correctly describes:

  • Self-authored ProfileUpdate preventing impersonation (inbox ID from XMTP envelope)
  • AES-256-GCM encryption for avatars with per-image key derivation
  • Privacy isolation via per-conversation identities
  • Message-level E2E encryption via XMTP

No security documentation concerns.


Test Coverage — N/A

This is documentation-only. No code tests needed.


Recommendations

Optional Enhancements:

  1. Add a migration timeline in ADR 005 if known:

    ### 12. Migration Strategy
    
    - **Phase 1 (complete, 2026-03)**: Dual-write
    - **Phase 2 (complete, 2026-03)**: Message-primary reads  
    - **Phase 3 (planned Q2 2026)**: Stop appData writes after forced update
  2. Consider adding a troubleshooting section in ADR 005 for common scenarios:

    • What happens if ProfileSnapshot building times out?
    • What if appData write fails during dual-write?
    • How to recover if profiles are missing?
  3. Add performance characteristics to consequences:

    ### Negative
    - **Message scan overhead**: Building snapshots scans up to 500 messages (~50-100ms typical)

None of these are blockers — the documentation is already comprehensive and accurate.


Final Assessment

Approved ✅

This PR successfully documents the profile message system migration with:

  • ✅ Accurate technical details
  • ✅ Consistent cross-references
  • ✅ Clear explanation of architecture changes
  • ✅ Proper migration path documentation
  • ✅ No security or accuracy concerns

The documentation will serve as an excellent reference for understanding the profile system architecture.


macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Mar 10, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Mar 10, 2026

Approvability

Verdict: Approved

Documentation-only changes updating ADR files to reflect the profile message system architecture. No runtime code is modified - these are purely markdown documentation updates describing how the system now works.

You can customize Macroscope's approvability policy. Learn more.

ADR 005 rewritten to document the current architecture: profiles
stored as ProfileUpdate/ProfileSnapshot XMTP messages instead of
appData. Covers message-primary reads with appData gap-fill,
snapshot triggers, typed metadata, JoinRequest content type,
MemberKind enum, encrypted avatar references, and migration phases.

Cross-references updated in ADRs 001-004, 007, 009 to reflect that
profiles no longer share the 8KB appData space.
@yewreeka yewreeka force-pushed the jarod/update-adr-profile-messages branch from ccf7352 to 754f629 Compare March 10, 2026 17:27
@macroscopeapp macroscopeapp Bot dismissed their stale review March 10, 2026 17:28

Dismissing prior approval to re-evaluate 754f629

@yewreeka yewreeka merged commit 5d8bf11 into dev Mar 10, 2026
9 checks passed
@yewreeka yewreeka deleted the jarod/update-adr-profile-messages branch March 10, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant