feat(eliminate-frontend-makefile): task 3.3 - update live documentation (11 files)
Removes every live current-fact reference to src/frontend/Makefile targets or Makefile-specific fixed paths across 11 docs (steering, frontend/CLAUDE.md, root CLAUDE.md, deployment docs, and two skill docs), replacing with the Meson-based equivalents established by tasks 1-3.2: /xce-build apiserver, meson test --suite apiserver, direct tests/regression/run.sh invocation. Round-1 review rejected the first pass: xce-deploy-ha/SKILL.md had over-corrected by deleting all mention of deploy-ha.sh's still-real /tmp/apiserver legacy fallback (that script's discovery logic is unchanged, unlike run-resource-verify.sh's, which genuinely lost its fallback in task 3.1 -- xce-test-resources/SKILL.md's identical- looking edit was correct for that reason). Fixed by restoring an accurate, Makefile-free description of the real fallback at all four touched sites. Re-reviewed and approved. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XYdtrEWWZfKRRGED7raEYg
This commit is contained in:
parent
483cac3dcb
commit
f5fbc6bcac
12 changed files with 56 additions and 48 deletions
|
|
@ -137,14 +137,13 @@ kill -9 $(pgrep xce_scheduler) 2>/dev/null || true
|
|||
|
||||
## Go Frontend Build
|
||||
|
||||
Go builds use `src/frontend/Makefile` for development, Meson for production:
|
||||
Go builds use Meson for both development and production — apiserver and xcecli have no separate build system:
|
||||
|
||||
```bash
|
||||
make build-server # → /tmp/apiserver
|
||||
make build-cli # → /tmp/xce_static (CGO_ENABLED=0)
|
||||
make test # unit tests (CGO_ENABLED=0)
|
||||
make test-backend # CGO-backed backend tests (needs nix dev shell)
|
||||
make test-integration # full regression suite (needs XCE_BIN + SRV_URL)
|
||||
/xce-build apiserver # → <build_dir>/frontend/apiserver/xce_apiserver, xcecli; runs unit tests (CGO_ENABLED=0)
|
||||
meson test -C <build_dir> --suite apiserver # CGO-backed backend tests (needs nix dev shell)
|
||||
XCE=<build_dir>/frontend/xcecli/xcecli URL=<url> \
|
||||
src/frontend/tests/regression/run.sh # full regression suite
|
||||
```
|
||||
|
||||
Go modules are independent — `apiserver` and `xcecli` have separate `go.mod` files, no `go.work`.
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ Plugin-based components add their own subdirectory:
|
|||
**Go tests** (co-located `_test.go`):
|
||||
- Table-driven unit tests, `t.TempDir()` for fixtures
|
||||
- Global state reset helpers (e.g., `resetRBACState()`) for test isolation
|
||||
- `make test` = unit only; `make test-all` = unit + integration
|
||||
- `/xce-build apiserver` = unit tests only; add `meson test -C <build_dir> --suite apiserver` (backend) and `tests/regression/run.sh` (integration) for full coverage
|
||||
|
||||
## Code Organization Principles
|
||||
|
||||
|
|
|
|||
|
|
@ -27,19 +27,18 @@ All controller state is in-memory. No persistent database in the API tier; job/q
|
|||
|
||||
| System | Scope |
|
||||
|--------|-------|
|
||||
| **Meson ≥ 1.5** | C daemons + Go modules via `tools/go_build` wrapper |
|
||||
| **Make** | Go development loop (build/test) from `src/frontend/` |
|
||||
| **Meson ≥ 1.5** | C daemons + Go modules via `tools/go_build` wrapper — sole build/test path for apiserver/xcecli |
|
||||
| **Nix flakes** | Hermetic dev environment, AppImage packaging |
|
||||
|
||||
```bash
|
||||
# Full build (C + Go, debug + ASAN)
|
||||
/xce-build
|
||||
|
||||
# Go development loop (from src/frontend/)
|
||||
make build-server # → /tmp/apiserver
|
||||
make build-cli # → /tmp/xce_static (CGO_ENABLED=0)
|
||||
make test # unit tests
|
||||
make test-integration # regression suite (needs XCE_BIN + SRV_URL)
|
||||
# Go development loop (apiserver + xcecli)
|
||||
/xce-build apiserver # builds both binaries + runs unit tests
|
||||
meson test -C <build_dir> --suite apiserver # CGO-backed backend tests
|
||||
XCE=<build_dir>/frontend/xcecli/xcecli URL=http://localhost:8080 \
|
||||
src/frontend/tests/regression/run.sh # regression suite
|
||||
|
||||
# Nix package builds (from src/)
|
||||
nix build .#xcecore # C daemons + apiserver
|
||||
|
|
@ -78,8 +77,8 @@ Early return on every error. Log with zap fields before returning.
|
|||
- **TDD mandatory**: Write failing test first, then implementation.
|
||||
- **Go unit tests**: Table-driven, no external dependencies, `t.TempDir()` for fixtures.
|
||||
- **C tests**: Add test case in `testsuite/` before modifying implementation.
|
||||
- `make test` must pass without a live server.
|
||||
- `make test-integration` requires `XCE_BIN` + `SRV_URL` env vars.
|
||||
- `/xce-build apiserver`'s unit-test step must pass without a live server.
|
||||
- `tests/regression/run.sh` requires `XCE` + `URL` env vars.
|
||||
|
||||
### Code Formatting
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
- **TDD mandatory**: Write a failing test first, then the minimal implementation. The cycle is Red → Green → Refactor.
|
||||
- Test behavior, not implementation details.
|
||||
- Tests must run without a live server or external services.
|
||||
- A change is not complete until `make test` (and `make test-integration` where applicable) passes.
|
||||
- A change is not complete until `/xce-build apiserver`'s unit-test step (and `tests/regression/run.sh` where applicable) passes.
|
||||
|
||||
## Go Tests (apiserver / xcecli)
|
||||
|
||||
|
|
@ -44,9 +44,9 @@ func TestPermissions(t *testing.T) {
|
|||
**Fixtures**: use `t.TempDir()` for file-system state; never rely on absolute paths or external services.
|
||||
|
||||
**Build targets**:
|
||||
- `make test` — unit tests only (`CGO_ENABLED=0`)
|
||||
- `make test-backend` — CGO-backed backend tests (requires nix dev shell + build dir)
|
||||
- `make test-integration` — full regression suite (requires `XCE_BIN` and `SRV_URL` env vars)
|
||||
- `/xce-build apiserver` — unit tests only (`CGO_ENABLED=0`), plus the build
|
||||
- `meson test -C <build_dir> --suite apiserver` — CGO-backed backend tests (requires nix dev shell + build dir)
|
||||
- `tests/regression/run.sh` — full regression suite (requires `XCE` and `URL` env vars, run directly)
|
||||
|
||||
## C Tests (controller / scheduler / lib)
|
||||
|
||||
|
|
@ -92,4 +92,4 @@ extern void reset_ha_state(ha_state_t *s);
|
|||
- Mock **external dependencies only** (network calls, file I/O that crosses component boundaries)
|
||||
- Do **not** mock the system under test
|
||||
- In-memory stores (`store/`) are real — use them directly in unit tests
|
||||
- CGO bridge (`backend/`) is covered by `make test-backend` — do not stub it in unit tests
|
||||
- CGO bridge (`backend/`) is covered by `meson test -C <build_dir> --suite apiserver` — do not stub it in unit tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue