fix: address Phase 1b code review feedback - Critical, Important, Minor issues master
Critical C1: Fixed get_next_task downstream count SQL - now correctly counts tasks that depend ON a ready task using LEFT JOIN on DependsOn edges where to_node matches ready_task. Test improved with reverse task creation order to verify downstream logic. Important I1: Fixed TOCTOU in update_node by moving status validation inside transaction. Important I2: Fixed add_edge validation race by moving node existence checks inside transaction with direct SQL. Important I3: Changed write transactions to BEGIN IMMEDIATE using transaction_with_behavior across all write methods. Minor M1: Added PartialEq derive to GraphNode and GraphEdge. Minor M2: Extracted duplicated test helpers into tests/common/mod.rs module. Minor M3: Removed unused --priority flag from tasks list CLI. All 157 tests pass. Code compiled and formatted.