Skip to content

Delete the vendored nodespace_pro.proto, its build.rs step and its build-only deps #3335

Closed as not planned

Description

@mstomar125

Summary

After #3334 deletes pro_client.rs, nothing in nodespace-app uses the generated nodespace.pro.v1 code. Yet every core build still compiles the Pro proto and pulls in build-only deps for it.

Delete all of it:

  • the vendored proto;
  • the build.rs step that compiles it;
  • the tonic-build, protoc-bin-vendored and prost dependencies;
  • the dev script that re-vendored the proto.

Context (main @ af8ddb6; locate by symbol)

  • src-tauri/build.rs main() (172-199).
    • Lines 173-192 are the Pro proto step: the comment, protoc_bin_vendored::protoc_bin_path, set_var("PROTOC"), tonic_build::configure()…compile_protos(&["proto/nodespace_pro.proto"], …), and rerun-if-changed.
    • Lines 194-199 are unrelated and stay: sync_external_bin_staging(), drop_unstaged_bundle_entries() and tauri_build::build().
    • If Split the desktop Tauri crate and add ADR-082's Tauri extension points #3322's library split has landed (ADR-082 §3.1), the proto step and these deps may live in the library package's build script and manifest instead. Delete them there.
  • src-tauri/Cargo.toml.
    • Lines 15-18: a comment, tonic-build = "0.12" and protoc-bin-vendored = "3".
    • Line 51: prost = { workspace = true }. Nothing in src/, tests/ or test-support/ uses prost; its only user is the generated code.
  • src-tauri/proto/nodespace_pro.proto (437 lines, 29 RPCs) is the only file in proto/.
  • scripts/refresh-pro-proto.ts (59 lines) is not wired into package.json and has no test.
  • packages/proto is unaffected. packages/proto/Cargo.toml keeps its own tonic-build and protoc-bin-vendored for core's protos, so the lockfile keeps both packages.

Scope

  • Delete packages/desktop-app/src-tauri/proto/ (the whole directory).
  • build.rs: delete the Pro proto step. main() becomes sync_external_bin_staging(); drop_unstaged_bundle_entries(); tauri_build::build(), plus whatever Split the desktop Tauri crate and add ADR-082's Tauri extension points #3322 added; keep the existing comment above the first two calls.
  • Cargo.toml: delete the comment and the two build deps (15-18) and prost (51).
  • Cargo.lock: let cargo update it. Only nodespace-app's dependency list should change.
  • Delete scripts/refresh-pro-proto.ts.

Out of scope

  • The packages/proto build.
  • tonic = "0.12", which GrpcClient still uses.
  • async-stream and async-trait. They also have no users in this crate, but they are not Pro-related.

Steps

  1. Run the CLAUDE.md startup sequence with worktree issue-<N>-delete-pro-proto:
    • git pull origin main;
    • EnterWorktree;
    • bun install;
    • a bun run test baseline;
    • bun run gh:assign <N> "@me";
    • bun run gh:status <N> "In Progress".
  2. Make the deletions.
  3. Build:
    • cargo build -p nodespace-app refreshes Cargo.lock;
    • cargo clean -p nodespace-app && cargo build -p nodespace-app proves the crate's build script works cold without the proto step.
  4. Run bun run scripts/check-pro-boundary.ts and paste the printed BASELINES.
  5. Ship:
    • bun run test:changed;
    • bun run quality:fix, then commit;
    • git push origin HEAD:issue-<N>-delete-pro-proto;
    • gh pr create --repo NodeSpaceAI/nodespace-core --head issue-<N>-delete-pro-proto;
    • /pragmatic-code-review, then /address-review;
    • after the user approves, bun run merge <PR#> in the background.

Acceptance criteria

  • packages/desktop-app/src-tauri/proto/ and scripts/refresh-pro-proto.ts are gone.
  • cargo tree -p nodespace-app -e build --depth 1 lists neither tonic-build nor protoc-bin-vendored.
  • cargo tree -p nodespace-app -e normal --depth 1 | rg -w prost returns nothing.
  • rg -n -e 'nodespace_pro\b|nodespace\.pro\.v1|tonic_build|protoc_bin_vendored|refresh-pro-proto' packages/desktop-app/src-tauri scripts -g '!scripts/check-pro-boundary*' returns nothing. Use the word boundary: a fixed-string nodespace_pro also matches the core crate nodespace_proto.
  • The Cargo.lock diff is limited to nodespace-app's dependency entries.
  • Clippy, the app unit tests, the scripts lint and typecheck, and the scripts tests all pass.
  • bun run scripts/check-pro-boundary.ts passes, with BASELINES lowered to the printed counts. Expected at af8ddb6:
    • proNamedFiles −2 (nodespace_pro.proto, refresh-pro-proto.ts);
    • tenantWording −57;
    • proProtocol −14;
    • cloudWording −13;
    • proWording −9;
    • editionBranching −4;
    • cloudBindState −1.

Tests and verification

  • cargo clippy -p nodespace-app --all-targets -- -D warnings -D clippy::unused-async
  • bun run rust:test:app-units
  • bun run quality:scripts:check
  • bun run test:scripts
  • bun run test:changed

Dependencies

Risks and rollback


Plan key: C4.6 (pro-boundary DAG).

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Sep 30, 2026
  2. added
    pro-boundary
    on Sep 30, 2026
  3. mstomar125 commented on Oct 1, 2026

    @mstomar125
    ContributorAuthor

    Superseded by #3412 (umbrella against the final ADR-081–085)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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