Two fixes:
1. Remove _run_memory_check() from trigger startup handler — rollover no
longer fires on every drone command. Rollover is now on-demand only
(drone @memory rollover) or via the watcher daemon. This eliminates the
noisy "Memory - Rollover Execution" banner from every drone invocation.
2. Add sentence-transformers>=2.0 to pyproject.toml [memory] extras — the
embedding subprocess was failing because torch/sentence-transformers
were missing from the dependency list. chromadb alone is insufficient;
the custom embed_subprocess.py requires sentence-transformers directly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ai_mail moved deliver_email_to_branch from modules.email to
handlers.email.delivery. The modules-level re-export is now in
email_send.py. Updated 3 source files + 4 test mock paths.
367 tests passing, seedgo 100%.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix check_and_rollover → run_rollover import in startup.py (type error)
- Remove dead _is_duplicate_error() from log_watcher.py + 3 tests (unused_function)
- Add logger.warning on silent catch in watchers/log_watcher.py (silent_catch)
- Update README date to 2026-04-22 (readme)
- All 24 seedgo categories at 100%, 367 tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(system): fix(windows-ci): combine pip bootstrap fix + venv activation in Verify step
Combines both fixes needed to get windows-test.yml actually passing:
1. setup.sh: stop swallowing ensurepip errors (quiet + 2>/dev/null + || true was
hiding real failures — pip was silently not installed). Add get-pip.py fallback
and hard pip verification.
2. windows-test.yml: add 'source .venv/Scripts/activate' to Verify step. Each CI
step gets a fresh shell — setup.sh's venv activation doesn't carry over, so
drone wasn't on PATH in the subsequent step.
Together, these should take Windows CI from the 'silent failure every run since
creation' state to actually green. Supersedes PRs #330 and #331 which had the
fixes on separate branches (neither green alone).
Co-Authored-By: @devpulse <devpulse@aipass>
* feat(system): chore(lint): ruff auto-fix sweep — 303 errors across 178 files (F401 unused imports + F541 f-string placeholders + F811 redefined); restored report_error re-export + added logger call in errors.py
Co-Authored-By: @devpulse <devpulse@aipass>
---------
Co-authored-by: @devpulse <devpulse@aipass>
* feat(system): ci: add Windows setup test workflow — runs setup.sh + drone CLI verification on windows-latest GitHub Actions runner. Triggers on changes to setup.sh, handler __init__.py files, cli.py, or pyproject.toml. Closes the 'we never tested on Windows' gap.
Co-Authored-By: @devpulse <devpulse@aipass>
* feat(system): fix(windows): SIGPIPE guard in flow.py (#301) + fcntl platform guards in trigger/config.py and watchdog/registry.py (#302) — lazy import fcntl on Unix only, no-op on Windows. inbox_lock.py already cross-platform (msvcrt). ai_mail.py already guarded (hasattr check).
Co-Authored-By: @devpulse <devpulse@aipass>
* feat(system): fix(windows): handler guard backslash path fix — all 11 __init__.py files (#304). caller_file.replace('\\', '/') normalizes Windows paths before the same-branch check. This is the actual fix for #293 which was incorrectly closed. drone is completely broken on Windows without this.
Co-Authored-By: @devpulse <devpulse@aipass>
---------
Co-authored-by: @devpulse <devpulse@aipass>
TRIGGER_ROOT.parent.parent resolves to src/, not the project root.
Fix to TRIGGER_ROOT.parent.parent.parent so all three SYSTEM_LOGS_DIR
constants resolve to /home/patrick/Projects/AIPass/system_logs.
Fixes recurring 'Failed to start log watcher' on every service start.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removed 10 orphaned functions/constants left after DPLAN-0112 Option C stripped
dispatch: _find_repo_root, _is_medic_enabled, _is_branch_muted,
_get_registered_emails, _is_rate_limited, _record_dispatch, _log_suppression,
_build_notification_message, and associated constants. Handler now only uses
_log_warning + json_handler. 370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extracted _restore_fingerprint_tracking() helper and flattened early-return
guards to reduce nesting depth from 5 to 3. Seedgo deep_nesting now passes.
370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
_fire_to_handlers now tracks consecutive failures per handler. After 5
consecutive failures, the handler is auto-disabled (skipped) and a CRITICAL
log is emitted. Success resets the failure count. Disabled handlers re-enable
on process restart (in-memory tracking). Prevents broken handlers from
flooding logs forever. 370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Moved CB state from trigger_config.json to dedicated trigger_cb_state.json.
Now persists full state: recent_errors timestamps, half_open_allow, summary_sent,
and per-fingerprint dispatch tracking (last_dispatch + count). Restored on
startup. record_dispatch() now triggers persist. Uses atomic_write_json +
json_file_lock. Module-level dict init moved before CB load so fingerprint
data restores correctly. 370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added json_file_lock() context manager to config.py using fcntl.flock
with .lock sidecar files. Wrapped all read-modify-write cycles:
- error_registry.py: report(), _save/_clear_circuit_breaker_state()
- medic_state.py: set_enabled(), mute_branch(), unmute_branch()
- log_watcher.py: _save_seen_hashes(), _save_log_positions()
Combined with existing atomic_write_json for both concurrency and crash safety.
370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
error_logged.py handler stripped to monitor-only (log event, no email/dispatch).
Centralized watcher (watchers/log_watcher.py) now calls registry_report() +
fires error_detected for ERROR-level lines, routing through full Medic v2
pipeline (count threshold, circuit breaker, fingerprint backoff). Falls back
to error_logged (monitor-only) if registry unavailable. 370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
report_error() and log_watcher primary path both had a gate that only fired
error_detected at count==1 (new) and count==2 (exact match). After count
passed 2, the event never fired again, so the handler's backoff logic never
got a chance to re-dispatch. Fix: always fire the event and let the
error_detected handler's Medic v2 gating (circuit breaker, backoff, rate
limiting) decide. 370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fallback path in log_watcher._process_log_line() used _is_duplicate_error()
to skip repeated errors entirely. This prevented registry count from incrementing
past 1, so dispatch (which requires count>=2) never fired. Fix: retry lazy
registry import in fallback path; if truly unavailable, track count locally
and fire event with count so error_detected handler can apply threshold.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After delivering error notification email, now calls wake_branch() to spawn
an agent in the target branch immediately. Changes reply_to from @trigger
to @devpulse so resolution reports go to devpulse. 370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All 11 JSON write locations across 7 files now use write-to-tmp + os.replace
pattern via shared atomic_write_json() in config.py. Prevents file corruption
if the process crashes mid-write. Updated 8 test files to provide the real
atomic_write_json on mocked config modules. 370 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 📝 docs(STATUS): update last sync timestamp
- update last sync timestamp to reflect recent status synchronization
* feat(trigger): audit cleanup — fix timestamp parsing, CLI formatting, bypass entries
- Fix log_watcher timestamp parsing: log warning once after all formats fail,
not on each format attempt (was generating hundreds of warnings per scan)
- Standardize rich formatting in branch_log_events and log_events print_help()
to match medic.py/errors.py Panel+rule style
- Add bypass entries for intentional silent catches (timestamp loop, error display)
- Remove unused Path imports
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- add `trigger_data.json` to `.gitignore` to prevent tracking of deleted file
🔥 chore(trigger): remove unused trigger data file
- delete `trigger_data.json` as it is no longer needed