Skip to content

Sweep the Pro and sync wording C7 leaves around replicated writes and AI-chat privacy #3367

Closed as not planned

Description

@mstomar125

Summary

After #3345 has applied ADR-083 and ADR-085 (both proposed) to core's data model, reword whatever Pro, cloud or nodespace-sync wording survives around the things #3345 removed or renamed.

This is a candidate-site checklist, not a final scope.

Context

#3345 decides, per ADR-083 and ADR-085, which of these stay in core and under what names:

#3345 sub-issue What it decides
#3337 The embedding provenance code and its SQL comments
C7.2 ConflictKind::SupersededEdit and DuplicateReactiveCreate
#3338 SYNC_SERVICE_CLIENT_ID and the push channel. #3338's "keep" option closes it and hands the docs to #3372
#3340 DatabaseSettingsNode's fields, and auth_status
#3343 get_multi_membership_edges
#3344 The personal AI-chat collection and ai_chat_privacy_play

The prose around them still says, for example:

  • "the convention nodespace-sync's real apply path uses";
  • "nodespaced-pro's catch-up/reconnect path";
  • "nodespace-sync writes to the local DB in-process via NodeService::with_client(\"sync-service\")";
  • "installs that later sync into one tenant";
  • "a permanently tenant-open chat".

Follow the parent's wording guide, and use #3345's new identifier names. "sync" may stay as the ADR-060/ADR-073 term for a write that arrived from another device. Name no product, repository or sync-internal function.

Scope: candidate sites (finalize at pickup)

Line numbers are hints at af8ddb6. Locate each site by the symbol or text named.

A. Sites #3367 owns, if they survive #3345

  • packages/core/src/playbook/engine.rs:

    • the comment ending "the sync-apply path (via RuleClass::Invariant in its own lookup)" (~540-546);
    • the log string "deleted after sync apply?" (~681).

    Reword them only if they name a product, or if Rename the origin-filtered event channel to subscribe_to_events_excluding_origin #3338 renamed the origin; then use its term, such as "replicated apply".

  • packages/core/src/playbook/core_plays.rs, the ai_chat_privacy_rules doc (~125-130, "permanently tenant-open chat"). If Reword the AI-chat privacy Play description without tenant wording #3344 kept the Play (ADR-085 option 3), write "a permanently unrestricted chat".

  • packages/core/src/services/node_service/mod.rs: the seed_personal_ai_chat_collection_if_needed doc (~1754-1756), and the doc of test_personal_ai_chat_collection_id_is_not_deterministic (~9417-9422).

    • They say "collide across installs that later sync into one tenant".
    • If kept, write "would collide when two installs' data meet in one database".
  • packages/core/tests/it/playbook_invariant_integration_test.rs:

    • the doc at ~415-421 ("the exact with_client(SYNC_SERVICE_CLIENT_ID) tagging convention nodespace-sync's real apply path uses");
    • ~500-505, ~2706-2708, ~3037-3043, ~3243-3251 and ~3327-3335, but only where they name a product or repository.
  • packages/core/tests/it/playbook_engine_integration_test.rs: ~395-401 and ~440-446 ("nodespaced-pro's catch-up/reconnect path", "apply_node_upserts_batched").

  • packages/core/src/services/node_service/mod.rs, the push-channel test comments (~8140-8417, "sync-service origin"). Only where Rename the origin-filtered event channel to subscribe_to_events_excluding_origin #3338 renamed the identifiers but left the prose.

  • packages/desktop-app/src/lib/services/remote-update-policy.ts. Rename the origin-filtered event channel to subscribe_to_events_excluding_origin #3338 leaves this file to Remove Pro, Supabase and nodespace-sync wording from core comments, docs and the skill #3372 explicitly.

    • The module doc (~33-43): "nodespace-sync writes to the local DB in-process via NodeService::with_client(\"sync-service\")" becomes "an in-process writer tagged with the reserved replicated-write origin (ADR-027), which does not go over the app's gRPC connection".
    • The decideRemoteUpdate doc (~69-71): "a sync-service replay" becomes "a replicated-write replay".
    • Keep the incomingIsNewer guard.
  • packages/desktop-app/src/tests/services/remote-update-policy.test.ts: ~76-80 and ~94-99, the same wording.

B. Sites a #3345 sub-issue rewrites; check only for leftovers

If a #3345 sub-issue closed with its "keep, docs only" option, move its sites into group A and record that in the PR.

Out of scope

Steps

  1. Follow CLAUDE.md's startup sequence:
    • pull main;
    • EnterWorktree({name: "issue-<N>-post-c7-wording"});
    • bun install, then the bun run test baseline;
    • self-assign at pickup and set In Progress.
  2. Confirm every Move Pro-owned data out of core's data model (ADR-083) #3345 sub-issue, and Describe core's access gate and daemon seams without naming the Pro daemon #3363 to Reword core data-model and identity docs that cite Pro, Supabase, RLS or tenants #3365, has merged or been closed. Then list what survived:
    git grep -n -I -P '(?i:supabase|pgvector|nodespace[-_]sync|nodespaced-pro|apply_node_upserts?|\bpro daemon|\btenant|cloud[- ]?(?:sync|push|pull)|push sweep|re-push|cold pull|sync-service|recovered[- ]items)|\bRLS\b|\bPro\b' -- packages/core packages/daemon/src/services/assembly.rs packages/desktop-app/src/lib/services/remote-update-policy.ts packages/desktop-app/src/tests/services/remote-update-policy.test.ts packages/desktop-app/src/lib/components/conflict-indicator-badge.svelte
    bun run scripts/check-pro-boundary.ts --list cloudWording
    bun run scripts/check-pro-boundary.ts --list tenantWording
    bun run scripts/check-pro-boundary.ts --list proWording
  3. Finalize the scope. Edit this issue's Scope to the sites that still need work, and note in the PR description which candidates were already gone or fixed by Move Pro-owned data out of core's data model (ADR-083) #3345.
  4. Reword each remaining site, using Move Pro-owned data out of core's data model (ADR-083) #3345's identifier names.
  5. Run bun run scripts/check-pro-boundary.ts and paste the printed BASELINES.
  6. Verify, then finish:
    • bun run quality:fix, and commit;
    • git push origin HEAD:issue-<N>-post-c7-wording;
    • gh pr create --head issue-<N>-post-c7-wording;
    • merge only with bun run merge <PR#> once approved.

Acceptance criteria

  • The issue body's Scope was edited to the final list before the PR was opened.
  • The grep in step 1 prints nothing under packages/core, assembly.rs, the two remote-update-policy files or the badge. The one exception is a line whose identifier ADR-083 deliberately kept; in that case the prose around it is neutral.
  • No comment names an identifier that no longer exists. Check every Move Pro-owned data out of core's data model (ADR-083) #3345 old name with git grep -n '<old name>'.
  • SCHEMA_SQL's executable statements are byte-identical to origin/main: only -- comment lines differ, and no edited comment contains a ;.
  • BASELINES in scripts/check-pro-boundary.ts is lowered to the counts the CLI prints, and the CLI exits 0.

Tests and verification

  • cargo fmt --all --check
  • cargo clippy -p nodespace-core -p nodespace-daemon --all-targets -- -D warnings
  • bun run test:changed. It runs the Rust, frontend and scripts tiers, as far as the diff reaches.
  • bun run scripts/check-pro-boundary.ts, then bun run scripts/check-code-references.ts.
  • No test logic changes. If a site turns out to need one, it belongs to the Move Pro-owned data out of core's data model (ADR-083) #3345 sub-issue that owns it.

Dependencies

Risks and rollback


Plan key: C10.5 (pro-boundary DAG).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

pro-boundary

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions