Class: Ace::Review::CLI::Commands::FeedbackSubcommands::Skip

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
SessionDiscovery, Support::Cli::Base
Defined in:
lib/ace/review/cli/commands/feedback/skip.rb

Overview

ace-support-cli Command class for feedback skip

Skips a feedback item (marks as not applicable).

Instance Method Summary collapse

Methods included from SessionDiscovery

#find_all_sessions, #find_latest_session, #resolve_feedback_path, #resolve_session_dir

Instance Method Details

#call(id:, **options) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/ace/review/cli/commands/feedback/skip.rb', line 54

def call(id:, **options)
  # Show deprecation warning (unless quiet)
  unless quiet?(options)
    puts "[DEPRECATED] 'skip' command is deprecated. Use: verify --skip --research \"...\""
  end

  # Map --reason to --research for consistency
  research = options[:research] || options[:reason]

  # Resolve feedback path from session context
  base_path = resolve_feedback_path(options)

  unless base_path
    raise Ace::Support::Cli::Error.new("No session found. Run a review first or use --session to specify path.")
  end

  debug_log("Feedback base path: #{base_path}", options)

  # Find item first for partial ID matching
  resolved_id = resolve_full_id(base_path, id)

  unless resolved_id
    raise Ace::Support::Cli::Error.new("Feedback item not found: #{id}")
  end

  # Skip the item using the new verify method with skip: true
  manager = Organisms::FeedbackManager.new
  result = manager.verify(
    base_path,
    resolved_id,
    skip: true,
    research: research
  )

  if result[:success]
    puts "Feedback #{resolved_id} skipped and archived."
    puts "Research: #{research}" if research && !quiet?(options)
  else
    raise Ace::Support::Cli::Error.new(result[:error])
  end
end