Skip to content

Deprecate shared daemon v1 and prepare v1.2.1 - #203

Merged
Shengyu Fu (shengyfu) merged 1 commit into
mainfrom
shengyfu-deprecate-v1-daemon
Oct 14, 2026
Merged

Shengyu Fu (shengyfu) merged 1 commit into
mainfrom
shengyfu-deprecate-v1-daemon

Conversation

@shengyfu

Copy link
Copy Markdown
Member

Summary

This is staged retirement: deprecation, not removal. It is a fresh, standalone PR from main at 95ea48dd421c0cb5729719e8d6d7236b8ccff5dd, which includes merged #202.

  • Emit one actionable stderr warning per legacy shared-v1 daemon startup, including restarts. The warning identifies deprecation as of tgrep 1.2.1 and recommends managed v2 with --shared-policy <FILE>.
  • Keep serve --shared without a policy on v1. Existing v1 attach/search/status/refresh/detach, protocol JSON, fixed pins and retain-all storage remain supported. Ordinary serving and both managed-v2 storage modes do not emit this warning. No protocol, storage schema, index format or transport behavior changes.
  • Recommend managed v2 for new integrations in README and AGENTS, retain the legacy documentation and link targets, and update shared-design, qualification and historical-benchmark guidance. No removal date or version is promised.
  • Prepare public package version 1.2.1 in the workspace manifest and the CLI/core entries in the root and fuzz lockfiles. No unrelated dependency upgrades, legacy-control changes or release-automation changes; the isolated 1.2.0 release-test fixture is intentionally unchanged.

Migration guidance

Use the existing complete managed policy and managed client contract, not just an added startup flag. Detach every legacy lease and drain readers/root handles before stopping v1. Then start with an explicit policy, establish fresh ownership and operation/lease tokens, and attach the intended exact revision using shared manage / views.attach rather than legacy shared attach.

Owner guards, private RPC credentials, version-checked recovery and explicit collection authorization remain required. Enabling managed v2 does not convert existing v1 storage or make it collectible; legacy data remains retain-all.

Verification

Native Windows, Rust/Cargo 1.98.0:

  • cargo test --locked -p tgrep-cli --features managed-test-hooks --test shared_daemon -- startup_deprecation cli_lifecycle_unsupported_options_and_explicit_index_intent v2_cli_real_backend_migration_replay_and_idle_shutdown --test-threads=2 — 5 passed.
  • cargo test --locked -p tgrep-cli --test shared_daemon startup_deprecation -- --test-threads=2 — 3 passed without test hooks.
  • Regression coverage checks two v1 daemon startups, once-only stderr warnings, unchanged legacy lifecycle and JSON search output, empty daemon stdout, ordinary indexed serving, and managed/compatibility-retain-all v2 startup without the warning.
  • cargo clippy --locked -p tgrep-cli --features managed-test-hooks --bin tgrep --test shared_daemon -- -D warnings — passed.
  • cargo fmt --all -- --check and git diff --check — passed.
  • python -B -m unittest discover -s scripts -p test_prepare_release.py -v — 17 passed, using isolated temporary Git remotes only.
  • Both workspace and fuzz cargo metadata --locked --offline --format-version 1 graphs resolve; parsed lockfile comparisons confirm only tgrep CLI/core package versions changed. CLI --version and Windows VERSIONINFO report 1.2.1.
  • Existing legacy/managed documentation anchors and the complete managed-policy example are preserved. Owned test processes were stopped and temporary fixtures cleaned up.

No release, tag, merge or auto-merge is requested by this PR.

Keep no-policy shared startup on v1, with a single stderr deprecation warning. Recommend explicit-policy managed v2 without changing legacy clients, protocols, formats, or retain-all storage. Prepare workspace package versions and add focused startup and output-isolation coverage.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 07:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The deprecation is correctly isolated to v1 startup, preserves existing behavior, and has focused regression coverage.

0 open findings

What changed in this PR

Deprecates—but retains—shared daemon v1 while recommending managed v2 and preparing release 1.2.1.

Changes:

  • Adds a once-per-startup v1 deprecation warning with regression coverage.
  • Updates migration and lifecycle documentation.
  • Bumps workspace and lockfile package versions to 1.2.1.
File Description
tgrep-cli/​src/​serve/​shared/​server.rs Emits the v1 startup warning.
tgrep-cli/​src/​main.rs Clarifies managed-v2 CLI help.
tgrep-cli/​tests/​shared_daemon.rs Tests v1 warning and compatibility.
tgrep-cli/​tests/​shared_daemon/​managed.rs Verifies managed v2 remains warning-free.
tgrep-cli/​tests/​shared_daemon/​runtime.rs Verifies ordinary serving remains warning-free.
README.md Documents deprecation and migration.
AGENTS.md Recommends the managed-v2 lifecycle.
SHARED_WORKTREE_INDEXES.md Updates shared-index design status.
SHARED_INDEX_BENCHMARKS.md Labels v1 benchmarks as historical.
CONTRIBUTING.md Updates release guidance to 1.2.1.
Cargo.toml Bumps the workspace version.
Cargo.lock Updates CLI/core package versions.
fuzz/​Cargo.lock Updates the core package version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@shengyfu
Shengyu Fu (shengyfu) merged commit 547f3c8 into main Oct 14, 2026
16 checks passed
@shengyfu
Shengyu Fu (shengyfu) deleted the shengyfu-deprecate-v1-daemon branch October 14, 2026 00:28
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.

2 participants