Skip to content

Implement PostgreSQL parity and publish DocFX via Pages#19

Merged
hindermath merged 7 commits into
mainfrom
001-pgsql-paritaet
Apr 19, 2026
Merged

Implement PostgreSQL parity and publish DocFX via Pages#19
hindermath merged 7 commits into
mainfrom
001-pgsql-paritaet

Conversation

@hindermath

Copy link
Copy Markdown
Owner

Zweck

Dieser PR schliesst die Feature-Implementierung fuer 001-pgsql-paritaet ab und fuehrt die fehlende PostgreSQL-Paritaet zum SqliteDbService in PgSqlDbService ein.
Zusaetzlich wird die DocFX-Dokumentation auf ungetrackte Build-Artefakte umgestellt und automatisch nach GitHub Pages ausgerollt.

Hauptaenderungen

  • PgSqlDbService um die fehlenden Write-, Read-, Count-, Cleanup- und CSV-Import-Pfade erweitert
  • Initialize und ServiceContainer fuer optionales PostgreSQL sauber nullable-/dispose-sicher gemacht
  • HarvesterWorkerService so erweitert, dass parallel nach PostgreSQL geschrieben werden kann
  • Build-Warnungen (NU1903, CA1416, Nullable/Testwarnungen) systematisch reduziert und Solution-Build auf 0 Warnungen gebracht
  • Coverage-Luecke fuer den Feature-Scope geschlossen und auf 88.72 % gebracht
  • DocFX-Artefakte api/ und _site/ aus Git herausgenommen
  • GitHub-Pages-Deployment fuer die veroeffentlichte Dokumentation ueber Actions eingerichtet
  • DocFX-API-Scope auf die relevanten Projekte InventarWorkerCommon, CtrlWorkerCommon und CtrlWorkerServiceCmdlet fokussiert

Betroffene Projekte

  • InventarWorkerCommon
  • HarvesterWorkerService
  • InventarWorkerCommonTest
  • CtrlWorkerCommon / CtrlWorkerCommonTest
  • InventarViewerApp
  • InventarWorkerServiceIntegrationTest
  • Repo-Governance / DocFX / GitHub Actions

Testnachweise

Ausgefuehrt und erfolgreich:

  • dotnet build InventarWorkerService.sln --no-incremental
  • dotnet test InventarWorkerCommonTest/InventarWorkerCommonTest.csproj --filter "TestCategory!=Integration"
  • dotnet test InventarWorkerCommonTest/InventarWorkerCommonTest.csproj --filter "TestCategory=Integration"
  • env PGSQL_TEST_CONNECTION_STRING='Host=localhost;Port=5432;Database=inventar_test;Username=inventar;Password=test;' dotnet test InventarWorkerCommonTest/InventarWorkerCommonTest.csproj --collect:"XPlat Code Coverage" --results-directory ./TestResults/coverage-t046-combined
  • dotnet tool run reportgenerator -reports:"./TestResults/coverage-t046-combined/**/coverage.cobertura.xml" -targetdir:"./TestResults/CoverageReport"
  • docfx docfx.json
  • Quickstart-Schritte 1-9 aus specs/001-pgsql-paritaet/quickstart.md

Wesentliche Ergebnisse:

  • Solution-Build: 0 Warnungen / 0 Fehler
  • Kombinierte Feature-Coverage: 88.72 %
  • PostgreSQL-Integrationstests: gruen
  • GitHub Pages fuer das Repository ist auf workflow aktiviert

Konfigurations- und API-Auswirkungen

  • Neue GitHub-Actions-Datei: .github/workflows/docs-pages.yml
  • GitHub Pages publiziert kuenftig die DocFX-Site von main
  • api/ und _site/ werden nicht mehr versioniert
  • Das Lastenheft wurde branch-konform in Lastenheft_PostgreSQL_Implementation.001-pgsql-paritaet.md umbenannt

hindermath and others added 7 commits April 19, 2026 01:01
…ems resolved

- data-model.md: fix MachineState bool types, view descriptions (TRUE/FALSE),
  add PgSQL 14+ requirement, HardwareInventoryView semantic-change explanation,
  FK ON DELETE RESTRICT documentation, C#-Methoden-Abdeckung section
- research.md: add R-07 negative daysToKeep edge case, R-08 unit/integration
  dividing line, R-10 Alternatives considered section
- plan.md: document unquantified write-perf as accepted ambiguity, add CI
  filter commands, test-DB teardown, Dispose null-check to Null-Pattern
- contracts/: NpgsqlException on all write methods, await using for CSV import,
  all 3 ServiceContainer changes with code examples, deferred stats-views section
- quickstart.md: standardize PGSQL_TEST_CONNECTION_STRING env var, add SQL
  negative verification to Schritt 7 (WriteEnabled=false)
- PgSqlDbService.cs: Disabled/Deprovisioned BOOLEAN + view WHERE clauses (from prev session)
- checklists/plan.md: all 30 CHK items marked [x]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ss 8 phases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… M1, M2, M3

- H1: Add T038b rollback integration test (SC-004 / US4 Scenario 3)
- H2: Add T026b unit test for CleanupOldRecords cutoff logic (+ CalculateCutoff helper)
- M1: Update spec.md US5 SC-2 — PostgreSQL lowercases unquoted column aliases
- M2: Fix Phase 2 parallel-execution ordering (T002 must precede T003–T007)
- M3: Replace integer notation (0/1) with BOOLEAN (FALSE/TRUE) in spec.md US3
  and contracts/ descriptions for GetAllActive/Disabled/DeprovisionedMachinesAsync

Tasks: 52 → 54 (7 unit tests, 19 integration tests, 28 impl tasks)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… U2, D1

- U1: T035 — add CalculateCutoff static helper extraction (required by T026b unit test)
- U2: T038b — narrow rollback trigger to UNIQUE violation (deterministic test setup)
- D1: add T026b/T038b dependency footnote to User-Story-Abhängigkeiten section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hindermath hindermath merged commit cc40356 into main Apr 19, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant