Commit graph

66 commits

Author SHA1 Message Date
Snider
d171fe5db8 refactor: remove build/, release/, sdk/ — extracted to core/go-build
Build system, release publishers, and SDK generation now live at
forge.lthn.ai/core/go-build v0.1.0. 110 files, 21K LOC moved.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 12:37:53 +00:00
Snider
a3f6b76337 fix: update go-agentic imports to core/agent
go-agentic → core/agent/pkg/lifecycle (aliased as agentic)
go-agentic/cmd/workspace → core/agent/cmd/workspace

All cmd/ packages now build cleanly.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 12:35:25 +00:00
Snider
f293e71a04 refactor: move cmd/ packages to their respective repos
- cmd/vm/ → go-container/cmd/vm/
- cmd/prod/ → go-infra/cmd/prod/
- cmd/monitor/ → go-infra/cmd/monitor/
- cmd/qa/ → lint/cmd/qa/
- cmd/deploy/cmd_ansible.go → go-ansible/cmd/ansible/

Each repo now owns its CLI commands alongside its library code.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 12:28:15 +00:00
Snider
0737b83196 chore: add .gitignore for IDE files
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 12:14:51 +00:00
Snider
d97db89866 refactor: replace all cobra imports with core/cli
19 files migrated from github.com/spf13/cobra to
forge.lthn.ai/core/cli/pkg/cli. All cmd/ and build/ packages
now use cli.Command exclusively. Zero direct cobra dependencies
remain in application code.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 12:05:13 +00:00
Snider
3a995db1db refactor: remove extracted packages
- container/ → core/go-container v0.1.0
- devops/ → core/go-container/devenv v0.1.0
- infra/ → core/go-infra v0.1.0
- devkit/ → core/lint v0.2.0

All cmd/ consumers already import from standalone repos.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 11:52:34 +00:00
Snider
14cfa408e7 refactor: remove ansible/ — extracted to core/go-ansible
Package lives at forge.lthn.ai/core/go-ansible v0.1.0.
All consumers already updated to import from there.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 11:51:40 +00:00
Snider
3d2466088e chore: remove legacy CI configs
Woodpecker and Forgejo Actions replaced by .core build system.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 11:49:12 +00:00
Snider
abbb7f6956 refactor: update imports to use extracted repos
Point cmd/ consumers at new standalone repos:
- go-devops/ansible → go-ansible
- go-devops/infra → go-infra
- go-devops/container → go-container
- go-devops/devops → go-container/devenv

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 11:46:32 +00:00
Snider
63e4b35a9a chore: add .core/ build and release configs
Add go-devops build system configuration for standardised
build, test, and release workflows across the Go ecosystem.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 18:52:36 +00:00
Snider
fd95028f2c feat(docs): add gohelp sync target
core docs sync --target gohelp collects repo docs/ folders
into flat content/{package}/ structure for go-help static gen.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 16:39:50 +00:00
Snider
f5064a72be chore: sync go.mod dependencies
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 15:22:48 +00:00
Snider
5a0aee4b2b refactor: swap pkg/framework imports to pkg/core
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 14:11:01 +00:00
Snider
3fcefd5edc refactor: swap pkg/repos import to go-scm/repos
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 13:48:08 +00:00
Snider
278e89e292 refactor: swap pkg/{io,log} imports to go-io/go-log
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 12:35:24 +00:00
Snider
8e8d356616 refactor: use core/go-i18n module instead of core/go/pkg/i18n
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 09:09:07 +00:00
Snider
28e1b85718 feat: add go-php dependency for PHP/Laravel command awareness
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-04 17:40:10 +00:00
Snider
4c7e5c7b42 chore: bump forge.lthn.ai dep versions to latest tags
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-26 05:34:23 +00:00
Claude
8c9fdca5a6
docs: archive completed plans
All 8 plan files (4 design + 4 impl) verified as completed against
codebase and git history. Each archived with completion summary
documenting date, key files built, and test coverage.

Archived plans:
- core-devops (design + impl): devops/ package fully implemented
- code-signing (design + impl): build/signing/ package fully implemented
- sdk-generation (design + impl): sdk/ package fully implemented
- sdk-release (design + impl): release/sdk.go fully implemented

Remaining in docs/plans/:
- docs-sync-next-steps.md: reference document for future setup steps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 18:08:28 +00:00
db185dec37 Merge pull request 'chore: Go 1.26 modernization' (#2) from chore/go-1.26-modernization into main 2026-02-24 18:01:41 +00:00
Claude
31985fa801
chore: use slices.Sorted(maps.Keys()) for ordered iteration 2026-02-24 15:45:03 +00:00
Claude
f4848deda6
chore: sort.Strings → slices.Sort 2026-02-24 15:44:09 +00:00
Claude
02a27dde71
chore: use slices.Contains for linear search 2026-02-24 15:43:09 +00:00
Claude
e3c2315c6a
chore: use %w for error wrapping 2026-02-24 15:41:11 +00:00
Claude
801bbe15e5
chore: fmt.Errorf(static) → errors.New 2026-02-24 15:38:34 +00:00
Claude
efa2f59e6e
chore: replace interface{} with any (Go 1.18+ alias) 2026-02-24 15:37:42 +00:00
Claude
cdcbd5a7bd
fix: update go.sum checksums for forge.lthn.ai modules 2026-02-24 15:37:23 +00:00
Snider
4ef438dc40 chore: refresh go.sum after upstream tag updates
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 06:35:19 +00:00
Snider
f9eb54b856 refactor: modernise to Go 1.26 — iterators, slices, maps, strings
- Add ParsePlaybookIter, ParseTasksIter, GetHostsIter, AllHostsIter (ansible)
- Add ListTemplatesIter (container), TargetsIter (build), LanguagesIter (sdk)
- Replace sort.Slice with slices.SortFunc across cmd/dev, cmd/qa, cmd/monitor, cmd/setup
- Replace manual map-key-sort with slices.Sorted(maps.Keys(...))
- Replace strings.Split with strings.SplitSeq where result is iterated (devkit)
- Replace range-over-int in complexity_test, ansible/modules, devops
- Remove redundant manual min() in favour of built-in
- 22 files, all tests pass

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 06:24:37 +00:00
Claude
171becfdd6
chore: refresh go.sum after upstream tag updates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:36:25 +00:00
Snider
ac6cff9b18 refactor: migrate CLI imports from core/go to core/cli
Update 58 files from forge.lthn.ai/core/go/pkg/cli to
forge.lthn.ai/core/cli/pkg/cli. Also fix pre-existing broken
imports: cmd/workspace → go-agentic, cmd/dev → self-reference.

Resolves circular dependency that caused qa docblock stub in core/go.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 23:28:58 +00:00
Claude
42613e2625
chore: migrate Snider deps from github.com to forge.lthn.ai
Update Borg dependency path from github.com/Snider/Borg to
forge.lthn.ai/Snider/Borg across go.mod and imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:40:28 +00:00
Snider
1c27bc4ca9 feat: absorb dev tooling commands from CLI
cmd/dev — multi-repo workflow (work, push, pull, commit, health)
cmd/setup — project bootstrap, CI, GitHub config
cmd/qa — code quality, review, docblock checking
cmd/docs — docs scan/sync/list
cmd/gitcmd — git helpers
cmd/monitor — monitoring

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:45:58 +00:00
Snider
b95d465499 refactor: move updater to dedicated core/go-update repo
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:38:27 +00:00
Snider
338a0a4c5e feat: absorb vanity-import, community, and updater from CLI
Moved from core/cli as part of repo cleanup:
- cmd/vanity-import/ — Go vanity import server
- cmd/community/ — community landing page
- cmd/updater/ — self-update service with Angular UI

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:33:23 +00:00
Snider
3e630139ad feat: add Woodpecker CI pipelines from CLI
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:18:35 +00:00
Snider
5c0dd15f64 fix: remove duplicate nested plans directory
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:17:02 +00:00
Snider
7b69124264 feat: add Ansible playbooks and design plans from CLI
- playbooks/: galera-backup, galera-deploy, redis-deploy, inventory
- docs/plans/: code-signing, core-devops, sdk-generation, sdk-release designs

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:16:52 +00:00
Snider
cd7e728280 feat: absorb core/ci commands + add reusable workflows
Merge core/ci repo into go-devops:
- cmd/ci: release publish, init, changelog, version commands
- cmd/sdk: API diff and OpenAPI validation commands

Add reusable Forgejo Actions workflows:
- security-scan.yml: govulncheck + gitleaks + trivy
- go-test.yml: test with optional race/coverage
- docker-publish.yml: build + push to registry

Other repos can call these via:
  uses: core/go-devops/.forgejo/workflows/security-scan.yml@main

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:01:46 +00:00
Snider
400d8a7690 feat: migrate deploy, prod, vm commands from CLI
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 19:38:18 +00:00
Snider
4b5739fbd7 chore: resolve forge deps from registry, remove local replaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 19:21:00 +00:00
Claude
802a054ffe
fix(go.mod): correct replace path ../core to ../go
The framework lives at ../go in the canonical workspace layout.
The ../core path was a symlink-specific workaround that broke
the CLI go.work build.

Co-Authored-By: Charon <charon@lethean.io>
2026-02-20 15:29:53 +00:00
Snider
9d433f6b43 docs: add README with quick start and docs links
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 15:11:26 +00:00
Snider
12ad23610f docs: graduate TODO/FINDINGS into production documentation
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 15:03:18 +00:00
Snider
9996754cc4 docs(todo): add commit hash to Phase 4 entries
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 06:28:59 +00:00
Snider
e20083d51b feat(devkit): Phase 4 — vulnerability scanning, complexity analysis, coverage trending
- govulncheck JSON output parsing with structured VulnFinding types (13 tests)
- Cyclomatic complexity analysis via go/ast with configurable threshold (21 tests)
- Coverage snapshot persistence and regression detection with CoverageStore (19 tests)

53 new tests, 68 total devkit tests. All pass with -race.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 06:28:37 +00:00
Snider
7aaa2154b6 test(release): Phase 3 — publisher integration, SDK generation, breaking change detection
Publisher integration tests (48 tests): dry-run verification for all 8 publishers
(GitHub, Docker, Homebrew, Scoop, AUR, Chocolatey, npm, LinuxKit), command building,
config parsing, repository detection, artifact handling, cross-publisher name
uniqueness, nil relCfg handling, checksum mapping, interface compliance.

SDK generation tests (38 tests): orchestration, generator registry, interface
compliance for all 4 languages (TypeScript, Python, Go, PHP), config defaults,
SetVersion, spec detection priority across all 8 common paths.

Breaking change detection tests (30 tests): oasdiff integration covering
add/remove endpoints, required/optional params, response type changes,
HTTP method removal, identical specs, multiple breaking changes, JSON format
support, error handling, DiffExitCode, DiffResult structure.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 05:28:20 +00:00
Snider
50ad540241 feat(infra): Phase 2 — API client abstraction, retry logic, rate limiting
Extract shared APIClient from HCloudClient/HRobotClient/CloudNSClient with
configurable retry (exponential backoff + jitter), 429 rate-limit handling
(Retry-After header), and functional options (WithHTTPClient, WithRetry,
WithAuth, WithPrefix). 30 new client_test.go tests covering retry exhaustion,
rate-limit queuing, context cancellation, and integration with all 3 providers.
DigitalOcean: no code existed, removed stale doc references. 66 infra tests
pass, race-clean.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 04:11:08 +00:00
Snider
c8615ce61e docs(todo): mark Phase 1 complete — 438 ansible tests
All 5 steps done: SSH mock, command, file, service/package,
user/group/advanced, and error/become/facts/idempotency modules.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:58:50 +00:00
Snider
8ab8643e88 test(ansible): Phase 1 Step 1.5 — error propagation, become, facts & idempotency
104 new tests covering cross-cutting concerns:
- Error propagation (68): getHosts, matchesTags, evaluateWhen,
  templateString, applyFilter, resolveLoop, handleNotify, normalizeConditions
- Become/sudo (8): enable/disable, passwordless, default user
- Fact gathering (9): Ubuntu/CentOS/Alpine/Debian os-release parsing
- Idempotency (8): group exists, key present, docker compose up-to-date
Total ansible tests: 438. Phase 1 complete.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:58:27 +00:00