Our Branch: fix/em-dash-auto-replace (Dec 10, 2025)
Main Branch: main (Dec 8, 2025)
Our branch is more recent than main, but main has important security improvements we should consider.
- Pre-commit hooks for automated security scanning
- Security documentation and incident response procedures
- Secret detection and dependency vulnerability scanning
- Tools: Semgrep, detect-secrets, bandit, safety, black, isort
Files Added:
.pre-commit-config.yaml- Automated security scanningSECURITY.md- Security policies and procedures
Benefits:
- ✅ Automated security scanning before commits
- ✅ SQL injection prevention
- ✅ XSS prevention
- ✅ Secret detection
- ✅ Code formatting automation
- ✅ Professional security practices
- SQL injection and XSS vulnerabilities fixed
- Input validation improvements
- CORS protection enhancements
- Complete migration to Markdown for content generation
- Removal of HTML examples from prompts
- System instruction improvements
Potential Conflict: We have extensive modifications to prompts and content generation. Need to evaluate compatibility.
| Change | Impact | Compatibility | Recommendation |
|---|---|---|---|
| Security Infrastructure | 🟢 High | 🟢 Compatible | ✅ PULL |
| Security Fixes | 🟢 High | 🟢 Compatible | ✅ PULL |
| Markdown Migration | 🟡 Medium | 🟡 Unknown |
# Cherry-pick security commits that won't conflict with our changes
git cherry-pick 0ad5a17 # Security infrastructure
git cherry-pick e56e574 # Security fixesWhy Safe:
- Security files are new additions (
.pre-commit-config.yaml,SECURITY.md) - Security fixes are likely in areas we haven't modified
- No conflicts expected with our architectural fixes
# Check what changed in prompt/content generation
git diff origin/main~3..origin/main -- pipeline/prompts/
git diff origin/main~3..origin/main -- pipeline/blog_generation/Potential Issues:
- Our architectural fixes modify the same files
- Prompt changes might conflict with our grounding URL fixes
- Content generation changes might affect our JSON parsing fixes
- DO Pull: Security infrastructure that doesn't conflict
- DON'T Pull: Content changes that might break our fixes
- EVALUATE: Merge benefits vs risks for each file
We have architectural fixes in:
stage_02_gemini_call.py- Validation thresholds, grounding URLsstage_03_extraction.py- JSON parsing corruption fixgemini_client.py- Grounding URL extractionerror_handling.py- Circuit breaker adjustmentsmain_article.py- Internal linking fixes
Critical: These fixes must be preserved during any integration.
- Pull only security infrastructure files
- Manually review and apply security fixes to our modified files
- Keep our architectural fixes intact
- Test thoroughly
- Merge main branch completely
- Re-apply our architectural fixes on top
- High risk of conflicts and breaking changes
- Requires extensive testing
- Cherry-pick non-conflicting security improvements
- Create a new branch to test Markdown migration
- Selectively integrate beneficial changes
- Maintain our fixes as priority
Pull the security improvements now - they're valuable and safe:
# 1. Stash our current changes
git stash push -m "Our architectural fixes"
# 2. Cherry-pick security commits
git cherry-pick 0ad5a17 # Security infrastructure
git cherry-pick e56e574 # Security fixes (if compatible)
# 3. Restore our changes
git stash pop
# 4. Resolve any conflicts (likely minimal)
# 5. Test everything worksBenefits:
- ✅ Get professional security practices immediately
- ✅ Minimal risk to our working system
- ✅ Easy to implement and test
- ✅ Preserves all our architectural fixes