Skip to content

chore(cli): make the CLI's test-project references opt-in - #704

Merged
IanFrelinger merged 1 commit into
masterfrom
chore/cli-test-references-opt-in
Oct 4, 2026
Merged

IanFrelinger merged 1 commit into
masterfrom
chore/cli-test-references-opt-in

Conversation

@IanFrelinger

Copy link
Copy Markdown
Owner

Summary

Makes Ashlar.CLI's references to Ashlar.Tests.Domain, Ashlar.Tests.Application and Ashlar.Tests.Infrastructure opt-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.API with 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 passed false, 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/ is Ashlar.CLI.csproj, and only to stop referencing test projects by default; no CLI source changes.

Changes

  • Ashlar.CLI.csproj: the test-project ItemGroup condition is now == 'true' (was != 'false'), with a comment saying why.
  • Ashlar.Tests.CLI.csproj: references Ashlar.Tests.Application directly. AgentCommandTests and AnalyzeCommandTests use its TestHelpers, 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 =false flags in reusable-release-nuget.yml, docs/AuthoringBricks.md and four scripts (redundant now, still correct), and Dockerfile.cli's SkipCopyAssemblies.

Testing

Not built: the environment that wrote this has no dotnet, so CI is the first build. build-core and the readiness lanes compile the CLI; the security gate's tier C builds and runs Ashlar.Tests.CLI.

Checked statically:

  • A condition-aware walk of the default net10.0 build: the CLI goes from 39 projects to 23, none of them test projects; Ashlar.Tests.CLI goes from 42 to 31.
  • Every using Ashlar.* in the CLI and in Ashlar.Tests.CLI resolves inside its new closure. Removing the new Ashlar.Tests.Application reference makes that check fail on AgentCommandTests.cs, so it catches the break this PR fixes.
  • No workflow, script, Makefile target or Dockerfile runs these test projects with --no-build after building only the CLI.
  • The all-edges closure that ReadinessClosureConventionTests walks is unchanged for Ashlar.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.py reports current, and pr-testing-strategy-gate.sh passes on this diff with this description. The two gates it suggests, make application-gate-tier-a and make dependency-boundary-gate, both need dotnet and were not run.

This may also unblock ashlar export native, whose single-file publish CONTINUITY.md says these references broke (NETSDK1191). Not verified.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TTy9BAd1T986FKZy7u9qHJ


Generated by Claude Code

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
@IanFrelinger
IanFrelinger merged commit 6d66c7e into master Oct 4, 2026
32 checks passed
@IanFrelinger
IanFrelinger deleted the chore/cli-test-references-opt-in branch October 4, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant