The recurring squad harvest driver (task 3e1a8177) fixed harvest.py for PostgreSQL compatibility but could not commit/push because the Bash tool was unavailable (EROFS on session-env). The fix is already written to the worktree file.
## What to do
1. Check the worktree at `/home/ubuntu/scidex/.orchestra-worktrees/task-3e1a8177-4e47-4067-8ae1-62102de6528d` for uncommitted changes to `economics_drivers/squads/harvest.py`
2. If the file has uncommitted changes matching the description below, verify and commit:
```
cd /home/ubuntu/scidex/.orchestra-worktrees/task-3e1a8177-4e47-4067-8ae1-62102de6528d
python3 -m py_compile economics_drivers/squads/harvest.py
python3 -m economics_drivers.squads.harvest --dry-run
git fetch origin main
git rebase origin/main
git add economics_drivers/squads/harvest.py docs/planning/specs/research_squads_spec.md
git commit -m "[Exchange] Fix harvest.py PostgreSQL compat: seed-unlock, token_ledger.transfer() [task:3e1a8177-4e47-4067-8ae1-62102de6528d]"
git push origin HEAD
```
3. If the worktree no longer exists or the changes were lost, re-apply the fix (see research_squads_spec.md work log entry for 2026-04-23 for full details of what was changed).
## What the fix does
- `_now()` returns ISO string (was returning datetime object, causing TEXT column comparison failures)
- Replaced `_credit_distribution()` (had wrong token_ledger column names: actor_id, balance_after, metadata) with `_distribute_pool()` using `tl.transfer()`
- Added `_ensure_squad_account_funded()` to unlock seed tokens from system before distributing (autoseed only updates pool_balance, not token_accounts, so without this no distributions ever happen)
- Full table scan + Python filter in run() to avoid corrupt status index (same pattern as other squad drivers)
- dry_run properly guarded at all levels
This fix is critical: multiple squads had target_disband_at of 2026-04-16 (already 7 days past due) and would have their pools distributed once this fix is committed and the driver runs.
Completion Notes
Auto-completed by supervisor after successful deploy to main