---
created: 2026-04-19
resolved: 2026-05-17
area: tooling
priority: low
resolves_phase: 34
---

# Sync Cargo.toml version with plugin.json

**Bug:** Binary prints stale crate version because `Cargo.toml` `version = "0.1.0"` is never bumped. Plugin manifest (`plugin/spt/.claude-plugin/plugin.json`) is at 1.8.7 but `env!("CARGO_PKG_VERSION")` resolves to `0.1.0`.

**Observed:** UAT Test 2 log 2026-04-19 04:06:18 — `READY:todlando (spt v0.1.0)` after `/spt:live todlando` on freshly-deployed 1.8.7 cache binary.

**Print sites using `env!("CARGO_PKG_VERSION")`:**
- `src/owl/poll.rs:73` — READY tag
- `src/owl/setup.rs:35` — READY tag
- `src/live/stop.rs:199` — REVIVE tag

**Fix options:**
1. Bump `Cargo.toml` version alongside `plugin.json` in `DEPLOY.ps1 -Bump` flow.
2. Switch print sites to read `plugin.json` at runtime (adds I/O; rejected).
3. Use build-time embedding of plugin version via `build.rs` + `include_str!` parse (cleaner; ensures single source of truth in plugin.json).

**Recommended:** Option 1 — extend DEPLOY.ps1 bump step to also patch `Cargo.toml` `version = "X.Y.Z"` before `cargo build --release`. Single source of truth stays plugin.json; Cargo.toml is a derivation committed alongside.

**Not blocking 18.4/18.5 UAT:** handoff mechanics validated end-to-end independent of version string.

---

**Resolved 2026-05-17:** Option 1 implemented in `docs/DEPLOY.ps1:224-287`. `-Bump` flow now reads Cargo.toml `^version = "X.Y.Z"`, asserts equality with plugin.json version (refuses divergence with clear error), rewrites both atomically, and commits as `chore: bump spt plugin to v$NewVersion`. Current state verified synced: plugin.json `1.10.10` ↔ Cargo.toml `1.10.10`. `env!("CARGO_PKG_VERSION")` now resolves to deployed plugin version — unblocks Phase 34 VERS-04 (SessionStart version-change prompt sourced from `CARGO_PKG_VERSION` against `$SPT_HOME/last-seen-version.json` sentinel).
