featureparity 0.0.39 → 0.0.40
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/lib/fp/commands/check.rb +1 -1
- data/lib/fp/commands/list.rb +4 -2
- data/lib/fp/commands/show.rb +3 -0
- data/lib/fp/commands/surfaces.rb +61 -6
- data/lib/fp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9dd6a510da7bd07c87ce3c58eaa05dcd3facc6c46f3faa912f4f10680e5880de
|
|
4
|
+
data.tar.gz: 5785e9baf74b9eb8721dca68c1e86b44e6ab69ead5ff596145816c81db8dc85b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b690ed24b1913f26f8a58c3610ef4e16e158f28919c1b8b0548eefef0254fe6bd58d41f2d86fa2a014e7f22a5020eb12eed60ee85e9cbb0c5c71861efb37429
|
|
7
|
+
data.tar.gz: 62eb7f052c5bf00cfd4d1c39c9f6b8dbae3d6e7db84c2348b8aff8c51cc0301f439f7a52c69b2a0488006c9ebe7a66779a08bdcd1e1e12709cd25010b013ae65
|
data/lib/fp/commands/check.rb
CHANGED
|
@@ -330,7 +330,7 @@ module Fp
|
|
|
330
330
|
pending.map { |p| [p['slug'], p['kind'], truncate(p['title'].to_s, 48)] }
|
|
331
331
|
)
|
|
332
332
|
puts 'These still count toward the gate — proposing a change is not a way out of it.'
|
|
333
|
-
puts "
|
|
333
|
+
puts "Review the proposal: fp history <slug>#{project_scope(project_slug)}"
|
|
334
334
|
puts
|
|
335
335
|
end
|
|
336
336
|
|
data/lib/fp/commands/list.rb
CHANGED
|
@@ -273,8 +273,10 @@ module Fp
|
|
|
273
273
|
'so nothing can cover them.'
|
|
274
274
|
end
|
|
275
275
|
# Gaps are counted on approved requirements. A project that is all drafts has
|
|
276
|
-
# none of those, which is not the same as having nothing left to test.
|
|
277
|
-
|
|
276
|
+
# none of those, which is not the same as having nothing left to test. Show the
|
|
277
|
+
# hint whether or not a surface filter is in force (Fizzy #2076): a surface
|
|
278
|
+
# from .featureparity.yml is still "inside a repo with no approved requirements".
|
|
279
|
+
if (report['summary'] || {})['requirements'].to_i.zero?
|
|
278
280
|
puts 'No requirement has been approved yet, so there is nothing to measure. ' \
|
|
279
281
|
'Drafts with no test: fp list --status draft --gaps, or fp coverage.'
|
|
280
282
|
end
|
data/lib/fp/commands/show.rb
CHANGED
|
@@ -135,6 +135,9 @@ module Fp
|
|
|
135
135
|
else
|
|
136
136
|
surfaces.each { |s| puts " - #{s}" }
|
|
137
137
|
end
|
|
138
|
+
if req['pending_change_kind'] == 'modification' && Parity.under_review?(req)
|
|
139
|
+
puts ' (Surfaces may change — a proposal is awaiting review)'
|
|
140
|
+
end
|
|
138
141
|
puts
|
|
139
142
|
|
|
140
143
|
# Required test types: the kinds of test that must each cover this requirement on
|
data/lib/fp/commands/surfaces.rb
CHANGED
|
@@ -237,6 +237,24 @@ module Fp
|
|
|
237
237
|
if source_surface && !opts[:evaluate]
|
|
238
238
|
drafted, gaps, skipped = draft_requirements_from_surface(project_id, opts[:project], surface, candidates,
|
|
239
239
|
opts[:from], key)
|
|
240
|
+
|
|
241
|
+
# If nothing was drafted (all skipped or errored), delete the surface and fail.
|
|
242
|
+
# The 0.0.36 changelog and the skill both promise "creates nothing when it has
|
|
243
|
+
# nothing to carry over" (Fizzy #2076).
|
|
244
|
+
if drafted.empty?
|
|
245
|
+
delete_result = client.delete_surface(project_id, surface['id'])
|
|
246
|
+
unless delete_result[:ok]
|
|
247
|
+
warn "Warning: could not clean up surface '#{key}': #{delete_result[:error]}"
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
output.error(
|
|
251
|
+
"No requirement on '#{opts[:from]}' could be drafted for '#{key}'. " \
|
|
252
|
+
"Nothing was created. #{skipped_summary(skipped)}" \
|
|
253
|
+
"To add the surface without drafting any requirements: " \
|
|
254
|
+
"fp surfaces add #{key} --project #{opts[:project]}"
|
|
255
|
+
)
|
|
256
|
+
exit 1
|
|
257
|
+
end
|
|
240
258
|
end
|
|
241
259
|
|
|
242
260
|
response_data = result[:data].merge('drafted' => drafted, 'gaps' => gaps)
|
|
@@ -551,7 +569,7 @@ module Fp
|
|
|
551
569
|
return unless drafted.any?
|
|
552
570
|
|
|
553
571
|
puts
|
|
554
|
-
puts '⚠️ These are now
|
|
572
|
+
puts '⚠️ These are now proposals awaiting human review.'
|
|
555
573
|
puts ' A human must approve each change in the web app before the surface is measured.'
|
|
556
574
|
end
|
|
557
575
|
|
|
@@ -798,10 +816,28 @@ module Fp
|
|
|
798
816
|
# Runs before the surface is created: a project without AI access is told once and
|
|
799
817
|
# the command exits 1 with nothing made, as `fp analyze` does.
|
|
800
818
|
def evaluate_requirements_for_surface!(candidates, source_key, new_surface_key)
|
|
801
|
-
|
|
819
|
+
# Check AI access first, before printing any progress (Fizzy #2076). The first
|
|
820
|
+
# candidate's check surfaces any account-level block (402) so the error appears
|
|
821
|
+
# alone, not after a "Evaluating..." line that looked like it was about to work.
|
|
822
|
+
# Reuse the result for the first candidate so we don't double-call the API.
|
|
823
|
+
precheck_result = nil
|
|
824
|
+
if candidates.any?
|
|
825
|
+
precheck_result = client.evaluate_surface_applicability(candidates.first['id'], new_surface_key, source_key)
|
|
826
|
+
if !precheck_result[:ok] && EVALUATION_BLOCKED.include?(precheck_result[:status])
|
|
827
|
+
output.error(
|
|
828
|
+
"#{precheck_result[:error]} Nothing was created. Without --evaluate, " \
|
|
829
|
+
"fp surfaces add #{new_surface_key} --from #{source_key} drafts every requirement on '#{source_key}' for review.",
|
|
830
|
+
status: precheck_result[:status]
|
|
831
|
+
)
|
|
832
|
+
exit 1
|
|
833
|
+
end
|
|
834
|
+
end
|
|
835
|
+
|
|
836
|
+
candidates.each_with_index.map do |req, index|
|
|
802
837
|
progress("Evaluating #{req['slug']} ...")
|
|
803
838
|
|
|
804
|
-
|
|
839
|
+
# Reuse the precheck result for the first candidate
|
|
840
|
+
eval_result = index.zero? && precheck_result ? precheck_result : client.evaluate_surface_applicability(req['id'], new_surface_key, source_key)
|
|
805
841
|
|
|
806
842
|
if eval_result[:ok]
|
|
807
843
|
evaluation = eval_result[:data]['evaluation'] || {}
|
|
@@ -881,22 +917,41 @@ module Fp
|
|
|
881
917
|
puts "Drafted #{drafted.size} requirement(s) from '#{source_key}' to include '#{new_key}':"
|
|
882
918
|
drafted.each { |req| puts " - #{req['slug']}: #{truncate(req['title'], 50)}" }
|
|
883
919
|
puts
|
|
884
|
-
puts '⚠️ These are now
|
|
920
|
+
puts '⚠️ These are now proposals awaiting human review.'
|
|
885
921
|
puts ' A human must approve each change in the web app before the surface is measured.'
|
|
886
922
|
end
|
|
887
923
|
|
|
888
924
|
SKIP_REASONS = {
|
|
889
925
|
'has_pending_change' => 'already has a change awaiting review',
|
|
890
926
|
'already_includes_surface' => 'already names this surface',
|
|
891
|
-
'archived' => 'archived'
|
|
927
|
+
'archived' => 'archived',
|
|
928
|
+
'parent_skipped' => 'parent was skipped'
|
|
892
929
|
}.freeze
|
|
893
930
|
|
|
931
|
+
# Build a brief summary of skip reasons for the error message when nothing is drafted.
|
|
932
|
+
def skipped_summary(skipped)
|
|
933
|
+
return '' if skipped.empty?
|
|
934
|
+
|
|
935
|
+
by_reason = skipped.group_by { |row| row['reason'] }
|
|
936
|
+
parts = by_reason.map do |reason, rows|
|
|
937
|
+
"#{rows.size} #{SKIP_REASONS[reason] || reason}"
|
|
938
|
+
end
|
|
939
|
+
"#{skipped.size} skipped (#{parts.join(', ')}). "
|
|
940
|
+
end
|
|
941
|
+
|
|
894
942
|
def print_skipped_requirements(skipped)
|
|
895
943
|
return if skipped.empty?
|
|
896
944
|
|
|
897
945
|
puts
|
|
898
946
|
puts "Skipped (#{skipped.size}):"
|
|
899
|
-
skipped.each
|
|
947
|
+
skipped.each do |row|
|
|
948
|
+
reason = SKIP_REASONS[row['reason']] || row['reason']
|
|
949
|
+
# Show the parent slug when a child was skipped because its parent was
|
|
950
|
+
if row['reason'] == 'parent_skipped' && row['parent_slug']
|
|
951
|
+
reason = "#{reason} (#{row['parent_slug']})"
|
|
952
|
+
end
|
|
953
|
+
puts " - #{row['slug']}: #{reason}"
|
|
954
|
+
end
|
|
900
955
|
end
|
|
901
956
|
|
|
902
957
|
def print_gap_list(gaps, new_key)
|
data/lib/fp/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: featureparity
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.40
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stowzilla
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-http
|