Commit Graph

32 Commits

Author SHA1 Message Date
Yanxin Lu
71672b31ca email-processor: fix concurrency bugs and several other issues
- Add fcntl file locking around read-modify-write cycles on both
  decision_history.json and pending_emails.json to prevent data
  corruption from parallel processes
- Pass --page-size 500 to himalaya envelope list to avoid silently
  missing emails beyond the default first page
- Use ollama.Client(host=...) so the config.json host setting is
  actually respected
- Fall back to sender-only matching in compute_confidence when LLM
  returns no valid taxonomy tags, instead of always returning 50%
- Fix _format_address to return empty string instead of literal
  "None" or "[]" for missing address fields
2026-03-20 18:58:13 -07:00
Yanxin Lu
d35e7b1475 Merge branch 'main' of ssh://git.luyanxin.com:8103/lyx/youlu-openclaw-workspace
merge
2026-03-13 11:19:23 -07:00
Yanxin Lu
36143fcd93 Add digest command to email processor
Read-only summary of recent decisions, grouped by action with
[auto]/[user] markers. Supports --recent N for multi-day lookback.
2026-03-13 11:17:43 -07:00
c4b19b7664 Update: prune pilates monitor, update reminders, sync memory files 2026-03-12 09:10:56 -07:00
Yanxin Lu
3c54098b1d Remove scan_index, use envelope_id (IMAP UID) as single identifier
scan_index created confusion for the OpenClaw agent which would
sometimes reference emails by scan_index and sometimes by envelope_id.
Since himalaya's envelope ID is an IMAP UID (stable, never recycled),
it works as the sole identifier for review commands.
2026-03-07 22:01:02 -08:00
Yanxin Lu
723c47bbb3 Clean up stale comments, dead code, and code quality issues
- Remove dead code: unused PENDING_FILE, _extract_domain(), sender_domain
  field, imap_uid fallback, check_unseen_only config key
- Fix stale comments: removed tag references in README and docstrings,
  top_domains -> top_senders, 1-based number -> scan_index number
- Make _extract_email_address public (used by 3 modules)
- Extract _format_address helper to deduplicate from/to parsing
- Batch pending queue disk I/O in review act/accept (load once, save once)
- Reuse cleared pending dict in scan instead of redundant disk load
- Track envelope IDs during scan loop to catch duplicates
- Fix default confidence_threshold 75 -> 85 to match config and docs
- Update get_relevant_examples default n=10 -> n=5 to match caller
- Add graceful error for --recent with non-numeric value
2026-03-05 15:28:05 -08:00
Yanxin Lu
361e983b0f Stable review indices and deduplicate tag taxonomy
Review items now get a stable scan_index assigned during scan, so
sequential review commands don't target wrong emails after earlier
items are resolved. Indices reset on each new scan.

Deduplicate tag taxonomy from 21 to 14 tags: drop invoice/payment
(covered by billing), delivery (covered by shipping), discount/marketing
(covered by promotion), and generic notification/update tags.
2026-03-05 15:02:49 -08:00
Yanxin Lu
81bc42075f steps for tag refinement 2026-03-04 15:16:39 -08:00
Yanxin Lu
eb0310fc2d Compute confidence from decision history instead of LLM 2026-03-04 15:05:44 -08:00
Yanxin Lu
64e28b55d1 Compute confidence from decision history instead of LLM 2026-03-04 14:23:50 -08:00
720f4ef1ad update 2026-03-04 10:40:12 -08:00
07bf6c4b39 daily backup: update MEMORY.md, add data/logs to .gitignore, commit uv.lock 2026-02-28 08:02:42 -08:00
Yanxin Lu
8414ea4a0f Merge branch 'main' of ssh://git.luyanxin.com:8103/lyx/youlu-openclaw-workspace
merging
2026-02-27 07:34:21 -08:00
Yanxin Lu
cf115bb48a switched to uv 2026-02-27 07:34:07 -08:00
71ec969be2 daily backup: heartbeat updates, memory, tools, ucla monitor 2026-02-27 06:19:26 -08:00
Yanxin Lu
e8c8256967 removed migration 2026-02-26 21:05:27 -08:00
Yanxin Lu
1e3faa0b20 not marking seen when push to pending 2026-02-26 20:59:55 -08:00
Yanxin Lu
b14a93866e email processor 2026-02-26 20:54:07 -08:00
c5c9be3f00 Daily backup: email logs, reminders update, remove news digest 2026-02-26 00:00:13 -08:00
eb834306f7 Daily backup: 2026-02-23 - memory updates, config changes 2026-02-23 00:00:15 -08:00
Yanxin Lu
d4a4768e18 100 word limit 2026-02-22 14:29:01 -08:00
Yanxin Lu
ef92820954 append logging and clear logging in main loop 2026-02-22 14:21:10 -08:00
Yanxin Lu
d91d206c22 claude code review 2026-02-22 14:06:50 -08:00
d15ed77bd5 send_digest.py 2026-02-22 13:16:54 -08:00
Yanxin Lu
94e03c2ca0 word limit 2026-02-22 13:14:11 -08:00
Yanxin Lu
9ec440be9c file logging 2026-02-22 12:49:32 -08:00
Yanxin Lu
c0d0a32c8c comment from youlu 2026-02-22 11:03:00 -08:00
Yanxin Lu
20ee5c2211 forgot to include files 2026-02-22 10:51:58 -08:00
Yanxin Lu
0183070e48 modified 2026-02-22 10:48:04 -08:00
Yanxin Lu
2345e32cab new digest script 2026-02-21 22:49:33 -08:00
edf8ebe9a7 auto: 2026-02-20 - update email processor, add ollama-local skill 2026-02-20 00:00:15 -08:00
e8389b8772 add agent workspace 2026-02-18 22:39:35 -08:00