feat(eliminate-frontend-makefile): task 2 - migrate xce-build.sh off Make

Replaces both `cd frontend && make test` call sites (apiserver and
all cases) with direct `go test` invocations covering the identical
package set/flags, mirroring the xcecli case's already-Makefile-free
style. Verified: apiserver case end-to-end, matching the captured
pre-change baseline exactly; all case verified by proxy (byte-
identical replacement line, apiserver instance fully verified) since
a full /xce-build all run is currently blocked earlier in the
pipeline by two pre-existing, unrelated C-test bugs (bug-1723,
bug-1758) -- noted in Implementation Notes for task 4's awareness.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYdtrEWWZfKRRGED7raEYg
This commit is contained in:
Rongsong Shen 2026-09-03 13:48:35 +00:00
parent a4a2734222
commit 3c199f376a
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
2 changed files with 4 additions and 3 deletions

View file

@ -15,7 +15,7 @@
- Observable: a captured failing run shows a real link-time error tied to the removed dependency; the immediately following restored run passes with no other change
- _Requirements: 3.2, 3.3_
- [ ] 2. (P) Core: migrate xce-build.sh's unit-test invocation off Make
- [x] 2. (P) Core: migrate xce-build.sh's unit-test invocation off Make
- Replace both `cd frontend && make test` call sites (the `apiserver` case and the `all` case) with direct `go test` invocations covering the exact same package set and flags the Makefile's `test` target runs today (apiserver: `store`/`utils`/`controllers`/`backend` under `CGO_ENABLED=0`; xcecli: full module), mirroring the `xcecli` case's own already-Makefile-free style in the same file
- Observable: `/xce-build apiserver` and `/xce-build all` run unit tests with zero invocation of `make`, reporting the identical test package set and pass/fail counts as the pre-migration baseline
- _Requirements: 2.1, 2.2, 2.3_
@ -83,4 +83,5 @@
## Implementation Notes
- Task 2: `/xce-build all` currently aborts (`set -euo pipefail`) at the pre-existing `meson test --print-errorlogs` step, BEFORE reaching the migrated Go-test line — two unrelated, already-logged C-side failures (bug-1723, LeakSanitizer on `xcelib_test`; bug-1758, `sched_core_events_test` deterministic failure), both predating this spec. Task 2's `all`-case line itself is verified (byte-identical to the fully-verified `apiserver`-case line), but this means task 4.1's "final go/no-go gate" and task 4.2's post-deletion re-validation will hit the SAME pre-existing abort when running `/xce-build all` — those tasks will need to either scope their validation to `/xce-build apiserver` + a separate `meson test` invocation that tolerates these 2 known-unrelated failures, or note them as pre-existing/out-of-scope rather than treating them as a regression from this spec.
- Task 1.2: design.md's Testing Strategy suggests `librtti_dep` as the example dependency to remove when proving the new backend test() exercises the real CGO path. Empirically (implementer + independent reviewer both reproduced this live), removing `librtti_dep` does NOT reproduce a link failure for the `apiserver/backend/...` test package — none of `librtti`'s exported symbols are actually pulled into this specific link unit's undefined-symbol set. `c_capnproto_dep` (real `capn_*` undefined-reference errors from `request.c`/`controller.capnp.c`) is the dependency that genuinely reproduces the failure and was used instead. `apiserver_cgo_deps` itself was left byte-identical to task 1.1's state (verification-only task, no permanent code change).

View file

@ -272,7 +272,7 @@ case "$COMPONENT" in
meson compile -C "$BUILD_DIR" apiserver xcecli
if [ "$RUN_TESTS" = 1 ]; then
echo "=== Running frontend Go unit tests ==="
cd frontend && make test
cd frontend/apiserver && CGO_ENABLED=0 go test ./store/... ./utils/... ./controllers/... ./backend/... -count=1 && cd ../xcecli && CGO_ENABLED=0 go test ./... -count=1
fi
;;
xcecli)
@ -319,7 +319,7 @@ case "$COMPONENT" in
echo "=== Running scheduler test (manual) ==="
"./$BUILD_DIR/scheduler/testsuite/sched_test"
echo "=== Running frontend Go unit tests ==="
cd frontend && make test
cd frontend/apiserver && CGO_ENABLED=0 go test ./store/... ./utils/... ./controllers/... ./backend/... -count=1 && cd ../xcecli && CGO_ENABLED=0 go test ./... -count=1
fi
;;
*)