Repository navigation
Seed the owner has_role edge with no role or status values - #3458
Conversation
Pragmatic Code Review — PR #3458Review Type: Initial review (no prior reviews or comments on the PR). One commit, SummaryThe change does what ADR-083 §2 (amended 2026-10-01) asks: seeding writes the owner Requirements Check (issue #3432)
Node type sequenceRelationship change only. No registry, schema field, wire type or generated TypeScript is involved, and I found no frontend reader of the edge's properties. Is what remains in
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). All five acceptance criteria met; no Critical findings; two non-blocking improvements (silent zero-edge fallback, order-dependent pick with a second edge) and a few nits. Full findings in the review comment above.
Review addressed (936c8e7)Addressed
Skipped
Verification: Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: about 20 lines in one function, implementing the reviewer's two recommendations as written, each pinned by a test that fails on the previous behaviour. No new functionality or design change. |
The has_role edge from the local PersonNode to the settings singleton records whose database this is and nothing else (ADR-083 §2). Seeding writes it with empty properties, and get_local_person resolves the person by the edge's existence instead of filtering on role. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rministically - get_local_person warns when it falls back because no has_role edge exists: seeding guarantees the edge, so its absence is an anomaly like a duplicate is. - With more than one edge it resolves the earliest-created node, so the answer no longer depends on SQL row order; the test asserts the seeded person. - Drop the 'backfilled on next open' wording from the person seed comment. Skipped: the 'roles' wording in the skill CLI reference (generic description of the built-in name) and cloud-sync.md, whose ADR-083 amendment note already states the constant is no longer written. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
936c8e7 to
e2297fe
Compare
Closes #3432
What changed
In core the
has_roleedge from the local PersonNode to the settings singleton records whose database this is and nothing else (ADR-083 §2, amended 2026-10-01). This makes the code match.seed_database_settings_if_neededcreates the edge with empty properties instead of{role: "owner", status: "active"}.get_local_personresolves the person by the edge's existence. Therole == "owner"filter is gone, along with the warning for "edges exist but none is the owner", which can no longer occur.has_roleedge points at the singleton, and still falls back to the first person node when there is none.behaviors/mod.rs,core_schemas.rs,sqlite_store/relationships.rsandnode_service.protono longer describe role values on the edge.No migration: reset the database.
Node type sequence
Relationship change only: the built-in
has_roleedge loses its two property keys. No node type, schema field, wire type or generated TypeScript changes. The docs (cloud-sync.md,data-layer.md,node-types.md,typed-relationships.md) already describe the new shape.Tests
properties == {}.test_get_local_person_ignores_non_owner_has_role_edgesand..._warns_when_has_role_edges_exist_without_owner_roleare removed: both tested the role filter.has_roleedge exists; no warning fires for the seeded property-less edge.bun run test:changedpasses (rust and scripts tiers, including the Pro-boundary check).🤖 Generated with Claude Code