feat(raft-apply-decoupling): extract guarded fact transition logic into reusable cores (task 2.1)

Split mark_job_start/finish/fail/update in job.c into four hook-free
core functions (apply_job_*_transition) containing only the
monotonic-rank guard and mutation. Wrappers now peek the same guard
to decide hook-firing, then delegate to the core, preserving exact
pre-extraction hook-firing timing. Prerequisite for task 2.2's
apply_committed_entry() dispatch and the ordered apply pump (6.1).
This commit is contained in:
Rongsong Shen 2026-07-03 15:26:22 +00:00
parent 2d9f1e947a
commit 41d36204d5
6 changed files with 480 additions and 28 deletions

View file

@ -157,6 +157,7 @@ controller_unit_test_src = [
'testsuite/test_snapdiff.c',
'testsuite/snapdiff.c',
'testsuite/test_persist_snapshot_entities.c',
'testsuite/test_apply_seam.c',
'ctrlstatus.c',
'commit.c',
'job.c',