PR #40 fixed complete_job/3 to resolve dependencies atomically (single CTE), closing the crash-between-statements strand window. The guardian noted fail_job/4 and discard_job/2 still use the two-statement split (a state UPDATE plus a standalone resolve_dependencies/2; discard_job even resolves before the UPDATE). Same class of window: a crash between the two statements can strand dependents (or unblock them prematurely).
Not urgent (their result is always null so no result-merge is affected), but for consistency give them the same CTE treatment as complete_job/3. Reference: src/shigoto_repo.erl fail_job/4, discard_job/2, resolve_dependencies/2.
PR #40 fixed complete_job/3 to resolve dependencies atomically (single CTE), closing the crash-between-statements strand window. The guardian noted fail_job/4 and discard_job/2 still use the two-statement split (a state UPDATE plus a standalone resolve_dependencies/2; discard_job even resolves before the UPDATE). Same class of window: a crash between the two statements can strand dependents (or unblock them prematurely).
Not urgent (their result is always null so no result-merge is affected), but for consistency give them the same CTE treatment as complete_job/3. Reference: src/shigoto_repo.erl fail_job/4, discard_job/2, resolve_dependencies/2.