refactor(models): consume dunite-user-core for the account vocabulary (DEV-517) #451
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/DEV-517-consume-user-core"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consumer side of DEV-517 (epic DEV-495). dunite PR #31 adds
dunite-user-core, the account vocabulary a8n-tools and bunyip had grown independently in identical form.What changed
models/user.rs:UserRole,MembershipStatusandSubscriptionTier(includingselect/trial_days/trial_label/display_name) are re-exported from the crate instead of defined here.crate::models::user::*paths are unchanged for every caller.models/tier.rs:TierConfigResponsere-exported.What stays
The
Userrow struct,is_access_allowed,normalize_emailandTierConfigRow. The row carrieslast_login_country,login_location_alerts,first_name,last_name,phone,has_used_trial,avatar_updated_atandis_super_admin, none of which exist in a8n's schema, so sharing it needs a schema reconciliation first.TierConfigRowadditionally derivessqlx::FromRow, and a8n is on sqlx 0.7 against bunyip's 0.8, so a shared derive would not satisfy both.The 12 tests that only exercised the moved enums are deleted rather than duplicated (they now live in the crate, with the fallback-direction assertions tightened). Everything touching the
Userrow stays: the access predicate, tier assignment, trial eligibility.Testing
cargo clippy --workspace --all-targets -- -D warningsclean,cargo fmt --all --checkclean,cargo test --workspace --lib414 passed / 0 failed (282 + 108 + 15 + 9; down 12 by exactly the moved tests).Depends on dunite #31. Re-pin to the merged rev once it lands.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CGnY8JKXCgH2jiUSqH6g4x