Skip to content

Adam/envelope attribution - #36

Merged
adamski merged 9 commits into
mainfrom
adam/envelope-attribution
Jul 4, 2026
Merged

Adam/envelope attribution#36
adamski merged 9 commits into
mainfrom
adam/envelope-attribution

Conversation

@adamski

@adamski adamski commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

adamski added 9 commits July 3, 2026 12:01
…er_id

BREAKING CHANGE: DocumentEventCallback now takes three new parameters
(user_id, author_name, visibility) inserted before context, in that
exact order. This is a sanctioned C ABI break; the only current
consumer (entonal-common's TonalDB) will be updated in a later task.

- events.rs: extend DocumentEventCallback typedef; thread user_id/
  author_name/visibility from Document through QueuedEvent and the
  event-dispatch marshaling (CString allocation, null when absent,
  mirroring the existing title/content convention). Add
  emit_document_created_with_attribution/emit_document_updated_with_attribution.
- ffi.rs: update all document-event emission call sites to pass
  attribution from the Document; add replicant_get_user_id (char**
  out + SyncResult convention, paired with existing replicant_string_free).
- client.rs: update emit_document_created/emit_document_updated call
  sites to use the new attribution-carrying variants.
- dist/include/replicant.h regenerated via cbindgen (build.rs +
  scripts/build_dist.py) — not hand-edited.
- replicant-client/include/replicant.hpp: hand-edit adds
  std::string get_user_id() wrapping replicant_get_user_id, matching
  the get_document()/get_version() error-handling idiom.
- tests/ffi_integration_tests.rs: extend the callback signature and
  DocumentCapture to the new 8-parameter arity; assert user_id
  arrives non-null and round-trips against replicant_get_user_id.

Claude-Session: https://claude.ai/code/session_014v9ckeoEb1eNH3K2t6fdH5
@adamski
adamski merged commit eff2c0f into main Jul 4, 2026
4 checks passed
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