Commit Graph

7 Commits

Author SHA1 Message Date
Azreen Jamal bd2c7d5102 feat: pi-worker now picks up and fixes real bugs from Asana
Major changes:
- Task loop polls Under Review + New Bugs sections (was only checking empty sections)
- Smart project routing: keyword matching maps task names to correct codebase
  (e.g. 'pledge' → legacy-donation-system-laravel)
- Pi executes in the project directory, not /opt/pi-worker
- Git pull before execution to get latest code
- Skips already-attempted tasks (checks Asana comments)
- Config now exposes projectsPath

First real bug fixed autonomously:
  'Duplicate Pledges Detected with Same External Reference'
  → Fixed uniqid() causing duplicate Engage pledges on every sync
  → 1 file changed in app/N3O/Schema.php

Also: fix watchdog to use systemd-notify command (unix_dgram unsupported in Bun),
add debug logging to lock acquire failures
2026-03-09 01:33:24 +08:00
Azreen Jamal a86865ee25 fix: raw fetch polling loop - bypasses Grammy polling, handles 409 gracefully
- Replaced Grammy bot.start() with manual fetch-based getUpdates loop
- Grammy used only for bot.handleUpdate() (middleware/handlers)
- 409 conflicts handled with 10s backoff + continue (no crash)
- Network errors handled with 3s retry
- Root cause of persistent 409: zombie bun process (PID 72407) from 3:23 AM
  was holding Telegram long-poll lock all day
2026-03-06 21:41:51 +08:00
Azreen Jamal 91b8ceeac9 feat: sweep My Tasks (Recently Assigned) for already-done tasks 2026-03-06 16:51:01 +08:00
Azreen Jamal 6e074fd512 feat: add pi-worker service for autonomous Asana task execution and project improvements 2026-03-06 15:14:43 +08:00
Azreen Jamal bcce1d4549 update extensions, telegram bot, and add giveaway module 2026-03-05 18:11:32 +08:00
Azreen Jamal a7413075c3 telegram bot: fix env loading, remove markdown, clear stale updates 2026-03-03 04:19:37 +08:00
Azreen Jamal dd2ce7e81f telegram bot: launchd install/uninstall scripts for macOS 2026-03-03 04:16:27 +08:00