Objective: Implement a mock analysis solution to enable end-to-end pipeline testing while real Strands integration is developed separately.
- No artificial delay - Process immediately for fast testing
- Immediate response - No simulation of analysis time
- Efficient pipeline - Focus on throughput over realistic timing
- S3 location - Path to analysis results in Drawer bucket
- Repository name - For Deliverer identification and processing
- Commit SHA - Not required in event payload (available in S3 path structure)
- Corrupted workingcopy.zip - Record error in EventBridge for Hermes logging
- Extraction failures - Use CloudWatch for full observability and debugging
- Partial success principle - If something can be delivered, mark as success
- Failure definition - Only fail when nothing can be delivered at all
- Graceful degradation - Deliver whatever analysis results are possible
- Direct storage - README.md stored at
repos/{owner}/{repo}/{commit_sha}/analysis/README.md - Simple structure - No subdirectories for mock implementation
- Clean paths - Consistent with existing Drawer bucket organization
- Single file output - README.md only
- Template content - "This is a mock analysis for repository {repo-owner}/{repo-name}"
- Repository context - Include actual repository information in mock content
- Download workingcopy.zip from S3 Drawer bucket
- Extract ZIP contents to ephemeral storage
- Simulate basic repository inspection (file count, size - optional metadata)
- Generate mock README.md with repository-specific content
- Create README.md with mock analysis content
- Include repository owner and name in content
- Store directly in analysis directory without subdirectories
- Maintain simple, testable output format
- Publish
analysis_readyevent to EventBridge for Deliverer - Include S3 location and repository name in event payload
- Follow Component Task Logging Standard for all processing states
- Use EventBridge for error recording (Hermes integration)
IF workingcopy.zip corrupted OR extraction fails:
- Record error in EventBridge (Hermes logging)
- Log full details in CloudWatch
- Attempt to generate basic README.md if possible
- IF any content can be created: SUCCESS
- IF no content possible: FAILURE with task_failed event
- ✅ Download and extract workingcopy.zip from S3 successfully
- ✅ Generate mock README.md with repository-specific content
- ✅ Store analysis results in S3 analysis directory
- ✅ Publish analysis_ready event with S3 location and repository name
- ✅ Handle corrupted files gracefully with EventBridge error recording
- ✅ Use CloudWatch for comprehensive observability
- ✅ Follow partial success principle - deliver what's possible
1. Receive repo_ready event from EventBridge
2. Publish task_started event
3. Download workingcopy.zip from S3 Drawer
4. Extract ZIP contents (handle corruption gracefully)
5. Generate mock README.md with repository information
6. Upload README.md to S3 analysis directory
7. Publish analysis_ready event (S3 location + repository name)
8. Publish task_completed event
Scenario 1: Corrupted workingcopy.zip
- Record error in EventBridge for Hermes
- Log details in CloudWatch
- Generate basic README.md if repository info available
- SUCCESS if README.md created, FAILURE if not
Scenario 2: S3 upload failure
- Retry upload operation
- Log failure in CloudWatch
- Publish task_failed event if no content delivered
- FAILURE - nothing delivered to analysis directory
Scenario 3: Partial extraction success
- Extract what's possible from workingcopy.zip
- Generate README.md with available information
- SUCCESS - partial content delivered
This mock implementation enables complete pipeline testing while maintaining realistic error handling and observability patterns for production readiness.