feat(validation): add post-execution business task validation (VALIDATE-001) - #344
Merged
Merged
Conversation
…TE-001) Adds a post-execution validation phase that runs a clean-context Claude session to verify business task completion. This separates technical success (Claude ran without errors) from business success (the intended work was done). Backend: - Add ValidationService with auditor-framed prompt - Add /api/internal/validate-execution endpoint for scheduler - Add business_status field to executions (pending_validation, validated, failed_validation, skipped) - Add validation config to schedules (validation_enabled, validation_prompt, validation_timeout_seconds) - Add linked validation execution records via validates_execution_id/validation_execution_id - Operator queue notification on validation failure Scheduler: - Trigger validation after successful execution completion - Call backend internal API for validation orchestration Database: - Migration #32 adds validation columns to schedules and executions tables - Add indexes for business_status and validates_execution_id Tests: - Add test_validation.py with unit tests for prompt building, response parsing, status mapping - Integration tests for schedule/execution API contracts Closes #294 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
business_statusfield and linked validation execution recordsChanges
Backend:
src/backend/services/validation_service.py— Core validation service with auditor promptsrc/backend/routers/internal.py—/api/internal/validate-executionendpointsrc/backend/routers/schedules.py— Updated response models with validation fieldssrc/backend/db/schedules.py— New DB operations for validationsrc/backend/db/schema.py— Validation columns in schedules/executionssrc/backend/db/migrations.py— Migration Quick Instance Deploy #32Scheduler:
src/scheduler/service.py— Trigger validation after successful executionTests:
tests/test_validation.py— Unit tests (19 passed, 3 skipped)Docs:
docs/memory/feature-flows/business-validation.md— Feature flow documentationTest Plan
pytest tests/test_validation.py -v(19 passed)validation_enabled=true, trigger, verify validation runsCloses #294
Generated with Claude Code