refactor/pool: split the orchestrator's update, status, rollback and cache-address flows into helpers #96
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/complexity-pool-orchestrator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #71, the pool orchestrator slice, the last of seven. UpdateHarnessLocked was at Sonar cognitive complexity 35, StatusHarness 36, RollbackHarnessLocked 32 and persistCacheAddresses 28. The update flow now runs through an updateRun struct whose methods cover the realize-and-record step that used to appear three times, the existing-generation repair, resolve plus lock plus fetch plus realize, the node note, lock persistence and the allow_young audit, with node selection and recipe revision moved verbatim into selectUpdateNode and the manifest load into loadUpdateManifest. persistCacheAddresses merges archive, runtime and npm addresses through one generic helper, no release loop because a release sha256 is fixed at resolve time. Rollback and status each gained small helpers. Order of lock write, allow_young audit and realize is unchanged, the scratch-dir cleanup still covers realize, the deferred node error still surfaces only on a fresh resolve. Reviewer pass ran nine mutations with eight caught by existing tests, including the integration tests which all ran here. The survivor was a pre-existing gap, so one test was added asserting no allow_young audit event is written when the lock write fails. 🤖 Generated with Claude Code