335f5444

By: lcnbr <im@lcnbr.ch>

separate nextest runtime fixtures from compiled archives

The clean invariant should be:
A downstream test may depend on a dependency’s compiled library, build script, and proc macro—but never on that dependency’s test sources or test binaries.

The current “test support” layer violates this: it recursively consumes dependency test-support artifacts and runs cargo test --no-run itself ([flake.nix (line 1889)](/home/lcnbr/dev/gammaloop/flake.nix:1889)). craneTestBinaryArtifacts is then merely an alias for that mixed artifact ([flake.nix (line 1932)](/home/lcnbr/dev/gammaloop/flake.nix:1932)).
third-party dependencies
          ↓
test-feature library support
(production sources only)
          ↓
package-local test binaries
(own tests/bins/examples only)
          ↓
nextest archive
          ↓
nextest run + runtime fixtures
Plan
Split source inputs
Introduce two source tiers within the existing source abstraction:
Production: manifests, build.rs, library sources, proc macros, and declared compile-time assets.
Own tests: production source plus that package’s tests, test-only bins/examples, snapshots, and test compile-time inputs.
Dependencies always use production sources. Only the package currently being tested receives its own-test source. This replaces the whole-directory behavior at [flake.nix (line 485)](/home/lcnbr/dev/gammaloop/flake.nix:485).

Replace mixed test support with library-only support
Rename/rework craneTestSupportArtifacts into something like craneTestDependencyArtifacts.
It should:
Run a feature-anchor/library build, never cargo test.
Preserve build scripts and host proc-macro artifacts.
Handle existing dev-dependency SCCs for feature unification.
Consume only library-support artifacts from dependencies.

Make test binaries genuinely package-local
craneTestBinaryArtifacts.<package> becomes a real derivation:
Input: the package’s test-dependency support.
Source: full source only for that package.
Command: cargo test --no-run -p <package>.
Output: only that package’s newly built test/bin units.
nextestPackageTestBinaryArtifactFor then consumes this artifact directly instead of the recursive mixed support artifact at [flake.nix (line 2294)](/home/lcnbr/dev/gammaloop/flake.nix:2294).

Share by resolved feature context
Key shared library support by the sorted resolved feature vector, target, profile, and relevant environment—not by CI group name.
Thus identical feature contexts share one cached derivation, while Python-only features remain isolated from ordinary integration tests. This balances reuse against over-invalidation better than one universal artifact.

Separate compilation, packaging, and runtime inputs
Narrow nextestSrcFor at [flake.nix (line 2202)](/home/lcnbr/dev/gammaloop/flake.nix:2202):
Compile/archive inputs: target package sources and dependency production sources.
Runtime fixtures: tests/resources, CLI examples, etc., supplied only to the run derivation where possible.
A runtime fixture edit should rerun its tests, but should not recompile or repackage binaries.

Prove the cache boundaries

Mutation	Must change	Must remain identical
vakint/tests/*	Vakint test binary/archive/check	Vakint library support and every downstream artifact
vakint/src/*	Vakint support and true consumers	Unrelated Linnet/Clinnet artifacts
Gammalooprs test only	Gammalooprs test artifact/core archive	Integration test binary
Python-only feature	Python feature context	Ordinary integration context
Runtime fixture	Owning run check	Compilation and archive derivations

The decisive check is byte-for-byte identical downstream drvPaths, supplemented by nix why-depends and nextest inventory comparisons.
I would implement this in two jj changes:
Source/artifact separation with unchanged nextest grouping and behavior.
Runtime-input separation and archive slimming after measuring the first change.
Two unavoidable caveats remain: workspace manifests and Cargo.lock are coarse inputs, and #[cfg(test)] code embedded directly in production .rs files still changes the production source hash. Synthetic manifests or moving inline tests can improve those later, but they should not block the high-value separation above.
gammaloopgammaloop-checkgammaloop-clippygammaloop-docgammaloop-fmtgammaloop-guppy-workspace-graphgammaloop-nextest-binaries-clinnetgammaloop-nextest-binaries-coregammaloop-nextest-binaries-integrationgammaloop-nextest-binaries-linnetgammaloop-nextest-binaries-python-apigammaloop-nextest-binaries-spensogammaloop-nextest-binaries-vakintlinnest-wasmconfiguredeploy:nix-ci-passeddevShellcargoArtifactsci-workspace-graph-jsonclinnet-clicrate-deps-gammaloop-workspace-hackcrate-gammaloop-workspace-hackcrate-test-binaries-clinnetcrate-test-binaries-gammaloop-apicrate-test-binaries-gammaloop-integration-testscrate-test-binaries-gammaloop-tracing-filtercrate-test-binaries-gammaloop-tracing-filter-macroscrate-test-binaries-gammalooprscrate-test-binaries-idensocrate-test-binaries-linnestcrate-test-binaries-linnetcrate-test-binaries-linnet-pycrate-test-binaries-spensocrate-test-binaries-spenso-hep-libcrate-test-binaries-spenso-macroscrate-test-binaries-spynso3crate-test-binaries-symbolica-utilscrate-test-binaries-vakintcrate-test-dependencies-clinnetcrate-test-dependencies-gammaloop-apicrate-test-dependencies-gammaloop-integration-testscrate-test-dependencies-gammaloop-tracing-filtercrate-test-dependencies-gammaloop-tracing-filter-macroscrate-test-dependencies-gammalooprscrate-test-dependencies-idensocrate-test-dependencies-linnestcrate-test-dependencies-linnet-pycrate-test-dependencies-spensocrate-test-dependencies-spenso-hep-libcrate-test-dependencies-spynso3crate-test-dependencies-symbolica-utilscrate-test-dependencies-vakintgammaloopgammaloop-python-modulegammaloopApiPackageArtifactslinnest-wasmlinnestWasmCargoArtifactsnix-ci-check-gammaloop-doctestnix-ci-check-gammaloop-nextest-clinnetnix-ci-check-gammaloop-nextest-corenix-ci-check-gammaloop-nextest-integrationnix-ci-check-gammaloop-nextest-linnetnix-ci-check-gammaloop-nextest-python-apinix-ci-check-gammaloop-nextest-spensonix-ci-check-gammaloop-nextest-vakintnix-ci-passedx86_64-linuxtest:nix-ci-check-gammaloop-doctesttest:nix-ci-check-gammaloop-nextest-clinnettest:nix-ci-check-gammaloop-nextest-coretest:nix-ci-check-gammaloop-nextest-integrationtest:nix-ci-check-gammaloop-nextest-linnettest:nix-ci-check-gammaloop-nextest-python-apitest:nix-ci-check-gammaloop-nextest-spensotest:nix-ci-check-gammaloop-nextest-vakint