ctx_runner 0.2.2 → 0.3.0
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/ctx_runner/batch.rb +2 -2
- data/lib/ctx_runner/collection.rb +2 -4
- data/lib/ctx_runner/version.rb +1 -1
- metadata +17 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5f2d2cf623bcbc5860e928ba8fe0ba75c5378f6ac55a499bc2583fdd1020ab7
|
|
4
|
+
data.tar.gz: 40c0d78388da5d9c3f23a5663af51da8e798efc37c4a958795f4768c98b851c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f691084cf2c10d95751751c6beb99c7bcbdb40c7fed75490688ba8406076b652a038c1a9295030a6e93626e9ea8cbc87e702fe85216fa729cd6175cdd45c4598
|
|
7
|
+
data.tar.gz: 222126983e2018e6014136d4ea49b04f3db8bd3720c1e5fff479a5fc5269d942ffa700ed6d94ffe901d05c925bff5a62533e51f37ec08c54ecb83b7416296eaa
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.3.0 (2026-10-29)
|
|
6
|
+
|
|
7
|
+
- Remove `Collection.new(strict:)`: provider contract failures consistently return structured diagnostics without replay and preserve the first failure. Batch consumers now expose `snapshot.observations`.
|
|
8
|
+
|
|
5
9
|
## 0.2.2 (2026-10-25)
|
|
6
10
|
|
|
7
11
|
- Share a single session delivery scope between collection and controlled execution; reject swallowed delivery violations, unfinished operations and cross-thread callbacks without replaying device actions.
|
data/README.md
CHANGED
|
@@ -38,7 +38,7 @@ end
|
|
|
38
38
|
|
|
39
39
|
领域 Profile 实现 `parse_many(names, body, complete:, command:)`;不可用投影接收 `(name, capture, failure)`。一次 Query 对应一条命令,多个视图共享同一份 Capture。
|
|
40
40
|
|
|
41
|
-
`Collection.new
|
|
41
|
+
`Collection.new` 统一记录 session_not_opened/session_reentered,保留首次失败且不重放;strict: 参数已移除。批次快照统一提供 observations Ruby 成员,输出文档仍保留 dimensions 字段。交付块未正常完成但异常被连接器吞掉时记录 session_incomplete;跨线程交付记录 session_out_of_scope,并拒绝执行领域块。连接关闭错误不会覆盖已完成的领域事实或先前交付故障。借用会话直接使用 Reader/Query,无需再进入 Collection。
|
|
42
42
|
|
|
43
43
|
Collection 与 Execution 共用 `SessionScope`。会话必须由创建流程的线程同步交付;并行调度应在每个设备任务内部创建流程。重复交付的异常即使被提供方吞掉,流程仍不能报告完成;所有者退出后保留的回调立即失效。作用域不持有或关闭会话,连接清理仍由连接器负责。跨模块职责、业务原子边界与领域拆分见 [模块设计](docs/module-boundaries.md)。
|
|
44
44
|
|
data/lib/ctx_runner/batch.rb
CHANGED
|
@@ -87,10 +87,10 @@ module CtxRunner
|
|
|
87
87
|
snapshot = nil
|
|
88
88
|
begin
|
|
89
89
|
snapshot = yield
|
|
90
|
-
dimensions = snapshot.
|
|
90
|
+
dimensions = snapshot.observations.transform_values do |value|
|
|
91
91
|
{ status: value.status, records: value.records.size, issues: value.issues.map { |issue| issue[:code] }.uniq }
|
|
92
92
|
end
|
|
93
|
-
result = { device: device, status: snapshot.
|
|
93
|
+
result = { device: device, status: snapshot.observations.fetch(:collection).status, dimensions: dimensions }
|
|
94
94
|
rescue StandardError => error
|
|
95
95
|
result = { device: device, status: :failed, error: CtxDriver::Failure.code(error, :collection_failed), dimensions: {} }
|
|
96
96
|
end
|
|
@@ -8,9 +8,8 @@ module CtxRunner
|
|
|
8
8
|
class Collection
|
|
9
9
|
attr_reader :failure, :stage
|
|
10
10
|
|
|
11
|
-
def initialize
|
|
12
|
-
|
|
13
|
-
@strict, @used = strict, false
|
|
11
|
+
def initialize
|
|
12
|
+
@used = false
|
|
14
13
|
@stage = :connect
|
|
15
14
|
end
|
|
16
15
|
|
|
@@ -53,7 +52,6 @@ module CtxRunner
|
|
|
53
52
|
end
|
|
54
53
|
|
|
55
54
|
def contract_failure(code)
|
|
56
|
-
raise ArgumentError, "Connector must provide one session" if @strict
|
|
57
55
|
@failure ||= { code: code, stage: stage }.freeze
|
|
58
56
|
end
|
|
59
57
|
end
|
data/lib/ctx_runner/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ctx_runner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gatework contributors
|
|
@@ -15,28 +15,40 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 0.3.0
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '0.4'
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
25
|
requirements:
|
|
23
26
|
- - ">="
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
28
|
+
version: 0.3.0
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '0.4'
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
33
|
name: ctx_driver
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
|
29
35
|
requirements:
|
|
30
36
|
- - ">="
|
|
31
37
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
38
|
+
version: 0.3.0
|
|
39
|
+
- - "<"
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '0.4'
|
|
33
42
|
type: :runtime
|
|
34
43
|
prerelease: false
|
|
35
44
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
45
|
requirements:
|
|
37
46
|
- - ">="
|
|
38
47
|
- !ruby/object:Gem::Version
|
|
39
|
-
version:
|
|
48
|
+
version: 0.3.0
|
|
49
|
+
- - "<"
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '0.4'
|
|
40
52
|
- !ruby/object:Gem::Dependency
|
|
41
53
|
name: digest
|
|
42
54
|
requirement: !ruby/object:Gem::Requirement
|