Repository navigation
#133: PersonNodeBehavior + person core schema (ADR-037 identity type) - #1399
mstomar125 wants to merge 2 commits into
Conversation
Implement PersonNode as a core node type — the identity primitive the
ADR-037 access model builds on ("members of a restricted collection =
person nodes only"). Owns the TYPE only; no instance is seeded (the first
PersonNode is created + named + bound at Pro sync-onboarding, nodespace-sync#125).
- PersonNodeBehavior: validate (name/content non-empty), can_have_children=false,
plain-text, name is embeddable (searchable), no parent contribution, plus a
computed display_name (custom:displayName override → content → placeholder).
- Register it in NodeBehaviorRegistry::new().
- Add the `person` core schema (content = name; no extra fields).
- Tests for validation + display name; update the registry/schema count asserts.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
REQUEST CHANGES ⏳ Initial review. Tight, well-tested addition: 🟡 🟢 🟢 Scoping to the type only (no seeded instance — that's sync#125 onboarding) is the right boundary. |
|
|
Construct-time seeding in NodeService::new: idempotently create one person node (auth_status: "local") representing the local user when none exists, so fresh and existing databases alike carry the identity node. On Pro upgrade this node is bound to a Supabase identity (nodespace-sync#125), not recreated. Add person_seed_test covering fresh-install single-seed, the local auth_status property, and re-open idempotency. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Seeding discrepancy — resolved in favor of ADR-037 (seed the local PersonNode)The open question on this PR was whether the local PersonNode is seeded (ADR-037) or not (the original #133 issue note). Resolved: seed it. ADR-037 is canonical here — "PersonNode Seeding & Upgrade Continuity" states every install (free included) seeds exactly one PersonNode: the local user, What landed (commit 46d5646)
Test status
This unblocks nodespace-sync#125 (bind the seeded PersonNode → Supabase uid at sign-in) and #126 (auto-admin bootstrap). |
|
Superseded by #1401. Both PRs implemented issue #133 in parallel; per maintainer decision we consolidate on #1401 — it carries the fuller vertical slice (PersonNodeBehavior + person schema with name/email fields + the frontend PersonNode component, schema form, and plugin registration). The one thing #1401 lacked — the ADR-037 local-PersonNode seed (every install seeds exactly one |
Implements PersonNode as a core node type — the identity primitive the ADR-037 access model builds on ("members of a restricted collection = person nodes only"). Closes #133.
Owns the type only (schema + behavior). No PersonNode instance is seeded — the first PersonNode is created + named + bound to a Supabase identity at Pro sync-onboarding (nodespace-sync#125).
Changes
PersonNodeBehavior(behaviors/mod.rs):validate(name/content non-empty),can_have_children=false, plain-text, name is the embeddable content (people are searchable), no parent contribution. Plus a computeddisplay_name—custom:displayNameoverride → content →"Unknown Person"placeholder.NodeBehaviorRegistry::new().personcore schema (core_schemas.rs):content= name,is_core, no extra fields.Unblocks the Pro-side enforcement (nodespace-sync#125 auth_identities/onboarding, #126 admin) and is the person-only check for nodespace-core#1372.
cargo test(behaviors + core_schemas) green, clippy clean.