Repository navigation
Strip the Pro Tauri layer and edition branching from app-lib, proto, daemon and CLI - #3422
Conversation
mstomar125
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (medium depth): APPROVE
Posted as a comment review because GitHub blocks self-approval.
Review Type: Initial Review
Requirements Check
- ✅ Deletions.
pro_sync.rs,pro_client.rs,nodespace_pro.proto, the Pro step inbuild.rs, thetonic-build/protoc-bin-vendored/prostdeps (Cargo.lock updated;nodespace-protostill uses them),refresh-pro-proto.ts,tauri.pro.conf.json, the probe andpro:tier-detectedemit, the 27 command registrations,ProClient::rebind, andPRO_LATEST_URLwithbuiltin_update_source_forare all gone.builtin_update_source()is stillpub(crate). Outside the frontend, README andpackages/core(other slices), nothing refers to the deleted items, and no workflow or package script does either. - ✅ Edition branching in app-lib.
is_pro_build, the compile-time Pro env reads, the Pro binary name,profile_for_build_envand the.prolabels are removed.launch_agent_label()returns onlyapp.nodespace.daemonorapp.nodespace.daemon.dev. - ✅
nodespace_proto::socket. All three tables are[&str; 2]and every function takes onlyis_debug. The daemon'smarker_path()takes no argument. - ✅ CLI and postinstall. CLI discovery and uninstall use the two-entry table: release first, then dev, and both sockets plus their lock files are removed.
postinstallpassesbash -nandshellcheck, nothing refers to the removed variable, and no preinstall was added. - ✅
DaemonProfile. It is now{binary_name, service_env}. Nothing else readproduct. - ✅ CLI docs. The
--socketdoc, thediscover_socket_indoc and theuninstall.rscomment are reworded, and the regeneratedcli.mdline matches the clap doc. - ✅ Wording. No added line hits a ratchet marker.
--changedreports only thetray.rs:806-807registry fixtures, which belong to S3.
Code Review Findings
🔴 Critical: none.
🟡 Important
- The rebase onto #3417 will break the build even though the text merges cleanly.
- 📁
packages/desktop-app/app-lib/src/lib.rs:553 - Issue: this PR deletes the block-level
use tauri::Emitter;because the Pro emit was the block's only.emit. #3417 addsapp_handle.emit(DATA_PLANE_READY_EVENT, ())in the same block and leaves the import's hunk untouched. Git therefore applies the removal without a conflict, and the result fails with E0599. - Recommendation: keep
use tauri::Emitter;when rebasing, then rerun clippy. - Principle: an atomic, buildable change after rebase.
- 📁
- The rewritten launchd label has no test.
- 📁
packages/desktop-app/app-lib/src/daemon_setup.rs:109-116 - Issue:
launch_agent_label()readscfg!(debug_assertions)directly, so no test pins either value. Swapping the two strings would pass every test, yet the label is part of the shared service identity (ADR-084 §4). - Recommendation: split out
launch_agent_label_for(is_debug), gated#[cfg(any(target_os = "macos", test))], and pin both rows literally, matching how this PR treats sockets, pids and markers. - Principle: test coverage proportional to criticality.
- 📁
🟢 Suggestion / Nit
- The app-side marker test checks less than its name claims.
- 📁
packages/desktop-app/app-lib/src/incompatible_database.rs:419-424 - Issue: the test only checks that the name is one of the table's entries, so the wrong flavour would pass.
- Recommendation: assert equality with
incompatible_database_name(cfg!(debug_assertions)).
- 📁
- Nit:
profile_for_this_build()(📁daemon_setup.rs:83-85) is now a one-line wrapper; consider callingDaemonProfile::communitydirectly. - Nit:
canonical_name_is_the_release_socket(📁socket.rs:203) is covered by the exact-table test. - Nit: a few places still say "variant" where the rest says "flavour":
socket.rs:5,:81main.rs:2153and thesocket_fallback_variant_testsmodule- the
uninstall.rs:153test name
- Nit (outside S1's file list): the label comment in
scripts/pkg-resources/app.nodespace.daemon.plist:7, and thedaemon_setup.rs:2874assertion message, say "community build".
Cross-slice notes (not findings against this PR)
scripts/check-pro-boundary.tskeepspostinstallinEXEMPTIBLE_NON_TEST_FILESonly until its guard is gone. The checker's owner can now drop that entry.- Draft PR #3381 also edits
scripts/pkg-resources/postinstall. - Until the frontend slices land, the frontend still invokes the removed commands. Those calls are wrapped in try/catch and only log a warning.
Recommendation: APPROVE. The strip is complete, correct and in scope. Two conditions: keep use tauri::Emitter; on the rebase onto #3417, and record the test:changed result in the body (now done).
580aa40 to
ad414c9
Compare
Address-review summaryBranch rebased onto main at df1077b (#3417) and force-pushed; head is ad414c9. Addressed
Skipped
Verification after the fixes and the rebase
Re-Review DecisionDecision: RE-REVIEW NEEDED, for the new commits and the rebase resolution only. Rationale: the rebase needed a manual, build-affecting fix in lib.rs (the restored import), and the label function was restructured. Both are small, but a second look at exactly those changes is cheap. |
mstomar125
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review, re-review (medium depth): APPROVE
Posted as a comment review because GitHub blocks self-approval. Head reviewed: ad414c9, on main df1077b (#3417).
Previous Review Summary: 8 recommendations (2 Important, 1 Suggestion, 5 Nits).
- Addressed: 5.
- Skipped with an acceptable reason: 3 (the
profile_for_this_build()choke point, the canonical-socket documentation test, and the plist comment outside the slice). - New issues: 0 blocking, 1 nit.
Rebase resolution: confirmed clean.
- The
lib.rsdiff against main is exactly four changes: thechannelbinding, the probe and its emit, the 27 command registrations, and two reworded comments. use tauri::Emitter;is present in the startup block.- #3417's code is identical to main: the reachability check, the data-plane round trip, the
DATA_PLANE_READY_EVENTemit and its branches. commands/nodes.rs,services/mod.rsandcommands/mod.rschange only by the removals of the deleted client and commands.
New commit.
- The
launch_agent_label_forcfg gating is correct on macOS and non-macOS, in test and non-test builds. - The label test pins both rows literally.
- The app marker test now fails on the wrong flavour, and the table itself is pinned literally in
socket.rs. - No stale references to the renamed tests remain.
- No added line hits a ratchet marker.
Findings
- 🔴 Critical: none.
- 🟡 Important: none.
- 🟢 Nit: the one-line
launch_agent_label()delegation itself is not pinned (daemon_setup.rs:110-112). No change is recommended: a single-expression delegation is not worth another test. - 🟢 Nit (carried over): the plist comment says "community build". It is outside this slice.
Recommendation: APPROVE.
Address-review (after the re-review)The re-review raised no Critical or Important findings, so there is no code change.
Re-Review DecisionDecision: NO RE-REVIEW NEEDED. Rationale: nothing changed since the approved re-review of ad414c9. The PR is review-clean and is not to be merged here: the coordinator merges in slice order. |
…daemon and CLI Delete the Pro Tauri commands (pro_sync.rs), the Pro daemon client (pro_client.rs), the Pro proto with its tonic-build/protoc-bin-vendored build step and refresh script, and the Pro bundle overlay. The startup task no longer probes for a Pro daemon or emits pro:tier-detected, and probe_and_recover no longer rebinds a Pro client. Remove edition branching: is_pro_build(), the NODESPACE_PRO_* reads, the Pro binary name, the .pro launchd labels and the Pro plist environment leave daemon_setup; profile_for_this_build() returns DaemonProfile::community(), and DaemonProfile loses its product field. nodespace_proto::socket keeps only the release and debug rows and its functions take only is_debug; the daemon's marker_path() takes no argument. The built-in update source is the core repository's GitHub releases. The CLI probes and removes only the release and dev sockets, and the .pkg postinstall drops its --edition guard. Part of #3412 Co-Authored-By: Claude Opus 5.5 <[email protected]>
launch_agent_label() now delegates to launch_agent_label_for(is_debug), so a test pins both the release and the dev label literally. The app's marker test asserts this flavour's exact marker name instead of any entry of the table. Leftover "variant" wording in the socket tables, the daemon's fallback tests and the CLI uninstall test now says "flavour". Part of #3412 Co-Authored-By: Claude Opus 5.5 <[email protected]>
ad414c9 to
3717883
Compare
Part of #3412
Slice S1 of the one-pass strip (ADR-081 §4 tables A and B3, §7 step 2; ADR-082 §4.5, §5; ADR-084 §4, §5): the Pro Tauri layer and every edition branch in app-lib, proto, daemon, CLI and the
.pkgpostinstall.Acceptance items done
app-lib/src/commands/pro_sync.rs(27pro_*commands),app-lib/src/services/pro_client.rs,app-lib/proto/nodespace_pro.proto, the Pro compile step and itstonic-build/protoc-bin-vendoredbuild dependencies,scripts/refresh-pro-proto.ts,src-tauri/tauri.pro.conf.json, the startup tier probe andpro:tier-detected,ProClient::rebind, and the Pro arm ofupdate_check.rs.is_pro_build(), theNODESPACE_PRO_*reads, the Pro binary name, the.prolaunchd labels and the Pro plist environment are removed fromapp-lib.nodespace_proto::socketholds only debug/release rows. Nois_proparameter,daemon-pro.sock,ui-pro.pidorincompatible-database-pro.jsonremains, andmarker_pathtakes no edition flag.--editioncheck is removed fromscripts/pkg-resources/postinstall; its replacement is a step-5 issue.product(daemon_profile.rs:28, the 'pro' value at daemon_setup.rs:127).--socketclap doc (packages/cli/src/lib.rs:102-108), the discover_socket doc (lib.rs:222-224) and the uninstall.rs:129 comment name no Pro variant. Regenerate the GENERATED cli-surface region of packages/skill/references/cli.md withbun run skill:gen, so thatbun run skill:checkpasses.Notes on these:
prostalso leaves app-lib's dependencies: only the generated Pro proto code used it.Cargo.lockdrops the three app-lib entries; the packages stay in the lock becausenodespace-protostill builds its own proto with them.cargo tree -p nodespace-app-lib -e build --depth 1lists no build dependencies.use tauri::Emitterfor Emit a neutral daemon:data-plane-ready event and reload on it instead of the capability-probe event #3417'sdaemon:data-plane-readyemit; the rebase dropped that import without a textual conflict, and it was restored by hand. The reachability check, the data-plane round trip and the daemon-ready ordering are Emit a neutral daemon:data-plane-ready event and reload on it instead of the capability-probe event #3417's, unchanged.profile_for_this_build()returnsDaemonProfile::community();profile_for_build_envis deleted.launch_agent_label()has onlyapp.nodespace.daemonandapp.nodespace.daemon.dev, throughlaunch_agent_label_for(is_debug)so a test can pin both.[&str; 2](release, dev). The functions take onlyis_debug: the flavour stays a parameter because a per-package profile override can buildnodespace-protowith different settings from the binary that links it.nodespace_daemon::incompatible_database::marker_path()takes no argument and returns the shared marker for the build flavour.nodespace uninstallremoves both flavours' sockets and lock files. The postinstall's whole guard block and its now-unusedNODESPACEDvariable are removed; no preinstall is added (pre-install check: Pro rebuild (after core release): core install coexistence checks and other-product notices (ADR-084 §4.3, §5) #3415).packages/daemon/src/tray.rsis only partly in this slice (theui_pid_relativecall and its doc). Its twobound_tenant_*hits are registry fixtures, which S3 removes.Ratchet (
bun run scripts/check-pro-boundary.ts)Counts only fall;
BASELINESis not edited. "Before" is main at df1077b (after #3417).--list editionBranchingnow shows onlyREADME.md,packages/core/tests/it/playbook_engine_integration_test.rsand two frontend files (add-synced-database-dialog.svelte,pro-sync.svelte.ts) that the frontend slices delete.--changedreports no added hit; its only hits in changed files are the two pre-existingbound_tenant_*fixture lines intray.rs(S3).Tests
Deleted (Pro-only): the
pro_clientinline tests (with the file); the daemon_setup Pro profile, service-env and edition-agreement tests; the(_, true)rows of the socket.rs, daemonmain.rsandgrpc_clienttables; the CLI dev-Pro discovery row; the update_check Pro-arm test; themarker_path(true)case.lib.rshad no source-text assertions about the probe on main, so none were removed there.Rewritten to exactly the debug and release rows: socket.rs (socket, UI pid and marker tables), the daemon's
socket_fallback_variant_tests, the app'seach_flavour_dials_the_socket_its_daemon_binds, the CLI's discovery test.Added:
DaemonProfile::community()equals{binary_name: "nodespaced", service_env: []}(whole-struct equality, so a new field fails to compile until the test states core's value);builtin_update_source()isGitHubLatestReleaseforNodeSpaceAI/nodespace-core; the socket-name list holds only the two core names (also the UI pid and marker lists); the build default profile is the community profile; the daemon marker is the shared name for the build flavour; the launchd label is exactlyapp.nodespace.daemon/app.nodespace.daemon.dev(review). The app's marker test now asserts this flavour's exact name rather than any table entry (review).Mutation checks
Each mutation applied alone, the named test run, then reverted. All 19 killed.
community()binary name"nodespaced-other"community_profile_is_the_core_daemon_with_no_service_envcommunity()gains a service env entryprofile_for_this_build()returns another binarythe_build_default_is_the_community_profilebuiltin_update_source()returns aVersionEndpointbuiltin_source_is_the_core_repositorys_latest_github_releasebuiltin_update_source()reads another repoDAEMON_SOCKET_NAMES[1]renamedsocket_table_holds_exactly_the_release_and_debug_namesDAEMON_SOCKET_NAMESgrows a third entrydaemon_socket_nameignores the flavourUI_PID_NAMES[1]renamedui_pid_table_holds_exactly_the_release_and_debug_namesINCOMPATIBLE_DATABASE_NAMES[1]renamedmarker_table_holds_exactly_the_release_and_debug_namesdaemon_socket_relativeignores the flavourrelative_path_is_state_dir_joined_to_nameevery_flavour_falls_back_to_its_own_scoped_socket,flavours_do_not_collapse_onto_one_socketmarker_pathuses the other flavourthe_marker_is_the_shared_name_for_this_build_flavoureach_flavour_dials_the_socket_its_daemon_bindsdiscover_socket_prefers_canonical_then_falls_back_to_devnodespace uninstallkeeps the dev socketremove_sock_removes_both_flavours_sockets_and_lock_files_onlythe_label_is_exactly_the_release_or_the_dev_labelthe_marker_lives_in_the_state_directory_under_this_flavours_nameRuns
cargo clippy -p nodespace-proto -p nodespace-daemon -p nodespace-cli -p nodespace-app-lib --all-targets -- -D warnings: clean.bun run skill:check, clippy and the verify greps re-run after the rebase: clean.socket::8/8, daemon socket/marker/arg tests 15/15, CLI discovery/uninstall 2/2, app-lib changed modules 51/51, app-libextensions::24/24 (they importbuiltin_update_source()).bun run skill:check: up to date.bun run quality:fix: passed, no changes.bun run test:changed(on ad414c9, rebased onto df1077b): passed. Tiers run: scripts (25s), skill (2s), Rust workspace nextest (57s); frontend skipped, the diff does not reach it. (Also passed on the pre-rebase 580aa40.)DB reset note
No database-file reset. Dev machines that ran internal Pro builds should remove leftover
daemon-pro.sock,daemon-dev-pro.sock,ui-pro.pidandincompatible-database-pro.jsonfiles from~/.nodespace, and boot out the.prolaunchd jobs, by hand. Core no longer knows those names and does not clean them up.Until the pre-install check (#3415) lands, a core
.pkgreplaces an installed internal Pro app without a guard. No Pro build is distributed, so this is acceptable (ADR-081 §7).Extension API
For S4's release-notes heading (S4 makes the single
EXTENSION_API_VERSIONbump):DaemonProfile.productis removed;DaemonProfileis{binary_name, service_env}(ADR-082 §4.5).nodespace_proto::socket::{daemon_socket_name, daemon_socket_relative, ui_pid_name, ui_pid_relative, incompatible_database_name}take onlyis_debug, andDAEMON_SOCKET_NAMES,UI_PID_NAMESandINCOMPATIBLE_DATABASE_NAMEShold two entries (release, dev). The shared names themselves are unchanged.nodespace_daemon::incompatible_database::marker_path()takes no argument.🤖 Generated with Claude Code