Skip to content

Redact and clamp park fault text; pin the planner wire schema #3519

Redact and clamp park fault text; pin the planner wire schema

Redact and clamp park fault text; pin the planner wire schema #3519

name: Backend · Integration
# The Category=Integration tests against a REAL Postgres (the engine's change tracker,
# concurrency tokens, the agent-run reconciler/lease/re-attach spine, the durable spool, the
# webhook→dispatch chain). A throw-away GUID database is created + DbUp-migrated + dropped per
# fixture. The committed appsettings.json admin connection (localhost:5432, postgres/123456)
# matches the service container below verbatim, so no override is needed.
on:
push:
branches: [main]
paths:
- 'backend/**'
- '.github/workflows/backend-integration.yml'
pull_request:
paths:
- 'backend/**'
- '.github/workflows/backend-integration.yml'
workflow_dispatch:
concurrency:
group: backend-integration-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
DOTNET_NOLOGO: 'true'
# The DI container fail-fasts without a Variables master key outside Development (the settings arc's
# guard). CI hosts get the SAME committed local-dev test key docker-compose.yml already carries —
# a committed value, not a toggle; production deployments still supply their own real key.
CODESPACE_VARIABLE_MASTER_KEY: 'bG9jYWwtZGV2LW9ubHkta2V5LW5vdC1mb3ItcHJvZCE='
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'
jobs:
integration:
name: dotnet test (IntegrationTests · Postgres)
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres:18-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: '123456'
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d postgres"
--health-interval 5s
--health-timeout 3s
--health-retries 20
steps:
- uses: actions/checkout@v4
- name: Set up .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-integration-${{ runner.os }}-${{ hashFiles('backend/**/*.csproj') }}
restore-keys: nuget-integration-${{ runner.os }}-
- name: Restore
run: dotnet restore backend/tests/CodeSpace.IntegrationTests/CodeSpace.IntegrationTests.csproj
- name: Test
run: >
dotnet test backend/tests/CodeSpace.IntegrationTests/CodeSpace.IntegrationTests.csproj
--no-restore
--filter "Category!=RealModel&Category!=LargeCapture"
--logger "console;verbosity=normal"
--logger "trx;LogFileName=integration.trx"
--results-directory backend/TestResults
--blame-hang-timeout 5m
- name: Assert the integration suite actually ran (no silent skip)
# `dotnet test --filter` EXITS 0 even when the filter matches ZERO tests, so a Category-trait regression (or a
# filter typo) could green this lane while exercising nothing. This is the ONE main lane that lacked the
# executed>=1 guard the e2e / sandbox / real-model lanes already carry — closing it upholds the no-silent-skip
# invariant uniformly and is the backstop that keeps a dormant fixture (e.g. the planner replay cassette) or a
# trait drift from passing GREEN at zero executions.
run: |
trx=backend/TestResults/integration.trx
test -f "$trx" || { echo "::error::trx not found at $trx — the test step produced no results"; exit 1; }
executed=$(grep -oE 'executed="[0-9]+"' "$trx" | head -1 | grep -oE '[0-9]+')
echo "executed=${executed:-0}"
if [ "${executed:-0}" -lt 1 ]; then
echo "::error::Expected the integration suite to run, but ${executed:-0} executed — the filter matched nothing (Category-trait regression?)."
exit 1
fi
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: backend-integration-trx
path: backend/TestResults/*.trx
if-no-files-found: ignore