Add automatic problem creation for scheduler failures#4
Merged
Conversation
When scheduled tasks fail, the scheduler now automatically creates problem records in the PROBLEMS table for Arsenale to detect and fix: - Creates problems for all error types: return code failures, missing scripts, exceptions - Applies to both 5-minute and hourly tasks - Includes task name, script path, error details, and last log output - Suggests common solutions (missing files, environment variables, etc.) - Prevents duplicate problems within 1 hour window - Assigns to ConsiglioDeiDieci as system problems This enables Arsenale to autonomously detect and fix scheduler failures, completing the feedback loop for self-healing infrastructure. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <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
Completes the self-healing infrastructure loop by automatically creating problem records when scheduled tasks fail, enabling Arsenale to detect and fix these issues autonomously.
What's New
Automatic Problem Creation
When any scheduled task fails, the scheduler now:
Problem Details Include:
scheduler_failure_YYYYMMDD_HHMMSS_task_namescheduler_task_failureError Types Handled:
Duplicate Prevention
Integration with Arsenale
With this change, Arsenale can now:
This creates a complete feedback loop where the infrastructure can heal itself!
Example Problem Record
{ "ProblemId": "scheduler_failure_20250627_0315_citizen_activity_creation", "Type": "scheduler_task_failure", "Title": "Scheduler Task Failed: Citizen activity creation", "Description": "The scheduled task 'Citizen activity creation' failed...\n\nScript: /path/to/engine/createActivities.py\n\nError: Exception: No module named 'pyairtable'", "Status": "active", "Severity": "High", "Solutions": ["Check if the script exists...", "Review the error message...", "Check for missing dependencies..."] }This enhancement enables La Serenissima's infrastructure to autonomously detect and repair its own scheduled task failures, demonstrating true self-healing capabilities.
🤖 Generated with Claude Code