Skip to main content

Test lanes

Agentstration separates test execution by runtime cost and dependency type. The root Agentstration.slnx remains the complete build graph, while the checked-in test solutions provide explicit execution boundaries.

Fast lane​

Fast tests do not start an ASP.NET Core host, open a relational database, spawn a child process, or contact a remote provider. They cover architecture rules, component behavior, mapping, validation, and in-process command behavior.

dotnet test --solution Agentstration.Tests.Fast.slnx --configuration Release --no-build --minimum-expected-tests 777 --max-parallel-test-modules 4

Integration lane​

Integration tests exercise a real boundary such as WebApplicationFactory, SQLite, Git, persistent Identity, or runtime reconstruction. This lane remains deterministic and offline by default. Tests marked Integration for a live model provider are opt-in and report inconclusive unless their documented environment variables are supplied.

dotnet test --solution Agentstration.Tests.Integration.slnx --configuration Release --no-build --minimum-expected-tests 954 --max-parallel-test-modules 2

Run both fast and integration solutions for complete required functional validation. Their union is the functional test inventory represented by the root solution.

API integration tests run in six independent test assemblies: Agentstration.Api.Flows.Tests, Agentstration.Api.Execution.Tests, Agentstration.Api.Resources.Tests, Agentstration.Api.DataSources.Tests, Agentstration.Api.Artifacts.Tests, and Agentstration.Api.Tests. These preserve the former consolidated module's cases and test names. After #1181, Resources exceeded its retained memory ceiling with 235 cases. Its Sources/Registry/Pack/function cases remain in Resources (111), including Data Source transport cases; Dataset/Knowledge/structured Storage cases run in DataSources (85), and Artifact cases run in Artifacts (39). The combined inventory is still 235. The three modules compile the same test-root resource fixtures and execute sequentially within each assembly, in separate processes. Each retains the 2048/2432 MiB warning/failure ceilings. The diagnostic job runs them one after another so process memory is released between groups; the Integration lane retains two concurrent modules. All six API projects participate in Integration and coverage; the three resource-family projects remain together in coverage shard A.

The #1044 reconciliation moves the 12 ToolDefinition and 5 relay API cases into the existing Agentstration.Api.Tests assembly, retaining the existing per-assembly host/Worker fixture pattern and preserving test namespaces and method names. Each assembly owns its fixture sources; the opt-in host instrumentation remains owned by the test root. Before redistribution, all 133 Management API cases passed, but the retained CI diagnostic measured 2831.1 MiB against its unchanged 2560 MiB ceiling. At that baseline, redistribution preserved all 1099 Integration cases (40 API and 116 Management API). Subsequent #1079 moved five Storage execution cases into Management Storage and added one StorageType administration case, leaving 112 Management API cases. Keep the existing process/worker limits and memory ceilings, and retain new diagnostic measurements before claiming a memory improvement.

By PR #1273, Management API had grown to 164 cases and again exceeded the same ceiling despite all tests passing. Its CI investigation moves the 40 Model/Profile/Provider cases to Agentstration.Management.Models.Api.Tests, leaving 124 in Management API. Both compile the test-root ManagementApiTestFixtures, retain private per-test state and one class worker, and run separately with unchanged 1920/2560 MiB limits. Both participate in Integration and coverage shard A; the existing Management API diagnostic runner executes them sequentially. Minimum counts require the complete 124 + 40 inventory. The global module concurrency remains unchanged.

LocalStorageContentTests.LinksAtStorageDirectoryAndContentFileAreRejected creates real directory and file symbolic links before checking that Storage rejects them. The Windows test session must have permission to create those links. A privilege failure during setup is an environment limitation, not a successful Storage validation: report it explicitly and run the case in an environment with that capability. Keep the rejection assertions enabled; do not replace this check with a passing stub or silently skip it.

SQLite connection pooling regression​

SqliteConnectionPoolTests in Agentstration.Management.Storage.Tests exercises concurrent pooled opens with active readers. Sixteen dedicated workers check that live logical connections retain distinct native handles and independent query results across 500 alternating cold and warm waves. The test uses its own temporary database, has a bounded execution time, and clears only that database's pool between cold waves and during cleanup. Its test output records the loaded managed driver and native SQLite versions.

The central Microsoft.Data.Sqlite.Core pin includes the upstream pooled-connection ownership correction from 10.0.13 independently of the EF Core version. Keep the SQLitePCLRaw bundle compatible with the driver. For a focused check after the Release build:

dotnet test --project tests/Agentstration.Management.Storage.Tests --configuration Release --no-build --filter FullyQualifiedName~SqliteConnectionPoolTests --minimum-expected-tests 1

Functional coverage​

CI collects managed-code coverage from the required Fast and Integration inventory on two partitioned runners while the uninstrumented functional lanes remain in build-and-test. The raw shard reports are merged into one consolidated result after both runners complete. Performance workloads, live-provider scenarios, test assemblies, generated sources, and files outside product src directories are excluded. Coverage is initially report-only: collection or report-generation failures fail CI, but the measured percentage does not.

After restoring dependencies and building the root solution, reproduce the CI report locally with:

dotnet tool restore
./scripts/ci/run-functional-coverage.ps1 -Configuration Release -NoBuild

The script merges every module result into artifacts/coverage/report/Cobertura.xml, writes the line and branch totals to artifacts/coverage/report/summary.md, and generates the browsable report at artifacts/coverage/report/index.html. The same summary appears in the GitHub Actions run, and the complete raw and consolidated output is retained as the functional-code-coverage artifact.

Performance lane​

Performance workloads live in a dedicated project and are never discovered by the fast or integration lanes:

$env:AGENTSTRATION_STORAGE_BENCHMARK_PROVIDER = "Sqlite"
$env:AGENTSTRATION_STORAGE_BENCHMARK_REPORT = "artifacts/storage-benchmark-sqlite.json"
dotnet test --solution Agentstration.Tests.Performance.slnx --configuration Release --no-build --filter TestCategory=Benchmark --minimum-expected-tests 1 --max-parallel-test-modules 1

The report records workload parameters, provider, elapsed time, runtime and OS metadata, throughput, median, p95, errors, conflicts, and retries. SQLite remains the local default; set AGENTSTRATION_TEST_POSTGRES for an opt-in PostgreSQL run. Pull requests execute only a bounded contention smoke for relevant storage paths. Full workloads run from the scheduled or manual Storage performance workflow and publish their JSON reports. Latency and throughput gates remain disabled until representative baselines have been collected; zero storage errors is always required.

CI concurrency and memory diagnostics​

The fast, integration, and performance lanes cap concurrent test modules at 4, 2, and 1 respectively. Host-heavy API and Management modules also use one class worker per assembly. CI reruns the designated hosted modules on two isolated runners (Management API alone, the other modules sequentially) through scripts/ci/run-hosted-module-diagnostics.ps1 in the dedicated hosted-module-diagnostics job. It consumes the shared Release build and runs in parallel with functional coverage. Each module runs in a separate process through scripts/ci/run-test-module-with-diagnostics.ps1. A failed module no longer prevents collection for the remaining modules; the group still fails after attempting every selected module. The diagnostic artifact deliberately excludes test output and payloads.

Each JSON report records total/passed/failed test counts, TRX availability, process exit code, duration, process peak working set, process peak private memory, aggregate peak working set for active dotnet processes, collector runtime and OS, and GitHub source revision/run/attempt. failureReasons distinguishes working-set-budget-exceeded, test-process-exit, test-failures, test-count-below-minimum, and missing/invalid test reports. Reasons can coexist. A successful test exit with only a working-set failure establishes a budget breach; it does not establish an OOM kill or a managed-memory leak. Aggregate dotnet working set is contextual and is not the per-module budget metric. Local runs may omit GitHub provenance. Run ./scripts/ci/test-hosted-module-diagnostics.ps1 to verify classification, unchanged budget enforcement, payload exclusion and collection after a failure.

The CI memory investigation for PR #1181 retains the evidence and its limits. All three resource-family modules enforce the original 2432 MiB failure ceiling. The split bounds the workload retained in each process; it does not establish or repair a product memory leak.

Bootstrap retains its original 500/700 MiB warning/failure limits in both the framework and scenario processes. The PR #1224 investigation records the cumulative working-set breach and the unchanged 60-case inventory. Both modules remain in Integration and coverage shard A; module concurrency is unchanged.

The Management budgets below use Release runs on Windows 11 10.0.26200 with .NET 10.0.10/10.0.11, collected during #298. Agentstration.Management.Api.Tests was recalibrated during #745 from 108-test Release runs: 1784.1 MiB peak working set on Ubuntu 24.04.5 with .NET 10.0.12 and 1757.6 MiB on Windows 11 10.0.26200 with .NET 10.0.11. Agentstration.Management.Security.Tests was recalibrated from 59-test runs in the same change: 1193.7 MiB on Ubuntu and 1127.6 MiB on Windows. The consolidated Agentstration.Api.Tests baseline was collected on the same Windows build with .NET 10.0.11 during #142: 191 tests in 200 seconds, 1503.7 MiB peak working set, 1176.6 MiB peak private memory, and 1621.2 MiB aggregate dotnet working set. A warning is evidence to review the Linux and Windows trend; a failure caps regression relative to the retained baseline. Adjust these values only after retaining representative artifacts from both runner families.

ModuleBaseline peak (MiB)Warning (MiB)Failure (MiB)Minimum tests
Agentstration.Api.TestsPending after split2048243240
Agentstration.Api.Flows.TestsPending after split2048243280
Agentstration.Api.Execution.TestsPending after split2048243258
Agentstration.Api.Resources.TestsPending after resource-family split20482432111
Agentstration.Api.DataSources.TestsPending after resource-family split2048243280
Agentstration.Api.Artifacts.TestsPending after resource-family split2048243239
Agentstration.Management.Api.TestsHistorical consolidated baseline: 1784.119202560124
Agentstration.Management.Models.Api.TestsPending CI baseline after split1920256040
Agentstration.Management.Bootstrap.Tests355.350070031
Agentstration.Management.Bootstrap.Scenarios.TestsPending CI baseline after split50070010
Agentstration.Management.Bootstrap.Plans.TestsPending CI baseline after split5007006
Agentstration.Management.Security.Tests1193.71280166464
Agentstration.Management.Aep.Tests763.4832102429

The six API modules inherit the consolidated module's current CI warning/failure limits of 2048/2432 MiB. These are retained ceilings, not measured baselines for the new assemblies. In main run 41710631042, the consolidated module passed all 235 tests but exceeded its failure ceiling at 2464.2 MiB; the preceding run measured 2417.3 MiB. Retain measurements of the split modules before recalibrating their budgets or claiming a memory or duration improvement.

The AEP budget was recalibrated during #916 after the hosted enrollment and bundle reconciliation coverage grew from the original 11-test baseline to 29 tests. All 29 tests passed in both retained runs: Linux report (Ubuntu 26.04.1, .NET 10.0.14) peaked at 763.4 MiB, and Windows report (Windows 10.0.26300, .NET 10.0.11) peaked at 691.7 MiB. The Linux report retains the original failed status because it exceeded the former 700 MiB cap despite a successful test exit. The Windows baseline was collected without memory thresholds. The revised warning/failure limits are 832/1024 MiB, and the minimum expected count is raised to 29 so missing scenarios cannot silently pass diagnostics. Only the AEP budget changes; the per-assembly worker limit remains one.

Project classification​

Test projectLaneBoundary or rationale
Agentstration.ArchitectureTestsFastAssembly dependency rules
Agentstration.Console.Client.TestsFastHTTP and SignalR mappings, pagination, errors, retries, and credential forwarding without an authoritative server
Agentstration.Console.Components.TestsFastConsole Razor behavior, presentation state, permissions, localization, and static assets with mocked clients
Agentstration.ResourceManagement.TestsFastResource access policies and descendant-use rules with in-memory ports
Agentstration.Storage.TestsFastStorage type/version, explicit export mappings, protected resolution, drift, authorization and concurrency with deterministic in-memory ports
Agentstration.Schemas.TestsFastSchema format selection and capability validation
Agentstration.Secrets.TestsFastSecret capability authorization, expiry and single-use redemption with fakes
Agentstration.Infrastructure.TestsFastInternal date/time tools and HTTP fetch validation with a fake handler
Agentstration.Tools.TestsFastPure tool validation and in-memory use cases
Agentstration.Tools.SourceRegistry.TestsFastIn-process CLI and manifest validation
Agentstration.Web.Components.TestsFastbUnit component behavior
Agentstration.Web.FlowDesigner.TestsFastbUnit and graph projection behavior
Agentstration.Workplace.Components.TestsFastbUnit component behavior
Agentstration.Application.TestsIntegrationApplication use cases and their SQLite-backed contracts without the executable host
Agentstration.Management.Storage.TestsIntegrationSQLite control-plane, Identity persistence, secrets, audit, and trigger storage
Agentstration.Management.Sources.TestsIntegrationSource provider, registry transport, and Pack composition behavior without the executable host
Agentstration.Api.TestsIntegrationCross-cutting authentication registration, OpenAPI, MCP catalog, Tool audit, and ToolDefinition/relay publication and adoption transport behavior
Agentstration.Api.Flows.TestsIntegrationFlow authoring, persistence, execution, recovery, scope isolation, and hosted Flow APIs
Agentstration.Api.Execution.TestsIntegrationHosted Work, Workplace, Runtime Run, SignalR, and AWP worker execution boundaries
Agentstration.Api.Resources.TestsIntegrationSources, Source Registry, Packs, and Data Source API transport behavior
Agentstration.Api.DataSources.TestsIntegrationData Source acquisition, Knowledge Snapshots and structured Storage
Agentstration.Api.Artifacts.TestsIntegrationArtifact APIs, processing and storage-backed content
Agentstration.Management.Api.TestsIntegrationHosted Management API tests using the API-only test profile
Agentstration.Management.Models.Api.TestsIntegrationHosted Model/Profile/Provider API and exact-read tests using the same API-only test profile
Agentstration.Management.Bootstrap.TestsIntegrationBootstrap framework, catalog, enrollment and startup contracts using the API-only test profile
Agentstration.Management.Bootstrap.Scenarios.TestsIntegrationDurable profile application/progress and versioned Assistant/documentation profile scenarios
Agentstration.Management.Bootstrap.Plans.TestsIntegrationOrdered multi-target plans, future targets, producer bindings, cancellation and deferred validation
Agentstration.Management.Security.TestsIntegrationIdentity, authorization, local-account, and interactive Security boundaries
Agentstration.Management.Aep.TestsIntegrationAEP enrollment lifecycle and extension inventory boundaries using the API-only test profile
Agentstration.ModelProviders.TestsIntegrationProduct model consumers, AEP/Value/Secret bindings and Worker/MAF/two-hop inference scenarios
Agentstration.Extensions.Foundry.TestsIntegration, provider-optionalFoundry discovery, chat, streaming, security and opt-in live checks
Agentstration.Extensions.LocalAI.TestsIntegration, provider-optionalLocalAI adapter and opt-in live checks
Agentstration.Extensions.LlamaCpp.TestsIntegration, provider-optionalllama.cpp adapter and opt-in live checks
Agentstration.Extensions.Ollama.TestsIntegrationOllama mapping and native streaming deadline with fake downstream transport
Agentstration.Runtime.TestsIntegrationRuntime business behavior and SQLite reconstruction without the executable host
Agentstration.Extensions.Git.TestsIntegrationExtension-owned AEP contracts, real Git processes and temporary repositories
Agentstration.Extensions.Utilities.TestsIntegrationExtension-owned AEP discovery and in-process MCP tool/schema contracts
Agentstration.Extensions.Crawl4AI.TestsIntegrationExtension-owned acquisition contracts with fake HTTP
Agentstration.Extensions.OpenApi.TestsIntegrationExtension-owned discovery/invocation, schema and bounded HTTP contracts
Agentstration.Extensions.PostgreSql.TestsIntegration, provider-optionalStructured-document extension contracts and opt-in PostgreSQL checks
Agentstration.Extensions.OpenDal.TestsIntegrationOfficial native OpenDAL filesystem/S3/Azure operators, real ASC/MCP, isolation, progressive transfer and restart
Agentstration.Web.TestsIntegrationCombined standalone composition, startup, storage profiles, workers, and lifecycle
Agentstration.Performance.TestsPerformance, opt-inSQLite/PostgreSQL relational storage concurrency workloads and machine-readable reports
Agentstration.Workplace.Web.TestsIntegrationWorkplace HTTP host

The autonomous AEP SDK keeps its own aep/Aep.slnx validation because it can be built and released independently from the product solution.

CI inventory and execution safeguards​

Run ./scripts/ci/test-ci-contracts.ps1 to check coverage partition completeness and path-selection regressions. The classifier also runs these checks before selecting jobs. Rename detection is disabled when gathering changed paths so both the removed and added paths contribute to validation selection. Storage/application families, including Resource Planning and Security, and every PostgreSQL project select PostgreSQL checks; Console Web, Client and Components select Browser UX on pull requests and main pushes. The required build-and-test check keeps its existing name and documentation-only success path.

Catalogue-driven extension selection​

scripts/ci/classify-changes.ps1 combines product, server/Worker and AEP extension selection. The single extension selector and its contracts live under scripts/ci/extensions/. Both contract suites run during the existing classify-changes job; no new publication or test pipeline is introduced.

Only implemented deploy/images/extensions/*.json entries grant extension ownership. The selector derives source and test directories, the independent version file and recipe from project, testProject, versionFile and dockerfile. Adding a catalogue therefore needs no provider-specific expression in the central classifier. Uncatalogued extensions retain product checks.

Changed inputsSelected OCI validationProduct functional/coverage/diagnostic lanes
One implemented extension's source, dedicated tests, version or catalogueThat extensionSkipped
Explicitly owned files in a shared test project (ci.testPaths)Declared owners and explicit shared dependenciesSkipped unless another input requires product checks
Several implemented extensions, with optional documentationThose extensionsSkipped
scripts/ci/extensions/**All implemented AEP extensionsSkipped
Generic AEP enrollment smoke/Compose or shared AEP protocolAll implemented AEP extensionsProtocol changes retain product/AEP checks; packaging smokes alone do not
Common image builder, unknown packaging helper, generic recipe or OCI workflowAll affected image families, including server/WorkerSkipped unless a product input is also changed
Shared .NET/build settings, central scripts/ci/** outside extensions/, or the main CI workflowAll implemented imagesRetained
Mixed product/extension changes, shared test fixtures or declared shared dependenciesDependent imagesRetained
Unknown/removed catalogue or unknown sourceRemaining affected imagesRetained; malformed catalogues fail classification
Manual CI dispatchAll implemented imagesRetained

The dotnet result controls the full build, Windows lifecycle, Fast/Integration, both coverage shards/publication and both hosted-diagnostic groups. storage and container are independently derived from product-owned inputs: the autonomous PostgreSQL document extension does not select the server's PostgreSQL profile. Extension selector edits select AEP images without pulling in unrelated server/Worker images. Changes to the central selector itself deliberately retain the complete transverse checks.

The existing build-and-test gate waits for the selected OCI matrix and rejects failed, cancelled or unexpectedly skipped validation. Test inventories, coverage partitioning/collectors, memory budgets, publication credentials and module concurrency are unchanged. Rename detection remains disabled, so removed and added paths both contribute. Run ./scripts/ci/extensions/test-classify-changes.ps1 for the focused contracts or ./scripts/ci/test-ci-contracts.ps1 for the complete selection/inventory/result-gate contracts. Temporary catalogues exercise the pending extensions without committing an unimplemented image entry.

Resource Plan UX excludes autonomous src/extensions/** sources from its broad src/** trigger, while mixed product changes still trigger it. Editing that specialized workflow runs its own Playwright validation, without also selecting unrelated product CI. Browser UX keeps its explicit Utilities source dependency because its executable journeys use that extension. CodeQL, Dependency Review and PR metadata remain independent; documentation builds still run when the relevant documentation changes. These workflows are not disabled by extension classification. No live model, registry credential or Azure dependency is added.

Coverage emits one assembly-named TRX per module. Collection and publication check each required module's TRX coverage attachment against its actual Cobertura file; missing, reused, malformed or unexpected reports fail publication; byte-identical TRX attachment copies are consolidated once. Fast and Integration remain authoritative inventories; Coverage A/B must partition Integration exactly. Performance and live-provider execution remain optional.

Linux validation compiles Agentstration.slnx once in build-linux, plus the autonomous AEP solution when selected. Fast and Integration then run in parallel on separate runners; AEP, both coverage shards, both hosted diagnostic groups and selected PostgreSQL checks also consume that build with --no-build. Consumers wait for compilation and artifact publication, not for another test job. Windows lifecycle and container builds remain independent. The required build-and-test check aggregates the build and selected functional/AEP and extension-image results, fails on failed or unexpectedly skipped dependencies, and retains documentation-only success.

The run-scoped Linux artifact contains tracked projects' bin and obj directories in a Zstandard-compressed tar archive, preserving executable modes, hidden generated files and timestamps. Its context manifest binds it to the checkout revision, exact SDK, OS, architecture, checkout path and NuGet package path; consumers reject mismatches before extraction. GitHub-hosted Linux runners must use matching checkout/package paths because generated static-web-asset files can contain absolute paths. Each consumer still restores and audits packages so a partial NuGet cache cannot silently omit dependencies. The build archive is retained for three days; rerun the producer too if it expires. Archive size and packaging duration appear in the build job summary. Compare artifact transfer costs, total runner minutes and complete elapsed time before claiming a speedup.

AEP tests remain in coverage shard B based on retained collection timings (A/B: 600/321 seconds in run 41668461593). Hosted diagnostics retain isolated Management API and other-module runners, all uninstrumented memory budgets and one worker per assembly. Build reuse changes neither test inventories nor coverage-report completeness checks.

Compare candidate workflow runs with the retained baseline runs 41668461593, 41646766981 and 41498304716 (17m30, 20m and 17m40 elapsed respectively). Retain source SHA, runner/runtime, job and step durations, test totals, coverage, diagnostic memory, complete elapsed time and total runner minutes. These historical runs use different revisions; they establish costs, not a controlled percentage improvement. Candidate measurements are required before claiming a speedup.

Browser UX runs Desktop Chromium in two Playwright shards on separate runners; Mobile Chromium and locale contracts each use one runner. Every runner retains one Playwright worker and isolated product hosts/data. The required browser-ux check waits for all four matrix jobs to succeed, and evidence artifacts include the project and shard index. Each runner restores the NuGet package cache using the same key and OS fallback as the main build job; dotnet restore and NuGet auditing still run on cache hits. The npm cache remains keyed by the browser workspace's lockfile. Compare complete elapsed time and total runner minutes against Browser UX runs 41733014469 and 41734413136 before claiming a measured speedup; the latter includes a mobile rerun tracked in #997.

Extension-owned test projects​

See the extension isolation inventory for source movements, retained consumer scenarios, dependency boundaries, lane/shard mapping and project/filter handoff to packaging PRs. Run one extension independently, for example:

dotnet test --project tests/Agentstration.Extensions.Ollama.Tests --configuration Release --minimum-expected-tests 2

The architecture suite traverses dedicated test project references and rejects a direct or transitive dependency on another extension executable. The existing CI inventory contract rejects missing or duplicate coverage projects. A shared Ollama inference fixture is compiled by its extension tests and the product two-hop tests; changes to it retain product validation.

Utilities has an independent 15-case AEP/MCP contract suite in Integration and Coverage B. The 13 McpToolCatalogTests cases remain in Agentstration.Api.Tests (44 cases total): they verify product governance, credentials, schema resolution and invocation through the product pipeline. Their Utilities host reference is still required. These are complementary consumer tests, not duplicated extension test sources. The dedicated project builds only Utilities and the required AEP SDK projects; it needs no running service, internet access or LLM.

Management fixture boundaries and profiling​

The required inventory contains 1,731 cases: Fast contains 777 and Integration 954 (including 12 optional cases without live-provider or PostgreSQL configuration). Twenty-four boundary-free cases moved from Management API/Security into ResourceManagement, Schemas, Secrets and Infrastructure test projects. Their existing test names are retained. Coverage follows these inventories automatically and expects 33 module reports after splitting the API integration assembly.

Flow recovery regressions cover terminal history, multiple active pages, equal update times, exact Instance/Tenant/Workspace keys, active leases, and input expiry while earlier runs become terminal. SQLite query checks require bounded, status-filtered key reads without loading payloads. The PostgreSQL CI lane also runs FlowRecoveryRepairsLegacyStatusesAndDrainsChangingPages: it creates a disposable database, upgrades stale status metadata without changing payloads, ETags or update times, and drains pages while visited runs are updated and deleted. Its test connection therefore needs permission to create and drop that disposable database; the default offline lane skips it when AGENTSTRATION_TEST_POSTGRES is absent.

Management API retains real HTTP, MCP transport, hosted provisioning and AWP execution tests. Eleven service-only cases instead use ManagementServiceFixture: the production application registrations with hosted services disabled, private non-pooled SQLite stores and deterministic bootstrap. Five Storage execution/provisioning cases use a module-owned preparation helper in Management Storage, alongside the existing content/persistence tests. Each test creates its own provider and private non-pooled SQLite databases, without an ASP.NET Core server, background scheduler or Worker, and disposes only its own provider/files. The tests retain real persistence, scope authorization, provisioning and the real artifact backend; all sixteen cases remain in the required Integration and coverage inventories. No host, mutable database or cross-project source compilation is shared.

SecurityApiTests.Factory defaults to the existing API-only composition. Tests rendering login/bootstrap/logout, account/PAT/profile, organization or audit pages explicitly request fullHost: true and keep their cookie/antiforgery checks. The role/PAT matrix asserts exact statuses and endpoint-specific Problem Details or response properties. Artifact leases are successfully read before expiry, denied exactly at the controlled deadline and denied independently after revocation, without wall-clock sleeps.

Set AGENTSTRATION_TEST_HOST_METRICS to a private output directory to collect one JSONL record per completed Management API/Security host. CI includes these files with hosted diagnostics. Records contain startup duration (the factory's CreateHost call), active duration (ready until stopping), shutdown-signal duration (stopping until stopped), process peak memory, runtime and OS. The shutdown signal excludes subsequent provider/file disposal; the complete module duration includes test execution and disposal. No requests, credentials or resource contents are retained. Service fixtures do not emit HTTP-host records. Keep the existing one-worker and memory limits when comparing runs; separate host-count reduction from relocation of already host-free tests.

The local comparison for #981 used Debian 13 x64, SDK 10.0.300, test runtime .NET 10.0.8, one class worker and one module at a time. The baseline is cdb9999 with the same opt-in instrumentation before fixture changes. The candidate preserves all 215 logical test names; 24 deliberately change test assembly when moved to Fast. No concurrent build or functional suite ran during either measurement.

ModuleTests before → afterHTTP hosts before → afterModule duration before → afterPeak working set before → after
Management API141 → 127116 → 105380.656 → 358.062 s2471.7 → 2329.0 MiB
Management Security74 → 6437 → 37148.336 → 143.611 s1516.2 → 1298.4 MiB

API host startup summed to 262.246 → 234.186 s; Security startup summed to 62.068 → 59.402 s. These are single-run observations, not a speed guarantee. The diagnostic wrapper's runtime field describes PowerShell; the host records identify the actual test runtime. Full disposal is included in module elapsed time but is not isolated by the host shutdown signal. Both modules remain above their warning thresholds and below unchanged failure limits. Pure-test relocation removes no host starts by itself.

Negative controls deliberately changed an authorized Model Provider operation to return an unexpected 404, and disabled valid Artifact lease recognition. The matrix and pre-expiry read each failed, then passed after restoring the source and rebuilding. Neither mutation is part of the change.

Structured document provider lane​

The default deterministic suites run the memory-backed structured-document cases. Set AGENTSTRATION_TEST_ASC_POSTGRES to an explicitly disposable local database to run matching PostgreSQL cases; never target production content. The structured-documents.yml workflow runs contracts plus V2/V3 against PostgreSQL 17. See Structured documents for commands and known bounded semantics. The separate reusable browser journey #1158 must wait for explicit maintainer UX approval and implementation merge.

The patched Aspire AppHost SDK uses the official Aspire CLI bundle 13.6.5. Install that version and put aspire on PATH before building the complete solution. Linux x64 CI uses scripts/ci/install-aspire-cli-linux.sh with a pinned archive SHA-512; Windows/macOS installations can use the same version's official release asset. The Web executable and isolated protocol tests do not require the AppHost to run.