Skip to content

Rename FodId::hash to FodId::match_key (match-key vocabulary) - #19

Merged
jwrosewell merged 3 commits into
mainfrom
refactor/51did-match-key-rename
Aug 31, 2026
Merged

Rename FodId::hash to FodId::match_key (match-key vocabulary)#19
jwrosewell merged 3 commits into
mainfrom
refactor/51did-match-key-rename

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The stable, comparable part of a 51Did is now called the match key, mirroring the Model Terms for Marketing vocabulary. The reader previously exposed it as FodId::hash.

Change

  • Rename the FodId::hash() accessor to FodId::match_key() (and the backing field).
  • Keep hash() as a #[deprecated] alias forwarding to match_key(), so existing callers keep compiling (with a deprecation warning) and get the same bytes.
  • Update the crate/type docs, the README, the example and the tests to the match-key vocabulary, in fodid-cloud as well as fodid.
  • Add a test asserting the deprecated hash() alias returns the match key.

The branch was brought up over the 51Did hardening and OWID vendoring change (#27) by merging main and re-applying the rename on top of the reworked files, so main's error variants, vendored fodid::owid module and README doctests are the base and only the match-key rename sits above them.

Tests

cargo test -p fodid -p fiftyone-fodid-cloud --all-features: 106 passed, 2 ignored (the live-cloud tests), which is main's 105 plus the new alias test. cargo clippy for both crates with -D warnings and cargo fmt --check are clean, and the wasm32-wasip1 build of fiftyone-fodid-cloud compiles.

Part of the cross-repo match-key vocabulary rename (documentation, Website, .NET reader (51Degrees/pipeline-dotnet#348) and cloud internals in separate PRs).

Produced with AI assistance under James Rosewell's direction and needs human review.

The stable, comparable part of a 51Did is now called the match key,
mirroring the Model Terms for Marketing vocabulary. Rename the FodId::hash
accessor to FodId::match_key (and the backing field), keep hash() as a
#[deprecated] alias forwarding to match_key() for backward compatibility,
and update the docs, examples and tests. Add a test that the deprecated
alias returns the match key.
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