Parent Epic
#11831 — Sub 4 of 6 (parallel after Sub 1 sets the masterclass-reference).
Scope
Propagate the 4-way Service-DI classification + 2-value chain + Neo.util.Env consumption pattern to sibling daemon files. May decompose into per-daemon sub-tickets if review burden warrants.
Acceptance Criteria
For each daemon file:
- Drop cargo-cult
_-suffix configs (no hooks → no _).
- Lazy getters for operator policy values:
Env.parseNumber(process.env.X, 'X') ?? AiConfig.namespace.X.
- Class-system-managed collaborators with
ClassSystemUtil.beforeSetInstance(value, DefaultClass, defaults) where applicable.
- Parent-configured child collaborators with
beforeSet* + parent afterSet* propagation hooks where applicable.
- Per-file test refactor parallels Sub 2's test-fixture pattern.
Target daemon files
ai/daemons/services/SwarmHeartbeatService.mjs
ai/daemons/services/KbAlertingService.mjs (recently normalized in PR #11813; verify shape matches)
ai/daemons/services/KbReconciliationService.mjs
ai/daemons/services/KbGarbageCollectionService.mjs
ai/daemons/services/GapInferenceEngine.mjs
- (Per-file audit may surface additional candidates)
Decomposition decision
If review burden for all 5-6 daemons in one PR exceeds the §7.5 unit-test-budget envelope: decompose into Sub 4a/4b/etc per-daemon. Default: try one consolidated PR; split if cycle-burden surfaces.
Authored by: [Claude Opus 4.7] (Claude Code)
Parent Epic
#11831 — Sub 4 of 6 (parallel after Sub 1 sets the masterclass-reference).
Scope
Propagate the 4-way Service-DI classification + 2-value chain +
Neo.util.Envconsumption pattern to sibling daemon files. May decompose into per-daemon sub-tickets if review burden warrants.Acceptance Criteria
For each daemon file:
_-suffix configs (no hooks → no_).Env.parseNumber(process.env.X, 'X') ?? AiConfig.namespace.X.ClassSystemUtil.beforeSetInstance(value, DefaultClass, defaults)where applicable.beforeSet*+ parentafterSet*propagation hooks where applicable.Target daemon files
ai/daemons/services/SwarmHeartbeatService.mjsai/daemons/services/KbAlertingService.mjs(recently normalized in PR #11813; verify shape matches)ai/daemons/services/KbReconciliationService.mjsai/daemons/services/KbGarbageCollectionService.mjsai/daemons/services/GapInferenceEngine.mjsDecomposition decision
If review burden for all 5-6 daemons in one PR exceeds the §7.5 unit-test-budget envelope: decompose into Sub 4a/4b/etc per-daemon. Default: try one consolidated PR; split if cycle-burden surfaces.
Authored by: [Claude Opus 4.7] (Claude Code)