Validate FreeBSD daemon store RPC

This commit is contained in:
2026-04-01 14:10:53 +02:00
parent 12afb2bab3
commit c3a2d45a02
3 changed files with 363 additions and 0 deletions

View File

@@ -1646,3 +1646,80 @@ Current assessment:
- Phase 5.2 is now satisfied on the current FreeBSD prototype track
- the next step is no longer “can we emit a derivation at all?” but “can the same daemon/store path accept and execute a derivation-backed build request successfully?”
## 2026-04-01 — Phase 5.3 completed: minimal daemon/store RPC integration validated on FreeBSD
Completed work:
- added a runnable daemon/store RPC validation harness:
- `tests/guix/run-phase5-daemon-rpc.sh`
- wrote the Phase 5.3 report:
- `docs/reports/phase5-daemon-rpc-freebsd.md`
- ran the daemon/store RPC harness successfully and captured metadata under:
- `/tmp/phase5-daemon-rpc-metadata.txt`
Important findings:
- the patched checkout can now contact a real FreeBSD-aware daemon over a Unix socket and submit a derivation-backed build request successfully
- the resulting build path is a real `/frx/store` output rather than a simulated prototype artifact
- the successful metadata path now includes the full minimal chain needed for later system work:
- checkout command path
- daemon RPC
- derivation submission
- build execution
- store output materialization
- observed metadata confirmed:
- `drv_path=/frx/store/...-phase5-freebsd-daemon-build-0.drv`
- `out_path=/frx/store/...-phase5-freebsd-daemon-build-0`
- `payload=phase5-daemon-build-source`
- `source_path=/frx/store/...-phase5-source.txt`
- this step was exercised through the Fruix-facing checkout boundary:
- `./pre-inst-env fruix repl -- ...`
which means the user-facing transition is now connected to actual daemon/store activity, not just to help text or version banners
Current assessment:
- Phase 5.3 is now satisfied on the current FreeBSD prototype track
- the project now has a real but narrow end-to-end host-side execution path on FreeBSD:
- runnable checkout
- Fruix front-end boundary
- real derivation emission
- daemon/store RPC
- successful derivation-backed build into `/frx/store`
## 2026-04-01 — Phase 5 completed on the current FreeBSD prototype track
Phase 5 is now considered complete for the active FreeBSD amd64 prototype path.
Why this milestone is satisfied:
- **Phase 5.1** success criteria were met on the prototype track:
- the checkout runtime blocker around `leave-on-EPIPE` was root-caused and fixed in the patch queue
- the uninstalled checkout command path now runs on FreeBSD
- a first user-facing `fruix` command boundary was established
- **Phase 5.2** success criteria were met on the prototype track:
- a real package object was lowered through `package->bag` and `bag->derivation`
- a real derivation was emitted targeting `/frx/store`
- **Phase 5.3** success criteria were met on the prototype track:
- a real checkout command path contacted a FreeBSD-aware daemon/store path
- that path accepted and executed a derivation-backed build request
- the resulting output was materialized successfully in `/frx/store`
Important scope note:
- this completes the **real checkout and host runtime unblocking milestone** on the current prototype track, not full upstream-package-graph support for arbitrary native FreeBSD package builds yet
- the successful derivation/build path currently uses a deliberately minimal custom package/build-system path to isolate real daemon/store viability from still-unresolved upstream bootstrap and package-graph assumptions for native FreeBSD
- nevertheless, the core Phase 5 question has now been answered positively:
- the checkout runs
- real derivations can be emitted
- the daemon can be built far enough to serve store RPC
- and derivation-backed builds can succeed into `/frx/store`
Next recommended step:
1. begin Phase 6.1 by moving from the minimal custom derivation-backed package path to at least one real FreeBSD store-backed package build driven by Fruix/Guix mechanisms
2. then integrate the already validated jail/build-user model more directly into the live daemon build path
3. continue preserving the selective Fruix naming policy:
- Fruix at the product boundary
- `/frx` as the canonical store root
- stable upstream-derived internal names unless there is strong architectural value in renaming them

View File

@@ -0,0 +1,71 @@
# Phase 5.3: Minimal daemon/store RPC integration validated on FreeBSD
Date: 2026-04-01
## Summary
This step validates that the FreeBSD-aware checkout can do more than emit a derivation: it can contact a real daemon/store path and submit an actual derivation-backed build request that succeeds into `/frx/store`.
Added file:
- `tests/guix/run-phase5-daemon-rpc.sh`
## Validation command
Run command:
```sh
METADATA_OUT=/tmp/phase5-daemon-rpc-metadata.txt \
./tests/guix/run-phase5-daemon-rpc.sh
```
## What the harness does
The harness:
1. reuses the patched checkout/runtime setup from Phase 5.1
2. starts the patched `guix-daemon` on a temporary Unix socket
3. invokes the checkout through the user-facing boundary:
- `./pre-inst-env fruix repl -- ...`
4. defines a minimal custom package with the same low-level FreeBSD build system style used in Phase 5.2
5. lowers that package to a derivation
6. submits the resulting derivation to the daemon through `build-derivations`
7. validates the built output content in `/frx/store`
## Observed results
Observed metadata included:
- `drv_path=/frx/store/...-phase5-freebsd-daemon-build-0.drv`
- `out_path=/frx/store/...-phase5-freebsd-daemon-build-0`
- `payload=phase5-daemon-build-source`
- `source_path=/frx/store/...-phase5-source.txt`
- `frontend_invocation=./pre-inst-env fruix repl -- ...`
This demonstrates that:
- the checkout can contact a real daemon over a Unix socket on FreeBSD
- the daemon accepts a derivation-backed build request
- the build succeeds into `/frx/store`
- the resulting output is a real store item
- the source was itself materialized as a store path and referenced by the built output path
## Important findings
- the FreeBSD daemon path is now operational enough to support a narrow but real end-to-end flow:
- checkout command path
- daemon RPC
- derivation submission
- build execution
- store output materialization
- this validation intentionally used a minimal custom derivation-backed package rather than a full upstream GNU package graph, so the result isolates actual daemon/store viability from unrelated unresolved bootstrap-package assumptions
- the command path was exercised through the Fruix-facing frontend boundary (`fruix repl`), which is important because Phase 5 is not just about making the upstream-derived checkout work internally, but about beginning the transition to Fruix as the operator-facing identity
## Conclusion
Phase 5.3 is satisfied on the current FreeBSD prototype track:
- a real checkout command path can contact a FreeBSD-aware daemon/store path
- that path accepts and executes a derivation-backed build request
- the build succeeds into `/frx/store`
- the Fruix-facing checkout frontend is now being exercised against the real daemon/store path rather than only against no-op or help-text commands