Replace monolithic add_worker with three focused functions: - apply_join_state (static under production, exported under XCE_TESTING): shared status/resource update called by both create and rejoin paths; clears XCE_WORKER_UNAVAIL, applies hconfig overrides, updates resources - init_worker: first-time join path via makeWorker + apply_join_state - rejoin_worker: reconnect path with explicit admin-bit preservation (XCE_WORKER_ADMIN_MASK = LOCKEDU|CLOSED|HIDDEN|CLOSED_BY_ADMIN) Also makes find_matched_hostconfig non-static so join.c can call it via the extern declaration already in worker.h. Removes add_worker (no longer declared in worker.h, no callers). All 7 tests in test_worker_join pass: apply_join_state (clears UNAVAIL, hosttype override, resource values), init_worker (creates entry, returns correct idx), rejoin_worker (updates attrs/ep, preserves admin bits).
22 lines
450 B
JSON
22 lines
450 B
JSON
{
|
|
"feature_name": "worker-join-refactor",
|
|
"created_at": "2026-05-15T00:00:00Z",
|
|
"updated_at": "2026-05-15T03:20:00Z",
|
|
"language": "en",
|
|
"phase": "tasks-generated",
|
|
"approvals": {
|
|
"requirements": {
|
|
"generated": true,
|
|
"approved": true
|
|
},
|
|
"design": {
|
|
"generated": true,
|
|
"approved": true
|
|
},
|
|
"tasks": {
|
|
"generated": true,
|
|
"approved": true
|
|
}
|
|
},
|
|
"ready_for_implementation": true
|
|
}
|