rework gradient build as Build Requests (#234) - #240
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #234.
Summary
direct_buildownership graph with a per-orgbuild-requestproject (reserved name, server-managed, no settings UI). Lazy creation on first dispatch.gradient buildas a nix-free git-files diff upload (BLAKE3 content-addressed blobs, three-stepmanifest→blobs→dispatchflow). No Nix tooling runs on the client./nix/store/<hash>-sourcein pure Rust viaharmonia_store_core, writes the NAR throughnar_storage, queues signature placeholders, and dispatches an evaluation through the existing project/commit/eval pipeline.gradient downloadrewritten as an artefact-tree picker overGET /evals/{id}/artefacts. Selection syntax supports indices, ranges, andall; works interactively or via--products.hide_build_requests(DB column, backend PATCH, nix module option, frontend toggle, OpenAPI schema).direct_buildtable, thePOST /buildsroute, theGET /builds/direct/recentroute, themax_direct_build_sizeknob, and the eval/build access-context fallbacks.build_request_blobsweep via existingnar_ttl_hours, and expired-undispatchedupload_sessionsweep — both hooked into the existing cache cleanup tick.Breaking changes
services.gradient.settings.maxDirectBuildSizeis removed. Operators with that key set will need to drop it (no replacement;MAX_BUILD_REQUEST_SIZEis a 20 MiB constant).gradient build <derivation-path>is gone.gradient buildnow requires a git working tree and takes an optional[TARGET]attribute path.gradient download's--build-idflag is replaced by--evaluation+ product picker.POST /api/v1/buildsandGET /api/v1/builds/direct/recentreturn 404.Test plan
build_requests_manifest,build_requests_blobs,build_requests_dispatch,evals_artefacts,old_direct_build_gone.build_request_blob_sweep_evicts_stale,build_request_blob_sweep_disabled_when_ttl_zero,upload_session_sweep_deletes_expired_undispatched.materialise_source_narunit tests (deterministic hash,-sourcesuffix, base32 shape).gradient buildend-to-end against a dev server using a tracked git repo, verify the eval queues and logs stream.gradient downloadpicker walks the artefact tree on a completed eval.build-requestproject's Settings tab and the project-create form rejects the reserved name.