chore: Deprecate deploy-agent in favor of network-agent#21
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
WalkthroughAdded repository archival and deprecation notices across docs, gemspec, and CLI; the CLI now prints a deprecation warning on every invocation and the gemspec emits a post-install deprecation message directing users to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@deploy-agent.gemspec`:
- Line 10: The s.description string in deploy-agent.gemspec is too long for
RuboCop's Layout/LineLength; update the s.description assignment to split the
long literal into multiple shorter string literals (e.g., break the sentence
into two adjacent string literals or use a backslash continuation) so the source
line length is under the limit while preserving the same combined description
text; edit the s.description assignment to use concatenated/adjacent literals
referencing the same wording.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 76b73794-97fe-45d8-b412-b6e6d1c36af0
📒 Files selected for processing (3)
CLAUDE.mdREADME.mddeploy-agent.gemspec
Adds two deprecation touchpoints alongside the existing README/CLAUDE.md notice so users discover the migration path without re-reading docs: - gemspec post_install_message: shown once on `gem install deploy-agent` - CLI dispatch warn: stderr banner on every `deploy-agent` invocation, catching existing installs that never re-install README notice expanded to match the deploy-lib deprecation tone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lib/deploy_agent/cli.rb`:
- Around line 19-20: The CLI now always emits a deprecation warning via warn
DEPRECATION_NOTICE (stderr), so update the CLI specs that only assert stdout to
either (a) assert the expected stderr contains DEPRECATION_NOTICE (or the exact
message) or (b) suppress/capture stderr in the test (e.g., using
capture_io/capture_stream or silence_stderr) so assertions focus on stdout;
modify the CLI spec for the command dispatch tests to check stderr for
DEPRECATION_NOTICE or wrap the call in a stderr-suppression helper to restore
test expectations.
- Around line 7-16: This file defines the DEPRECATION_NOTICE heredoc constant
but is missing the required frozen string literal pragma; add the magic comment
# frozen_string_literal: true at the top of the file (as the first
non-shebang/non-encoding line) so that DEPRECATION_NOTICE and other string
literals are frozen per repo Ruby rules, ensuring compatibility with frozen
string enforcement for constants like DEPRECATION_NOTICE.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 38b74429-557a-4835-a390-99ef88ea2bc0
📒 Files selected for processing (3)
README.mddeploy-agent.gemspeclib/deploy_agent/cli.rb
✅ Files skipped from review due to trivial changes (1)
- README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- deploy-agent.gemspec
| DEPRECATION_NOTICE = <<~MSG | ||
| \e[33m╔══════════════════════════════════════════════════════════════════╗ | ||
| ║ DEPRECATED: deploy-agent will not receive further updates. ║ | ||
| ║ Please migrate to the new agent: ║ | ||
| ║ ║ | ||
| ║ https://github.com/deployhq/network-agent ║ | ||
| ║ ║ | ||
| ║ Fewer dependencies, easier to install. ║ | ||
| ╚══════════════════════════════════════════════════════════════════╝\e[0m | ||
| MSG |
There was a problem hiding this comment.
Add frozen string literal pragma for the new heredoc constant.
This file still misses # frozen_string_literal: true; with this new constant, that remains out of compliance with repo Ruby rules.
Suggested fix
+# frozen_string_literal: true
+
require 'ipaddr'
require 'optparse'As per coding guidelines, **/*.rb: Enable frozen string literals in Ruby files.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@lib/deploy_agent/cli.rb` around lines 7 - 16, This file defines the
DEPRECATION_NOTICE heredoc constant but is missing the required frozen string
literal pragma; add the magic comment # frozen_string_literal: true at the top
of the file (as the first non-shebang/non-encoding line) so that
DEPRECATION_NOTICE and other string literals are frozen per repo Ruby rules,
ensuring compatibility with frozen string enforcement for constants like
DEPRECATION_NOTICE.
| warn DEPRECATION_NOTICE | ||
|
|
There was a problem hiding this comment.
Update CLI specs for the new unconditional stderr emission.
Line 19 now writes to stderr on every command path, but spec/deploy_agent/cli_spec.rb:8-20 only asserts stdout. This needs matching stderr expectations (or explicit suppression), otherwise the dispatch behavior change is not fully covered and can fail CI.
Suggested spec adjustment (outside this file)
describe '#dispatch' do
it 'responds to version command' do
- expect { cli.dispatch(['version']) }.to output(/\d+\.\d+\.\d+/).to_stdout
+ expect { cli.dispatch(['version']) }
+ .to output(/\d+\.\d+\.\d+/).to_stdout
+ .and output(/DEPRECATED: deploy-agent/).to_stderr
end
it 'shows usage for invalid command' do
- expect { cli.dispatch(['invalid']) }.to output(/Usage: deploy-agent/).to_stdout
+ expect { cli.dispatch(['invalid']) }
+ .to output(/Usage: deploy-agent/).to_stdout
+ .and output(/DEPRECATED: deploy-agent/).to_stderr
end
it 'shows usage when no arguments provided' do
- expect { cli.dispatch([]) }.to output(/Usage: deploy-agent/).to_stdout
+ expect { cli.dispatch([]) }
+ .to output(/Usage: deploy-agent/).to_stdout
+ .and output(/DEPRECATED: deploy-agent/).to_stderr
end
end🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@lib/deploy_agent/cli.rb` around lines 19 - 20, The CLI now always emits a
deprecation warning via warn DEPRECATION_NOTICE (stderr), so update the CLI
specs that only assert stdout to either (a) assert the expected stderr contains
DEPRECATION_NOTICE (or the exact message) or (b) suppress/capture stderr in the
test (e.g., using capture_io/capture_stream or silence_stderr) so assertions
focus on stdout; modify the CLI spec for the command dispatch tests to check
stderr for DEPRECATION_NOTICE or wrap the call in a stderr-suppression helper to
restore test expectations.
Summary
post_install_messageto the gemspec sogem install deploy-agentsurfaces the migration path.CLI#dispatchso existing installs (which never re-rungem install) see the notice on every invocation.Test plan
bundle exec rspec— 17 examples, 0 failuresbundle exec rubocop— no new offensesgem install ./deploy-agent-*.gemprints the post-install messagedeploy-agent statusprints the stderr banner