Skip to content

Test Agentweaver ​

Use the test command that matches the code or documentation you changed. A passing test confirms only the behavior its test exercises against the source revision that ran. Local tests do not prove that Azure resources, services, or provider integrations are deployed.

Prerequisites ​

Install the .NET 10 SDK selected by global.json and Node.js 24. PostgreSQL integration tests use disposable Testcontainers databases, so install a Docker-compatible engine and allow it to pull the test image. Do not point the tests at a shared or production database.

The standalone CLI's distributed executable includes its .NET runtime and does not require Node.js or a .NET SDK to run. Building the CLI and running its test suite from source still require the .NET SDK.

Run commands from the repository root unless a procedure says otherwise.

Choose and run a test procedure ​

  1. Identify the service, provider, or documentation surface you changed.
  2. Run the matching standard or focused command in the sections below.
  3. Record the command, result, and exact source SHA. Mark unrun tests as not run; do not count a compile-only or older-source result as a pass.

Test slot-backed BYOK model credentials ​

Provider removal fixtures use the Projects and Broker PostgreSQL databases. Run the focused checks with:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj `
  --configuration Release --filter "FullyQualifiedName~ProviderRemoval|FullyQualifiedName~PendingRemovalRejectsNewCredentialPreflight|FullyQualifiedName~PreflightRejectsRetryOfPreviousOperationIdWhenRemovalIsPending|FullyQualifiedName~FinalizeRejectsUnknownReceiptOutcomeBeforeDatabaseCall|FullyQualifiedName~DrainCredentialClaim|FullyQualifiedName~FeatureOffReplayPreserves409FingerprintMismatchAnd404ArchivedProject"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj `
  --configuration Release --filter "FullyQualifiedName~ProviderRemoval|FullyQualifiedName~BrokerModelProviderRemovalClientTests"

The checks cover exact-request replay with the original provider revision, global removal operation identity, one terminal provider revision, the credential write fence, settlement drain and SlotDisabled / NoSlot reconciliation, BrokerModelProviderRemovalClient private token and receipt calls, and Gateway 202 and 204 forwarding contracts (ProviderRemovalForwardsExactBodyAndPreservesCompletion204).

Run the identity, Projects, and Broker regressions from the repository root:

powershell
dotnet test tests\Agentweaver.Identity.Tests\Agentweaver.Identity.Tests.csproj --configuration Release --filter "FullyQualifiedName~SlotBackedCredentialIdentityMustMatchThePinnedProviderAndRuntimeProject|FullyQualifiedName~ResolvesSlotBackedProviderRevisionOnlyWithItsExactCredentialIdentity|FullyQualifiedName~RejectsRuntimeCredentialMismatchWithoutFallingBackToDeploymentBinding"
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~SlotBackedSelectionsRequireTheirCredentialIdentityAndConflictingRoutesFail|FullyQualifiedName~ChangingOverrideSourceClearsTheOldCredentialOrConnectionReference|FullyQualifiedName~EffortOverrideKeepsInheritedSlotCredentialWithMatchingPin"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~SlotBackedModelGrantRedeemsThePinnedByokVersionAfterDisableAndRejectsAnotherSlot|FullyQualifiedName~EgressHostMatchesTheConfiguredVaultAndDefaultsToTheExistingVault"

The Broker test uses disposable PostgreSQL and a fake secret backend. It does not call Azure. The tests check exact slot identity, pinned-version lookup, vault selection, old pins after disable, and denial for another slot.

Test Key Vault write-claim recovery ​

Run the Broker journal and runtime-grant tests from the repository root:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~ModelProviderCredentialStorePostgresTests|FullyQualifiedName~IdentityBrokerPostgresBootstrapCommandTests"

These tests use disposable PostgreSQL databases. They cover claim replay after a process restart, quarantine after an uncertain result, blocked retry and reuse, atomic completion with the exact returned version, publication receipt replay, provider and slot reservations, database transition guards, and runtime table grants. They use fixture receipts and do not write to Key Vault or call Projects.

Test model-provider Draft routes ​

Run the deployment-binding snapshot regressions:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter FullyQualifiedName~DeploymentBindingsReadRequiresUnboundPlatformAdminAndReturnsOnlyByokSnapshot
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~GatewayModelProviderDraftTests
dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --configuration Release --filter FullyQualifiedName~ProviderHostRequest
Push-Location apps\web
.\node_modules\.bin\vitest.cmd run src\v1\DeploymentByokBindings.test.tsx src\v1\PlatformSettingsPage.test.tsx --maxWorkers=2 --config vitest.config.ts
Pop-Location

The Projects test uses disposable PostgreSQL. The Gateway test uses a local owner handler. The web tests use mocked responses.

Run the target-context authorization, PostgreSQL race, schema, and proxy tests:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayTargetContext"
dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayOpenApiParityTests"

Run the reference reservation, authority-race, and migration tests with the disposable PostgreSQL fixture:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~ModelProviderDraft|FullyQualifiedName~ProjectsConfigMigrationInventoryTests|FullyQualifiedName~ProjectModelChoices"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~GatewayModelProviderDraft
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~MigrationRejectsChangedProviderIdentityGuardBeforeCommittingGrants
dotnet test tests\Agentweaver.FoundationProbe.Tests\Agentweaver.FoundationProbe.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~P1PostgresInitializerTests|FullyQualifiedName~ProviderIdentityGuardIsRequiredByInitializerAndRuntimeGrantPlan"

These tests cover local reference collisions, current authority, later selector saves, and the database trigger that protects provider IDs. The reservation does not activate a provider.

Run the database-free request-contract and Gateway route tests locally after building the solution:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~ModelProviderDraftHttpContractTests
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~GatewayModelProviderDraftTests

The endpoint and Gateway-to-owner tests use disposable PostgreSQL databases. CI runs those tests with its database fixture:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~PublicModelProviderDraft
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~GatewayModelProviderDraftPostgresTests

Run the Projects namespace identity and reference reservation tests with disposable PostgreSQL:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~InstallationIdentity|FullyQualifiedName~InstallationPinRejects|FullyQualifiedName~LegacyReservationDoesNotAcquire|FullyQualifiedName~MissingInstallationBlocks|FullyQualifiedName~UnreadableInstallation|FullyQualifiedName~InternalDraftCallsCannotBypassInstallationPinValidation|FullyQualifiedName~RuntimeCannotInsertMissingOrForeign|FullyQualifiedName~RuntimeGrantPlanRejectsMutatedInstallationGuardSource|FullyQualifiedName~InstallationRekeyAndCreate|FullyQualifiedName~ConflictRetryRechecksInstallation|FullyQualifiedName~NewOwnerRejectsPreIdentitySchema|FullyQualifiedName~FailedIdentityMigrationRollsBack|FullyQualifiedName~ModelProviderDraftReference|FullyQualifiedName~PublicModelProviderDraftNamedDatabaseConflict|FullyQualifiedName~OtherDatabaseCheckViolations"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayRawReferencePin|FullyQualifiedName~GatewayS1OwnerRejectsPinsAndPreservesReplayAndAccessChecks"

These tests check migration retention and rollback, restricted runtime grants, reference pins through the Gateway, legacy and fork receipts, restore snapshots, rekey lock ordering, and owner restart without singleton read access. The S1 compatibility test runs the historical Projects owner through the production Gateway and checks reference creation and replay.

Test Platform Policy full-set proof and cross-schema fence ​

Run the Environment, Projects, Persistence, and RBAC/plan tests from the repository root:

powershell
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --configuration Release --filter "FullyQualifiedName~KubernetesPlatformPolicyProofTests|FullyQualifiedName~PlatformPolicyProofPostgresTests|FullyQualifiedName~PlatformPolicyProofV6Tests|FullyQualifiedName~PlatformEgressApplyReservationPostgresTests|FullyQualifiedName~CiliumPlatformEgressReservationTests"
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~ExactPreparationReadReturnsPolicyIdAndCheckedNextRevision|FullyQualifiedName~GuardedPlatformWriteCommitsAndRetiresClaimsAtomicallyAndRollsBackOnFenceFailure"
dotnet test tests\Agentweaver.Persistence.Postgres.Tests\Agentweaver.Persistence.Postgres.Tests.csproj --configuration Release --filter FullyQualifiedName~PlannedRuntimeGrants
node --test scripts\release\tests\environment-rbac.test.mjs scripts\azure\tests\p1-postgres-plan.test.mjs scripts\azure\tests\db-maintenance.test.mjs

These tests use disposable PostgreSQL databases and local Kestrel TLS fixtures. They verify three-role SelfSubjectReview identity checks, two-call mutual-TLS peer separation, universal Kubernetes NetworkPolicy receipt witnesses, metadata-preserving reserved PUT and abort-handoff convergence, exact preparation reads, and atomic cross-schema commit and rollback. They do not deploy to or activate a live cluster.

The local database-free tests do not prove owner persistence or current authorization against PostgreSQL.

Test the offline Kata egress verifier ​

Run the focused replay and negative cases from the repository root:

powershell
node --test scripts\release\tests\verify-kata-egress.test.mjs

The suite invokes the actual Node command with scripts/release/tests/fixtures/kata-egress/. Those files are explicitly marked fixture-test-data. The suite checks exact target and workload bindings, policy revision and inventory stability, approved HTTPS and DNS success, owner-Service readback, Pod endpoint readback, selector normalization, source-connection correlation, port ranges, independent Cilium allow and drop correlation, legacy and overlapping grants, object drift, diagnostic list-version changes, missing evidence, contradictions, and execution refusal. It also transforms source-shaped Kubernetes, application, and Hubble records before offline replay. It does not collect from a cluster or establish a live acceptance result.

Test BYOK credential publication ​

Run the legacy shutdown, Broker transport, and PostgreSQL guard tests after building the solution:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~ModelProviderCredentialPublicationEndpointTests|FullyQualifiedName~ModelProviderCredentialPublicationContractTests|FullyQualifiedName~ModelProviderWriteGuardPostgresTests|FullyQualifiedName~ModelProviderGuardMigrationPostgresTests|FullyQualifiedName~PublicationV2_"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~BrokerModelProviderCredentialPublicationClientTests|FullyQualifiedName~SameVersionRecheckTransitionsDraftToAvailableWithoutNewVaultVersionAndKeepsReplayAndRecoveryDistinct"

The client test uses a local HTTP handler. The guard tests use disposable PostgreSQL databases.

Test Events-owned rate-card verification from the repository root:

powershell
dotnet test tests\Agentweaver.EventsAndSessions.Tests\Agentweaver.EventsAndSessions.Tests.csproj --configuration Release --filter FullyQualifiedName~RuntimeRateCardStoreTests
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter FullyQualifiedName~RuntimeRateCardOwnerClientTests
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~GatewayModelProviderDraftTests

These tests check Projects-only Events authorization, exact card and provenance validation and strong ETags. PostgreSQL cases use disposable test containers.

Test accepted-run Skill recovery ​

Run the non-Docker owner validation, human-class, Gateway, and OpenAPI parity regressions from the repository root:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~ProjectAuthorizationContextTests|FullyQualifiedName~SkillRefreshEndpointValidationTests"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayWorkspaceReadRegressionTests"
dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayOpenApiParityTests"

Run the PostgreSQL-backed aw_actor_class, refresh-inputs eligibility, and multi-Skill recovery tests with disposable Testcontainers databases:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~UnboundInteractiveTokenEmitsHumanClassAcrossRefresh|FullyQualifiedName~TokenExchangeRejectsInvalidOrBoundActorClassClaims|FullyQualifiedName~NativeCliLoginCompletesPkceConsentAndValidatesBrokerIdentity"
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~ReadRefreshInputsRequiresVerifiedHumanAndReportsEligibilityAndConcealsForeignRun|FullyQualifiedName~RefreshAcceptedRunSkillsEndToEndCoversEligibilityDriftAndReplay"

Test manual runtime price-card writes ​

Run the Events, Gateway, and Projects regressions from the repository root:

powershell
dotnet test tests\Agentweaver.EventsAndSessions.Tests\Agentweaver.EventsAndSessions.Tests.csproj --configuration Release --filter "FullyQualifiedName~RuntimeRateCardManualWriteEndpointTests"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayManualRateCardTests"
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~PlatformModelPricingRateCardWriteAuthorizationChecksUnboundPlatformAdminAndScopes"

These tests use disposable PostgreSQL databases and local test servers. They check unbound PlatformAdmin authority (api.read and projects.admin), literal key and encoded-alias rejection, 64 KiB body bounds, 415 media-type checks, 201/200/409 immutability semantics, strong SHA-256 ETags, and existing RuntimeRateCardOwnerReadEndpoint compatibility.

Test Azure Retail runtime price-card writes ​

Run the Events, Gateway, and migration regressions from the repository root:

powershell
dotnet test tests\Agentweaver.EventsAndSessions.Tests\Agentweaver.EventsAndSessions.Tests.csproj --configuration Release --filter "FullyQualifiedName~AzureRetailPriceLookupTests|FullyQualifiedName~RuntimeRateCardAzureRetailWriteEndpointTests|FullyQualifiedName~EventsAndSessionsMigrationTests"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayRetailRateCardTests"

These tests use disposable PostgreSQL databases and local HTTP fixtures. They check exact meter resolution across pages, 1K/1M normalization, missing and ambiguous meters, 409 pricing_changed, 503 pricing_unavailable, token expiry and authority revocation during lookup, canonical request digest replay and insert races, and migration 013_retail_rate_card_digest.sql.

Test provider host access requests ​

Run the Projects, Environment, and Gateway host-request regressions from the repository root:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter FullyQualifiedName~HostRequest
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --configuration Release --filter FullyQualifiedName~ProviderHostRequestPostgresTests
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~GatewayModelProviderDraftTests

These tests use disposable PostgreSQL databases and local test servers. They check atomic revision and host-request commit, authority revocation before lock, exact historical replay, outbox relay retries, expired-lease recovery, mismatched receipts, Environment outage fallback on provider reads, receipt idempotency and immutability, stale-row cursor advancement, and 503 on unavailable proof. The CLI tests cover request paging, authority, owner status, exact Policy artifact changes, stale revisions, stable prepare and commit IDs, and replay after a lost response.

To run the read-only native CLI readback case for one pending BYOK model-provider host request against an approved non-production Gateway, follow Read back a pending BYOK provider host request. Run npm run test:harness:api and dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --configuration Release --filter FullyQualifiedName~CriticalPathCoverageTests to exercise the fake-CLI case tests and critical-path coverage locally.

Test revision-backed BYOK run admission ​

Run the contract and orchestration tests after the Release build:

powershell
dotnet test tests\Agentweaver.Identity.Tests\Agentweaver.Identity.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~RevisionBackedTaskSelectionsRequireTheirOwnCardAdmission|FullyQualifiedName~RuntimeRunAdmissionContractTests"
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~CoordinatorRunAdmissionTests|FullyQualifiedName~AzureByokBudgetUsesCurrencyAndBlocksUnpricedUsage"
dotnet test tests\Agentweaver.EventsAndSessions.Tests\Agentweaver.EventsAndSessions.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~ProvidersWithTheSameEventsCardKeepSeparatePinsAndOneAggregateBudgetMeter
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~RunAcceptanceRejectsAChangedProviderCredentialSlotOrSecretReference

The Events and Projects tests use disposable PostgreSQL databases. They check that two providers can share a card without sharing a cost pin and that run acceptance rejects a changed credential slot or exact SecretRef. The contract and orchestration tests check admission for task overrides, matching delivery to the runtime, and denial when the BYOK hard USD budget is missing or unpriced. These tests do not call a live provider or create paid usage.

Test stored run egress reads ​

Run the Environment, Orchestrator, Gateway, and OpenAPI parity tests from the repository root:

powershell
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --configuration Release --filter "FullyQualifiedName~EnvironmentRunEgressTests"
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter "FullyQualifiedName~RunEgressEndpointTests"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayRunEgressTests"
dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --configuration Release --filter "FullyQualifiedName~RunEgressCommandTests|FullyQualifiedName~GatewayOpenApiParityTests"

The Environment and Orchestrator tests use disposable PostgreSQL databases and local test servers. They check duplicate tenant header rejection, current Projects authority revalidation, Platform/default admin and project/tenant read grants, visible-run resolution with hidden duplicates, keyset pagination with equal timestamps, cursor scope binding, Cache-Control: no-store, and 503 dependency errors. The CLI tests check exact GET dispatch, escaped run IDs and cursors, tenant headers, unbound default and projects.admin credentials, live-contract drift, stdout and stderr separation, page shape, and error exits.

Run the egress installation and persistence checks:

powershell
node --test scripts\azure\tests\deploy.test.mjs scripts\azure\tests\plan.test.mjs scripts\azure\tests\infrastructure.test.mjs
node --test scripts\release\tests\deploy-from-commit.test.mjs scripts\release\tests\simple-workflows.test.mjs
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --configuration Release --filter "FullyQualifiedName~EnvironmentEgressAuditImporterTests|FullyQualifiedName~EnvironmentEgressAuditPostgresTests|FullyQualifiedName~EnvironmentActivationEgressEvidenceTests"
dotnet test tests\Agentweaver.Persistence.Postgres.Tests\Agentweaver.Persistence.Postgres.Tests.csproj --configuration Release --filter "FullyQualifiedName~PlannedRuntimeGrantsTests"
node --test scripts\azure\tests\p1-postgres-plan.test.mjs

The Node tests use controlled Azure and Kubernetes transports. They check the allowed default for new and existing AKS paths, the single owned ContainerNetworkLog, exact-source forwarding, readiness gates, and explicit off behavior for narrow stages. The .NET tests parse the confirmed ContainerNetworkLogs fields, exclude other workloads, preserve address-only Kata records, and continue past rows with missing source metadata. They bound workspace queries to 100 source rows, persist the first fixed scan window before querying, and store each flow page with its continuation cursor in one PostgreSQL transaction. They check owner mapping retention, run isolation, append-only flow identity, duplicate replay, first-batch failure after time advances, rollback on a later page, and late-row replay in the fixed overlap window.

Live acceptance still has to generate distinct flows in two runs against an approved non-production AKS target. It must prove that Web and CLI return only the caller's attributed run and that a failed batch resumes from its durable source cursor without losing or duplicating a record.

Run the standard test suites ​

Run the following commands to restore, build, and test the main .NET and Node.js code:

powershell
dotnet restore Agentweaver.slnx --locked-mode
dotnet build Agentweaver.slnx --no-restore --configuration Release
npm run coverage:dotnet
npm run coverage:node
npm run test:azure
npm run test:release

The commands restore the locked dependencies, build the solution, run the .NET and Node.js suites, and check Azure and release tooling. The Azure tooling tests use local fixtures; they do not connect to Azure. PostgreSQL-backed suites require the container engine. A missing engine, permission to pull the image, or database startup fails those suites; it does not count as a pass.

Test web browser journeys ​

The Web end-to-end tests use Playwright with fake Broker and Gateway services. They check the built app with fixture data; they do not contact deployed services. The Chief of Staff journey checks that Priority creation and order survive a reload, notes save successfully, and a conversation link created from Priorities is still shown after a reload. The Board deletion journey checks keyboard confirmation, focus restoration, owner denial, and narrow-screen layout against fixture responses; it does not prove live owner persistence or authorization.

Run the Web build and the focused browser journeys from the repository root:

powershell
npm ci --prefix apps/web
npm run build --prefix apps/web
node --test apps/web/e2e/cos.e2e.test.mjs apps/web/e2e/priority-links.e2e.test.mjs apps/web/e2e/artifact.e2e.test.mjs apps/web/e2e/board-delete.e2e.test.mjs

To run named project suites after the Release build, use:

powershell
dotnet test tests\Agentweaver.SourceControl.Tests\Agentweaver.SourceControl.Tests.csproj --no-build --no-restore --configuration Release
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --no-build --no-restore --configuration Release
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~GitHubRepoAppConnectionServicePostgresTests
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~ModelProviderCredentialContractTests
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~SourceControlSecretRedemptionClientTests
dotnet test tests\Agentweaver.Identity.Tests\Agentweaver.Identity.Tests.csproj --no-build --no-restore --configuration Release
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --no-build --no-restore --configuration Release
dotnet test tests\Agentweaver.Knowledge.Tests\Agentweaver.Knowledge.Tests.csproj --no-build --no-restore --configuration Release
dotnet test tests\Agentweaver.Mcp.Tests\Agentweaver.Mcp.Tests.csproj --no-build --no-restore --configuration Release
dotnet test tests\Agentweaver.Providers.Sessions.AgentSessions.Tests\Agentweaver.Providers.Sessions.AgentSessions.Tests.csproj --no-build --no-restore --configuration Release
dotnet test tests\Agentweaver.EventsAndSessions.Tests\Agentweaver.EventsAndSessions.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~SessionsProviderAbsenceTests
dotnet test tests\Agentweaver.EventsAndSessions.Tests\Agentweaver.EventsAndSessions.Tests.csproj --configuration Release --filter "FullyQualifiedName~RestrictedRoleCanInsertAndLockButCannotUpdateOrDisableTheGuard|FullyQualifiedName~RestrictedRuntimeRoleAddressedMessageIsIdempotentAndCommitsWithJournalAndOutbox"

For the RubberDuck contract, binder, checkpoint, and recovery tests without running the PostgreSQL fixture, use:

powershell
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~MafRubberduckTests

These project suites use test-owned fixtures. Some include disposable PostgreSQL; none of these commands publishes packages or deploys a service. The AgentSessions suite checks export verification and replay behavior. The absence test confirms that the native provider stays the default and the platform works without the optional AgentSessions package. The model-provider credential contract selector uses no database, network, or Azure identity. Hosted GitHub CI runs the PostgreSQL store and bootstrap cases for this change.

Test the Events & Sessions Azure Retail lookup ​

The Azure Retail lookup and Events route tests use in-memory HTTP handlers. They do not call the live Azure Retail API or Projects service. The route tests check that Events calls Projects before the price lookup. The Projects role route test uses PostgreSQL fixtures to check current PlatformAdmin and project Owner access, denial for other roles and projects, and Owner revocation.

Run the focused tests from the repository root:

powershell
dotnet build services\events-and-sessions\Agentweaver.EventsAndSessions\Agentweaver.EventsAndSessions.csproj --configuration Release
dotnet build tests\Agentweaver.EventsAndSessions.Tests\Agentweaver.EventsAndSessions.Tests.csproj --configuration Release
dotnet test tests\Agentweaver.EventsAndSessions.Tests\Agentweaver.EventsAndSessions.Tests.csproj --no-build --configuration Release --filter "FullyQualifiedName~AzureRetailPriceLookupTests|FullyQualifiedName~AzureRetailPriceEndpointsTests|FullyQualifiedName~ProjectsAuthorizationContextClientTests"
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~ModelPricingSearchRequiresPlatformAdminOrCurrentOwnerOfTheRequestedProject"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~AzureRetailPricingRoutePublishesProjectAuthorizationAndStrictResponseContract"

The Projects role test needs PostgreSQL. Rate-card and hard-budget regressions also use PostgreSQL. These tests do not create or change Azure resources.

Lint exported ACS artifacts ​

Use this check to lint a policy artifact exported by Agentweaver. The materializer writes the exact manifest and relative files into a new directory. The lint runner passes only that directory's manifest.yaml to AGT. AGT checks the manifest schema and whether relative references exist. It does not check the Agentweaver profile, artifact hash, or Rego behavior; the native ACS tests check those rules.

Run these commands from the repository root on Linux with Python 3.12.10, Rust 1.89.0, and uv 0.13.0. uv sync installs the locked tools from the pinned AGT source and package indexes. The lint commands run offline and do not sync dependencies or download Python.

bash
uv sync --project scripts/acs-lint --locked
uv run --project scripts/acs-lint --locked --offline --no-sync --no-python-downloads \
  python scripts/acs-lint/test_acs_lint.py

POLICY_EXPORT='path/to/cli-export.json'
python scripts/acs-lint/materialize_export.py "$POLICY_EXPORT" \
  --output-dir artifacts/acs-lint/policy
uv run --project scripts/acs-lint --locked --offline --no-sync --no-python-downloads \
  python scripts/acs-lint/lint.py \
  artifacts/acs-lint/policy/manifest.yaml

The output directory must be new and inside the repository. Replace path/to/cli-export.json with the CLI export file. The materializer rejects an invalid hash, unsafe or duplicate paths, and artifacts that exceed the native size limits before it writes the artifact.

Test local prompt and content scans ​

The Projects & Config scanner evaluates exact UTF-8 bytes with the pinned .NET AGT evaluator. Its report records the input hash, owner revision, source provenance, evaluator version, and vector coverage. The scanner makes no network or model calls and does not write database state. Projects & Config creates owner-side reports and requires current passing results before it previews, packages, imports, assigns, saves configuration with enabled Skills, confirms casting proposals with enabled Skills, accepts a run that uses them, or returns their content. A separate internal trust-evidence service stores reports for one exact, non-revoked Skill revision. The service stores evidence separately from imported content and assignments. A stored report does not decide whether a Skill can be used in a run.

Run these commands from the repository root. First install the Python tools:

powershell
uv sync --project scripts\acs-lint --locked

Then run the focused tests:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~PromptContentScannerTests|FullyQualifiedName~CharterScanTests|FullyQualifiedName~SkillContentScanAdmissionTests|FullyQualifiedName~SkillContentEndpointValidationTests|FullyQualifiedName~GenericPackageBlocksUnsafeSkillContent|FullyQualifiedName~ImportsPinnedSkillContentAndReadsOnlyForItsAcceptedActiveAgent|FullyQualifiedName~RejectsUnsafeSkillsAtConfigurationCastingConfirmationAssignmentAndRunSelection"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayCharterScanContractTests"
dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayOpenApiParityTests"
uv run --project scripts\acs-lint --locked --offline --no-sync --no-python-downloads python scripts\acs-lint\test_prompt_defense_compatibility.py

The .NET tests check exact-byte hashing, owner and source provenance, input bounds, invalid UTF-8, evaluator errors, current report validation, blocked content, forged client reports, generic packaging, import rejection before storage writes, and optional post-commit charter scans (CharterScanTests, GatewayCharterScanContractTests, and GatewayOpenApiParityTests). PostgreSQL integration tests in ProjectsConfigPostgresTests.CharterScan cover selector precedence (invalid_charter_selection vs auth, lifecycle, revision, and configuration errors) and concurrent saves during an in-flight scan. The Python check confirms the pinned evaluator's separate 17-vector set and 100,000-character limit; it does not feed results into the .NET report.

Run the PostgreSQL regressions for persisted Skill trust evidence:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~PersistsExactSkillScanEvidenceAndPendingDecision|FullyQualifiedName~ExactReplayIgnoresEvaluationTimeButChangedReportConflicts|FullyQualifiedName~EvaluatorErrorsPersistPendingEvidenceAndReuseItOnReplay|FullyQualifiedName~DecisionAppendFailureReusesCommittedEvidenceOnExactRetry|FullyQualifiedName~TrustEvidenceReplayRechecksProjectOwnerRevocationDuringScan|FullyQualifiedName~TrustEvidenceReplayRechecksRevisionRevocationDuringScan|FullyQualifiedName~TrustEvidenceRequiresCurrentProjectOwnerAndUnrevokedRevision|FullyQualifiedName~TrustEvidenceReadsOnlyItsProjectWhenProjectsRunInReverseOrder"

These tests use the disposable PostgreSQL fixture. They check exact replay, changed-report conflicts, pending evaluator-error evidence, current Owner authority during the save, recovery after a decision-append failure, revision revocation, source metadata, and project-scoped reads. The order test uses one actor and one idempotency key in two projects, then replays them in the opposite order.

Run the focused Skill admission cutover and runtime checks:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~SkillAdmission"
dotnet test tests\Agentweaver.Policy.Acs.Tests\Agentweaver.Policy.Acs.Tests.csproj --configuration Release --filter "FullyQualifiedName~SkillsDomainUsesClosedScoreAndEvidencePolicy"
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter "FullyQualifiedName~ProjectsRunSelectionSkillContentTests"

The Projects tests cover cutover draining, forged built-in labels, score boundaries, denied writes without revision records, and exact replay. The ACS test checks the closed Skills domain schema. The Orchestrator tests preserve stable denial and retryable-unavailable runtime outcomes.

Run the Project Skill decision history CLI and Gateway checks against their controlled fixtures:

powershell
dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --configuration Release --filter "FullyQualifiedName~PolicyCommandTests.ProjectSkillDecisions|FullyQualifiedName~PolicyCommandTests.ProjectAndPlatformDecisions|FullyQualifiedName~GatewayOpenApiParityTests"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayGovernanceDecisionHistory"
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~PersistsExactSkillScanEvidenceAndPendingDecision"

The CLI tests use a local Gateway fixture and check unbound identity, exact query encoding, 64-bit sequence paging, pending and null fields, scope option rejection, --output new-file export safety and Windows path guards, and evidence redaction. The Gateway and Projects tests use a local owner handler and disposable PostgreSQL.

To run the published linux-x64 native apphost fixture test on Linux, publish the CLI first, start a D-Bus session with an unlocked Secret Service keyring, and set AGENTWEAVER_TEST_SECRET_SERVICE=1:

bash
dotnet publish tools/Agentweaver.Cli/Agentweaver.Cli.csproj --configuration Release --runtime linux-x64
AGENTWEAVER_TEST_SECRET_SERVICE=1 \
AGENTWEAVER_TEST_PUBLISHED_APPHOST="$PWD/tools/Agentweaver.Cli/bin/Release/net10.0/linux-x64/publish/agentweaver" \
dotnet test tests/Agentweaver.Cli.Tests/Agentweaver.Cli.Tests.csproj --configuration Release --filter "FullyQualifiedName~GatewayOpenApiParityTests.PublishedLinuxApphostReadsProjectSkillDecisionsOverHttpsWithBrokerAndSecretService"

This test runs the published executable against a local HTTPS Gateway and Identity Broker fixture with isolated credentials. It checks Platform and Project --output decision export, owner-only 0600 Unix permissions, silent success, pagination, and denied-project error handling. It is a local fixture check, separate from live API acceptance.

Test the native ACS profile ​

The shared ACS library validates a complete manifest and its relative Rego and JSON files before native evaluation. It rejects manifest inheritance and any bundle or data path that points outside the supplied artifact. The pinned ACS package contains a Linux-x64 native library. To run its evaluator tests, use Linux and set ACS_OPA_PATH to the pinned OPA 0.70.0 executable described in the ACS runtime asset guide. The composed-domain tests also check fixed module bytes, separate data namespaces, and independent action and network decisions. The unified profile tests check exact model/provider permission and ordered Guardrails findings. Approval tests retain the native evaluation and resolve an exact turn ID and argument digest through the real Linux ApprovalResolver. Project profile tests check omitted network data and the exact submitted hash.

Run these commands from the repository root. Replace /path/to/opa with the full path of the pinned OPA executable from the runtime asset guide.

bash
export ACS_OPA_PATH='/path/to/opa'
dotnet restore tests/Agentweaver.Policy.Acs.Tests/Agentweaver.Policy.Acs.Tests.csproj --runtime linux-x64 --locked-mode -p:AgentweaverUseLinuxX64LockFile=true
dotnet test tests/Agentweaver.Policy.Acs.Tests/Agentweaver.Policy.Acs.Tests.csproj --runtime linux-x64 --no-restore --configuration Release -p:AgentweaverUseLinuxX64LockFile=true

The suite checks content hashes, bounded facts, default deny, hard-deny precedence, unavailable verified-human facts, native failures and conversion goldens against the existing Policy adapter. The native-acs Ubuntu CI shard downloads OPA 0.70.0, verifies its pinned SHA-256, and requires each named native test to pass. ComposedNativeSelectorKeepsDomainDecisionsIndependent is one of those required tests. A Windows skip does not satisfy this Linux CI check. UnifiedNativeModelAndGuardrailsDecisionsAreHashBound and RuntimeNativePolicyGateTests.NativePolicyBlocksEveryWithheldModelSendAndBindsRevision and NativeGuardrailsEscalationRetainsExactTurnAndDigestAcrossApprovalResolution are also required. The runtime test counts fake model sends and source revisions through the opt-in Orchestrator policy gate. The escalation test changes the digest and proves native resolution rejects it. These tests do not activate ACS or change the deployed v4 Policy path.

Run the Remote MCP scan and send-boundary regressions after the Release build:

powershell
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~RemoteMcpCatalogScan|FullyQualifiedName~EnvironmentRemoteMcpDiscoveryPostgresTests"
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~ReviewedRemoteToolAgentTests

The Environment tests cover accepted-baseline persistence, replay, required and optional checks, scanner version binding, complete-catalog findings, and scan failure recovery. The Orchestrator tests cover exact reviewed-tool facts, gateway revocation after approval, durable admission acknowledgment, and zero transport sends after denial or journal failure.

Test the canonical Policy API ​

The Platform head tests check snapshot consistency, current authority, integrity failures, request rejection, and unchanged Policy state.

Run the database-free selector tests and Gateway route/OpenAPI tests after the Release build:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~NativeAcsPolicyHistoryRequestTests|FullyQualifiedName~NativeAcsPolicyRequestGateTests"
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~PlatformPolicyRoutesAreBoundedAndExcludedFromMcp|FullyQualifiedName~PlatformPolicyHistory|FullyQualifiedName~PlatformPolicyRevisionRoutesEnforceQueryAndHeaderForwarding|FullyQualifiedName~ProjectPolicyRoutesAreBoundedAndExcludedFromMcp|FullyQualifiedName~ProjectPolicyRoutesForwardTenantAndRejectUnknownQueryValues|FullyQualifiedName~ProjectPolicyValidationForwardsBoundedBodyAndRejectsQueries|FullyQualifiedName~ProjectPolicyReadsPublishTypedOpenApiContracts"

Run the Projects & Config PostgreSQL tests in hosted CI:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~NativeAcsPolicy|FullyQualifiedName~NativeAcsPlatformPolicy|FullyQualifiedName~NativeAcsProjectPolicyRead|FullyQualifiedName~NativeAcsProjectPolicyList|FullyQualifiedName~NativeAcsProjectValidation|FullyQualifiedName~ProjectPolicyBaseline|FullyQualifiedName~FirstProjectPolicyWrite"

Run the Gateway preparation receipt regression on Linux. Set AGENTWEAVER_TEST_OPA_PATH to the same pinned OPA 0.70.0 executable. This test-only variable lets the Broker test use a validator without enabling native ACS evaluation in unrelated service fixtures.

bash
export AGENTWEAVER_TEST_OPA_PATH='/path/to/opa'
dotnet test tests/Agentweaver.Identity.Broker.Tests/Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~GatewayPlatformPolicyPreparationOpenApiMatchesNewAndRetryReceipts

These controlled tests use disposable PostgreSQL. They check Platform and Project source reads, current authorization, history pagination, exact bytes, opaque list cursors, bounded set-based list authorization, and unchanged policy tables. Project validation tests check role revocation, cancellation, and responses across different Platform sources. Run those tests on Linux with the pinned ACS_OPA_PATH to check a successful native validation. They also check preparation persistence and replay, duplicate requests, stale heads, revoked authority, and rollback. The private source test stages a preparation and confirms that the source still returns only the committed artifact with pending/null admission. These tests do not install a provider barrier or admit a policy. They do not call a live API or prove that a deployed image contains the pinned ACS assets.

Test the private Environment Policy source ​

After the Release build, run the direct TLS tests with their controlled certificate fixtures:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~PlatformPolicySourceTlsTests|FullyQualifiedName~PlatformPolicySourceGuardTests|FullyQualifiedName~BrokerRunBindingTlsCompositionTests"

The route and PostgreSQL snapshot tests use disposable PostgreSQL. Hosted CI runs them:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-build --no-restore --configuration Release --filter "FullyQualifiedName~PrivatePlatformPolicySource|FullyQualifiedName~PrivatePlatformPolicyPreparationRead"

The TLS tests check shared-listener composition with neither workload profile, Broker, AgentHost, and both; peer certificate rules; certificate rotation; revocation; and reused connections. The untrusted-leaf canary counts AIA and CRL requests before pin classification. Response checks include a final peer check before headers and no-store headers confined to source paths. The canary uses the .NET TLS client on Linux and Git for Windows' bundled OpenSSL on Windows. It resolves OpenSSL from git --exec-path; Schannel itself retrieves the client's issuer in LSASS and would contaminate the server-fetch count. Install Git for Windows before running this canary on Windows. The PostgreSQL tests use a real shared Kestrel request for the complete artifact response, plus controlled requests for the read-only snapshot, storage bounds, pending admission, and sanitized failures. Hosted CI runs the full Projects & Config suite with disposable PostgreSQL:

powershell
node scripts\ci\v1-test-plan.mjs run projects-config

The production-host consumer test enables the source client, confirms that startup sends no request, and reads successive pending artifacts through the real Projects route. It checks candidate compilation and confirms that the Environment host registers no admitted source, provider, or reconciler. Run it with the disposable PostgreSQL fixture:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter FullyQualifiedName~ProductionEnvironmentReadsRealPendingSourceWithoutAdmissionOrWorkers

The client and compiler unit tests cover bounded response parsing, TLS certificate separation, and candidate output:

powershell
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --configuration Release --filter "FullyQualifiedName~PlatformPolicySourceHttpClientTests|FullyQualifiedName~PlatformPolicySourceClientCompositionTests|FullyQualifiedName~PlatformEgressAcsCompilerTests"

Run the Environment Policy ledger read-only grant, runtime readiness, and database-maintenance cutover tests:

powershell
dotnet test tests\Agentweaver.Persistence.Postgres.Tests\Agentweaver.Persistence.Postgres.Tests.csproj --configuration Release --filter "FullyQualifiedName~PlannedRuntimeGrants"
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --configuration Release --filter "FullyQualifiedName~EnvironmentRemoteMcpConnectionPostgresTests"
npm run test:azure

Test project-wide Knowledge discovery ​

Run the Knowledge service suite to check authorization, existing provider bindings, and all-agent search across the native PostgreSQL, Cosmos, and Redis providers, including global paging across distinct provider resources. Run the Web suite to check the project-wide search, access-run links, record provenance, and revision history alongside the run-scoped record workflows:

powershell
dotnet test tests\Agentweaver.Knowledge.Tests\Agentweaver.Knowledge.Tests.csproj
npm --prefix apps/web test

These tests use test-owned stores and owner responses. They do not prove that Knowledge or the Gateway is deployed. The Knowledge suite checks that project search works without ReadRunSelection and still requires AccessPrivateKnowledge.

Test child dispatch and task completion ​

On Linux with a Docker-compatible engine, provide two isolated mountpoints before running the focused composition test. The production Host rejects an ordinary directory in place of a workspace mount. CI mounts two disposable 64 MiB tmpfs workspaces for Broker shards and unmounts them afterward. For a containerized SDK runner, pass --tmpfs /workspace/agentweaver/native-join-workspace-1 --tmpfs /workspace/agentweaver/native-join-workspace-2 to the container engine. Run the following command inside that Linux environment:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~PublicNativeChildrenJoinBeforeIndependentReviewGate
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~PublicNativeTaskCompletionRequiresClaimAndNoOutputWitness

This source test uses disposable Testcontainers PostgreSQL and enters through the public confirmed-plan dispatch route. It starts a production RuntimeAgentHost child through the PR2 placement continuation, with no seeded child registration. The SDK wire peer, Kubernetes responses, and external object storage are controlled fixtures; they are not live providers or paid model execution. Completed child results must come from the runtime path, not pre-seeded checkpoint results.

PublicNativeChildrenJoinBeforeIndependentReviewGate holds child completion until the child startup worker has released its lease. It checks that dispatch returns pending while another owner holds that lease, then polls until the child receipt is stored. The independent-review gate stays pending, so the response has child completion evidence but no task-completion evidence. A lost Host reply and a lost dispatch reply both recover the same child result without a second model turn.

PublicNativeTaskCompletionRequiresClaimAndNoOutputWitness runs a separate one-item plan with no declared outputs and no review step. It checks that dispatch returns task-completion evidence only after the claim, completed plan checkpoint, child receipt, and valid no-output witness agree. Completed child sessions no longer expose runtime owner context; teardown verifies the Broker's authority-loss path revoked each source grant and that local Host/SDK resources were disposed. Readiness consumes Identity's Observe grant for the registered observation endpoint, not the Host configure endpoint; wrong audiences and expired grants remain invalid. Linux is required for the production workspace and native placement checks. The fixture records UTC wall-clock boundaries and monotonic elapsed time for each Host's Sandbox provisioning, registration, TestServer startup, bootstrap, and RuntimeAgentHost.ConfigureAsync, including SDK request arrivals and response durations. Host and Broker liveness checks use system time; the test does not freeze their clock to keep a lease or registration alive. Owner authority and credential expiry checks remain active. The native fixture waits two seconds after provisioning before registering the Host. This wait keeps the controlled Pod's lease-plus-two-second Started timestamp from being in the future relative to the Host's system clock. Reservation and provider-operation leases, including retirement, expire after 60 seconds; a valid transition into Active assigns a fixed 600-second lifetime. Runtime registration uses the exact persisted active expiry, and credential grants retain their existing lifetime and authority caps. Only this isolated native test fixture uses a 60-second Configured phase budget and a 120-second total startup budget; production remains at 30/180 seconds. Passing this test does not prove production-budget or live AKS acceptance. A local expiry failure is not a passing native receipt. Each Host starts ConfigureAsync as soon as its Host bootstrap receiver accepts delivery, without waiting for the outer Broker request to return; this overlaps peer-fixture setup without changing production authority checks or startup budgets. This is a local source-composition check, not deployed native acceptance; the broader approved-source acceptance gap remains open.

Test MAF dispatch with disposable PostgreSQL ​

Run the Orchestrator dispatch tests from the repository root:

powershell
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter FullyQualifiedName~MafDurableDispatchPostgresTests

These tests use the production catalog binder and isolated PostgreSQL schemas. They check parallel and conflicting ready work, dependent work blocked until its predecessor succeeds, duplicate dispatch after restart, and rollback when the execution fence is stale. The separate PublicNativeChildrenJoinBeforeIndependentReviewGate test composes the public dispatch route with two production RuntimeAgentHost instances and controlled SDK and owner responses. Neither test proves a native AKS journey.

Test checkpoint recovery ​

Run the controlled Source Control response-loss regression:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~RealOwnerResponseLossReconcilesCommittedPullRequest

The test uses the production pull-request executor and authenticated Source Control owner with disposable PostgreSQL, a local Git repository, and fake GitHub. It drops a committed owner response, disposes the original Orchestrator and Events test hosts, and starts fresh hosts with the same schemas and GitHub state, local Git workspace, and origin. It reloads the durable intent, rejects a changed title, and checks that concurrent exact retries retain one pull-request receipt and make no second create attempt. The test uses stub callbacks. Live Host interruption acceptance remains open.

Use the checkpoint recovery observation case to compare a retained before-capture with normal status after recovery. Its before and after modes use finite native CLI reads for a pending gate, saved child, or recorded OpenPullRequest receipt. Full plan, dependency graph, committed recovery-event, and physical no-duplicate evidence remain separate. readCheckpointRecoveryEvents exposes retained owner progress for one operation. The observation case does not use this read as complete recovery or physical-effect proof. After observation discovers the operation, reads all event pages through the native CLI, and requires a ready event bound to the stable run and root-session recovery status. Before capture does not discover or read owner recovery events. For a pending gate, the script separately compares the readiness source checkpoint with the identical checkpoint pair retained in the four original before-capture root-session responses. A missing, malformed, or changing pair blocks that comparison without changing readiness. A stable mismatch fails the comparison and the overall observation. The comparison never substitutes a replacement or later checkpoint. A blocked event read does not replace the base gate, child, or receipt result. A bound event contradiction fails the case while the script retains those results.

Run the event projection and owner tests from the repository root:

powershell
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter "FullyQualifiedName~CheckpointRecoveryEventProjectionTests|FullyQualifiedName~RecoveryEvents|FullyQualifiedName~OriginalLegacyAdmissionIsReadWithItsSavedFieldsAndBindings|FullyQualifiedName~NewCheckpointRecoveryWaitsForBlockedHostAndAdvancesOneFence|FullyQualifiedName~ChildRecoveryCommitsFrozenManifestAndHoldWithFenceAndExactReplay|FullyQualifiedName~ChildRecoverySupersessionPreservesR1ToR2CheckpointLineageAndReleasesHoldAfterReady"

The owner tests use disposable PostgreSQL. They do not access a live target.

Run its local regression tests from the repository root:

powershell
node --test scripts\acceptance\api\tests\checkpoint-recovery-observation.test.mjs

The case tests compare child receipt links from both execution-plan reads. They also cover pending-gate checkpoint parity with only the two checkpoint fields excluded, all four retained source reads, no confirmed work plan, malformed and unstable pairs, source ID and revision mismatches, and a different replacement checkpoint. They cover paged child admission and readiness, sequence gaps, duplicate IDs, cursor and watermark changes, unsafe sequence values, denial on a later page, status changes, and a passing readiness witness with a blocked receipt. The Orchestrator PostgreSQL tests cover current, carried, imported, and unproven receipts:

powershell
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter "FullyQualifiedName~ExecutionPlanLinksCurrentAndCarriedReceiptsButOmitsSwappedMessage|FullyQualifiedName~ChildRecoveryImportsVerifiedCompletedUnjoinedResultAndReleasesHold"

The owner-store status tests use PostgreSQL and run in hosted CI. Local checks can build those tests, but cannot run them without Docker/PostgreSQL.

Run the recovery boundary and progress tests from the repository root:

powershell
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter "FullyQualifiedName~RuntimeRegistrationRecoveryTests|FullyQualifiedName~CheckpointRecoveryHoldTests|FullyQualifiedName~ChildCheckpointRecoveryManifestTests|FullyQualifiedName~CheckpointRecoveryProgressSurvivesRestartAndProjectsAnOutboxEvent|FullyQualifiedName~CoordinationOwnerStorePostgresTests|FullyQualifiedName~MafCheckpointStorePostgresTests"

RuntimeRegistrationRecoveryTests uses controlled state to check that Host recovery accepts only the saved pending gate and decision version. The checkpoint progress test uses disposable PostgreSQL to check that a retry of the same step keeps the saved status and emits one progress event. The owner-store tests exercise recovery from an accepted idle run, including races with a gate answer and run cancellation. ChildCheckpointRecoveryManifestTests checks member-bound registration authorization and the all-registration barrier. CheckpointRecoveryHoldTests checks fail-closed manifest handling and hold release. The PostgreSQL tests require a Docker-compatible engine.

The child-join cases in MafCheckpointStorePostgresTests check the frozen manifest, exact replay, dispatch hold, lock order, member registration barrier, wrong-member rejection, hold release after readiness, malformed-manifest handling, and rejection of unsupported BuildTest history. These focused unit tests check that a completed-but-unjoined child does not need a replacement registration and that its saved material uses the original registration fence: ChildRecoveryRegistrationBarrierAllowsCompletedUnjoinedMemberForFinalImport and CheckpointRecoveryChildMaterialMustMatchOriginalRegistrationFence. Run them without the PostgreSQL tests:

powershell
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter FullyQualifiedName~ChildRecoveryRegistrationBarrierAllowsCompletedUnjoinedMemberForFinalImport
dotnet test tests\Agentweaver.Identity.Tests\Agentweaver.Identity.Tests.csproj --configuration Release --filter FullyQualifiedName~CheckpointRecoveryChildMaterialMustMatchOriginalRegistrationFence

Hosted GitHub CI runs these PostgreSQL integration tests: ChildRecoveryImportsVerifiedCompletedUnjoinedResultAndReleasesHold, ChildRecoveryRejectsMismatchedOrMalformedCompletedUnjoinedResultAndKeepsHold, and ChildRecoveryCompletedUnjoinedImportRetryIsIdempotent. They check verified result import and hold release, rejection with the hold retained, and one-time import on retry. Do not run these PostgreSQL tests locally. Controlled tests do not prove a live Environment or Host recovery.

Test governance checkpoint create replay ​

The Projects Config PostgreSQL tests hold a SHARE lock on the governance checkpoint table while two serializable create transactions reach their inserts. The test observes both blocked backends through pg_blocking_pids, then releases the lock. Both calls must return the same checkpoint ID and hash, and PostgreSQL must contain one row for the stream and idempotency key. The same test project also checks retry exhaustion, unrelated error propagation, stream scoping, later-head replay, corrupt stored data, and export recovery.

Run the focused tests from the repository root:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~GovernanceCheckpoint"

These tests use Testcontainers PostgreSQL. They require a Docker-compatible container engine.

The prepared-native-child recovery cases also run only in hosted PostgreSQL CI. They cover immutable-origin supersession, ready-commit rollback and replay, ordinary replacement accounting, verified checkpoint descendants, serialization with begin, reservation and credit-guard preservation, replacement observation, and migration compatibility: ChildRecoverySupersessionRebindsPreparedNativeDispatchWithoutChangingOrigin, ChildRecoveryNativeRebindReadyCommitRollsBackAndReplaysAfterRestart, NativeChildRebindCompletesOriginalMessageThroughReplacementAccounting, NativeChildRebindAcceptsOnlyVerifiedCheckpointDescendants, NativeChildRebindSerializesWithBeginAndSupersession, NativeChildRebindPreservesReservationsAndCreditGuard, ReboundNativeDispatchObservationKeepsOriginAndShowsEffectiveBinding, and NativeChildRebindMigrationIsOptionalUntilAppliedAndEnforcesImmutableUniqueReceipts. RuntimeObservationContractsTests.ReboundDispatchProjectionKeepsOriginAndEffectiveBindingsSeparate checks the public projection without PostgreSQL.

CheckpointRecoveryRequiresCacheOrSavedTurnHistory checks that the checkpoint recovery guard rejects missing cache and saved turn history. A fresh session and configuration-only, zero-turn state do not count as restored material. This unit test does not exercise Host activation or material endpoints. Run it with:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~CheckpointRecoveryRequiresCacheOrSavedTurnHistory

Test Scribe Knowledge output ​

Run the producer, immutable-intent, and exact serialized-size tests, followed by the selected-gate Orchestrator/Broker/Projects/Knowledge PostgreSQL composition test:

powershell
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter FullyQualifiedName~MafScribeTests
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~SelectedScribeGateCheckpointsKnowledgeReceiptAndReplaysAfterServerRestart

The composition test requires the existing Testcontainers PostgreSQL fixture. It selects and confirms the workflow and plan through native owner routes, seeds the preceding accepted child's completed result, and dispatches the real Scribe gate. The test persists the intent in the real checkpoint store, commits through the Knowledge API/native PostgreSQL provider, discards the acknowledgment after that commit, restarts both servers, and replays the checkpointed intent. It requires a compact durable receipt, one pending-trust Memory and one immutable revision, stable record/revision identifiers, payload conflict, and no extra writes after actor/scope/authority rejection. Fixture authority uses current database-backed project Owner/Orchestrator assignments; the test does not grant live access. The test does not claim deployment or model execution. The retained ScribeKnowledgeCommitLostAcknowledgmentReplaysSamePendingMemoryAfterRestart test covers the isolated Knowledge client only, not selected-gate integration. The completed-child fixture includes a Source Control capture admitted through the existing PostgreSQL owner path. The successful replay must retain both Scribe's compact receipt and the plan's independent source-output witness. Scribe's Memory receipt cannot substitute for that source evidence.

The coverage runner used in CI saves TRX results, Cobertura coverage, and source identity alongside the test output. Match a result to the exact source SHA, pull request head, workflow run, and attempt. A compiled test or a green run from an older revision is not evidence that the current revision passed.

Understand pull request CI ​

The v1 foundation CI workflow keeps the required foundation check as an always-reported aggregate. It fails if any selected job fails, is cancelled, or is unexpectedly skipped. Release composition validation, controlled API journeys, and CI/coverage guards still run on every candidate. v1-docs-ci.yml remains the separate documentation check.

Both workflows trigger for pull requests targeting v1 when a PR opens, receives new commits, reopens, or is edited, including a base branch change. An edit to the PR title or body also triggers both workflows. GitHub suppresses these workflows when the PR has conflicts. The foundation workflow also triggers for PRs targeting sabbour-v1-opentelemetry-core.

Changed-path detection skips expensive .NET, Web, image, and tooling suites for documentation/metadata-only PRs. Unrelated workflow edits do not run those suites. Unknown paths and edits to v1-ci.yml or CI helpers select everything. .NET and Node tooling inputs select Web validation too: Broker browser and Linux release-container tests consume the exact candidate's built Web artifact. The tooling job restores its AgentHost/Web Host publish dependencies. Broker shards also install locked Web dependencies for Vite-backed browser fixtures; the built artifact alone does not replace their development server. Service/package/test, lockfile and deployment inputs select image checks, including source receipts and isolated native prompt-capacity verification; no images are published by this workflow. Web, AgentHost, deployment and .NET build/lock inputs also select Node tooling because its executable Linux contracts consume those inputs.

The image job checks the Projects & Config Linux x64 lock after the foundation build. To regenerate and verify the lock from the repository root, run:

powershell
dotnet restore services/projects-config/Agentweaver.Projects.Config/Agentweaver.Projects.Config.csproj --runtime linux-x64 --force-evaluate -p:AgentweaverUseLinuxX64LockFile=true
dotnet restore services/projects-config/Agentweaver.Projects.Config/Agentweaver.Projects.Config.csproj --runtime linux-x64 --locked-mode -p:AgentweaverUseLinuxX64LockFile=true
dotnet restore Agentweaver.slnx --locked-mode

Inspect every changed lock file after regeneration. Keep unrelated lock changes out of the change.

Each .NET project runs on its own runner. The Broker suite has four deterministic method shards, derived from the built assembly's VSTest discovery. All theory cases for a method stay together, including methods in large partial classes. Shards are balanced by measured duration: CI places the slowest method first on the least-loaded shard (longest-processing-time-first). Method weights come from scripts/ci/broker-test-weights.json, which records the source run. A method without a recorded weight uses defaultSeconds, so new tests are still assigned exactly once. Weights change placement only; they never filter tests. Every Broker shard saves the complete partition and checks its TRX method set against its assigned partition. Empty discovery, empty shards, missing receipts and failed tests fail CI. Existing explicitly opt-in native cases retain their skip behavior; isolated image-native checks remain separate and mandatory when image validation is selected.

The PostgreSQL collection already shares one container per test process; each test retains a fresh database. Browser-backed Projects tests also share a lazily created Playwright driver, but not browsers, resolver arguments, contexts or cookies. NuGet caches are keyed by SDK/project/lock inputs. Chromium caches are keyed by OS, architecture and Broker package lock; the installer still runs on cache hits to install required Linux libraries. The web job and Broker shards also cache the installed apps/web/node_modules directory. The key combines OS, architecture, the exact Node.js version, and the hash of apps/web/package-lock.json. The cache has no partial restore key, so a lockfile or Node.js change misses and runs a clean npm ci. On an exact hit, CI skips npm ci. Tool caches such as node_modules/.vite are excluded. CI does not cache .NET bin/obj output or Docker layers: a reused build output could hide a compile failure, and image builds must stay reproducible for the image provenance checks.

Pull request, push, and manual v1 foundation CI runs never collect coverage. Coverage is a separate weekly measurement; see Measure coverage weekly. Local npm run coverage:dotnet retains its full sequential diagnostic behavior. Only superseded runs for the same PR are cancelled; pushes and manual runs have independent concurrency groups. Manual release validation derives its comparison base from the selected commit's first parent, preserving the validator's checked history contract without inventing a push event or changing the tested checkout.

Run the workflow regression guards locally:

powershell
npm ci --ignore-scripts --no-audit --no-fund
node --test scripts\ci\tests\*.test.mjs scripts\coverage\tests\*.test.mjs
node scripts\ci\v1-test-plan.mjs matrix

After restoring/building a test project, use node scripts\ci\v1-test-plan.mjs run identity-broker-1 to reproduce a Broker shard (Docker, Chromium and built Web assets are required). Set COLLECT_COVERAGE=true to instrument that invocation. Each shard's summary and artifact include test/discovery elapsed time; Actions job durations also include setup, restore and build.

When one Broker shard becomes consistently slower than the others, refresh the weights from the TRX receipts of a recent successful run without coverage:

powershell
gh run download <run-id> --pattern 'v1-dotnet-identity-broker-*' --dir artifacts\broker-trx
node scripts\ci\v1-test-plan.mjs weights "v1 foundation CI run <run-id>" (Get-ChildItem artifacts\broker-trx -Recurse -Filter *.trx).FullName

The command sums theory-case durations per method, keeps methods that take at least one second, and sets defaultSeconds to the mean of the rest. Commit the updated file with the run URL in the pull request.

Performance acceptance for v1 foundation CI requires at least three representative successful pull-request runs. The median total duration must not exceed 20 minutes, and the longest Broker shard must not exceed 8 minutes. Use completed run results to verify these targets. A configuration change alone does not prove performance acceptance.

Measure coverage weekly ​

The v1 coverage workflow (.github/workflows/v1-coverage.yml) measures coverage once a week. It calls v1-ci.yml with collect_coverage: true, so the same test jobs run with instrumentation, and the same foundation gate must pass. The coverage job merges the .NET shard reports without rerunning tests and uploads the source-bound v1-coverage-<sha>-<attempt> artifact, which is kept for 30 days.

Every suite artifact is bound to the run attempt that produced it. Each .NET shard and the Node and Web coverage jobs write attempt.json (suite, run attempt, and job status) and upload <artifact>-<attempt>, for example v1-dotnet-identity-broker-2-2. Re-run failed jobs keeps the artifacts of jobs that passed, so a rerun has one artifact per attempt for each rerun suite. Before combining, scripts/coverage/attempts.mjs select keeps only the newest attempt of each suite. It fails if that attempt has no marker, a marker from another suite or attempt, or a job status other than success. The selected attempt of each suite is recorded in attempts.json and in the suiteAttempts field of source.json. Data from a failed attempt therefore never enters the combined report.

GitHub runs scheduled workflows only from the default branch, which is dev. A dev copy of v1-coverage.yml runs every Monday at 05:00 UTC and dispatches the real workflow on refs/heads/v1 with publish=true. To validate coverage collection by hand, run the workflow on a branch:

powershell
gh workflow run v1-coverage.yml --ref <branch>
gh workflow run v1-coverage.yml --ref <branch> -f publish=true

The first command only measures. The second also publishes. Publishing from a branch other than v1 replaces the current badges until the next weekly run, so publish only to verify the publication path.

Each surface reports its own line coverage. The value is covered executable lines divided by coverable lines in that surface's instrumented scope:

SurfaceScopeSource report
.NETProduction assemblies in the combined suite reportsReportGenerator Summary.json
Webapps/web/src/v1 source filesVitest coverage-summary.json
Node release toolingscripts/release/*.mjsNode test LCOV, merged per line

The surfaces are not combined, because one overall value would be dominated by .NET and hide the smaller surfaces. Values are rounded down to one decimal place.

When a run publishes, scripts/ci/v1-coverage-report.mjs:

  1. Writes one shields.io endpoint document per surface, plus coverage.json and coverage.md, to v1/ on the badges branch. The README badges read these documents and link to coverage.md, which records the source SHA, run, and artifact. Only a run that passes the foundation gate publishes, and the artifact's tested SHA must match the run's SHA. The workflow never pushes to v1.
  2. Creates or updates one open issue labeled area:testing that starts with the agentweaver:v1-coverage-improvement marker. The issue lists the measured values, the five largest gaps for each surface (classes or files with at least 10 uncovered lines), and acceptance criteria. If an open marker issue exists, the run updates it instead of creating another.
  3. Assigns the issue to the Copilot coding agent with a v1 base branch, then reads the issue back to confirm the assignment. If Copilot is already assigned, the run leaves the assignment unchanged.

GITHUB_TOKEN can't assign Copilot. As a one-time setup, an administrator adds a repository secret named COPILOT_ASSIGN_TOKEN that holds a user token: a fine-grained personal access token with read access to metadata and read and write access to actions, contents, issues, and pull requests, or a classic token with the repo scope. If the secret is missing, the run still creates or updates the issue, logs a warning, and comments on the issue that Copilot was not assigned. If the secret is present but assignment fails, the job fails.

Test coordinator-root numeric-limit no-send evidence ​

Run the focused Host, contract, PostgreSQL owner, and migration cases:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --filter FullyQualifiedName~CoordinatorRootNumericTurnDenial
dotnet test tests\Agentweaver.Identity.Tests\Agentweaver.Identity.Tests.csproj --filter FullyQualifiedName~NativeNoSendCompanion
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --filter "FullyQualifiedName~CoordinatorRootAdmissionEnforcesAcceptedModelAndToolBudgets|FullyQualifiedName~RuntimeNumericNoSendMigration"

The controlled Host tests exercise the actual coordinator-root dispatch branch: the persisted message ID is the action attempt, cursor capture precedes root authorization, and empty-range failures do not produce a companion or call native Send. The HTTP-path regression preserves only the exact, bounded no-store numeric-limit error from an Orchestrator 403; unrelated or malformed forbidden responses remain generic denials without a companion. Contract tests reject changed or incomplete pairs. The PostgreSQL owner test posts through the authenticated internal route, reads the stored original and companion together, and checks exact retry and immutability. The migration test verifies the forward ledger-kind change and append-only guards. These tests use controlled SDK peers and disposable PostgreSQL; they do not prove a deployed numeric boundary, restart recovery, or duplicate-send prevention. Child pre-dispatch and in-turn tool denials remain explicitly partial.

Run focused database checks ​

Run the run-start readiness and authority regressions against disposable PostgreSQL and controlled providers:

powershell
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter FullyQualifiedName~RuntimeRunStartReadiness
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --configuration Release --filter "FullyQualifiedName~FirstStartAuthorityLossAfterProviderReturnRecordsTheExactResourceWithoutReadiness|FullyQualifiedName~ResumeAuthorityLossAfterReservationPreservesOnlyEffectsThatActuallyStarted"

These tests check complete pre-042 and installed-042 schema shapes, reject partial installations, and verify the first-start and resume authority checks. They do not establish live API acceptance.

Run the Broker migration/grant and read-only bootstrap regressions against disposable PostgreSQL:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter "FullyQualifiedName~IdentityBrokerMigrationCommandTests|FullyQualifiedName~IdentityBrokerPostgresBootstrapCommandTests"

These cases reproduce missing history permission, exercise the migration owner's canonical grant step, and verify that the runtime cannot write migration history. They do not connect to Azure or authorize a live grant.

The Foundation Probe PostgreSQL initializer has separate source and database checks. Run the source preflight without starting PostgreSQL:

powershell
dotnet test tests\Agentweaver.FoundationProbe.Tests --filter FullyQualifiedName~P1PostgresInitializerTests

These source checks include the migration catalog maximum, live-history prefix, runtime CONNECT, relation, and schema ACL checks used by --apply-pending-migrations. Projects & Config migration/grant reconciliation is covered by its service PostgreSQL migration tests.

Run the production catalog SQL cases and continuation checks against the disposable PostgreSQL fixture:

powershell
dotnet test tests\Agentweaver.FoundationProbe.Tests --filter FullyQualifiedName~P1PostgresInitializerPreflightPostgresTests
dotnet test tests\Agentweaver.FoundationProbe.Tests --filter FullyQualifiedName~P1PostgresContinuationPostgresTests

These tests check the initializer's source-defined SQL behavior, including grant preservation, membership cleanup, and rejection of unsafe reserved flags. They do not execute the initializer against Azure or the approved database. See the Azure operator guide for the separate live-state and approval requirements. The continuation PostgreSQL tests also exercise fresh Projects initialization: the dedicated owner receives the schema and objects, missing operator role assumption is rejected before writes, and a grant-reconciliation failure rolls back both the schema and temporary membership.

Run the Projects governance decision chain tests against disposable PostgreSQL:

powershell
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --configuration Release --filter "FullyQualifiedName~GovernanceDecision"

These tests check canonical serialization, fenced appends, idempotent retries, atomic outbox writes, and the runtime grants.

Test Broker TLS listener composition ​

Run the focused Broker composition tests from the repository root:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --filter FullyQualifiedName~HostedModelCatalogCredentialUseCompositionTests

The TLS listener test checks the effective HTTPS certificate, protocol, and required-client-certificate settings for the IssueSync, hosted-catalog, and remote-MCP listeners, then confirms each rejects a request without a client certificate. It does not claim a successful mTLS exchange.

Test Gateway and authenticated client paths ​

The following Broker integration tests use a Broker-issued token and test-owned Projects/PostgreSQL state. They use controlled owner transports; they do not test deployed owner services:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~GatewayDelegatesOwnerStatusesReplaysCursorsAndReauthorizesBeforeSseWrite
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~CopilotConnectionRotationPreservesAcceptedSelectionThroughNativeSdkAccounting --blame-hang-timeout 3m --blame-hang-dump-type none --logger "console;verbosity=normal" -- xUnit.ShowLiveOutput=true
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~BrokerIssuedRunTokenRegistersSessionsDeliversAtTurnBoundaryAndKeepsGatePending
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~AuthorityLossDuringSdkPreparationPreventsNativeSessionCreation
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~BrokerIssuedOwnerAndSeparateRunSelectionAuthorizeWorkspaceVolumeHttpEffects
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName~BrokerTokenTraversesMcpAndGatewayToKnowledgeWithoutMutation

These scenarios cover authenticated Gateway forwarding, event replay and reauthorization, account-connection lifecycle, run-bound authority, and Knowledge access. Their real database and authorization fixtures do not prove deployment, live OAuth, live Azure credentials, or paid model execution.

To run the six-scenario public BuildTest dispatch regression after the Release build, use:

powershell
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --no-build --no-restore --configuration Release --filter FullyQualifiedName=Agentweaver.Identity.Broker.Tests.ProjectsConfigBrokerAuthorizationTests.PublicBuildTestDispatchRetainsItsIntentAndRejectsChangedAuthority --collect "XPlat Code Coverage" --logger "trx;LogFileName=public-buildtest-dispatch.trx" --results-directory artifacts\tests\public-buildtest-dispatch

A successful run reports six executed tests with no failures, skips, or warnings. The fixture uses broker-issued tokens, current Projects authority, disposable PostgreSQL, a temporary Git workspace, and controlled Environment responses. The positive case captures output through an explicit test action from an empty Git baseline. It does not prove automatic production capture, native Kubernetes execution, paid model execution, or deployment.

Test native Redis Memory integration ​

The native Redis tests are opt-in. They do not create, pull, or delete a container. Set AGENTWEAVER_REDIS_MEMORY_NATIVE=1 only after you have confirmed that the existing Redis instance and its volume are dedicated to this test run.

Provide an already-running instance with these variables:

VariableRequirement
AGENTWEAVER_REDIS_MEMORY_NATIVE_ENDPOINTLoopback rediss://127.0.0.1:<published-port>/ endpoint. The test host must trust the certificate, and its name must match the endpoint.
AGENTWEAVER_REDIS_MEMORY_NATIVE_CONTAINER_IDFull 64-character container ID.
AGENTWEAVER_REDIS_MEMORY_NATIVE_OWNER_IDUnique 32-character run GUID. Set io.agentweaver.redis-memory.native-test=true and io.agentweaver.redis-memory.native-test-owner=<run-guid> on both the container and AOF volume.
AGENTWEAVER_REDIS_MEMORY_NATIVE_IMAGEExact cached image reference, including @sha256: and 64 lowercase hexadecimal digits. The test does not pull an image.
AGENTWEAVER_REDIS_MEMORY_NATIVE_ENGINEdocker or podman, used only to inspect the labeled container and restart that exact container in the restart case.
AGENTWEAVER_REDIS_MEMORY_NATIVE_USERNAME and AGENTWEAVER_REDIS_MEMORY_NATIVE_PASSWORDOptional existing ACL credentials. Set both or neither. The test does not create credentials or print their values.

Publish Redis port 6380/tcp only on the loopback host port. Store the active AOF directory on a dedicated named volume with the same test-owner labels. Redis must pass provider negotiation, including AOF-always, healthy AOF, standalone-primary, and noeviction checks. The helper verifies the container, image, port binding, AOF path, and volume labels before it writes. Each test uses a fresh key prefix; the tests do not run FLUSHALL or perform namespace-wide cleanup.

After you verify every instance, image, volume, endpoint, and ownership value, run only the native test filter:

powershell
$env:AGENTWEAVER_REDIS_MEMORY_NATIVE = "1"
dotnet test tests\Agentweaver.Knowledge.Tests\Agentweaver.Knowledge.Tests.csproj --no-restore --configuration Release --filter FullyQualifiedName~RedisMemoryNativeIntegrationTests

Do not use the opt-in flag for a shared or production Redis instance. These tests exercise the selected Redis deployment but do not prove a deployed Agentweaver application.

Validate the selected Projects runtime profile ​

Run the profile's local source checks:

powershell
node --test scripts\azure\tests\projects-runtime-profile.test.mjs

The tests check required runtime identity and database inputs, rejection of missing configuration, immutable image references, non-root file access, private HTTPS, bounded resources, and caller and network rules. They also check the existing provider-catalog reference and environment prefix. They do not read or verify a live catalog, create database roles, apply migrations or grants, publish images, or deploy a service.

Test platform component reporting ​

Run the report tests:

powershell
dotnet test tests\Agentweaver.Providers.Tests\Agentweaver.Providers.Tests.csproj --filter FullyQualifiedName~PlatformComponentReportTests
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --filter FullyQualifiedName~PlatformComponentCollectorTests
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --filter FullyQualifiedName~PlatformComponentReaderRequiresCurrentTenantAdminOrPlatformAdmin

The first command checks the 16-area catalog, report composition, readiness rules, and that the area list matches the table in Provider extensibility. The second checks parallel owner collection, the three-second owner limit, and the owner HTTP client. The third needs Docker. It checks that only a current TenantAdmin or PlatformAdmin can read the report. These tests don't call deployed owner services.

Test the platform egress provider ​

Run the platform egress tests:

powershell
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --filter FullyQualifiedName~PlatformEgress

These tests check host validation, the provider conformance kit, Cilium rendering and readback against a fake Kubernetes store, and the fail-closed reconciler. They use a fake policy source. They do not prove Cilium enforcement on a cluster or exact-host rules on Kata.

Run the source-only full policy-set proof checks:

powershell
dotnet test tests\Agentweaver.Environment.Tests\Agentweaver.Environment.Tests.csproj --filter "FullyQualifiedName~KubernetesPlatformPolicyProofTests|FullyQualifiedName~PlatformPolicyProofPostgresTests|FullyQualifiedName~PlatformEgressApplyReservationPostgresTests|FullyQualifiedName~CiliumPlatformEgressReservationTests|FullyQualifiedName~KubernetesApiServerAddressTests|FullyQualifiedName~EnvironmentMigratorTests"
node --test scripts\release\tests\environment-rbac.test.mjs
node --test scripts\azure\tests\p1-postgres-plan.test.mjs

The fake Kubernetes tests cover complete, empty, malformed, forbidden, expired, namespaced, cluster-wide, unrelated, and combined policy sets. The PostgreSQL tests cover complete reservation comparison, transport binding, snapshot size, reservation and hold replay, competing bindings, stale reservations, append-only rows, and receipt checks for supplied targets. The Node checks verify the separate RBAC, sealed-epoch manifest, runtime grants, and migration plan. These checks do not install the fence or write a cluster policy.

Planned GitHub Canvas adapter acceptance ​

GitHub Canvas adapter cases are unexecuted requirements, not a passing suite or current adapter support. The Canvas research did not run interoperability, rendering, or restart tests. The adapter is not implemented yet. Do not report the planned cases as product behavior or passing test evidence.

Test the CLI ​

Run the CLI unit tests after changing command behavior. Run the harness tests after changing API case launchers or scripts:

powershell
dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --configuration Release
npm run test:harness:api

The CLI tests check command behavior. The harness tests check script inputs, process arguments, and evidence handling with local fixtures. Neither runs a live API case or proves a deployed target.

Windows archive checks ​

The read-only host preflight preserves only inherited proxy variables for its PowerShell child and does not change proxy settings. A null GetProxy target means direct access; the exact fixture URI is also accepted. Any other target blocks the checks. IsBypassed is diagnostic only because .NET proxy implementations can report false for direct access.

On native Windows x64, prepare the candidate from a clean committed source tree with python scripts\cli-dotnet\package.py build --rid win-x64 --smoke. After the approved host preflight succeeds, run the verifier against that candidate and its full source commit. Set $workspace to a new durable path outside every Git checkout and $output to a new windows-controlled-archive-checks.json path; both parent directories must already exist. The verifier blocks by default before preflight or fixture acquisition. Run it from a local operator terminal with --attended-trust. The verifier also blocks when either standard input or standard error is not a terminal, or when CI or GITHUB_ACTIONS is nonempty.

powershell
$sourceCommit = (git rev-parse HEAD).Trim()
python scripts\cli-dotnet\verify_windows_archive_checks.py `
  --directory .\artifacts\cli\win-x64 `
  --source-commit $sourceCommit `
  --attended-trust `
  --workspace $workspace `
  --output $output

The source commit must be the full 40-character value recorded in the candidate receipt, and the workspace and output paths must be separate. The verifier uses one temporary CurrentUser\Root certificate and unique synthetic Credential Manager entries. Before each import or removal, it displays the certificate subject, SHA-1 thumbprint, run ID, store, public certificate path, and available wait. Review the matching Windows Security Warning and answer it yourself. The verifier cannot answer it. The import and each removal get at most 60 seconds, clamped to the existing execution or cleanup deadline. A timeout or cancellation fails the check.

If cleanup is unresolved, keep the workspace, journal, public CA certificate, its parent directory, and child-temp. Use the original workspace and a new sidecar path for recovery:

powershell
python scripts\cli-dotnet\verify_windows_archive_checks.py `
  --cleanup-only --attended-trust `
  --workspace $workspace `
  --output $recoveryOutput

Recovery does not rerun or pass the interrupted check. Without --attended-trust, it can stop proven owned processes, remove other proven owned fixture data, and inspect CurrentUser\Root; it does not remove a root certificate. Recovery can verify root absence by the recorded thumbprint even if the public CA file is missing. If the root is present, recovery needs the public CA file and an exact byte match before it can remove the certificate. This sidecar is local controlled-test evidence only. nativeJourneyProof remains not-run. The sidecar is not release evidence and does not prove that the native API journey passed.

Run the read-only Gateway API case ​

The API case scripts exercise normal CLI commands through the exact native apphost. The current case checks sign-in status, Gateway operation discovery, operation details, and the authorization context through rest. It does not create fixtures, mutate resources, send model requests, or open a browser.

Follow Run a read-only CLI API case for the approved target, case input, exact apphost, dry run, and evidence results. Use only an explicitly approved non-production target. The successful dry run validates local inputs only and creates no evidence. A passing case does not prove full API or P1 acceptance.

Use the spending, credit, and tool-use limit case to inspect complete v2 history and a recorded native tool-permission denial through normal CLI commands and rest. The case reads an existing child session. It does not create a run or call a model. The same script has a pinned child hard-credit denial case and root model-turn and hard-credit no-send cases. These cases use only facts from the current session, execution fence, and accepted selection.

Use the Workspace repository-read case to read one project repository file through the agentweaver workspace commands. It opens browser approvals, so it needs --interactive and a person who approves each review.

Use the provider egress journeys to prepare one approved platform-provider turn and one project-provider denial/no-send then approved retry. Run their fixture and command-plan tests:

powershell
node --test scripts\acceptance\api\tests\runtime-provider-egress-journeys.test.mjs

These tests check the exact input schemas, normal CLI command shapes, stdin credential boundary, Policy readback, provider-request matching, and dry-run behavior. Synthetic evidence checks require one matching nonzero dispatch ID and exact attempt across the owner denial and complete zero-event no-send witness. The runner rejects incomplete history before approval or retry and still cleans up the denied disposable run. The live project case depends on the #2659 provider-host denial and enforcement contract.

Test workflow generation through the Gateway ​

The workflow-generation case exercises the public POST, status, and result operations through native CLI api invoke commands. It checks both caller contexts, the accepted selection, a generated draft and artifact hash, native completion evidence, the stored assistant reply's hash, and one-shot cancellation with bounded 90-second runtimeCleanup verification of the disposable run.

Run its controlled case tests from the repository root:

powershell
node --test scripts\acceptance\api\tests\workflow-generation.test.mjs

These tests use controlled CLI responses. They check that the case resends the same request once when Orchestrator reports a full queue, that reply verification failures do not resubmit the request, and that partial digest or cleanup command output does not enter the evidence files. They also check both caller gates, one-shot cancellation, uncertain 504 owner_timeout readback, strict deadline enforcement, and runtimeCleanup summary validation. The tests do not contact a live Gateway or run a model. Run the live case only with the exact native apphost, an approved non-production target, and an approved disposable run. Follow Run workflow generation for the input and retained evidence.

This route-specific case checks workflow generation. It does not replace full P1 API acceptance. For zero-credit workflow-generation denials and verified cleanup, use the workflow-generation-credit-zero case in Verify zero-credit workflow generation and cleanup and run the focused Orchestrator, Gateway, and CLI suites (WorkflowGenerationContractTests, WorkflowGenerationJobStorePostgresTests, WorkflowGenerationIntegrationTests, RuntimeNumericLimitsPostgresTests, GatewayWorkflowGenerationTests, and GatewayOpenApiParityTests).

Test task dispatch and completion through the Gateway ​

The task-model-completion case dispatches a claimed task through the public Gateway with native CLI api invoke commands. It checks the accepted BYOK model and hard run budget, matching task and child completion evidence, the stored assistant reply hash, priced usage, and disposable-run cleanup.

Run its controlled case tests from the repository root:

powershell
node --test scripts\acceptance\api\tests\task-model-completion.test.mjs
dotnet test tests\Agentweaver.Cli.Tests\Agentweaver.Cli.Tests.csproj --filter FullyQualifiedName~TurnDigest

The Node tests use controlled CLI responses. The .NET tests use the emitted Gateway contract and the Events turn response type with a controlled HTTP handler. Neither test runs a model. Run the live case with the exact native apphost, an approved non-production target, and an approved disposable run. The case sends a model request and cancels the run after it confirms the run identity. Follow Run task model completion for the input and retained evidence.

This route-specific case checks task dispatch and completion. It does not replace full P1 API acceptance.

Record release acceptance results ​

For version-level coverage and sign-off, use the single Release acceptance: vX.Y.Z tracker issue for that version milestone. Follow the release acceptance checklist. Do not keep a completed implementation issue open only to hold a live-test task; move that task to the tracker after source delivery is complete.

For a native API item, link the approved case input and its hash, then link the unmodified evidence output and hash for each attempt. Record the tested apphost and source or deployment identity, plus the result. For a browser item, link the browser procedure and its separate retained evidence. Keep API and browser results separate. Preserve failed or blocked attempts; add a new attempt when you test corrected source.

A successful dry run validates input only and writes no evidence; validation failure may write a blocked result to the requested output. A dry run is not a passed acceptance item. A fixture-based browser test is not a deployed browser pass. Use retained team-accessible evidence storage, and do not post sensitive operator inputs or private screenshots in public comments. The tracker does not change the authorization, target, cleanup, or other limits in the procedures above.

Test API, UI, and retained MCP compatibility code ​

Run the local harness tests after changing an API case, launcher, UI journey, or retained MCP compatibility code:

powershell
npm run test:harness
npm run test:harness:api
npm run test:harness:ui
npm run test:harness:mcp

The API tests cover the checked-in case scripts and launcher contracts with local fixtures. They do not run the case against a live Gateway. The UI tests use controlled browser or page fixtures. The retained MCP adapter tests check compatibility code only; MCP is not a supported product or API acceptance surface.

Test runtime observation v2 ​

The spending, credit, and tool-use limit case checks the public CLI and rest reads against an existing child session. Its child hard-credit case checks one existing preparation attempt for equality or overshoot without claiming native no-send evidence. Its root model-turn and hard-credit cases check an existing root session. Their dry runs are local only; they do not exercise a live target. The admitted completion case sends one model request and rejects the generated proposal. It needs separate non-production, model-spend, and cleanup approval. Its dry run starts no process. The controlled tests use fixtures and do not call a Gateway or model:

powershell
node --test scripts\acceptance\api\tests\numeric-runtime-observation.test.mjs scripts\acceptance\api\tests\numeric-admitted-completion.test.mjs

The limit-observation tests check a valid cross-page two-slot reservation pair with a sequence gap. They also check zero counts, duplicate attempts, stale or foreign facts, invalid or out-of-bound watermarks and sequences, and reversed page or sequence order. These failures block only the tool-below-cap matrix row. The ordinary one-slot fixture and the other matrix rows keep their existing behavior.

Run the focused contract, owner paging, query validation, and Gateway schema tests from the repository root:

powershell
dotnet test tests\Agentweaver.Identity.Tests\Agentweaver.Identity.Tests.csproj --configuration Release --filter FullyQualifiedName~RuntimeObservation
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter FullyQualifiedName~RuntimeObservationV2
dotnet test tests\Agentweaver.Orchestrator.Core.Tests\Agentweaver.Orchestrator.Core.Tests.csproj --configuration Release --filter FullyQualifiedName~RuntimeExecutionObservationTests
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~RuntimeCopilotToolCallAuthorizationTests
dotnet test tests\Agentweaver.Identity.Broker.Tests\Agentweaver.Identity.Broker.Tests.csproj --configuration Release --filter FullyQualifiedName~RuntimeObservationV2

These tests check response validation, bounded query parsing, high-water cursor paging, exact attempt lookup, and the Gateway operation schema. The callback tests check that a numeric tool denial stays rejected when evidence recording fails and that secondary permission denials do not create invocation evidence. The PostgreSQL test uses a disposable test database and checks idempotent rejection facts. These checks do not prove live authorization, native SDK delivery of the rejection, tool execution, or complete legacy history. The child hard-credit case preserves the exact accepted, configured, and observed decimal tokens while comparing their values as .NET decimal. Its duplicate-key and decimal-bound tests run through controlled raw CLI output and evidence files. The response reports missing evidence as unavailable rather than inferring it from an empty result or a reservation.

The runtime-observation probe also has a focused local test:

powershell
node --test scripts\api-harness\test\runtime-observation.test.mjs scripts\azure\p1-dispatch-recovery-probes\tests\run.test.mjs

This read-only probe requires an already authorized client and real Environment creation evidence. Stored rows alone do not prove dispatch, a late provider callback, or verified resource release. The full harness runner validates its target and plan before it reads credentials or starts a surface client. It does not sign in, refresh tokens, or grant authority. For setup requirements, see the API harness guide, UI harness guide, and MCP harness guide.

Use Run a read-only CLI API case for the read-only discovery case. Use the spending, credit, and tool-use limit case to inspect existing tool-denial, root model-turn, and hard-credit evidence. Keep controlled test results separate from live target evidence.

Validate documentation changes ​

After you edit documentation, run these commands from the repository root:

powershell
npm run docs:build
npm run docs:check-links
npm run docs:check-drift -- --base origin/v1
npm run docs:check-diagrams
npm run docs:check-flagship-diagrams
npm run test:docs-diagrams

The build and link checks validate published pages, anchors, and local assets. The diagram checks validate the repository's diagram sources, rendered images, and integrity stamps. This article rewrite does not add or change a diagram.

Understand what each test proves ​

Use the following table when you report test results:

Test areaThe tests exerciseThe tests do not prove
Release and deployment toolingSource manifests, receipts, release validation, controlled GitHub/registry/Kubernetes transports, and failure handling.Artifact publication, write access to external registries, a live deployment, or release approval.
Projects & ConfigReal PostgreSQL project authority and revision transactions, including casting-generation proposal staging, rejection, stale revisions, concurrent completion, and idempotent replay.A deployed owner service, a live AgentHost model run, or production model credentials.
Providers and resource selectionCatalog validation, cardinality and override rules, capability negotiation, immutable selection pins, meter-source compatibility, and adapter request contracts.Resource provisioning, SDK model-source provenance, cloud access, pricing, or network-policy enforcement.
OrchestratorWorkflow grammar and step-DAG validation, bounded WorkPlans, schedule and event-predicate evaluation, backlog graph edits, readiness evidence, MAF capture checks, provider pins, Policy evaluation, action-guard receipts, pre-registration child-spawn authorization, and ordered Guardrails checks with a stubbed Prompt Shields transport, including controlled response-body failure and withholding. PostgreSQL cases exercise the production MAF binder and durable dispatch, parallel and conflicting frontiers, dependent work after predecessor success, duplicate replay after restart, stale-fence rollback, backlog edits, concurrent claims, immutable Guardrails evidence, request-bound coordinator-root model-turn admissions, durable child-spawn evidence and idempotent consumption, shared root/workflow turn limits, and readiness rejection for incomplete migration-036 and migration-037 storage. A controlled Broker composition test runs two production RuntimeAgentHost instances through public dispatch and an independent-review gate. Deployment checks preserve the Core 034 gap while accepting migrations 035 through 037.Automatic workflow initiation, native AKS execution, live model output, deployed authorization, a live Content Safety resource, or protected-effect call-site enforcement. Controlled Host and PostgreSQL tests do not establish live deployment evidence.
Gateway and IdentityBroker-issued tokens, owner authorization fixtures, route contracts, status forwarding, current-grant checks, and reauthorization before event writes. Slot-backed BYOK tests check exact credential identity and version lookup, recorded vault selection, old pins after disable, and wrong-slot denial.Deployed Gateway or owner availability, live OAuth, native TLS handshakes, live Kubernetes ownership, or an external identity-provider response.
AgentHost and model executionThe pinned SDK sends real test turns to an isolated loopback endpoint. Tests check bearer, model, request path, session marker, response receipt, and measured compaction under a bounded token limit. An owner-backed PostgreSQL test also runs an accepted coordinator-root generation turn through the persisted action grant.Hosted Copilot, production BYOK access, paid model execution, or deployed runtime behavior.
Cost and usagePublished Copilot rate cards, model-scoped Azure token arithmetic, explicit Unpriced results, immutable source bindings, controlled SDK evidence, real disposable PostgreSQL transactions, and replay. The combined Broker scenario controls the external SDK transport and credential backend.A paid model call, live Azure pricing, or deployed Broker/provider behavior.
Source Control and SkillsReal temporary Git workspaces, controlled GitHub HTTP, raw-byte HMAC and repository binding, immutable provider pins, webhook replay, and owner-backed Skill metadata. Skill-reader tests verify original bearer/tenant forwarding, pinned hashes, revocation, and SDK file reads.A deployed Source Control or Skills service, live GitHub access, trusted unattended webhook delivery, runtime route deployment, or proof that a production runtime loaded a Skill.
Remote MCP and identityConnection-record migrations, exact Identity-binding revisions and digests, restart replay, immutable history, owner TLS profiles, policy inputs, and denial before secret or certificate access.A positive native mutual-TLS exchange, mapped credential-use route, applied network enforcement, credential delivery, or protected remote call.
Environment and SandboxOwner stores, bounded receipts, fake providers and Kubernetes responses, controlled lifecycle races, PostgreSQL egress-reservation replay, append-only Sandbox egress audit records and runtime grants, and fake Kubernetes API tests for delayed writes, lost responses, and a recreated target.Live flow-log collection, Kubernetes or CSI behavior, durable mounted data, Cilium enforcement, or a complete deployed suspend/resume flow. See Environment Sandbox tests.
Azure toolingBicep and manifest source checks, local Kustomize rendering, and controlled deployment-tool transports.An Azure subscription, live resources, cloud grants, or successful service deployment. See Azure acceptance.
DocumentationVitePress build, links, source drift, and diagram consistency.Runtime behavior or the correctness of claims that are not covered by source checks.

Some GitHub Canvas checks documented in the issue tracker are planned requirements, not an implemented adapter or a passing test suite. Treat controlled fixtures, compiled cases, and unexecuted requirements as distinct from live or deployed evidence.

Expected result ​

The selected commands exit successfully, and the recorded results identify the source revision that ran. A passing test proves only the behavior described for its test area; it does not prove deployment or live external access.