Build and test
Commands
dotnet build # whole solution (Conderis.slnx)
dotnet test Conderis.slnx # both test projects
dotnet test tests/Conderis.Core.Tests # domain, no web host, seconds
dotnet test tests/Conderis.Tests # HTTP, OAuth, MCP and rendered UI, about a minute
dotnet run --project src/Conderis # local web app
Test projects
| Project | What it covers | Database |
|---|---|---|
Conderis.Core.Tests |
Services: permissions, numbering, proposals, documentation pages, privacy deletion | SQLite in memory, one per test |
Conderis.Tests |
The running app through HTTP: sign-in, MCP tool calls, rendered pages, redirects, the contact form | SQLite |
Conderis.TestSupport |
Shared helpers such as the test database; contains no tests |
SQLite tests create the schema with EnsureCreated, not with migrations. A migration is therefore not exercised by the test run; see Database and migrations.
Guards worth knowing
These tests fail on problems that are easy to miss by looking at a page:
McpDiscoveryTests.ToolListStaysWithinItsContextBudgetlimits how many tools MCP advertises and how many characters their descriptions take (8 tools, 6,500 characters since #317). Every connected agent pays for that list in every session. When a new capability needs more room, shorten existing descriptions first and raise the limit only by what is left; record each step in the comment above the limits.ToolListMeasurement.BuiltV2ToolsMatchTheMeasuredSchemascompares the built MCP tools withtests/Conderis.Tests/ToolSurface/V2Prototype.cs. Change both together (#309).HttpTests.PublishedBatchV2ExampleIsStoredAsItStandsAndRetriedWithoutDuplicatessends the published/examples/conderis-batch-v2.jsonthroughitem_store, so the schema, example and server cannot drift apart.HttpTests.ScopedStylesMatchTheMarkupTheyStylecompares the scope ids in rendered markup with the served CSS bundle. A staleobjfolder after renaming a project produces a bundle that matches nothing, and component styles silently stop applying.SourceEncodingTestsrejects files that were saved with broken UTF-8.ItemNumberConcurrencyTestsruns against LocalDB, because only SQL Server shows whether two concurrent writers can receive the same item number.
Publishing and deploying
Deploying changes the live site for every user and agent: ask the owner first, and check git status, since another agent may be mid-edit.
dotnet publish src/Conderis -c Release -o artifacts/web
./scripts/Publish-Web.ps1 -Deploy
After a rename, delete src/Conderis/obj and bin first; an incremental publish can reuse generated files from before it. The deployment keeps remote files such as App_Data/keys, and the start applies pending migrations (#283). Never commit .env, publish settings or the generated artifacts/web/web.config.
Afterwards check that /connect answers 200 (the first request after a deployment waits for the start), and for MCP changes run a fresh headless session against production (claude -p with the conderis tools allowed) that recalls, creates and completes a task and changes a memory.