Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dotnet add package Tomtastisch.FileClassifier --version X.Y.Z
```bash
EXPECTED_VERSION=X.Y.Z bash tools/ci/verify_nuget_release.sh
```
- Release-Ablauf: `Release Publish` blockiert post-publish auf `registration + flatcontainer`; die vollständige Online-Konvergenz inkl. `search` läuft asynchron über `NuGet Online Convergence` (Details: `docs/ci/002_NUGET_TRUSTED_PUBLISHING.MD`).
- Release-Ablauf: `Release Publish` blockiert post-publish immer auf `flatcontainer`; `registration` ist für stabile Tags blocker und für Pre-Release-Tags standardmäßig entkoppelt. Die vollständige Online-Konvergenz inkl. `search + registration` läuft asynchron über `NuGet Online Convergence` (Details: `docs/ci/002_NUGET_TRUSTED_PUBLISHING.MD`).
- Details: [NuGet Usage Guide](https://github.com/tomtastisch/FileClassifier/blob/main/docs/021_USAGE_NUGET.MD)
- Portable-Integration: [Portable Adoption Guide](https://github.com/tomtastisch/FileClassifier/blob/main/docs/guides/003_GUIDE_PORTABLE.MD)
- Maintainer-Hinweis: Das Publish-Helper-Skript nutzt `NUGET_API_KEY` aus dem Keychain und gibt den Token nicht aus.
Expand Down
64 changes: 36 additions & 28 deletions docs/audit/compat/003_NETSTANDARD2_COMPAT_EVIDENCE.MD
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,20 @@ MSBuild-Conditionen in `src/FileTypeDetection/FileTypeDetectionLib.vbproj`:
### 4.1 Befehle und Exit-Codes
1. `dotnet --info` -> `0`
2. `dotnet restore FileClassifier.sln -v minimal` -> `0`
3. `dotnet restore --locked-mode FileClassifier.sln -v minimal` -> `0`
4. `dotnet build FileClassifier.sln -c Release --no-restore -warnaserror -v minimal` -> `0`
5. `dotnet test tests/FileTypeDetectionLib.Tests/FileTypeDetectionLib.Tests.csproj -c Release --no-build -v minimal` -> `0` (`414` Tests gruen)
6. `dotnet test tests/FileTypeDetectionLib.Tests/FileTypeDetectionLib.Tests.csproj -c Release --no-build --filter "Category=ApiContract" -v minimal` -> `0` (`3` Tests gruen)
7. `dotnet pack src/FileTypeDetection/FileTypeDetectionLib.vbproj -c Release --no-build -o artifacts/ci/netstandard2-compat/nuget -v minimal` -> `0`
8. `dotnet build src/FileTypeDetection/FileTypeDetectionLib.vbproj -c Release -f netstandard2.0 -v diag > artifacts/ci/netstandard2-compat/build-netstandard2.0.log` -> `0`
9. `dotnet build src/FileTypeDetection/FileTypeDetectionLib.vbproj -c Release -f net8.0 -v diag > artifacts/ci/netstandard2-compat/build-net8.0.log` -> `0`
10. `dotnet build src/FileTypeDetection/FileTypeDetectionLib.vbproj -c Release -f net10.0 -v diag > artifacts/ci/netstandard2-compat/build-net10.0.log` -> `0`
11. `python3 tools/check-doc-consistency.py` -> `0`
12. `python3 tools/check-docs.py` -> `0`
13. `bash tools/ci/bin/run.sh versioning-svt` -> `0`
14. `bash tools/ci/bin/run.sh version-convergence` -> `0`
15. `bash tools/ci/bin/run.sh security-nuget` -> `0`
3. `dotnet build FileClassifier.sln -c Release --no-restore -warnaserror -v minimal` -> `0`
4. `dotnet test tests/FileTypeDetectionLib.Tests/FileTypeDetectionLib.Tests.csproj -c Release --no-build -v minimal` -> `0` (`414` Tests gruen)
5. `dotnet pack src/FileTypeDetection/FileTypeDetectionLib.vbproj -c Release --no-build -o artifacts/ci/netstandard2-compat/nuget -v minimal` -> `0`
6. `dotnet build src/FileTypeDetection/FileTypeDetectionLib.vbproj -c Release -f netstandard2.0 -v diag > artifacts/ci/netstandard2-compat/build-netstandard2.0.log` -> `0`
7. `dotnet build src/FileTypeDetection/FileTypeDetectionLib.vbproj -c Release -f net8.0 -v diag > artifacts/ci/netstandard2-compat/build-net8.0.log` -> `0`
8. `dotnet build src/FileTypeDetection/FileTypeDetectionLib.vbproj -c Release -f net10.0 -v diag > artifacts/ci/netstandard2-compat/build-net10.0.log` -> `0`
9. `python3 tools/check-doc-consistency.py` -> `0`
10. `python3 tools/check-docs.py` -> `0`
11. `bash tools/versioning/verify-version-convergence.sh` -> `0`
12. `bash tools/ci/bin/run.sh security-nuget` -> `0`
13. `EXPECTED_RELEASE_TAG=v5.2.0-rc.3 REQUIRE_RELEASE_TAG=1 bash tools/ci/check-versioning-svt.sh --repo-root . --out artifacts/ci/versioning-svt/versioning-svt-summary.json` -> `0`
14. `bash tools/ci/release/gate2_version_policy.sh release v5.2.0-rc.3 artifacts/nuget/Tomtastisch.FileClassifier.5.2.0-rc.3.nupkg` -> `0`
15. `VERIFY_ONLINE=0 bash tools/ci/release/gate4_verify_postpublish.sh 5.2.0-rc.3 artifacts/nuget/Tomtastisch.FileClassifier.5.2.0-rc.3.nupkg` -> `0`
16. `VERIFY_ONLINE=0 bash tools/ci/release/gate4_verify_postpublish.sh 5.2.0 artifacts/ci/netstandard2-compat/nuget/Tomtastisch.FileClassifier.5.2.0.nupkg` -> `0`

### 4.2 Build-/Pack-Proof
- Build-Matrix erfolgreich:
Expand All @@ -70,39 +71,46 @@ MSBuild-Conditionen in `src/FileTypeDetection/FileTypeDetectionLib.vbproj`:
- `lib/net10.0/Tomtastisch.FileClassifier.dll`

### 4.3 Provider-Compile-Proof
- `netstandard2.0`:
- `artifacts/ci/netstandard2-compat/build-netstandard2.0.log:48497`
- Treffer: `Providers/NetStandard2_0/HashPrimitivesProvider.vb (Aufgaben-ID: 7)`
- `net8.0`:
- `artifacts/ci/netstandard2-compat/build-net8.0.log:48421`
- Treffer: `Providers/Net8_0Plus/HashPrimitivesProvider.vb (Aufgaben-ID: 12)`
- `net10.0`:
- `artifacts/ci/netstandard2-compat/build-net10.0.log:48416`
- Treffer: `Providers/Net8_0Plus/HashPrimitivesProvider.vb (Aufgaben-ID: 12)`
- Negativ-Proof:
- kein Treffer fuer `Providers/Net8_0Plus/HashPrimitivesProvider.vb (Aufgaben-ID: 7)` in `build-netstandard2.0.log`
- kein Treffer fuer `Providers/NetStandard2_0/HashPrimitivesProvider.vb (Aufgaben-ID: 12)` in `build-net8.0.log` und `build-net10.0.log`
- Build-Logs enthalten die erwarteten Providerpfade je TFM:
- `artifacts/ci/netstandard2-compat/build-netstandard2.0.log` mit `Providers/NetStandard2_0/HashPrimitivesProvider.vb`
- `artifacts/ci/netstandard2-compat/build-net8.0.log` mit `Providers/Net8_0Plus/HashPrimitivesProvider.vb`
- `artifacts/ci/netstandard2-compat/build-net10.0.log` mit `Providers/Net8_0Plus/HashPrimitivesProvider.vb`
- Runtime-nahe Marker-Probe aus den drei Build-Artefakten:
- `netstandard2.0:NetStandard2_0`
- `net8.0:Net8_0Plus`
- `net10.0:Net8_0Plus`
- Probe-Kommando:
```bash
tmpdir=$(mktemp -d)
cd "$tmpdir"
dotnet new console -n Probe -f net10.0
# Program.cs laedt jede TFM-DLL in eigenem AssemblyLoadContext und liest ProviderMarker via Reflection.
dotnet run -c Release --no-restore
```

### 4.4 Forbidden-API Grep-Proof (Core)
Befehl:
```bash
rg -n "Convert\.ToHexString|SHA256\.HashData|System\.IO\.Hashing|Microsoft\.AspNetCore\.App" src/FileTypeDetection/Core
```
Ergebnis:
- keine Treffer, Exit-Code `1` (expected for no-match)
- keine Treffer (`forbidden_core_refs=none`)

### 4.5 CI-Teilchecks
- `artifacts/ci/versioning-svt/versioning-svt-summary.json` -> `status: pass`
- `artifacts/ci/versioning-svt/versioning-svt-summary.json` -> `status: pass` (pre-release `v5.2.0-rc.3`, core-match `5.2.0`)
- `artifacts/ci/version-convergence/summary.json` -> `status: pass`, `repo_version=5.2.0`, `vbproj_version=5.2.0`, `docs_latest_version=5.2.0`
- `artifacts/ci/security-nuget/result.json` -> `status: pass`
- Gate-4-PreRelease-Probe (`VERIFY_ONLINE=0`) zeigt `require_registration=0`.
- Gate-4-Stable-Probe (`VERIFY_ONLINE=0`) zeigt `require_registration=1`.

### 4.6 Policy Ambiguity
### 4.6 Policy/Konvergenz-Notiz
Ambiguitaet zwischen:
- `docs/versioning/001_POLICY_VERSIONING.MD:43` (in PR/CI keine statischen Versionfelder), und
- existierendem SVT/Convergence-Setup (`verify-version-convergence.sh`, `check-versioning-svt.sh`), das `RepoVersion` und `Version`/`PackageVersion` in `FileTypeDetectionLib.vbproj` erwartet.

Entscheidung fuer diesen Scope:
- fail-closed nach bestehendem CI/Repo-Vertrag: Versionen auf `5.2.0` synchron gehalten und durch `versioning-svt` + `version-convergence` verifiziert.
- Pre-Releases werden ueber Tag `v5.2.0-rc.N` abgebildet; die Projektfelder bleiben semantisch auf Kernversion `5.2.0`.

## 5. Grenzen/Nicht-Ziele
- Keine oeffentliche API-Signatur geaendert.
Expand Down
10 changes: 6 additions & 4 deletions docs/ci/002_NUGET_TRUSTED_PUBLISHING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ Die aktive Trusted-Publishing-Policy ist an folgende Identität gebunden:
- Nach erfolgreichem `dotnet nuget push` kann die NuGet-Indexierung (Search/Registration/Flatcontainer) zeitverzögert sichtbar sein.
- Gate 4 im Release-Workflow bleibt **fail-closed** für publish-kritische Endpunkte:
- `REQUIRE_FLATCONTAINER=1`
- `REQUIRE_REGISTRATION=1`
- `REQUIRE_REGISTRATION=1` fuer stabile Tags `vX.Y.Z`
- `REQUIRE_REGISTRATION=0` fuer Pre-Release-Tags `vX.Y.Z-<label>` (per Default; via `SVT_POSTPUBLISH_REQUIRE_REGISTRATION=1` übersteuerbar)
- `REQUIRE_SEARCH=0` (Search ist aus dem blocking Gate entkoppelt).
- Default-Wartefenster für Gate 4:
- `SVT_POSTPUBLISH_RETRY_SCHEDULE_SECONDS=2,3,5,8,13,21,34,55,89,89,89`
- `SVT_POSTPUBLISH_RETRY_COUNT=11` (dynamisch aus Schedule-Länge, sofern nicht explizit gesetzt)
- stabil: `SVT_POSTPUBLISH_RETRY_SCHEDULE_SECONDS=2,3,5,8,13,21,34,55,89,89,89`
- pre-release: `SVT_POSTPUBLISH_RETRY_SCHEDULE_SECONDS=2,3,5,8,13,21,34,55,89,144,233,377`
- `SVT_POSTPUBLISH_RETRY_COUNT` dynamisch aus Schedule-Länge, sofern nicht explizit gesetzt
- `SVT_POSTPUBLISH_RETRY_SLEEP_SECONDS=10`
- entspricht deterministisch einem Retry-Sleep-Budget von bis zu 408s (6m48s) zuzüglich HTTP-Timeout-Anteilen pro Versuch.
- entspricht deterministisch einem Retry-Sleep-Budget von bis zu 408s (stabil) bzw. 984s (pre-release), jeweils zuzüglich HTTP-Timeout-Anteilen pro Versuch.
- Bei Incident-Diagnose kann das Fenster über die beiden Variablen erhöht werden, ohne Workflow-Jobnamen oder Required Contexts zu ändern.

## 5. Entkoppelte Online-Konvergenz (Async)
Expand Down
10 changes: 6 additions & 4 deletions docs/ci/102_NUGET_TRUSTED_PUBLISHING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ The active trusted-publishing policy is bound to the following identity:
- After a successful `dotnet nuget push`, NuGet indexing (search/registration/flatcontainer) can become visible with a delay.
- Gate 4 in the release workflow remains **fail-closed** for publish-critical endpoints:
- `REQUIRE_FLATCONTAINER=1`
- `REQUIRE_REGISTRATION=1`
- `REQUIRE_REGISTRATION=1` for stable tags `vX.Y.Z`
- `REQUIRE_REGISTRATION=0` for pre-release tags `vX.Y.Z-<label>` (default; can be overridden via `SVT_POSTPUBLISH_REQUIRE_REGISTRATION=1`)
- `REQUIRE_SEARCH=0` (search is decoupled from the blocking gate).
- Default wait window for Gate 4:
- `SVT_POSTPUBLISH_RETRY_SCHEDULE_SECONDS=2,3,5,8,13,21,34,55,89,89,89`
- `SVT_POSTPUBLISH_RETRY_COUNT=11` (derived dynamically from schedule length unless explicitly set)
- stable: `SVT_POSTPUBLISH_RETRY_SCHEDULE_SECONDS=2,3,5,8,13,21,34,55,89,89,89`
- pre-release: `SVT_POSTPUBLISH_RETRY_SCHEDULE_SECONDS=2,3,5,8,13,21,34,55,89,144,233,377`
- `SVT_POSTPUBLISH_RETRY_COUNT` is derived dynamically from schedule length unless explicitly set
- `SVT_POSTPUBLISH_RETRY_SLEEP_SECONDS=10`
- deterministically corresponds to a retry sleep budget of up to 408s (6m48s), plus HTTP timeout portions per attempt.
- deterministically corresponds to a retry sleep budget of up to 408s (stable) or 984s (pre-release), plus HTTP timeout portions per attempt.
- For incident diagnostics, the window can be increased via these variables without changing workflow job names or required contexts.

## 5. Decoupled Online Convergence (Async)
Expand Down
4 changes: 2 additions & 2 deletions docs/versioning/002_HISTORY_VERSIONS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Heuristik fuer die Rueckwirkungs-Zuordnung:
- `docs|test|ci|chore|tooling|refactor|fix` => Patch

Aktueller Entwicklungsstand:
- Aktuelle Entwicklungslinie enthaelt `5.x` (Release-Stand: `v5.1.4`, naechster Zielstand in Arbeit: `5.2.0`; Details in `docs/versioning/003_CHANGELOG_RELEASES.MD`).
- Aktuelle Entwicklungslinie enthaelt `5.x` (aktueller Pre-Release-Stand: `v5.2.0-rc.2`, naechster stabiler Zielstand: `5.2.0`; Details in `docs/versioning/003_CHANGELOG_RELEASES.MD`).

Hinweis:
- Die Spalte `Keyword` verwendet den technischen Klassifizierungswert aus der Historie.
- Einzelne Committitel bleiben in der Originalsprache, wenn sie als exakter Quelltextnachweis uebernommen wurden.

| Version | Kurzbeschreibung | Commit | Keyword |
|---|---|---|---|
| `5.2.0` | netstandard2.0-Compat-Layer eingefuehrt, Provider-Struktur konsolidiert und TFM-Multi-Targeting erweitert | n/a (branch: `codex/chore/netstandard2-compat-structure`) | minor |
| `5.2.0` | netstandard2.0-Compat-Layer eingefuehrt, Provider-Struktur konsolidiert und TFM-Multi-Targeting erweitert | [8d65a52](https://github.com/tomtastisch/FileClassifier/commit/8d65a52) | minor |
| `5.1.4` | Refactor-Cluster 7C abgeschlossen + Qodana-Alerts auf 0 + Version-Bump fuer Release | [2adeb83](https://github.com/tomtastisch/FileClassifier/commit/2adeb83) | patch |
| `5.1.3` | PR-Governance-Haertung (DE-Naming, PR-Template, fail-closed Gate fuer `security/code-scanning/tools = 0`) | [0b488ac](https://github.com/tomtastisch/FileClassifier/commit/0b488ac) | patch |
| `5.1.2` | Gate4 Polling-Optimierung und Release-Haertung | [f12711d](https://github.com/tomtastisch/FileClassifier/commit/f12711d) | patch |
Expand Down
14 changes: 10 additions & 4 deletions docs/versioning/003_CHANGELOG_RELEASES.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ der Git-Tag `vX.Y.Z` (optional `-prerelease`) als SSOT.

## [Unreleased]
- Added:
- TBD
- Incode-Dokumentation fuer die TFM-Providermethoden komplettiert (`HashPrimitivesProvider` fuer `netstandard2.0` und `net8.0+`).
- Changed:
- TBD
- Public XML-Dokumentation auf Policy-045 ausgerichtet: unzulaessige `<exception>`-Tags in fail-closed APIs entfernt.
- Deutsche Log-/Dokumentationstexte mit korrekten Umlauten harmonisiert.
- Gate 4 (`tools/ci/release/gate4_verify_postpublish.sh`) fuer Pre-Release-Tags robust gemacht:
- laengeres Retry-Fenster,
- `registration` standardmaessig entkoppelt bei `vX.Y.Z-<label>`,
- weiterhin fail-closed auf `flatcontainer`.
- Fixed:
- TBD
- Release-Blocker beseitigt, bei dem Pre-Release-Publish trotz erfolgreichem Push an verzögerter Registration-Sichtbarkeit scheiterte.
- Docs/CI/Tooling:
- TBD
- NuGet-Trusted-Publishing-Doku (DE/EN) und Root-README auf den angepassten Gate-4-Ablauf aktualisiert.
- Commit-Referenz fuer Version 5.2.0 in Versionshistorie (DE/EN) hinzugefuegt.

## [5.1.4]
- Changed:
Expand Down
4 changes: 2 additions & 2 deletions docs/versioning/102_HISTORY_VERSIONS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Heuristics for retroactive classification:
- `docs|test|ci|chore|tooling|refactor|fix` => patch

Current state:
- Current release line contains `5.x` (release state: `v5.1.4`, next target in progress: `5.2.0`; details in `docs/versioning/103_CHANGELOG_RELEASES.MD`).
- Current release line contains `5.x` (current pre-release state: `v5.2.0-rc.2`, next stable target: `5.2.0`; details in `docs/versioning/103_CHANGELOG_RELEASES.MD`).

Note:
- The \"short description\" column follows the original commit/PR intent text for deterministic traceability and is not normalized to a single language.

| Version | Short description | Commit | Keyword |
|---|---|---|---|
| `5.2.0` | Introduce netstandard2.0 compatibility layer, consolidate provider structure, and extend TFM multi-targeting | n/a (branch: `codex/chore/netstandard2-compat-structure`) | minor |
| `5.2.0` | Introduce netstandard2.0 compatibility layer, consolidate provider structure, and extend TFM multi-targeting | [8d65a52](https://github.com/tomtastisch/FileClassifier/commit/8d65a52) | minor |
| `5.1.4` | Refactor-Cluster 7C abgeschlossen + Qodana-Alerts auf 0 + Version-Bump fuer Release | [2adeb83](https://github.com/tomtastisch/FileClassifier/commit/2adeb83) | patch |
| `5.1.3` | PR-Governance-Haertung (DE-Naming, PR-Template, fail-closed Gate fuer `security/code-scanning/tools = 0`) | [0b488ac](https://github.com/tomtastisch/FileClassifier/commit/0b488ac) | patch |
| `5.1.2` | Gate4 Polling-Optimierung und Release-Haertung | [f12711d](https://github.com/tomtastisch/FileClassifier/commit/f12711d) | patch |
Expand Down
14 changes: 10 additions & 4 deletions docs/versioning/103_CHANGELOG_RELEASES.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ All changes are documented here in technical terms. The release version itself i

## [Unreleased]
- Added:
- TBD
- Completed in-code documentation for TFM provider methods (`HashPrimitivesProvider` for `netstandard2.0` and `net8.0+`).
- Changed:
- TBD
- Aligned public XML docs with Policy 045 by removing invalid `<exception>` tags from fail-closed APIs.
- Harmonized German log/doc strings to use proper umlauts.
- Hardened Gate 4 (`tools/ci/release/gate4_verify_postpublish.sh`) for pre-release tags:
- longer retry window,
- `registration` decoupled by default for `vX.Y.Z-<label>`,
- still fail-closed on `flatcontainer`.
- Fixed:
- TBD
- Resolved release blocker where pre-release publishing failed due delayed registration visibility despite successful push.
- Docs/CI/Tooling:
- TBD
- Updated NuGet trusted-publishing docs (DE/EN) and root README for the adjusted Gate 4 behavior.
- Added commit reference for version 5.2.0 in version history (DE/EN).

## [5.1.4]
- Changed:
Expand Down
7 changes: 0 additions & 7 deletions src/FileTypeDetection/ArchiveProcessing.vb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ Namespace Global.Tomtastisch.FileClassifier
''' </remarks>
''' <param name="path">Pfad zur zu prüfenden Datei.</param>
''' <returns><c>True</c>, wenn das Archiv die Sicherheitsregeln erfüllt; andernfalls <c>False</c>.</returns>
''' <exception cref="UnauthorizedAccessException">Kann bei Dateizugriff intern auftreten und wird fail-closed behandelt.</exception>
''' <exception cref="System.Security.SecurityException">Kann bei sicherheitsrelevantem Dateizugriff intern auftreten und wird fail-closed behandelt.</exception>
''' <exception cref="System.IO.IOException">Kann bei I/O-Zugriff intern auftreten und wird fail-closed behandelt.</exception>
Public Shared Function TryValidate _
(
path As String
Expand Down Expand Up @@ -78,10 +75,6 @@ Namespace Global.Tomtastisch.FileClassifier
''' <c>True</c> aktiviert eine vorgelagerte Typprüfung; <c>False</c> extrahiert direkt unter Sicherheitsregeln.
''' </param>
''' <returns>Read-only Liste der extrahierten Einträge oder eine leere Liste bei Fehlern.</returns>
''' <exception cref="UnauthorizedAccessException">Kann bei Dateizugriff intern auftreten und wird fail-closed behandelt.</exception>
''' <exception cref="System.Security.SecurityException">Kann bei sicherheitsrelevantem Dateizugriff intern auftreten und wird fail-closed behandelt.</exception>
''' <exception cref="System.IO.IOException">Kann bei I/O-Zugriff intern auftreten und wird fail-closed behandelt.</exception>
''' <exception cref="System.IO.InvalidDataException">Kann bei ungültigen Archivstrukturen intern auftreten und wird fail-closed behandelt.</exception>
Public Shared Function ExtractToMemory _
(
path As String,
Expand Down
Loading
Loading