Skip to content

Reword the AI-chat privacy Play text without tenant wording - #3400

Merged
mstomar125 merged 1 commit into
mainfrom
issue-3344-privacy-play-wording
Oct 1, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
issue-3344-privacy-play-wording

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Closes #3344

Summary

The AI-chat privacy Play's user-visible description said that disabling the Play makes every future chat "visible to the whole tenant by default". That names a sharing model core does not have, and ADR-085 section 6 calls it inaccurate. It now says what disabling does on this install.

Old:

Every new AI chat is added to this install's private AI-chat collection at creation, so it starts private to you. Disabling this makes every future chat visible to the whole tenant by default; existing chats keep whatever membership they already have.

New:

Every new AI chat is added to this install's private AI-chat collection when it is created, so it starts private to you. Disabling this leaves future chats out of that collection; existing chats keep whatever membership they already have.

ADR-085 (proposed) gives no accepted text, so this uses the issue's suggested wording.

Also changed: the ai_chat_privacy_rules doc comment

The doc comment on ai_chat_privacy_rules called a failed action "a permanently tenant-open chat". It now says "a permanently unrestricted chat". The issue lists that comment as out of scope and as a candidate site for the later wording sweep, but it is the only other tenant wording in core_plays.rs. The task owner asked for the whole edit to this file to land here, so it does. The sweep issue's candidate list for this comment is now already done.

Nothing outside core_plays.rs is touched. The node_service/mod.rs docs stay with the sweep issue.

What does not change

  • Rules, _seed.default_rules, the Play id and all seeding are untouched in the diff.
  • seed_core_plays_if_needed still never overwrites an existing Play node, so only new databases get the new text. This is accepted by ADR-085 section 8, and core's CLAUDE.md rules out a migration.

Tests

Three tests added in core_plays.rs:

Test What it pins
the_ai_chat_privacy_play_description_names_no_sharing_model the description names no tenant or workspace and still says what disabling does. The needle is built from fragments, so the test carries no marker
integration::a_fresh_database_carries_the_shipped_description a freshly seeded database stores the shipped description
integration::re_seeding_keeps_an_existing_plays_description an existing Play node keeps its stored text across a re-seed

Mutation checks, each reverted afterwards:

  • Restoring the old tenant description fails the first test.
  • Making seeding blank the description fails a_fresh_database_carries_the_shipped_description.
  • Making seeding overwrite an existing Play fails re_seeding_keeps_an_existing_plays_description.

Pro-boundary ratchet

tenantWording goes from 453 to 451 on this branch (the description string and the doc comment). BASELINES is not edited, as instructed: the baseline stays 463 and the final tightening issue lowers it. bun run scripts/check-pro-boundary.ts exits 0, and --changed reports 0 hits in the changed file.

Class check: no Pro line is added.

Verification

  • cargo fmt -p nodespace-core -- --check
  • cargo clippy -p nodespace-core --all-targets -- -D warnings -D clippy::unused-async
  • .tools/bin/cargo-nextest nextest run -p nodespace-core --lib core_plays: 13 passed
  • bun run test:changed: Rust workspace and scripts tiers pass
  • the push check passes, including the ratchet

🤖 Generated with Claude Code

@mstomar125

Copy link
Copy Markdown
Contributor Author

Automated pragmatic code review (medium)

Review Type: Initial Review (commit 721cae86)

Requirements Check

  • ✅ The description names no tenant, workspace or sharing model, and says what disabling does locally. The new text says: "Disabling this leaves future chats out of that collection; existing chats keep whatever membership they already have." That is accurate:
    • disable_play (playbook/lifecycle.rs) removes the Play from the trigger index, so the invariant rule stops firing.
    • That rule is the only writer of the chat→collection member_of edge. seed_personal_ai_chat_collection_if_needed does no backfill, capture_service backfills only transcripts, and no frontend or daemon path adds that membership.
    • Nothing removes existing edges.
    • edit_or_disable_warning in seeded.rs already gives users the same message.
    • Chats still get the personal_collection_id property stamped, but that is a property, not membership.
  • ✅ Only the description changes. The rules, AI_CHAT_PRIVACY_PLAY_ID, _seed.default_rules and seed_core_plays_if_needed are byte-for-byte unchanged. The only other production change is the ai_chat_privacy_rules doc comment ("tenant-open" → "unrestricted"). The coordinator assigned this file's whole edit to this issue rather than to the later wording sweep, and the new text is the one the sweep prescribes. node_service/mod.rs is untouched.
  • ✅ A fresh database gets the new text; an existing database keeps its old text. seed_core_plays_if_needed skips any id that already exists, and two new integration tests pin both sides.
  • ✅ Ratchet. bun run scripts/check-pro-boundary.ts exits 0 and no count is above its baseline. tenantWording goes from 453 to 451 (main has two hits in this file). Under the standing rule for this drain, BASELINES is deliberately left alone rather than lowered, because parallel PRs collide on those lines and the final tightening issue lowers them.
  • ✅ Core builds and tests pass. core_plays: 13 passed (10 existing, 3 new). "AI chat in the free app works" cannot change from a string edit.

Deviations: two, both authorised and described in the PR body: the doc-comment edit, and leaving BASELINES unedited.

Other checks

  • Tests are meaningful and follow existing patterns.
    • The local create_test_service matches the one in seeded.rs.
    • NodeUpdate::with_properties is used correctly: normalize_flat_properties_to_namespace moves the key under properties["play"], which is where stored_description reads it.
    • The re-seed test covers never-overwrite, which the existing reopening_a_database_does_not_duplicate_the_play test does not.
  • The ["ten", "ant"].concat() needle follows CLAUDE.md's fragment rule for absence tests. "workspace" is not a ratchet marker.
  • Hygiene: no #NNNN references in code comments and no lint suppression.
  • No other copies: the old description text appears nowhere else in the repo.
  • PR body: accurate against the diff.

Code Review Findings

  • 🔴 Critical: None
  • 🟡 Important: None
  • 🟢 Suggestion: None worth acting on. The absence test's positive check is only contains("disabling this"). Correct wording cannot be asserted in a general way, and the ratchet plus the two integration tests cover the rest.

Recommendation: APPROVE

@mstomar125 mstomar125 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review: APPROVE (posted as a comment, because GitHub blocks self-approval). Full findings are in the review comment above.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Address-review summary

The review of 721cae86 came back APPROVE, with no Critical and no Important findings.

Planned changes

  • ✅ Will address: none. Nothing is required.
  • ⏭️ Will skip (1):
    • 🟢 The absence test's positive check is only contains("disabling this"). Skipped, as the reviewer also recommends. A stronger positive check would mean pinning the whole sentence with assert_eq!, which duplicates the string and breaks on any future copy edit without catching a real defect.
    • The behaviour that matters is covered elsewhere: the absence assertions and the ratchet keep the sharing-model wording out, and the two integration tests pin what seeding stores.
    • Revisit if the description ever gains more structure, such as separate fields for the disable consequence.

Final summary

  • ✅ Addressed: 0
  • ⏭️ Skipped: 1 suggestion (reason above)
  • 📝 Commits created: 0. The branch is unchanged at 721cae86.
  • 🧪 Tests: passed, re-verified on 721cae86.
    • .tools/bin/cargo-nextest nextest run -p nodespace-core --lib core_plays: 13 passed.
    • cargo fmt -p nodespace-core -- --check: clean.
    • bun run scripts/check-pro-boundary.ts: exit 0, tenantWording 451 against a baseline of 463.
    • Each new test was mutation-checked again and fails when its target behaviour is broken:
      • restoring the old description fails the absence test;
      • making seeding blank the description fails a_fresh_database_carries_the_shipped_description;
      • making seeding overwrite an existing Play fails re_seeding_keeps_an_existing_plays_description.

Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: No code changed in response to the review. The reviewed commit 721cae86 is the PR head.

The PR is ready for the merge queue whenever the merge is approved. It is not merged here.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Merge queue: #3400 was taken out of the queue — the merge gate failed on it, rebased onto main. Reproduce with git rebase origin/main and bun run test:changed, fix, push, and re-run bun run merge 3400.

test window_routing::tests::empty_database_id_is_treated_the_same_as_no_id ... ok
test window_routing::tests::no_database_id_and_no_focus_falls_back_to_the_first_label_deterministically ... ok
test window_routing::tests::no_database_id_routes_to_the_focused_window ... ok
test window_routing::tests::no_monitor_information_fails_open_rather_than_forcing_the_fallback ... ok
test window_routing::tests::no_windows_open_at_all_yields_no_targets ... ok
test window_routing::tests::only_a_sliver_of_overlap_does_not_count_as_onscreen ... ok
test window_routing::tests::registry_pin_returns_the_previous_value_and_unpin_removes_it ... ok
test window_routing::tests::resolve_focus_window_falls_back_deterministically_when_nothing_is_focused ... ok
test window_routing::tests::resolve_restore_geometry_applies_the_saved_geometry_unchanged_when_no_monitor_is_known_at_all ... ok
test window_routing::tests::resolve_restore_geometry_centers_an_offscreen_geometry_on_the_primary_monitor ... ok
test window_routing::tests::resolve_restore_geometry_falls_back_to_the_first_monitor_when_no_primary_is_identified ... ok
test window_routing::tests::resolve_restore_geometry_leaves_an_onscreen_geometry_unchanged ... ok
test window_state::tests::a_corrupt_file_is_treated_as_no_saved_state_rather_than_an_error ... ok
test window_state::tests::a_transient_non_missing_read_failure_refuses_to_save_rather_than_wiping_the_file ... ok
test window_state::tests::concurrent_saves_for_different_databases_all_survive ... ok
test window_state::tests::different_databases_do_not_clobber_each_other ... ok
test window_state::tests::is_plausible_rejects_degenerate_dimensions_but_allows_negative_position ... ok
test window_state::tests::missing_file_yields_no_saved_geometry ... ok
test window_state::tests::save_leaves_no_temp_file_behind ... ok
test window_state::tests::save_then_load_round_trips ... ok
test window_state::tests::saving_again_for_the_same_database_overwrites_its_entry ... ok
test shutdown_tests::close_requested_does_not_cancel_token_until_window_is_destroyed ... ok
failures:
---- daemon_setup::stale_socket_removal_tests::a_socket_nothing_answers_on_is_removed stdout ----
thread 'daemon_setup::stale_socket_removal_tests::a_socket_nothing_answers_on_is_removed' (10565555) panicked at packages/desktop-app/app-lib/src/daemon_setup.rs:3701:9:
assertion failed: !socket.exists()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
    daemon_setup::stale_socket_removal_tests::a_socket_nothing_answers_on_is_removed
test result: FAILED. 267 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.87s
error: test failed, to rerun pass `-p nodespace-app-lib --lib`
error: script "rust:test:app-units" exited with code 101
error: script "rust:test" exited with code 101
[stage exited with code 101]

  full output: /var/folders/3w/y9kj522n1_j9wqmt6vl_sb6r0000gp/T/nodespace-gate-logs/_gate-merge-2026-10-01T06-42-51-404Z/rust-test-rust-workspace-nextest.log

✗ rust:test (Rust workspace, nextest) failed — merge blocked.
  Fix the failure, push, and re-run: bun run merge <PR#>

The Play's user-visible description said that disabling it makes chats
"visible to the whole tenant". That names a sharing model core does not
have. It now says what disabling does on this install: future chats are
left out of the private AI-chat collection, and existing chats keep
their membership.

The doc comment on the privacy rules, which called a failed action a
"permanently tenant-open chat", now says "permanently unrestricted
chat".

Seeding is unchanged and still never overwrites an existing Play node,
so only new databases get the new text. Tests pin the description's
wording, that a fresh database carries the shipped text, and that
re-seeding leaves an existing node's text alone.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reword the AI-chat privacy Play description without tenant wording

1 participant