Repository navigation
Rewrite the restrictedToMembers and member_of permission comments as storage contracts - #3389
Conversation
|
Review Type: Initial Review Code Review SummaryComment-only rewrite of the Reviewed at e89e464 (one commit on top of current origin/main; Requirements CheckIssue #3301 acceptance criteria:
Wording fidelity (ADR-083 section 4)
Factual accuracy against the code
FindingsCritical IssuesNone. Suggested Improvements
Nitpicks
Nothing in the comment would lead a core engineer to rename the field, move it out of the Recommendation: APPROVE. Hold the merge until nodespace-docs#93 (ADR-083) is merged, or re-check the two contract sentences against the merged text first. |
mstomar125
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment: GitHub blocks self-approval). Full findings in the review comment above.
e89e464 to
6fe6dbd
Compare
Address Review (round 1)Review: APPROVE, 0 critical, 1 improvement note, 2 nits. Triage
Rebase after the reviewMain moved after the review (a merged change lowered
Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: No finding required a change. The only edit since the review is the mechanical resolution of a 🤖 Generated with Claude Code |
…storage contracts The collection schema comment named a Pro consumer and did not say what core must not change. State the two storage contracts without naming a consumer: restrictedToMembers is a JSON boolean at properties.collection.restrictedToMembers, and a person's member_of edge carries a free-form permission of admin, modify or readOnly. Also note each field's local effect in core. The test that pins restrictedToMembers now says its name, bucket and type are the contract. Lower the proWording and cloudWording baselines by the 1 and 2 lines the old block held. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
6fe6dbd to
e7fbeae
Compare
Closes #3301
Summary
Rewrites the comment above the
collectionschema'sfieldsinget_core_schemasso it states the two storage contracts that ADR-083 section 4 (proposed) defines, without naming a consumer:restrictedToMembers: stored atproperties.collection.restrictedToMembersas a JSON boolean; absent or false means open. Locally it bounds embedding roots and marks the personal AI-chat collection.permissionproperty on a person'smember_ofedge: one ofadmin,modifyorreadOnly; a content node's membership edge carries none. Core stores it free-form, does not validate it, and readsadminback to find the personal AI-chat collection.Both sentences that make each a contract ("This path and type are a storage contract ..." and "This path and these values are a storage contract ...") use ADR-083 section 4's wording. The new block names no Pro, RLS, Supabase, tenant or nodespace-sync wording.
The leading comment of
test_collection_has_restricted_to_members_fieldnow says its name, bucket and type are the contract and that the test pins them.This is the first PR to lower a Pro-boundary baseline, so it exercises the ratchet workflow end to end.
Ratchet delta
Before (origin/main a7a1906) and after, from
bun run scripts/check-pro-boundary.ts:proWordingcloudWordingThe block removed one
proWordingline and twocloudWordinglines, and--list proWording,--list cloudWordingand--list tenantWordingshow no line fromcore_schemas.rsany more. The check exits 0.Deviations from the issue text
cloudSyncHooks4 to 0. That headroom comes from an earlier merged change, not from this block, and the issue's criterion is that onlyproWordingandcloudWordingmove. I leftcloudSyncHooksalone to keep this diff scoped and to avoid aBASELINESline conflict with anything else queued. It is a one-line follow-up for whichever PR is next to touch the ratchet.Verification
git diff origin/mainchanges only comment lines inpackages/core/src/models/core_schemas.rs, plus two numbers inBASELINES.seed_personal_ai_chat_collection_if_neededmatchesrestrictedToMembersand apermissionofadminand writes{"permission": "admin"}when seeding;restricted_collection_sqltreats a restricted collection as an embedding-root boundary; nothing validatespermission.cargo fmt -p nodespace-core --check: clean.cargo clippy -p nodespace-core --all-targets -- -D warnings -D clippy::unused-async: clean.bun run scripts/check-pro-boundary.ts: exit 0.bun run scripts/check-code-references.ts: exit 0.core_schemas(lib) andscalar_field_type_validation_test::(integration).bun run test:changed: passed (rust and scripts tiers run; frontend and skill skipped by scope), on the branch, then again after each rebase onto a moved main. The commits that landed in between touch only desktop-app files andBASELINES(proSyncModule,proWording); after the last rebase theproWordingconflict was resolved by taking main's value and re-deriving mine from the check output.bun run scripts/check-pro-boundary.ts --changed: 0 hits in both changed files.No new test: the change is comment-only, and the two tests above already pin the part of the contract core owns.
🤖 Generated with Claude Code