lex-codegen 0.2.0 → 0.2.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2e30c960afc4038c2b8f08bf3d24d10885fff4337bee37dd9801d7d20c34472
|
|
4
|
+
data.tar.gz: e304453e246016cc9103929ac502163c3b00cd3b1c1362cea2948b016a16c6ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed9d68924f40f3cfe096c5f6e5588afabdfe4e4aa746ec1b321343021e9cf51b694d59ebe058f84835c680fe375ff59a98d13393847b5c9215b456db78a0c760
|
|
7
|
+
data.tar.gz: 1fb2feefe815838c4e9211f7b1b3eb463afd2dc644d19a9a5cafa4a2f9821822c3d251fcef377ca25d37f40d713f5fb3879f2ba82762f817c504bbf7d0071da4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.1] - 2026-03-26
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- `Actor::GapSubscriber` now enforces `corroboration.min_agents` threshold before boosting gap priority (default 2)
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- Expanded Apollo corroboration test coverage: boost values, cap at 1.0, unique provider counting, and edge cases (17 specs)
|
|
10
|
+
|
|
3
11
|
## [0.2.0] - 2026-03-26
|
|
4
12
|
|
|
5
13
|
### Added
|
|
@@ -12,7 +12,7 @@ module Legion
|
|
|
12
12
|
|
|
13
13
|
ingest_gap_to_apollo(gap)
|
|
14
14
|
corroboration_count = query_corroboration(gap)
|
|
15
|
-
gap = boost_priority(gap, corroboration_count) if corroboration_count
|
|
15
|
+
gap = boost_priority(gap, corroboration_count) if corroboration_count >= min_agents
|
|
16
16
|
|
|
17
17
|
result = Runners::FromGap.generate(gap: gap)
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ module Legion
|
|
|
20
20
|
|
|
21
21
|
result
|
|
22
22
|
rescue StandardError => e
|
|
23
|
-
|
|
23
|
+
log&.warn("GapSubscriber failed: #{e.message}")
|
|
24
24
|
{ success: false, error: e.message }
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -47,7 +47,7 @@ module Legion
|
|
|
47
47
|
source: { provider: node_name, channel: 'gap_detector' }
|
|
48
48
|
)
|
|
49
49
|
rescue StandardError => e
|
|
50
|
-
|
|
50
|
+
log&.debug("GapSubscriber: Apollo ingest failed: #{e.message}")
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
def query_corroboration(gap)
|
|
@@ -62,7 +62,7 @@ module Legion
|
|
|
62
62
|
results = result[:results] || []
|
|
63
63
|
results.map { |r| r.dig(:source, :provider) }.compact.uniq.size
|
|
64
64
|
rescue StandardError => e
|
|
65
|
-
|
|
65
|
+
log&.debug("GapSubscriber: Apollo query failed: #{e.message}")
|
|
66
66
|
0
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -85,6 +85,14 @@ module Legion
|
|
|
85
85
|
Legion::Settings.dig(:codegen, :self_generate, :corroboration, :apollo_query_before_generate) != false
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
+
def min_agents
|
|
89
|
+
if defined?(Legion::Settings)
|
|
90
|
+
Legion::Settings.dig(:codegen, :self_generate, :corroboration, :min_agents) || 2
|
|
91
|
+
else
|
|
92
|
+
2
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
88
96
|
def priority_boost_per_agent
|
|
89
97
|
if defined?(Legion::Settings)
|
|
90
98
|
Legion::Settings.dig(:codegen, :self_generate, :corroboration, :priority_boost_per_agent) || 0.15
|
|
@@ -96,6 +104,12 @@ module Legion
|
|
|
96
104
|
def node_name
|
|
97
105
|
defined?(Legion::Settings) ? (Legion::Settings.dig(:node, :name) || 'unknown') : 'unknown'
|
|
98
106
|
end
|
|
107
|
+
|
|
108
|
+
def log
|
|
109
|
+
return unless defined?(Legion::Logging)
|
|
110
|
+
|
|
111
|
+
Legion::Logging
|
|
112
|
+
end
|
|
99
113
|
end
|
|
100
114
|
end
|
|
101
115
|
end
|
|
@@ -18,9 +18,17 @@ module Legion
|
|
|
18
18
|
|
|
19
19
|
Runners::ReviewHandler.handle_verdict(review: review)
|
|
20
20
|
rescue StandardError => e
|
|
21
|
-
|
|
21
|
+
log&.warn("ReviewSubscriber failed: #{e.message}")
|
|
22
22
|
{ success: false, error: e.message }
|
|
23
23
|
end
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
def log
|
|
28
|
+
return unless defined?(Legion::Logging)
|
|
29
|
+
|
|
30
|
+
Legion::Logging
|
|
31
|
+
end
|
|
24
32
|
end
|
|
25
33
|
end
|
|
26
34
|
end
|