Class: Aidp::Watch::ImplementationVerifier
- Inherits:
-
Object
- Object
- Aidp::Watch::ImplementationVerifier
- Includes:
- MessageDisplay
- Defined in:
- lib/aidp/watch/implementation_verifier.rb
Overview
Verifies that implementation fully addresses issue requirements using ZFC before allowing PR creation in watch mode build workflow
Constant Summary
Constants included from MessageDisplay
MessageDisplay::COLOR_MAP, MessageDisplay::CRITICAL_TYPES
Instance Method Summary collapse
-
#initialize(repository_client:, project_dir:, ai_decision_engine: nil) ⇒ ImplementationVerifier
constructor
A new instance of ImplementationVerifier.
-
#verify(issue:, working_dir:) ⇒ Object
Verify implementation against issue requirements Returns: { verified: true/false, reason: String, missing_items: Array }.
Methods included from MessageDisplay
#display_message, included, #message_display_prompt, #quiet_mode?
Constructor Details
#initialize(repository_client:, project_dir:, ai_decision_engine: nil) ⇒ ImplementationVerifier
Returns a new instance of ImplementationVerifier.
14 15 16 17 18 |
# File 'lib/aidp/watch/implementation_verifier.rb', line 14 def initialize(repository_client:, project_dir:, ai_decision_engine: nil) @repository_client = repository_client @project_dir = project_dir @ai_decision_engine = ai_decision_engine || build_default_ai_decision_engine end |
Instance Method Details
#verify(issue:, working_dir:) ⇒ Object
Verify implementation against issue requirements Returns: { verified: true/false, reason: String, missing_items: Array }
FIX for issue #391: Enhanced verification to require substantive code changes Rejects implementations that only contain documentation changes
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/aidp/watch/implementation_verifier.rb', line 25 def verify(issue:, working_dir:) Aidp.log_debug("implementation_verifier", "starting_verification", issue: issue[:number], working_dir: working_dir) ("🔍 Verifying implementation completeness...", type: :info) # Gather verification inputs issue_requirements = extract_issue_requirements(issue) implementation_changes = extract_implementation_changes(working_dir) # FIX for issue #391: Check for substantive changes before ZFC verification substantive_check = verify_substantive_changes(implementation_changes, working_dir) unless substantive_check[:has_substantive_changes] Aidp.log_warn( "implementation_verifier", "no_substantive_changes", issue: issue[:number], reason: substantive_check[:reason] ) return { verified: false, reason: substantive_check[:reason], missing_items: ["Substantive code changes required - only documentation/config changes detected"], additional_work: ["Implement the actual code changes described in the issue"] } end # Use ZFC to verify completeness result = perform_zfc_verification( issue_number: issue[:number], issue_requirements: issue_requirements, implementation_changes: implementation_changes ) Aidp.log_info( "implementation_verifier", "verification_complete", issue: issue[:number], verified: result[:verified], reason: result[:reason] ) result end |