Repository navigation
test(graph): pin what a first build takes from a replace_on_cycle spec's runtime_deps - #3921
Merged
Merged
Conversation
…c's runtime_deps gominimal/arch#206 asks whether runtime_deps in a replace_on_cycle spec work in the tool of today. Five planner tests pin the answer, through the Nickel contract, the decoder, the loader, the planner and the spec hasher: - an inline prebuilt replace_on_cycle spec may declare runtime_deps; - the build box of a first build comes from the lists of the packages, with each replace_on_cycle spec put in one for one, so the list of the inline spec brings nothing into the box; - the planner reads the list only to find what to build; - a loop of inline prebuilt specs through runtime_deps plans to the end; - the list is in the spec hash of each dependent. The doc comment of each test says which assertions the rule of arch D-29 / OQ-63 is expected to flip. No production code changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
bryan-minimal
marked this pull request as ready for review
December 2, 2026 00:17
Contributor
|
Approved: no findings at Nothing to do. Clobber: none: the diff only appends to the test module. |
norrietaylor
approved these changes
Dec 2, 2026
Member
There was a problem hiding this comment.
Read at d08fd84. The change is tests only in crates/graph/src/planner.rs, and the new cases pin what the title says. No findings.
bryan-minimal
added this pull request to the merge queue
Dec 3, 2026
bryan-minimal
added a commit
that referenced
this pull request
Dec 3, 2026
… fix Experiment, not for merge; a separate commit so it can be dropped. With the fix, two tests of #3921 failed in CI (and only those two in the workspace): breaker_runtime_deps_add_builds_to_the_plan_but_nothing_to_a_build_box and loop_of_prebuilt_breakers_through_runtime_deps_plans_to_the_end. Every build box in those plans stays the same. What moves: the replace_on_cycle spec of "a" now comes from the lazy path in next() one phase later (the walk from "b" closes the cycle at "b", which has none), and "c (prebuilt)", which no box used, is no longer fetched. The assertions that the first failure hid (without_list, by_breaker) are expectations derived by hand, to be checked by this run. With the fix the by_package half of the loop test no longer plans the loop of prebuilts; the comment says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
gominimal/arch#206 asks: "Do
runtime_depsin areplace_on_cyclespec work in the tool of today?" This PR adds five tests tocrates/graph/src/planner.rsthat pin what the planner of today does with such a list. It changes no production code.The fixture is one small graph, written in Nickel as a package tree writes it: packages
aandbin a cycle, a packagecthat needsato build, and a plain packaged.aandceach have an inlineprebuiltreplace_on_cyclespec. Theruntime_depsof packageanamedand neverc. Each test chooses what the two inline specs name.The answer for the tool of today
BuildSpeccontract, the decoder and the loader acceptruntime_depson an inlineprebuiltspec and keep it apart from the list of the package.breaker_runtime_deps_are_accepted_and_kept_apart_from_the_packageruntime_depsalso plans, in both ways of writing it (each names the package of the other; each names the inline spec of the other). Aprebuiltis ready at once and its box is empty.loop_of_prebuilt_breakers_through_runtime_deps_plans_to_the_endbgetsa (prebuilt)in the place ofa, anddfrom the list of the PACKAGEa. It never getscorc (prebuilt), whether the inline spec ofanames nothing, the packagec, orc (prebuilt)itself.first_build_box_takes_the_package_runtime_deps_not_the_breaker_runtime_depsctwo times and fetchesc (prebuilt), and no box ofaorbholds either. Without the list the plan has noc, and each box ofaandbis the same.breaker_runtime_deps_add_builds_to_the_plan_but_nothing_to_a_build_boxdstays.breaker_runtime_deps_are_in_the_spec_hash_of_a_dependentSo the list "works" in that nothing refuses it and it is hashed, and it does not work in the sense of arch D-29 / OQ-63 (owner ruling, 2026-11-28): the box of a first build is that of the package lists, with each
replace_on_cyclespec put in one for one. The doc comment of each test says which assertions an implementation of D-29 is expected to flip. None is#[ignore].Testing
Nothing was compiled or run on a workstation; CI is the only run of these tests.
All five ran and passed in CI on the first push (
d08fd84a0), with no re-run and no change to an assertion:PASSfor each of the fivegraph planner::tests::…names of the table; summary "6921 tests run: 6921 passed".graphcrate (its scope is the darwin crates), so the run above is the only one, on Linux.The expected plans were written from a reading of
planner.rs,transitives.rsandspec_hasher.rsbefore any run, and the run agreed with each.What this does not show
Build::with_deps). That the orchestrator makes the box from exactly that list is from readingcrates/orchestrator/src/state.rsandlocal_backend.rs(override_deps), and no test here runs it. The builders of gominimal/build-servers were not read for this.BuildSpeccontract ofminimal.ncl. No spec of gominimal/pkgs was evaluated.Dep::Cached), which the tests do not cover.check(the dependency-list check of an output) andmip pkg upload-cacheuseTransitivesin their own ways and are not covered.Refs: gominimal/arch#206, #1305
Checklist
BREAKING CHANGE:footer present if this is a breaking change (none)🤖 Generated with Claude Code
Summary by CodeRabbit