Relocate infra to $CODE/infra; keep $CODE as the workspace root#54
Open
krystophny wants to merge 6 commits into
Open
Relocate infra to $CODE/infra; keep $CODE as the workspace root#54krystophny wants to merge 6 commits into
krystophny wants to merge 6 commits into
Conversation
The repository was the workspace root, so its .git tracked every sibling code checkout as untracked noise and carried two accidental gitlinks (SIMPLE, libneo) with no .gitmodules. Make it the infra directory of a workspace. activate.sh, activate.fish and activate export INFRA (this repo) and derive CODE as its parent. Infra-owned paths (scripts, .venv, external, modules, images, local, lib, bin) move to $INFRA. $CODE stays the workspace root, so the codes keep resolving dependencies as $CODE/<name> via find_or_fetch. Sibling references ($CODE/libneo/build) and workspace navigation (cdcode, vscode) stay on $CODE; set_branch reads the infra repo via $INFRA. Drop the accidental SIMPLE and libneo gitlinks. Update setup.sh, the devcontainer build and postCreateCommand.sh, the release CI in main.yml, the STELLOPT and VMEC config paths, and the README to the new layout.
main.yml downloaded a pinned release tarball whose frozen activate.sh predates the infra relocation, so $INFRA was unset and $INFRA/scripts/checkout_branch.sh resolved to /scripts/... (exit 127). Check out the branch and rsync its sources over the tarball, keeping the release's prebuilt .venv and external, and relocate the venv shebangs to the new path.
activate.sh is meant for interactive shells; its add_to_path/add_to_library_path helpers return the guard status, so under the runner's bash -e the first absent dir ($INFRA/local/bin) aborted the step before the venv activated. Wrap the source in set +e/set -e so activation completes while build commands stay strict.
The codes read prebuilt third-party libs from $CODE/external (e.g. NEO-2's build links $CODE/external/fgsl-1.6.0/.libs/libfgsl.a). external is workspace- shared like the code checkouts, not infra-private, so revert it from $INFRA to $CODE and stop tracking it in the infra repo. setup.sh creates it; CI moves the release's external to the workspace; CODE_ROOT (STELLOPT make configs) points at $CODE. setup.yml release packaging flagged for tag-time validation.
9be1ed9 to
a14b19c
Compare
main.yml built every downstream code on each push to infra and never passed (0 of 94 runs): it built the unpinned tips of six repos in one sequential job against a frozen release tarball. Remove it. Add docs/development-model.md (proposed): workspace layout, the self-describing dependency graph, the per-code + release-time reverse-dependency testing model, the <DEP>_BRANCH convention, the release-branch flow, and YY.MINOR.PATCH versioning. The genuine external -> $CODE fix from earlier commits stays; the umbrella build it was chasing is gone.
docs/templates/downstream-integration.yml: per-consumer reverse-dep validation, dispatched with a libneo ref, no commit. docs/templates/upstream-release.yml: libneo release-branch + gate + bump-PR skeleton (untested, TODOs marked). Referenced by the development-model design note.
This was referenced May 28, 2026
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.
What
Make this repository the
infradirectory of a workspace instead of theworkspace root, and retire the umbrella integration CI that never passed.
activate.sh/.fishexportINFRA=$CODE/infraand deriveCODEas itsparent. Infra-private paths (
scripts,.venv,modules) move to$INFRA.$CODEstays the workspace root, so the codes keep resolving dependencies as$CODE/<name>(find_or_fetch) and prebuilt libraries as$CODE/external.SIMPLE,libneo) are dropped.main.ymlis removed. It built the unpinned tips of six code repos in onesequential job and never went green (0 of 94 runs). The replacement model is
in
docs/development-model.md: per-code CI at the source plus release-timereverse-dependency validation owned by the upstream.
Migration for users
Move your checkout one level down and repoint the activation line:
Verification
New activation resolves correctly. Simulated workspace with infra at
<ws>/infraand a
libneo/sibling:Before/after on the dependency-resolution contract, with infra at
<ws>/infra:Verified locally on macOS: variable resolution, venv activation, PATH and
library-path entries,
set_branch. CI is no longer the umbrella build; thatworkflow is removed rather than fixed.
Note
docs/development-model.mdis proposed, not settled. It documents the layout,the
<DEP>_BRANCHconvention, the release-branch flow, andYY.MINOR.PATCHversioning for group discussion.
setup.yml(the release-tarball builder) isleft in place but loses its only consumer with
main.ymlgone, so it needs aseparate decision.