Refactor cleanup branch integration#12
Merged
Merged
Conversation
Align the start command contract with actual runtime behavior by removing the unsupported --version flag and updating command coverage and docs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Require committing coordinator-branch changes before spawning worktrees, basing subagent worktrees on the active branch, and rebasing before integration gates. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Capture restart context, branch anchors, worktree status, and next actions with references to canonical team docs to minimize context reload cost. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Prevent nil-pointer panic in Manager.Get when network inspection returns nil and add regression coverage for missing-network and inspect-error paths. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Block traversal and absolute/root-escape in cluster name and file path handling, and add focused regression tests for confinement behavior. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Treat first-run missing cluster config directory as an empty list so `hind list` returns the empty-state success output instead of an error. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ensure manager read/stop operations always honor persisted cluster topology while preserving default config behavior when no state file exists. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Compute get status from runtime container states and format port slices for readable output without fmt artifacts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
In Stop() and Delete(), InspectContainer returned (nil, err) when the docker daemon failed. The nil-check on containerInfo fired first, causing the error to be silently swallowed and execution to continue. In Delete(), InspectNetwork errors were also discarded - the condition err == nil && netInfo != nil silently dropped any non-nil error. Fix all three sites by checking err != nil before checking for nil info, and add fmt.Errorf wrapping with percent-w for context. Add three tests that verify each error is propagated via errors.Is. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Apply scoped correctness fixes for reconcile planning, network list error text, container image fallback, vault port assignment, and polling timer handling. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Delete the unreferenced pkg/cluster/cni scaffolding and clean stale AGENTS guidance so architecture docs match runtime reality. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Clarify that hind no longer supports enabling Cilium via the start command after CNI package removal, preventing users from following a broken CLI path. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
(cherry picked from commit 7d11f3297b710eed7ba5530a7b7eb063d2de4bdf)
Remove hardcoded dockercli construction from cluster.New by requiring an injected provider.Client, then update command callsites to pass dockercli explicitly and add constructor DI seam tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Use root-relative EnsureDir usage in image file templating so hind build no longer fails with "path must be relative" after path confinement hardening, and add regression coverage for embedded build context extraction. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…numbering collision Adds newNomadClientNode, parseClientNodeNumber, and nextClientNodeNumber to types.go as a single source of truth for client node construction. Wires addClientNodes in manager.go to use nextClientNodeNumber (max-based, not count-based) and newNomadClientNode, eliminating the collision bug where adding a node to a cluster with gaps (e.g. clients 01, 03) would produce a duplicate instead of the next available number. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add ClientStub to pkg/provider/mock package with optional func fields for each interface method. Each method dispatches to its Fn field if non-nil, otherwise returns zero values. Includes compile-time interface assertion to ensure ClientStub implements provider.Client. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Delete four duplicated local stub types (stubProviderClient, managerProviderStub, stubProvider, waitFakeProvider) and replace all usages with *mock.ClientStub from pkg/provider/mock. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Mark BL-018 done (default-version resolution + dependency messaging gaps closed) - Remove worktree-agent-ace3ba77e384a7624 (strict ancestor of refactor-cleanup) - Promote BL-019 to in-progress with staff planning gate open - Commit BL-017 stop behavior product code (force/verbose/partial/idempotent) - Update team runtime files: work-items, log, handoff Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Merges worktree-agent-aa19bb280d37fcce0 (BL-019) into refactor-cleanup. Resolves conflicts in rm.go, start.go, start_test.go by preserving the factory-seam pattern from BL-019 with correct three-arg cluster.New calls. Also fixes pre-existing test failures: stop_test.go duplicate removal, StopWithOptions config-name requirement, and aggregation contract update. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Extend BuildImageOptions with Dockerfile, WithCache, Platform fields - Add BuildImageResult struct with Digest and ImageRef - Update Client interface: BuildImage returns (BuildImageResult, error) - Update dockercli stub and mock/ClientStub to match new signature Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… extraction - Add CommandExecutor seam to Client struct for test injection - Add newWithExecutor constructor for tests - Implement checkBuildxAvailable in info.go (call-time check, not construction) - Full BuildImage: buildx args with --load unconditional, metadata-file digest extraction - Validate digest starts with sha256: before returning BuildImageResult - Add 7 unit tests covering buildx-absent, success, empty-digest, --load, --platform omit, --no-cache Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…provider Phase 3: image.go — replace []docker.BuildArg with map[string]string; remove internal/docker import from image.go; packagesToBuildArgs and buildArgs now return map[string]string. Phase 4: builder.go — add provider.Client field; NewBuilder takes client provider.Client; BuildImage delegates to client.BuildImage; checkDependencies uses client.TagExists; no internal/docker import. build.go call site updated to construct dockercli.New(logger) and pass it to NewBuilder. Tests: builder_test.go updated for new NewBuilder signature with stub client; added TestBuilder_CheckDependencies tests; added image_test.go asserting map return types for buildArgs and packagesToBuildArgs. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
All runtime Docker operations now go through pkg/provider/dockercli.
No production code imports pkg/build/image/internal/docker. Full deletion
is safe; logic has been reproduced in pkg/provider/dockercli/{build,info}.go.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements W-026 by adding GitHub Actions pre-merge checks for pull requests to main, including test and CLI build validation with team protocol artifacts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.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.
Summary
refactor-cleanupbranch work intomainmake test,make hind-cli) and image build validation (./bin/hind build all)Test plan
PR CIjob passes on this PR🤖 Generated with Claude Code