deployangel 0.1.38 → 0.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a0944295d3cbddf9d6ff41ce21ad608b3c9615dc2910bfed6ef9745ffde6e93
4
- data.tar.gz: 7197967f339bb1af5057528e2b08b9e894379051401d059f02a91ec6cd3083ad
3
+ metadata.gz: d930ff0701b6c48f6793339eaff985418ae4a6b0332689e7c87d85047f80a082
4
+ data.tar.gz: a1848b93327d98249e6bd98acf595047b62b926604c9940ed92f17334db3b093
5
5
  SHA512:
6
- metadata.gz: 9fc73a15daea7553d4a04121c001a49feef7a15195b0313b1115ab572a387cc053bf80196d6c8d79baee8c980df2833c198cdf7a2e0dcdeda18d81235dd3c208
7
- data.tar.gz: 4d5fe66f67476bd5c0e41137d6f3f38746d31da776ea295526e4becd463da21f61bf4d23a5d0ebfaac61df4c84d0d4692b67e49797d5e05a6cb63fa5e59a706f
6
+ metadata.gz: '00943ef2bac8f6acb697ec20243c211b96779b4eb33dc8c4da1aff53cd789b14ca569320fa06d960de7811a0dd15e4aacab06e6656f4ffe1240a8b63cf1467eb'
7
+ data.tar.gz: 9e8ede3e14497f6afaf02b08f0438876397ee73b95f7ba79bbff8d43dc84ad69e018e0bffb903ce722458b1a5df48c2eb372580c034699a00315f09335a92235
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.39 (2026-11-04)
4
+
5
+ - `deployangel doctor` warns when the project's AGENTS.md or CLAUDE.md has
6
+ an older copy of the block `deployangel install agents` writes, and
7
+ `deployangel status` says so on stderr at the start of a session, where
8
+ a coding agent reads it. Running `deployangel install agents` updates
9
+ it. Hand-written instructions without the block's markers aren't
10
+ checked.
11
+
3
12
  ## 0.1.38 (2026-11-04)
4
13
 
5
14
  - `deployangel verify` shows a volume drop (servers from 2026-11-04) as
@@ -258,6 +258,7 @@ module DeployAngel
258
258
  output(document, options[:format]) { Formatter.verification(document) }
259
259
  step_summary(Formatter.markdown(document))
260
260
  @stderr.puts("deployangel: timed out; verification is still in progress") if outcome.timed_out
261
+ stale_instructions_note if status
261
262
  outcome.exit_code
262
263
  end
263
264
 
@@ -406,6 +407,15 @@ module DeployAngel
406
407
  # What this checkout will report and what DeployAngel has seen of the
407
408
  # app. Warnings are advice, so only errors (a rejected token, an
408
409
  # unreachable server, no agent in the bundle) fail it.
410
+ # At the start of a session (`status`), where an agent reads it and can
411
+ # update the instructions it's following.
412
+ def stale_instructions_note
413
+ stale = Doctor.stale_instructions(@root)
414
+ return if stale.empty?
415
+
416
+ @stderr.puts("deployangel: #{Doctor.stale_instructions_note(stale)}; run `deployangel install agents` to update")
417
+ end
418
+
409
419
  def doctor
410
420
  format = parse(format: nil) { |o, opts| o.on("--format=FORMAT", %w[text json]) { |v| opts[:format] = v } }[:format]
411
421
  doctor = Doctor.new(root: @root, client: doctor_client, env: @env)
@@ -36,10 +36,29 @@ module DeployAngel
36
36
  def checks
37
37
  @checks ||= begin
38
38
  @setup, server = server_checks
39
- [ *agent_checks, here_check, schedule_check, *server, release_check, *comparison_checks ].compact
39
+ [ *agent_checks, here_check, schedule_check, *server, release_check, *comparison_checks, instructions_check ].compact
40
40
  end
41
41
  end
42
42
 
43
+ # Files whose DeployAngel block (between the markers `deployangel install
44
+ # agents` writes) differs from this version's: agents keep following the
45
+ # older copy until it's updated. Hand-written instructions without the
46
+ # markers aren't checked.
47
+ def self.stale_instructions(root)
48
+ block = /#{Regexp.escape(CLI::AGENTS_START)}.*?#{Regexp.escape(CLI::AGENTS_END)}/m
49
+ %w[AGENTS.md CLAUDE.md].select do |name|
50
+ path = File.join(root, name)
51
+ found = File.file?(path) && File.read(path)[block]
52
+ found && found != CLI::AGENT_INSTRUCTIONS.chomp
53
+ end
54
+ rescue SystemCallError
55
+ []
56
+ end
57
+
58
+ def self.stale_instructions_note(files)
59
+ "#{files.join(" and ")} #{files.one? ? "has" : "have"} an older copy of DeployAngel's agent instructions"
60
+ end
61
+
43
62
  def failed?
44
63
  checks.any? { |check| check.status == :error }
45
64
  end
@@ -57,6 +76,14 @@ module DeployAngel
57
76
  [ Check.new(status: :error, message: "The agent isn't in the bundle", fix: "Add gem \"deployangel\" to the Gemfile and run bundle install.") ]
58
77
  end
59
78
 
79
+ def instructions_check
80
+ stale = self.class.stale_instructions(@root)
81
+ return if stale.empty?
82
+
83
+ Check.new(status: :warn, message: self.class.stale_instructions_note(stale),
84
+ fix: "Run deployangel install agents to update #{stale.one? ? "it" : "them"}.")
85
+ end
86
+
60
87
  def schedule_check
61
88
  counts = local_schedules.group_by { |schedule| schedule["source"] }.map { |source, list| "#{SOURCES.fetch(source, source)} #{list.size}" }
62
89
  later = [ ("GoodJob's cron" if read("Gemfile.lock").to_s.include?(" good_job (")), "config.recurring_jobs" ].compact
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeployAngel
4
- VERSION = "0.1.38"
4
+ VERSION = "0.1.39"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deployangel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.38
4
+ version: 0.1.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Owens