fix(service): start_all creates a Run per service so status reports running #82

Merged
omarz merged 1 commit from fix/start_all_creates_run into development 2026-04-30 15:01:05 +00:00
Member

After 4ca6ed0 (feat(ui+wipe): jobs run-id filter and wipe_all socket
sweep) scoped service_running_jobs and service_last_terminal_state to
the current Run via current_run_id, jobs created by handle_start_all
became invisible to service.status: that handler still produced plain
Pending jobs with no run_id and never inserted a Run record. The
processes were spawned and running on disk, but service.status returned
"inactive" forever, breaking three bulk_operations integration tests
(test_start_all_user_services, test_system_service_protected_start_all,
test_mixed_class_with_dependencies) since 2026-04-28.

handle_start_all now mirrors handle_start: insert a Run with
service_id set, then for every action create a Pending Job with
run_id and call runs.add_job to register the link. If no actions
resolve to a real ActionSpec, the freshly-inserted Run is rolled back.

Also fixes a pre-existing bug where start_all only spawned the first
action of multi-action services — now it spawns every action, matching
handle_start.

Verified: cargo test -p hero_proc_integration_tests --test
bulk_operations now passes 7/7 (was 4/7); cargo test --workspace
green.

After 4ca6ed0 (feat(ui+wipe): jobs run-id filter and wipe_all socket sweep) scoped service_running_jobs and service_last_terminal_state to the current Run via current_run_id, jobs created by handle_start_all became invisible to service.status: that handler still produced plain Pending jobs with no run_id and never inserted a Run record. The processes were spawned and running on disk, but service.status returned "inactive" forever, breaking three bulk_operations integration tests (test_start_all_user_services, test_system_service_protected_start_all, test_mixed_class_with_dependencies) since 2026-04-28. handle_start_all now mirrors handle_start: insert a Run with service_id set, then for every action create a Pending Job with run_id and call runs.add_job to register the link. If no actions resolve to a real ActionSpec, the freshly-inserted Run is rolled back. Also fixes a pre-existing bug where start_all only spawned the first action of multi-action services — now it spawns every action, matching handle_start. Verified: cargo test -p hero_proc_integration_tests --test bulk_operations now passes 7/7 (was 4/7); cargo test --workspace green.
fix(service): start_all creates a Run per service so status reports running
All checks were successful
Tests / test (pull_request) Successful in 4m5s
Build and Test / build (pull_request) Successful in 4m14s
Build and Test / build (push) Successful in 4m17s
Tests / test (push) Successful in 4m48s
ab091484d9
After 4ca6ed0 (feat(ui+wipe): jobs run-id filter and wipe_all socket
sweep) scoped service_running_jobs and service_last_terminal_state to
the current Run via current_run_id, jobs created by handle_start_all
became invisible to service.status: that handler still produced plain
Pending jobs with no run_id and never inserted a Run record. The
processes were spawned and running on disk, but service.status returned
"inactive" forever, breaking three bulk_operations integration tests
(test_start_all_user_services, test_system_service_protected_start_all,
test_mixed_class_with_dependencies) since 2026-04-28.

handle_start_all now mirrors handle_start: insert a Run with
service_id set, then for every action create a Pending Job with
run_id and call runs.add_job to register the link. If no actions
resolve to a real ActionSpec, the freshly-inserted Run is rolled back.

Also fixes a pre-existing bug where start_all only spawned the first
action of multi-action services — now it spawns every action, matching
handle_start.

Verified: cargo test -p hero_proc_integration_tests --test
bulk_operations now passes 7/7 (was 4/7); cargo test --workspace
green.
omarz merged commit ab091484d9 into development 2026-04-30 15:01:05 +00:00
omarz deleted branch fix/start_all_creates_run 2026-04-30 15:01:06 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_proc!82
No description provided.