Commit Graph

4 Commits

Author SHA1 Message Date
Corey H
626d111cc6 fix(molt): address code review feedback
- Fix: mkdir -p for MOLT_DIR/WORKSPACE_DIR before use
- Fix: Replace broken `source --rollback-internal` with rollback() function
- Fix: Rollback now uses git checkout + reset --hard (no detached HEAD)
- Fix: Auto-switch to expected branch if on wrong branch
- Add: Recovery attempt marker prevents infinite agent loops
- Add: Capture pnpm-install.log and pnpm-build.log for agent context
- Add: Prompt injection guardrails in agent prompts (treat logs as data)
- Remove: Unused PING_TIMEOUT variable
- Change: git diff --stat now uses head -50 instead of tail -20

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:29:43 +00:00
Corey H
c51d9a052c fix(molt): make recovery messages generic for upstream
Replace hardcoded "Corey" references with generic "the user" and
"configured channel" so the script works for any clawdbot user.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:58:54 +00:00
Corey H
3c0ee018f4 feat(molt): add autonomous recovery via clawdbot wake
After a successful rollback, molt now triggers the clawdbot agent to
diagnose and fix the issue. The agent receives crash logs and context,
attempts common fixes, and reports to the user if manual intervention
is needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:58:54 +00:00
Corey H
7a900e90f5 feat: add molt - self-healing update agent
Molt is a self-healing update system for self-hosted Clawdbot instances.
It handles nightly updates from upstream with automatic rollback if
something breaks.

Key features:
- Pulls from upstream, installs deps, builds, restarts gateway
- Health check with stability window (catches crash loops)
- Automatic rollback to pre-update commit on failure
- Module manifest to define what *you* care about (personalized health checks)
- Changelog generation for morning reports
- Agentic recovery philosophy: capture context, let the AI fix edge cases

Files:
- docs/molt.md: Full PRD with architecture, config schema, and rationale
- scripts/molt.sh: Reference implementation (bash)

This is an RFC seeking feedback on approach and integration strategy.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:58:54 +00:00