Skip to content

docs(attribution): document UTF-16 / UTF-8 encoding boundary#223

Merged
shikokuchuo merged 1 commit into
mainfrom
docs/attribution-encoding-contract
May 21, 2026
Merged

docs(attribution): document UTF-16 / UTF-8 encoding boundary#223
shikokuchuo merged 1 commit into
mainfrom
docs/attribution-encoding-contract

Conversation

@shikokuchuo
Copy link
Copy Markdown
Member

@shikokuchuo shikokuchuo commented May 21, 2026

  • Adds a contract doc at claude-notes/designs/attribution-encoding-contract.md plus file-header and struct-doc anchors on the two load-bearing AttributionRun types (TS in hub-client/src/services/attribution-runs.ts, Rust in crates/quarto-core/src/attribution/types.rs).
  • Frames the dual encoding — UTF-16 code units on the JS / Automerge / Monaco side, UTF-8 byte offsets on the Rust side — as inherited from each side's substrate (tree-sitter + SourceInfo on the Rust side; JS string primitives + Monaco + Automerge on the JS side) rather than a stylistic choice, with concrete failure modes if "harmonized".

Adds a contract doc in claude-notes/designs/ plus file-header /
struct-doc anchors on the two load-bearing AttributionRun types.
Frames the dual encoding as inherited from each side's substrate
(tree-sitter + SourceInfo on the Rust side, JS string primitives +
Monaco + Automerge on the JS side) rather than a stylistic choice,
so it isn't "harmonized" later.
@shikokuchuo shikokuchuo merged commit d12bd61 into main May 21, 2026
5 checks passed
@shikokuchuo shikokuchuo deleted the docs/attribution-encoding-contract branch May 21, 2026 09:49
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