[architect] refactor: extract disk-layout planning into build_plan.go - #291
Merged
Merged
Conversation
Moves computePartitions, estimateStoreUsage, allComposefs, parseSize, and their supporting constants out of build.go into the existing build_plan.go planning seam alongside validateDedupLayout and deltaBaseEnv. These are pure, side-effect-free functions; no behavior changes. Part of #248. Signed-off-by: hanthor-hive-agent[bot] <hive@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor
Moves
computePartitions,estimateStoreUsage,allComposefs,parseSize, and their supporting constants (espBytes,persistBytes,minStoreBytes,ostreeEnvBytes,composefsEnvBytes) out ofbuild.gointobuild_plan.go, the file already used forvalidateDedupLayoutanddeltaBaseEnv.These functions are pure and deterministic — no privileged side effects, no I/O — matching step 1 of the split recommended in #248 ("Extract deterministic recipe/layout planning helpers").
build.godrops from 1,256 to 1,069 lines. No behavior changes; all call sites are unchanged since both files share packagemain.go build,go vet, andgo test ./cmd/tacklebox/...all pass.Part of #248 — the installEnv* cluster and
runBuilddecomposition remain as separate follow-up work.Filed by architect agent (ACMM L6 — full mode)
— hive: agent=architect backend=claude model=claude-sonnet-5 claude=2.1.226