diffbroker 0.12.1 → 0.12.2

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: 93366baf36d2624668bda7070960557ef337a5699c80be427798638386adcdda
4
- data.tar.gz: 0013377ed45686039a4f4eeeae00c995844fdea592a885dfae774d6c1ba9812c
3
+ metadata.gz: 843632a85c52d68a7b94d6a1f7dd1229e7353961a5611a7ed9c1cb05d7f11542
4
+ data.tar.gz: 7a0c380a109114c7feeb13b203fc45a05e95f3da9773288e0b77e52d6df12a58
5
5
  SHA512:
6
- metadata.gz: 78525e73d46c72bc944a63181b1e86bf774d12d7273d81010a1024b0ea17012f601ff208d3bbbd7d34b3992dd8ddfbeff1d0471abaadf691f047e9411fe5f54f
7
- data.tar.gz: 3e74c23e1d5091235d00482aa790af5a9b40af3263ff7caf9b5c03e8f9cccee2f1e0c65a5b66ddd15a91353ebfc589e0bf768db9210a2d481a7c1426dc998c7b
6
+ metadata.gz: 1d432acb33edef5d5f4d7699445a4e1a53f119499ecc94ea70e10001eb7c894358efe5d74984495d660230924510f89ff9656e9252afe11e73bb96d11b4d54db
7
+ data.tar.gz: 60b4a66bd37677fcf6f39ea798d7b7c0fee21cd04167cd102d7958af51cfa1f2f6ccbba05070825eba84239c2209da07c3c91ef6870d4373be4d46d6e906d33a
@@ -367,9 +367,8 @@ module Diffbroker
367
367
  return unless @running_lock.synchronize { !@upgrading && @running.add?(id) } # the upgrade's restart would kill it
368
368
 
369
369
  @state&.update(busy_tasks: @running_lock.synchronize { @running.size })
370
- repositories = @repositories
371
370
  @spawner.call do
372
- @task_runner.run(message, repositories:)
371
+ @task_runner.run(message, repositories: known_repositories)
373
372
  rescue StandardError => e
374
373
  @out.puts "Task #{id} crashed: #{e.class}: #{e.message}"
375
374
  ensure
@@ -380,6 +379,14 @@ module Diffbroker
380
379
  end
381
380
  end
382
381
 
382
+ # The server hands over pending tasks while the connection is still being set up, before the first scan: scan now rather
383
+ # than fail the task with "no checkout".
384
+ def known_repositories
385
+ @repositories = @scanner.scan if @scanned_at.nil?
386
+ @scanned_at ||= @clock.call
387
+ @repositories
388
+ end
389
+
383
390
  # Helpers an agent left in worktrees nobody works in (rubocop --server and the like). Only while no task runs here.
384
391
  def sweep_strays
385
392
  return unless @reaper && @running_lock.synchronize { @running.empty? }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Diffbroker
4
- VERSION = "0.12.1"
4
+ VERSION = "0.12.2"
5
5
  end
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "diffbroker",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "Skills for working on Diff Broker agent tasks: the diffbroker MCP tools, write rules and report_task."
5
5
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diffbroker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Sidorov (@newstler)