12 Commits

Author SHA1 Message Date
sdk-lead 792039e016 Merge pull request 'docs(cli): sync CLAUDE.md — remove stale template text' (#7) from fix/sync-claude-md-state into main 2026-05-11 03:55:41 +00:00
sdk-dev d03845c4ff docs(cli): sync CLAUDE.md — remove stale template text
- Repo state: remove "(2026-04-16): Thin/stub" description
- Section 2: remove "Run tests (none yet...)" and "There is no main.go" notes
- Section 8: mark "Unit tests" and "molecule init" as implemented

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 03:46:55 +00:00
sdk-lead 438a04a380 Merge pull request 'docs(cli): update KI-005 — tests now exist (32 integration tests)' (#6) from fix/ki-005-cli-tests-known-issues into main 2026-05-11 03:19:26 +00:00
sdk-dev 022cab0dbb docs(cli): update KI-005 — tests now exist (32 integration tests)
known-issues.md claimed "There are no tests at all" but cmd/molecule/
molecule_test.go ships 32 table-driven integration tests covering the
full CLI command surface (workspace CRUD, agent ops, delegation, config,
completion, error paths). Mark KI-005 as resolved.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 03:15:47 +00:00
sdk-lead fd66cb201e Merge pull request 'ci: rename .github/workflows -> .gitea/workflows (post-suspension sweep)' (#5) from ci-rename-github-to-gitea into main
CI / Test / test (push) Successful in 3m41s
2026-05-10 21:18:07 +00:00
infra-sre 861b562d12 ci: rename .github/workflows -> .gitea/workflows (post-suspension sweep)
CI / Test / test (pull_request) Successful in 1m39s
Release Go binaries / test (pull_request) Successful in 2m27s
Release Go binaries / release (pull_request) Has been skipped
GitHub org Molecule-AI was suspended 2026-05-06; SCM moved to Gitea
(git.moleculesai.app). The wholesale `git push --mirror` migration left
workflow files under .github/workflows/, which Gitea Actions does NOT
read - it reads .gitea/workflows/ exclusively.

This rename + the cross-repo `uses:` path rewrite are the minimum
edits to make CI fire on this repo again. The workflow content itself
is not modified (other than the path rewrites and lowercasing of the
old `Molecule-AI` org reference to the post-suspension `molecule-ai`).

Refs: feedback_post_suspension_migration_must_sweep_dormant_repos
2026-05-10 14:12:49 -07:00
claude-ceo-assistant 7badce1740 chore(ci): verify auth fix (revert me) 2026-05-10 20:20:21 +00:00
claude-ceo-assistant e562b60d1b chore(ci): auth-test 2 (revert me) 2026-05-10 20:04:17 +00:00
claude-ceo-assistant 4a84eb3a6b chore(ci): auth-test marker (revert me) 2026-05-10 20:01:54 +00:00
claude-ceo-assistant d4ed094c7b chore(ci): remove recovery marker (rerun delivered, see internal#233) 2026-05-10 19:52:10 +00:00
claude-ceo-assistant ed089b0c68 chore(ci): re-fire after incident recovery 2026-05-10 (see internal#233; revert me) 2026-05-10 19:51:30 +00:00
sdk-dev 09ea1f9ed6 fix(ci): add dedicated CI test workflow (#3)
CI / Test / test (push) Successful in 10m2s
[sdk-lead-agent] Closes the gap where Go tests only ran on tag push. New ci.yml mirrors release.yml test job (Go 1.25, vet, test -race) on PRs + main pushes; path filters scoped correctly. Self-validation of the workflow passed (1m36s, race-enabled). Approved + merged.
Co-authored-by: Molecule AI SDK-Dev <sdk-dev@agents.moleculesai.app>
Co-committed-by: Molecule AI SDK-Dev <sdk-dev@agents.moleculesai.app>
2026-05-10 09:16:19 +00:00
8 changed files with 68 additions and 23 deletions
+1
View File
@@ -0,0 +1 @@
ci-auth-test-1778443313
+1
View File
@@ -0,0 +1 @@
ci-auth-test2-1778443456
+39
View File
@@ -0,0 +1,39 @@
name: CI / Test
# Runs on every PR touching Go code, and on every push to main.
# Mirrors the test job from release.yml so PRs are validated independently
# of the release workflow. Uses Go 1.25 to match release.yml.
on:
push:
branches: [main]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/ci.yml'
pull_request:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/ci.yml'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true
- name: Tidy
run: go mod tidy && git diff --exit-code go.sum
- name: Vet
run: go vet ./...
- name: Test
run: go test -race -count=1 ./...
+1
View File
@@ -0,0 +1 @@
verify-fix-1778444420
+4 -6
View File
@@ -4,7 +4,7 @@ Go CLI for the Molecule AI agent platform. Wraps the platform's workspace runtim
**Users:** Platform operators and developers integrating with the Molecule AI platform.
**Repo state (2026-04-16):** Thin/stub. Go module is initialized; core CLI commands are not yet implemented. CI (Go binary release via GoReleaser + GitHub Actions) is wired up.
**Repo state:** Core commands implemented. 32 integration tests in `cmd/molecule/molecule_test.go`.
---
@@ -23,15 +23,13 @@ This CLI is the primary user-facing tool for interacting with the Molecule AI pl
# Build the binary to ./bin/molecule (or $GOBIN/molecule)
go build -o bin/molecule ./cmd/molecule
# Run tests (none yet; add as commands are implemented)
# Run tests — uses httptest.Server fixtures, no live platform required
go test ./...
# Run the CLI locally (requires platform env vars — see Section 5)
./bin/molecule --help
```
There is no `main.go` or `cmd/molecule/main.go` yet. Creating it is the first implementation task. The module path will be auto-detected from `go.mod`.
## 3. Go Module Conventions
**Module path:** `go.moleculesai.app/cli` (from `go.mod`)
@@ -131,8 +129,8 @@ See `known-issues.md` at the repo root for the full tracked list.
- [x] Control plane API client (initialized with `MOLECULE_API_URL`)
- [ ] Workspace runtime client (for dev/proxy mode)
- [ ] Configuration file (e.g., `~/.config/molecule/cli.yaml`) — workspace template per platform rules
- [ ] Unit tests for core command logic
- [ ] `molecule init` (bootstrap local workspace config)
- [x] Unit tests for core command logic (32 integration tests)
- [x] `molecule init` (bootstrap local workspace config)
**Platform constraint reminders (from `constraints-and-rules.md`):**
- Postgres is the source of truth. CLI commands that mutate state ultimately write to Postgres via the control plane.
+22 -17
View File
@@ -130,24 +130,29 @@ is set to `.` (repo root) since the main package is at `cmd/molecule`.
## KI-005 — No integration test for the full CLI lifecycle
**File:** `tests/` (does not exist)
**Status:** Not yet implemented
**File:** `cmd/molecule/molecule_test.go`, `internal/`
**Status:** ✅ Resolved
**Severity:** Medium
### Symptom
There are no tests at all (per `go test ./...` — no packages match).
As subcommands are built, there is no test harness for end-to-end CLI testing
(e.g. `molecule workspace create --name test --output json` → verify JSON output).
### Resolution
`cmd/molecule/molecule_test.go` contains 32 table-driven integration tests
covering the full CLI command surface. Each test:
- Starts a `httptest.Server` that mirrors the platform REST API (workspace CRUD,
agent inspection, delegation, health, audit, config, completion scripts).
- Builds the `molecule` binary via `go build -o <tempdir>/molecule .`
- Executes it with `exec.Command` and validates stdout/stderr output.
### Impact
Each subcommand will be shipped without regression protection. Manual testing
is required for every release. The absence of a `tests/` directory also means
there is no fixture for CLI integration testing with recorded API responses.
Test coverage includes:
- Root help, workspace/agent/platform/config help
- `workspace list`, `workspace inspect`, `workspace create`, `workspace delete`,
`workspace restart`, `workspace audit`, `workspace delegate`
- `agent list`, `agent inspect`, `agent send`, `agent peers`
- `platform health`, `platform audit`
- `config init`, `config list`
- `init`, `init --force`
- `completion bash/zsh/fish/powershell`
- Error paths: missing workspace, missing agent, unknown subcommand,
missing required args, duplicate init
### Suggested fix
Add `tests/` with:
- `cmd/molecule/molecule_test.go` — table-driven tests for each subcommand
using `exec.Command("molecule", ...)` against a built binary
- Use `molecule-sdk-python` fixture server or recorded API responses for
offline testing
- Add `go test ./...` to CI; require >0 test packages before merge
Run `go test ./...` from the repo root to execute. No live platform required —
all tests use `httptest.Server` fixtures.