Low Cohesion in src/worker/job.rs
CodeScene has flagged a significant worsening of the Low Cohesion biomarker in src/worker/job.rs:
The number of different responsibilities increases from 8 to 74, threshold = 3
This was identified during PR #123 (Add regression coverage for worker reload contracts).
Why this matters
High numbers of distinct responsibilities in a single module indicate that the file is doing too much. This makes the code harder to understand, test, and maintain, and increases the risk of unintended coupling between concerns.
Suggested next steps
- Audit the responsibilities now present in and group related ones.
- Extract cohesive subsets into dedicated modules (e.g. separate tool invocation, safety checks, state management, and event emission).
- Review imports such as , ///, and to determine whether they belong in a thinner coordination layer or in dedicated sub-modules.
References
/cc @leynos
Low Cohesion in
src/worker/job.rsCodeScene has flagged a significant worsening of the Low Cohesion biomarker in
src/worker/job.rs:This was identified during PR #123 (Add regression coverage for worker reload contracts).
Why this matters
High numbers of distinct responsibilities in a single module indicate that the file is doing too much. This makes the code harder to understand, test, and maintain, and increases the risk of unintended coupling between concerns.
Suggested next steps
References
/cc @leynos