Repository navigation
chore(cli): make the CLI's test-project references opt-in - #704
Merged
Merged
Conversation
Ashlar.CLI referenced Ashlar.Tests.Domain, Ashlar.Tests.Application and Ashlar.Tests.Infrastructure unless a build passed -p:IncludeTestProjectReferences=false. No CLI source uses a type from them, and the CLI commands that run their tests (ci verify, dogfood, validate) build them first. Yet every default build, pack and publish of the CLI compiled them: 39 projects instead of 23, including, on net10.0, Ashlar.API and its MCP, A2A and AWS ingress projects. The release pipeline already passed false. The references are now opt-in: -p:IncludeTestProjectReferences=true. Ashlar.Tests.CLI used TestHelpers from Ashlar.Tests.Application through those references (AgentCommandTests, AnalyzeCommandTests), so it now references that project directly. docs/knowledge-graph.json is regenerated for the new edge. Left in place on purpose: the explicit =false flags in the release workflow, docs/AuthoringBricks.md and four scripts (redundant now, still correct), and Dockerfile.cli's SkipCopyAssemblies. This may also unblock `ashlar export native`, whose single-file publish CONTINUITY.md says these references broke (NETSDK1191); not verified. Checked statically; nothing was built, since the environment that wrote this has no dotnet. A condition-aware walk of the default net10.0 build takes the CLI from 39 projects to 23, none of them test projects. Every `using Ashlar.*` in the CLI and in Tests.CLI resolves inside its new closure. No workflow, script, Makefile target or Dockerfile runs these test projects with --no-build after building only the CLI. All 23 gates in scripts/ci/run-repo-gates.sh pass before and after. CI is the first build: build-core and the readiness lanes compile the CLI, and the security gate's tier C builds and runs Ashlar.Tests.CLI. [coordinated-integration] The only product file touched under application/ is Ashlar.CLI.csproj, and only to stop referencing test projects by default; no CLI source changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTy9BAd1T986FKZy7u9qHJ
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
Makes
Ashlar.CLI's references toAshlar.Tests.Domain,Ashlar.Tests.ApplicationandAshlar.Tests.Infrastructureopt-in (-p:IncludeTestProjectReferences=true). They were on unless a build passed=false, so a default CLI build compiled 39 projects instead of 23, including, on net10.0,Ashlar.APIwith its MCP, A2A and AWS ingress projects.No CLI source uses a type from those projects, and the CLI commands that run their tests (
ci verify,dogfood,validate) build them first. The release pipeline already passedfalse, so NuGet packages do not change; source builds and the CLI container image no longer carry the test assemblies.[coordinated-integration] The only product file touched under
application/isAshlar.CLI.csproj, and only to stop referencing test projects by default; no CLI source changes.Changes
Ashlar.CLI.csproj: the test-projectItemGroupcondition is now== 'true'(was!= 'false'), with a comment saying why.Ashlar.Tests.CLI.csproj: referencesAshlar.Tests.Applicationdirectly.AgentCommandTestsandAnalyzeCommandTestsuse itsTestHelpers, which used to arrive through the CLI's references.docs/knowledge-graph.json: regenerated for that new edge.CHANGELOG.md: an Unreleased entry.Left in place on purpose: the explicit
=falseflags inreusable-release-nuget.yml,docs/AuthoringBricks.mdand four scripts (redundant now, still correct), andDockerfile.cli'sSkipCopyAssemblies.Testing
Not built: the environment that wrote this has no
dotnet, so CI is the first build.build-coreand the readiness lanes compile the CLI; the security gate's tier C builds and runsAshlar.Tests.CLI.Checked statically:
Ashlar.Tests.CLIgoes from 42 to 31.using Ashlar.*in the CLI and inAshlar.Tests.CLIresolves inside its new closure. Removing the newAshlar.Tests.Applicationreference makes that check fail onAgentCommandTests.cs, so it catches the break this PR fixes.--no-buildafter building only the CLI.ReadinessClosureConventionTestswalks is unchanged forAshlar.Tests.CLI(42 projects before and after), so the readiness path lists need no edits.scripts/ci/run-repo-gates.sh: all 23 gates pass before and after.verify-knowledge-graph-current.pyreports current, andpr-testing-strategy-gate.shpasses on this diff with this description. The two gates it suggests,make application-gate-tier-aandmake dependency-boundary-gate, both needdotnetand were not run.This may also unblock
ashlar export native, whose single-file publishCONTINUITY.mdsays these references broke (NETSDK1191). Not verified.🤖 Generated with Claude Code
https://claude.ai/code/session_01TTy9BAd1T986FKZy7u9qHJ
Generated by Claude Code