Skip to content

feat: add workflow improvements and retry mechanisms for Factory AI#3

Merged
xrey167 merged 3 commits intomainfrom
claude/github-userstory-factory-workflow-011CUodBcpPZVPaercqJsJvE
Nov 4, 2025
Merged

feat: add workflow improvements and retry mechanisms for Factory AI#3
xrey167 merged 3 commits intomainfrom
claude/github-userstory-factory-workflow-011CUodBcpPZVPaercqJsJvE

Conversation

@xrey167
Copy link
Copy Markdown
Owner

@xrey167 xrey167 commented Nov 4, 2025

This commit enhances the Factory AI User Story Workflow with:

New Features

  • Git push retry mechanism with exponential backoff (2s, 4s, 8s, 16s)
  • Git fetch retry mechanism with exponential backoff
  • Branch name validation in retry scripts
  • Comprehensive workflow improvements documentation

Files Added

  • .github/scripts/git-push-with-retry.sh: Robust git push with retry logic
  • .github/scripts/git-fetch-with-retry.sh: Robust git fetch with retry logic
  • docs/WORKFLOW_IMPROVEMENTS.md: Complete guide for workflow enhancements
  • .github/workflows/userstory-factory-workflow-improved.yml.example: Example workflow with improvements

Documentation Updates

  • Updated README.md with links to improvement docs
  • Added integration examples for retry scripts
  • Documented 10+ workflow enhancement patterns

Benefits

  • Improved reliability with network error handling
  • Better error reporting and user feedback
  • Performance optimizations with caching
  • Enhanced security checks
  • Comprehensive testing strategies

See docs/WORKFLOW_IMPROVEMENTS.md for detailed usage instructions.

## 📋 Zusammenfassung

Kurze Beschreibung der Änderungen

🔗 Verknüpfte Issues

Closes #issue-nummer
Related to #issue-nummer

🎯 Art der Änderung

  • 🐛 Bug Fix (non-breaking change die ein Problem löst)
  • ✨ Neues Feature (non-breaking change die Funktionalität hinzufügt)
  • 💥 Breaking Change (fix oder feature die bestehende Funktionalität beeinträchtigen würde)
  • 📝 Dokumentation Update
  • 🔧 Konfiguration/Build-Änderung
  • ♻️ Code Refactoring
  • ⚡ Performance Verbesserung
  • 🧪 Tests hinzugefügt/aktualisiert

✅ Checklist

Entwicklung

  • Code folgt den Projekt-Style-Guidelines
  • Self-review des eigenen Codes durchgeführt
  • Code ist gut kommentiert, besonders bei komplexer Logik
  • Entsprechende Änderungen an der Dokumentation vorgenommen
  • Keine neuen Warnings durch die Änderungen

Testing

  • Tests hinzugefügt die beweisen, dass der Fix funktioniert oder das Feature implementiert ist
  • Neue und bestehende Unit Tests laufen lokal mit den Änderungen
  • Abhängige Änderungen wurden zusammengeführt und veröffentlicht

Deployment

  • Änderungen wurden lokal getestet
  • Änderungen funktionieren in Staging-Umgebung
  • Migration/Setup-Scripts funktionieren korrekt (falls zutreffend)

🧪 Test-Beschreibung

Beschreiben Sie die Tests, die Sie durchgeführt haben, um Ihre Änderungen zu verifizieren.

Test-Konfiguration

  • Browser/OS:
  • Node Version:
  • Test-Framework Version:

📸 Screenshots (falls UI-Änderungen)

Vorher Nachher
alt alt

📝 Zusätzliche Notizen

Fügen Sie hier weitere Notizen, Überlegungen oder Diskussionspunkte hinzu.

👥 Reviewer

@mention-relevant-reviewers


Definition of Done:

  • Code Review abgeschlossen und genehmigt
  • Alle Tests bestanden (Unit, Integration, E2E)
  • Dokumentation aktualisiert
  • Security Review abgeschlossen (bei kritischen Änderungen)
  • Performance-Impact bewertet (bei größeren Änderungen)

claude and others added 3 commits November 4, 2025 22:24
This commit enhances the Factory AI User Story Workflow with:

## New Features
- Git push retry mechanism with exponential backoff (2s, 4s, 8s, 16s)
- Git fetch retry mechanism with exponential backoff
- Branch name validation in retry scripts
- Comprehensive workflow improvements documentation

## Files Added
- `.github/scripts/git-push-with-retry.sh`: Robust git push with retry logic
- `.github/scripts/git-fetch-with-retry.sh`: Robust git fetch with retry logic
- `docs/WORKFLOW_IMPROVEMENTS.md`: Complete guide for workflow enhancements
- `.github/workflows/userstory-factory-workflow-improved.yml.example`: Example workflow with improvements

## Documentation Updates
- Updated README.md with links to improvement docs
- Added integration examples for retry scripts
- Documented 10+ workflow enhancement patterns

## Benefits
- Improved reliability with network error handling
- Better error reporting and user feedback
- Performance optimizations with caching
- Enhanced security checks
- Comprehensive testing strategies

See docs/WORKFLOW_IMPROVEMENTS.md for detailed usage instructions.
…kflow

This commit integrates all workflow improvements directly into the main workflow:

## Retry Mechanisms
- Git push operations now use git-push-with-retry.sh with exponential backoff
- Automatic retry on network failures (2s, 4s, 8s, 16s delays)
- Applied to 2 critical push operations (planning and verification phases)

## Error Handling
- Added comprehensive error comments for each phase:
  - Planning phase errors
  - Implementation phase errors
  - Test phase errors
  - Verification phase errors
- Each error comment includes:
  - Direct link to workflow run
  - Common causes
  - Next steps for resolution

## Performance Optimizations
- Added timeout-minutes to all jobs:
  - validate-user-story: default (6h)
  - plan-implementation: 20 minutes
  - implement-story: 30 minutes
  - write-tests: 25 minutes
  - verify-acceptance-criteria: 25 minutes
  - create-pull-request: 10 minutes
  - notify-completion: 5 minutes
- Implemented npm caching for 3 jobs (impl, tests, verify)
- Cache keys are job-specific to avoid conflicts

## Manual Re-Trigger Support
- Added workflow_dispatch trigger
- Allows manual workflow execution with issue_number input
- Useful for retrying failed workflows

## Enhanced Reporting
- Complete workflow summary at the end
- Visual status table for all phases
- Posted as GitHub Actions Summary and issue comment
- Shows overall success/failure status

## Benefits
- Improved reliability with automatic retries
- Better error visibility and debugging
- Faster workflow execution with caching
- Enhanced user feedback throughout process
- Manual control when needed

All improvements are production-ready and backward compatible.
@xrey167 xrey167 merged commit 8524579 into main Nov 4, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants