Skip to content

chore: Deprecate deploy-agent in favor of network-agent#21

Merged
facundofarias merged 3 commits into
masterfrom
docs/deprecation-notice
Apr 28, 2026
Merged

chore: Deprecate deploy-agent in favor of network-agent#21
facundofarias merged 3 commits into
masterfrom
docs/deprecation-notice

Conversation

@facundofarias
Copy link
Copy Markdown
Contributor

@facundofarias facundofarias commented Mar 20, 2026

Summary

  • Marks deploy-agent as deprecated in favor of network-agent, applying the same three-touchpoint pattern used for deployhq-lib.
  • Adds post_install_message to the gemspec so gem install deploy-agent surfaces the migration path.
  • Adds a stderr banner in CLI#dispatch so existing installs (which never re-run gem install) see the notice on every invocation.
  • Strengthens the README notice to match the deploy-lib deprecation tone.

Test plan

  • bundle exec rspec — 17 examples, 0 failures
  • bundle exec rubocop — no new offenses
  • Verify gem install ./deploy-agent-*.gem prints the post-install message
  • Verify deploy-agent status prints the stderr banner

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 20, 2026

Walkthrough

Added 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 deployhq/network-agent.

Changes

Cohort / File(s) Summary
Docs / Archive Notice
CLAUDE.md, README.md
Inserted repository archive/deprecation banners instructing users to migrate to https://github.com/deployhq/network-agent. No functional code changes.
Gemspec metadata
deploy-agent.gemspec
Prefixed s.description with a deprecation notice and added s.post_install_message to warn users at install time. Review for wording/links.
CLI runtime warning
lib/deploy_agent/cli.rb
Added DEPRECATION_NOTICE constant and updated dispatch to warn the notice to stderr before executing commands; affects runtime output and scripts that parse CLI stderr.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'chore: Deprecate deploy-agent in favor of network-agent' clearly and specifically describes the main change: deprecating the deploy-agent in favor of network-agent, which is the core objective across all modified files.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/deprecation-notice

Comment @coderabbitai help to get the list of available commands and usage tips.

@facundofarias facundofarias requested a review from thdurante March 20, 2026 10:08
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2430cc6 and 265f502.

📒 Files selected for processing (3)
  • CLAUDE.md
  • README.md
  • deploy-agent.gemspec

Comment thread deploy-agent.gemspec Outdated
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>
@facundofarias facundofarias changed the title docs: Add deprecation notice pointing to network-agent chore: Deprecate deploy-agent in favor of network-agent Apr 28, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7e9c7b4 and 6757da9.

📒 Files selected for processing (3)
  • README.md
  • deploy-agent.gemspec
  • lib/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

Comment thread lib/deploy_agent/cli.rb
Comment on lines +7 to +16
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Comment thread lib/deploy_agent/cli.rb
Comment on lines +19 to +20
warn DEPRECATION_NOTICE

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

@facundofarias facundofarias merged commit fc465cd into master Apr 28, 2026
13 checks passed
@facundofarias facundofarias deleted the docs/deprecation-notice branch April 28, 2026 09:53
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