specwrk 0.22.0 → 0.22.1

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: 6629189f0771a5d84ba3f12881503400669aec3e1645984a52b6044203a33565
4
- data.tar.gz: 37a69cd7fa9d92ea7ad17497945526ed71f72e1e675d4d7b125c447dc144da99
3
+ metadata.gz: 1a13b3c3e70f9d783a12f5234fb6d4b1d8c1b1d88f51d9697f577af787992af7
4
+ data.tar.gz: def9c56c399edf73caf06a8f6c35a66cca2edc78469011b9c590be024a0dbdfa
5
5
  SHA512:
6
- metadata.gz: a800f92fe4aae81e623887044cbcdc265708010b716d3af321ecad5f408fe3af89546201733e72fb8716af542b9a4ffd9b773c573a1cd113e62c0aa8238c582f
7
- data.tar.gz: 283d6acb6411c7a173b9d8cd246caae1278b5d849b11303ef0761e0cf1aa4ec39690be203d470da923cca0e15a070feb537f0a3a759188fa58e1a15d9682a4d9
6
+ metadata.gz: 60533ae109485af8cc632937362e5e03407790ba6bcd985b403811c8183d0e77cbfdcf730f68f1871e3562b02bffb519be733d2f64965b64634b531864adf69a
7
+ data.tar.gz: 2dd7c656477fe49b58e4ff7ef8b0c74c71ff527e8f0894043861fc8db5b6a4d7ccc0354b69e69c0463e1c5c5e03a7f1392105284fb7297794a251cf97abe0105
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # Changelog
2
2
 
3
3
  ## Unreleased
4
- [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.22.0...main)
4
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.22.1...main)
5
+
6
+ ## v0.22.1 — 2026-11-12
7
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.22.0...v0.22.1)
8
+ - Distinguish seeded runs from runs awaiting their first seed and correct worker status while waiting for work — [#205](https://github.com/danielwestendorf/specwrk/pull/205) by [@danielwestendorf](https://github.com/danielwestendorf)
5
9
 
6
10
  ## v0.22.0 — 2026-11-02
7
11
  [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.21.4...v0.22.0)
@@ -107,6 +107,11 @@ module Specwrk
107
107
  bucket_ids.length
108
108
  end
109
109
 
110
+ def empty?
111
+ # The backing store retains configuration even when no work remains.
112
+ bucket_ids.empty?
113
+ end
114
+
110
115
  private
111
116
 
112
117
  def write_bucket(examples)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Specwrk
4
- VERSION = "0.22.0"
4
+ VERSION = "0.22.1"
5
5
  end
@@ -132,11 +132,15 @@ module Specwrk
132
132
  end
133
133
 
134
134
  def worker_status
135
- return 0 if worker[:failed].nil? && completed.any? # worker starts after run has completed
135
+ return 0 if worker[:failed].nil? && seeded?
136
136
 
137
137
  worker[:failed] || 1
138
138
  end
139
139
 
140
+ def seeded?
141
+ !pending[PendingStore::MAX_RETRIES_KEY].nil?
142
+ end
143
+
140
144
  def worker_store_for(id)
141
145
  WorkerStore.new(ENV.fetch("SPECWRK_SRV_STORE_URI", "memory:///"), File.join(run_id, "workers", id))
142
146
  end
@@ -11,7 +11,7 @@ module Specwrk
11
11
  def with_pop_response
12
12
  if examples.any?
13
13
  [200, {"content-type" => "application/json"}, [JSON.generate(examples)]]
14
- elsif pending.empty? && processing.empty? && completed.empty?
14
+ elsif !seeded?
15
15
  [204, {}, []]
16
16
  elsif completed.any? && processing.empty?
17
17
  [410, {"content-type" => "text/plain"}, ["That's a good lad. Run along now and go home."]]
@@ -15,8 +15,6 @@ module Specwrk
15
15
  failure_counts.clear
16
16
  completed.clear
17
17
 
18
- pending.max_retries = payload.fetch(:max_retries, "0").to_i
19
-
20
18
  metadata.delete("report_json")
21
19
 
22
20
  pending.update_run_time_bucket_maximum(
@@ -26,6 +24,8 @@ module Specwrk
26
24
 
27
25
  with_lock do
28
26
  pending.merge!(examples_with_run_times)
27
+ # Publish the seed marker only after all pending work has been stored.
28
+ pending.max_retries = payload.fetch(:max_retries, "0").to_i
29
29
  end
30
30
 
31
31
  Hooks.run(:after_server_seed, payload[:examples])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specwrk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Westendorf