Commit Graph
270 Commits
Author SHA1 Message Date
AIOSAIandClaude Sonnet 4.6 efc0056be8 fix(prax): AIPL polyglot log leak — path resolver fix + regression tests (DPLAN-0125 Track G)
Root cause: get_module_logs_dir() last fallback unconditionally created
src/aipass/{name}/logs/ for any unknown module, causing external projects
(AIPL polyglot) running with AIPASS_HOME set to pollute the AIPass src tree
with src/aipass/unknown_branch/logs/*.

Fix (already committed in 3c5ac29):
- Check AIPASS_CALLER_CWD env var (set by drone during cross-project dispatch,
  DPLAN-0121) and walk up to the caller's project root (.git/pyproject.toml)
- Final fallback: system_logs/external/{module_name} — never create unknown
  dirs in the AIPass source tree
- Added inspect.stack() auto-detection when module_name is not provided
- Added _warn_routing() helper for lazy prax logger access (avoids circular
  imports — logger.py imports load.py at module level)

This PR:
- Regression tests: test_unknown_module_routes_to_system_logs_external and
  test_aipass_caller_cwd_routes_to_caller_project (both green)
- Cleanup: moved 27 leaked AIPL polyglot logs from src/aipass/unknown_branch/
  to /tmp/aipl_leaked_logs/ for AIPass Developer review; removed directory
- bypass.json: architecture + documentation exemptions for tests/test_config.py

CC @polyglot: AIPL-side logger config may need AIPASS_CALLER_CWD set during
cross-project dispatch so logs route to ~/Projects/AIPL/ correctly. The fix
is transparent if drone sets AIPASS_CALLER_CWD; no AIPL changes required for
the basic fix, but explicit env var support improves log placement accuracy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 13:28:06 -07:00
AIOSAIand@devpulse 2e41b75fe9 feat(system): Compass devpulse personal layer scaffold (DPLAN-0125 Track I): triple-layer gitignore protection, compass_wrapper.py stub (query_top/ingest_learning/stats signatures), seedgo bypass entries. Design doc at devpulse/.trinity/night_shift_reports/compass_layer_design.md. Scaffold ready for future implementation session.
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-14 06:33:50 -07:00
AIOSAIand@devpulse 3c5ac29fba feat(system): Personal-name scrub: Patrick -> user / AIPass Developer across public repo
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-14 06:14:03 -07:00
AIOSAIand@drone 181145be54 feat(drone): S91 three bugs: git add -A, STATUS.md sync before commit, Rich help formatting
Co-Authored-By: @drone <drone@aipass>
2026-04-14 02:31:17 -07:00
AIOSAIand@devpulse 2fd70c4902 feat(system): devpulse docs restructure: lean README (209→35 lines) + new SETUP.md with install/uninstall/troubleshooting for Linux/macOS/Windows (WSL), env vars reference, Windows native support tracking via issue #261
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-14 02:20:11 -07:00
AIOSAIand@devpulse c27cc4ab11 feat(system): S91 cleanup round 2: S90 stragglers staged (ai_mail contacts/identity, devpulse feedback channel, prax monitor_info)
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-14 01:38:56 -07:00
AIOSAIand@devpulse 6958cfe28f feat(system): S91 cleanup: AIPass Developer scrub, S90 stragglers, README presence epigraph, trigger lock gitignore
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-14 01:36:05 -07:00
AIOSAIand@devpulse e73abb8f8b feat(system): S90: fix cross-project email — sender detection + caller registry target resolution
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-12 01:02:35 -07:00
AIOSAIand@devpulse 46d80093d1 feat(system): S90: ai_mail contacts-based resolution (DPLAN-0121 Phase 5) — replaces env var branch detection
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 22:49:47 -07:00
AIOSAIand@devpulse cb9c39f400 feat(system): S90: prax Ctrl+C clean exit + UNKNOWN labels fix + AI_MAIL label fix (DPLAN-0118 complete)
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 21:25:55 -07:00
AIOSAIand@devpulse 5931952c2b feat(system): S90: local prompt hook injection + prax trigger dead code removal (Vera BUG-4 fix)
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 18:34:45 -07:00
AIOSAIand@devpulse b62e9784c1 feat(system): S90: prax dead trigger code removal + filesystem handler cleanup
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 18:26:23 -07:00
AIOSAIand@devpulse 262bb7bb58 feat(system): S90: ai_mail bidirectional cross-project email (DPLAN-0121 Phase 3) + reply-path delivery
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 18:15:37 -07:00
AIOSAIand@devpulse e7950e76f9 feat(system): S90: drone JSON fix + cli AIPASS_HOME auto-detect + mailbox + prax monitor refactor + test isolation
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 18:00:43 -07:00
AIOSAIand@devpulse 1f900bcbbb feat(system): S89: prax branch_detector cleanup (parameter rename, logging)
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 15:48:55 -07:00
AIOSAIand@devpulse 55cf149a95 feat(system): S89: ai_mail view latest + ANSI TTY detection + auto-watchdog hook (DPLAN-0119)
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 15:41:24 -07:00
AIOSAIand@devpulse 36a0f4a894 feat(system): S89: prax monitor colors + UNKNOWN fix (project colors, test attribution, external project detection)
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 15:22:28 -07:00
AIOSAIand@devpulse 4410138973 feat(system): S89 follow-up: prax three-tier monitor labels (DPLAN-0118) — PROJECT/AGENT/MODEL format for multi-project ecosystem
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 15:16:17 -07:00
AIOSAIand@devpulse e8a9af4bc0 feat(system): S89: full external access (AIPASS_HOME dual registry) + feedback channel (cross-project bridge) + init update idempotency
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 14:49:16 -07:00
AIOSAIandClaude Sonnet 4.6 5b2d14a846 fix(trigger): correct SYSTEM_LOGS_DIR path in watchers and startup
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>
2026-04-11 10:22:36 -07:00
AIOSAIand@devpulse 079cb3e94e feat(system): S87: model choice for dispatch + DPLAN-0114 (aipass init update) + Compass decisions + Patrick-Personal deny rules
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-11 01:36:03 -07:00
AIOSAIand@devpulse 6d34836748 feat(system): S86: memory bypass update + trigger dead code removal (10 orphaned functions from DPLAN-0112)
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 16:44:44 -07:00
AIOSAIandClaude Opus 4.6 4cf1b327dc refactor(trigger): remove dead code from error_logged.py after monitor-only conversion
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>
2026-04-10 16:43:10 -07:00
AIOSAIand@devpulse 612a6f5afa feat(system): S86: drone unused_function fix — refresh_external_modules wired to public API
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 16:40:26 -07:00
AIOSAIand@devpulse 6cfceee49d feat(system): S86: ai_mail naming bypass + STATUS sync
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 16:31:49 -07:00
AIOSAIand@devpulse bd24c65dfd feat(system): S86: cli test_quality fix + drone/trigger seedgo bypass updates
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 16:27:58 -07:00
AIOSAIandClaude Opus 4.6 0199356b5b fix(trigger): update seedgo bypass line numbers for error_handling standard
Line numbers shifted after DPLAN-0112 code changes. Updated 6 bypass entries:
config.py 31→36, core.py 160→61, json_handler.py 24→31, error_detected.py
54→53, plan_file.py 58→59, memory_threshold_exceeded.py 46→47. All are
pre-existing meta-logging _log_warning() except:pass patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 16:26:16 -07:00
AIOSAIandClaude Opus 4.6 f626a0411c fix(trigger): fix silent_catch violations — add logging + bypass entries
Fixed log_watcher.py:584 lazy registry import fallback (was except:pass,
now logs warning). Added seedgo bypass entries for intentional patterns:
core.py (ImportError fallback, type coercion), config.py (meta-logging,
tmp cleanup, ImportError fallback), log_watcher.py (timestamp format loop).
370 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 16:20:42 -07:00
AIOSAIand@devpulse d9fe1ad38b feat(system): S86: drone debug_print fix + memory encapsulation bypasses + STATUS sync
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 16:10:27 -07:00
AIOSAIandClaude Opus 4.6 1cc07b3ca2 refactor(trigger): fix deep_nesting in _load_circuit_breaker_state
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>
2026-04-10 16:03:10 -07:00
AIOSAIand@devpulse 6a127b066d feat(system): S86: api catch-all logger + STATUS sync
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 15:59:33 -07:00
AIOSAIand@devpulse 75645d2747 feat(system): S86: cleanup — json_handler noise fix, prompt tightened, plugins README, STATUS branches count
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 15:49:21 -07:00
AIOSAIandClaude Opus 4.6 59490757ca feat(trigger): DPLAN-0112 #4 — per-handler failure counting + auto-disable
_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>
2026-04-10 14:56:48 -07:00
AIOSAIandClaude Opus 4.6 24568eb208 feat(trigger): DPLAN-0112 #3 — full circuit breaker persistence to trigger_cb_state.json
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>
2026-04-10 14:54:05 -07:00
AIOSAIandClaude Opus 4.6 e4a7c04a2b feat(trigger): DPLAN-0112 #2 — fcntl file locking on JSON state files
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>
2026-04-10 14:50:51 -07:00
AIOSAIand@devpulse 09315827f9 feat(system): S86: drone deep_nesting fix — fix_git_state refactored (last seedgo gap)
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 14:43:27 -07:00
AIOSAIand@devpulse 0350fa20ca feat(system): S86: seedgo quality — silent_catch + deep_nesting fixes (5 branches) + trigger error_logged refactor + prompt fixes
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 14:35:51 -07:00
AIOSAIandClaude Opus 4.6 0c290a95d1 fix(trigger): DPLAN-0112 Option C — strip dispatch from error_logged, route through Medic v2
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>
2026-04-10 14:28:11 -07:00
AIOSAIand@devpulse 64c74a5a2f feat(system): S86: docs accuracy — HERALD S83-S86 milestones, STATUS counts, demo/devpulse.py fixes
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 14:19:38 -07:00
AIOSAIand@devpulse 16b33a6d36 feat(system): S86: APLAN fix sweep — 11 CRITICALs resolved, 35+ BUGs fixed, catch-all loggers, README update
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 14:06:52 -07:00
AIOSAIand@flow 119aaea9de feat(flow): feat(flow): S84 multi-type support — fix FPLAN-only hardcoding in dashboards, aggregate, restore, append, get_closed, lock race
Co-Authored-By: @flow <flow@aipass>
2026-04-10 13:55:02 -07:00
AIOSAIandClaude Opus 4.6 0c9a57f912 feat(system): S85: Trigger self-healing live + drone error handler + watchdog v1.1 snapshot + STATUS
Fix 6 bugs from DPLAN-0111 audit + cleanup:
- Bug #3: memory_threshold_exceeded.py handler→modules import path
- Bug #5: startup catch-up fires error_detected (Medic v2) not error_logged
- Bug #7: circuit_breaker_record_error at detection time, not dispatch time
- Bug #8: add encoding=utf-8 to 5 open() calls missing it
- Bug #9: core.py _fire_to_handlers copies data dict before mutation
- Cleanup: local prompt 12→14 events, remove stale branch prefixes
  (backup, The_Commons, aipass_os, aipass_business), add spawn/devpulse

370 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 13:54:29 -07:00
AIOSAIand@devpulse f564996a8f feat(system): S85: Trigger self-healing live + drone error handler + watchdog v1.1 snapshot + STATUS
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 13:19:06 -07:00
AIOSAIandClaude Opus 4.6 5e119c293b fix(trigger): fire error_detected event on every occurrence, not just count 1 and 2
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>
2026-04-10 12:53:49 -07:00
AIOSAIandClaude Opus 4.6 30cb50b2e0 fix(trigger): remove dedup gate that blocked error count from reaching dispatch threshold
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>
2026-04-10 12:35:33 -07:00
AIOSAIandClaude Opus 4.6 c8d299ec8d feat(trigger): add wake_branch() to error dispatch for autonomous handling
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>
2026-04-10 12:12:23 -07:00
AIOSAIand@devpulse 600dfbccd4 feat(system): S85: Drone git fix/sync/smart-sync — merge on divergence instead of rebase + STATUS update
Co-Authored-By: @devpulse <devpulse@aipass>
2026-04-10 10:53:49 -07:00
AIPassand@devpulse 040611d098 feat(system): S85: Restore api branch + gitleaks config (merge sync) (#228)
* feat(system): SECURITY: gitleaks config + pre-commit for API key leak prevention

Co-Authored-By: @devpulse <devpulse@aipass>

* feat(system): S84: Restore api branch to repo — normal branch, gitleaks protection, no real keys outside .secrets

Co-Authored-By: @devpulse <devpulse@aipass>

---------

Co-authored-by: @devpulse <devpulse@aipass>
2026-04-10 10:22:28 -07:00
AIPassand@devpulse 2918960dd1 feat(system): SECURITY: Remove api/ from public repo — key handling test patterns (#223)
Co-authored-by: @devpulse <devpulse@aipass>
2026-04-10 03:43:38 -07:00
AIPass 6db9b11f6a Merge pull request #221 from AIOSAI/system/devpulse-s84-drone-bug-fixes-version-dead-imports-interacti
feat(system): S84: drone BUG fixes (version, dead imports, interactive constants) + spawn BUG fixes (passport path, hash length)
2026-04-10 03:28:59 -07:00