Commit graph

10 commits

Author SHA1 Message Date
Snider
c7da9ad16c test(ansible): Phase 1 Step 1.2 — file operation module tests
54 new tests for copy/file/lineinfile/blockinfile/stat/template modules.
Extended mock_ssh_test.go with sshFileRunner interface and 6 module shims.
Fixed unsupported module test (copy→hostname now that copy is supported).
Total ansible tests: 208.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:39:27 +00:00
Snider
fd46e82297 docs(todo): mark Phase 1 Steps 1.0-1.1 complete (3330e55)
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:32:15 +00:00
Snider
3330e55b2b test(ansible): Phase 1 Steps 1.0-1.1 — SSH mock + command module tests
Step 1.0: MockSSHClient with command registry, file system simulation,
become state tracking, execution log, upload log, and assertion helpers.
Module shims via sshRunner interface for testability.

Step 1.1: 48 tests for command/shell/raw/script modules verifying:
- command uses Run(), shell uses RunScript()
- chdir wrapping, non-zero RC, SSH error propagation
- raw passes through without shell wrapping
- script reads local file content, sends via RunScript()
- Cross-module dispatch differentiation
- Template variable resolution in args

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:31:48 +00:00
Snider
17b9e32df2 docs: refine Phase 1 with 40-module audit and mock SSH strategy
Analysis found 40 modules in modules.go (1,434 LOC) with zero tests.
Broken into 5 steps: mock infrastructure, command execution (4),
file operations (6), service/package (7), advanced (10), plus
error propagation and become/sudo testing.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:09:44 +00:00
Snider
b3954c808b docs: mark Phase 0 as complete in TODO.md
All 6 Phase 0 items done:
- ansible/ tests (6e346cb)
- infra/ tests (6e346cb)
- build/ tests (5d22ed9)
- release/ tests + linuxkit nil fix (5d22ed9)
- Race condition tests (6e346cb)
- go vet clean (6e346cb)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 01:59:04 +00:00
Snider
5d22ed97e6 test: complete Phase 0 build/ and release/ test coverage
build/:
- archive_test.go: round-trip tests for tar.gz/zip, multi-file archives
- signing_test.go: mock signer tests, path verification, error handling

release/:
- Fix nil pointer crash in linuxkit.go:50 (release.FS nil guard)
- linuxkit_test.go: nil FS test case for the crash fix

All 862 tests pass, go vet clean.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 01:58:37 +00:00
Snider
7708f8fddd docs(devops): update TODO.md Phase 0 completion status
Mark ansible/ and infra/ tests as done, race detection clean,
go vet fixed. Note pre-existing LinuxKit nil pointer crash.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 01:38:18 +00:00
Snider
6e346cb2fd test(devops): Phase 0 test coverage and hardening
- Fix go vet warnings across 4 files: update stale API calls in
  container/linuxkit_test.go, container/state_test.go, and
  devops/devops_test.go (removed io.Local arg from NewState/LoadState),
  rewrite container/templates_test.go for package-level function API
- Add ansible/parser_test.go: 17 tests covering ParsePlaybook,
  ParseInventory, ParseTasks, GetHosts, GetHostVars, isModule,
  NormalizeModule (plays, vars, handlers, blocks, loops, roles, FQCN)
- Add ansible/types_test.go: RoleRef/Task UnmarshalYAML, Inventory
  structure, Facts, TaskResult, KnownModules validation
- Add ansible/executor_test.go: executor logic (getHosts, matchesTags,
  evaluateWhen, templateString, applyFilter, resolveLoop, templateArgs,
  handleNotify, normalizeConditions, helper functions)
- Add infra/hetzner_test.go: HCloudClient/HRobotClient construction,
  do() round-trip via httptest, API error handling, JSON serialisation
  for HCloudServer, HCloudLoadBalancer, HRobotServer
- Add infra/cloudns_test.go: doRaw() round-trip via httptest, zone/record
  JSON parsing, CRUD response validation, ACME challenge logic,
  auth param verification, error handling
- Fix go.mod replace directive path (../go -> ../core)
- All tests pass, go vet clean, go test -race clean

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 01:36:03 +00:00
Snider
9b55b97b28 docs: add domain expert guide, task queue, and research notes
CLAUDE.md: architecture guide for ansible/build/infra/release (29K LOC)
TODO.md: 5-phase task queue (test coverage, ansible, infra, release, devkit)
FINDINGS.md: package inventory, test gaps, config ecosystem

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 00:59:01 +00:00
Claude
392ad68047
feat: extract devops packages from core/go
Build system, release automation, SDK generation, Ansible executor,
LinuxKit dev environments, container runtime, deployment, infra
metrics, and developer toolkit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 15:21:39 +00:00