Skip to content

release(core): hashing finalisieren und lokale 6.0.1-Konvergenz vorbereiten - #108

Merged
tomtastisch merged 31 commits into
mainfrom
codex/fix/sharpcompress-v1-api-compat
Feb 21, 2026
Merged

release(core): hashing finalisieren und lokale 6.0.1-Konvergenz vorbereiten#108
tomtastisch merged 31 commits into
mainfrom
codex/fix/sharpcompress-v1-api-compat

Conversation

@tomtastisch

@tomtastisch tomtastisch commented Feb 21, 2026

Copy link
Copy Markdown
Owner

Ziel & Scope

Dieses PR finalisiert die Hashing-Refaktorierung als stabile Fassade/Service-Architektur, haertet Governance-Checks und konvergiert lokal deterministisch auf Version 6.0.1.

WIP-Limit: ein Thema (Hashing/Detection/Governance/Versioning-Konvergenz in einem Release-Refactor-Block).

Umgesetzte Aufgaben (abhaken)

  • EvidenceHashing als Fassade reduziert und interne Logik in EvidenceHashingCore, EvidenceHashingRoundTrip, EvidenceHashingIo ausgelagert.
  • HashRoundTripReport auf Slot-basiertes Modell umgestellt (HashSlot, Evidence(...), LogicalEquals(...), PhysicalEquals(...)).
  • Detection-/Registry-Ausrichtung auf die neue FileKind-Linie (Doc, Xls, Ppt) inklusive interner Nutzungen und Tests.
  • Governance-Gates ergänzt: CodePolicy045ComplianceTests, PublicApiAllowlistTests.
  • README-Pflichtdateien ergänzt (/src/FileTypeDetection/Abstractions/Hashing/Internal/README.md, /src/FileTypeDetection/Infrastructure/Utils/README.md).
  • Lokale Versionskonvergenz auf 6.0.1 hergestellt (RepoVersion, Version, PackageVersion, Versionshistorie DE/EN, Changelog DE/EN).
  • tools/versioning/check-version-policy.sh mit Konvergenz-Policy harmonisiert.
  • Formatter-Drift bereinigt, sodass preflight/dotnet format --verify-no-changes deterministisch besteht.
  • Security-Claim-Evidence auf Major 6 angehoben (SECURITY.md, Traceability DE/EN, verify-security-claims.sh).

Nachbesserungen aus Review (iterativ)

  • Reflection-basierte Hashing-Tests auf ausgelagerte interne Typen (EvidenceHashingCore, EvidenceHashingIo) angepasst.
  • README-Template-Verstoesse (Diagramm-Sektion, absolute Links) behoben.
  • Versioning-/Quality-Gates nach allen Anpassungen erneut lokal gruen verifiziert.
  • CI-Blocker preflight (PR-Body-Contract) und security-claims-evidence (Major-Drift) ursachengerecht behoben.

Security- und Merge-Gates

  • Branch-Name folgt Schema codex/<tag>/....
  • PR-Titel folgt Schema <tag>(<scope>): <deutsche kurzbeschreibung>.
  • required checks werden vor Merge vollstaendig abgewartet.
  • Review-Threads werden nur nach fachlicher Bearbeitung resolved.
  • Gate security/code-scanning/tools ist auf 0 offene Alerts auszurichten und als Merge-Bedingung eingehalten.

Evidence (auditierbar)

  • dotnet build FileClassifier.sln -v minimal
  • dotnet test FileClassifier.sln -v minimal
  • bash tools/check-quality.sh
  • bash -euo pipefail tools/ci/bin/run.sh preflight
  • bash tools/audit/verify-security-claims.sh
  • bash tools/versioning/verify-version-convergence.sh --require-remote 0
  • bash tools/versioning/check-version-policy.sh

Artefakte/Pfade:

  • /tests/FileTypeDetectionLib.Tests/coverage.cobertura.xml
  • /docs/governance/045_COMPLIANCE_STATUS_DE.MD
  • /artifacts/ci/preflight/result.json
  • /artifacts/ci/security-claims-evidence/result.json

DoD (mindestens 2 pro Punkt)

Umgesetzter Punkt DoD 1 (auditierbar) DoD 2 (auditierbar)
Hashing-Auslagerung/Fassade EvidenceHashing delegiert auf EvidenceHashingCore/EvidenceHashingRoundTrip/EvidenceHashingIo dotnet test FileClassifier.sln gruen
Slot-basierter RoundTripReport Public API Snapshot in /tests/FileTypeDetectionLib.Tests/Contracts/public-api.snapshot.txt konsistent Hashing-Roundtrip-Tests in /tests/FileTypeDetectionLib.Tests/Unit/HashingEvidenceTests.cs gruen
Detection-/FileKind-Ausrichtung Registry/Core/Detector konsistent auf FileKind.Doc/Xls/Ppt zugehoerige Unit-/BDD-Tests gruen
Governance-Gates neue Contract-Tests vorhanden und ausfuehrbar bash tools/check-quality.sh gruen
Versionierungs-Konvergenz 6.0.1 /Directory.Build.props, /src/FileTypeDetection/FileTypeDetectionLib.vbproj, Versionshistorien konsistent bash tools/versioning/verify-version-convergence.sh --require-remote 0 gruen
Security-Claim-Major-Konvergenz SECURITY.md und Traceability DE/EN zeigen 6.x/<6.0 bash tools/audit/verify-security-claims.sh gruen

Issue-Verknuepfung

Closes #105
Closes #106
Closes #107

Issue-Abschlussnachweis:

  • /docs/governance/046_ISSUE_105_106_107_CLOSURE_DE.MD

Copilot AI review requested due to automatic review settings February 21, 2026 11:47
@github-actions github-actions Bot added area:docs area:versioning area:tooling area:tests feature New compatible feature or datatype impl:config versioning:minor New compatible functionality; requires MINOR bump and removed area:tooling area:tests labels Feb 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This is a major breaking release (6.0.0) that finalizes the hashing refactoring by splitting internal logic into separate services, migrates the FileKind enum values to shorter names, and refactors the HashRoundTripReport public API to a slot-based model. The PR also prepares local version convergence and adds governance test gates for Policy 045 compliance and public API stability.

Changes:

  • Breaking change: Renamed FileKind enum values from Docx/Xlsx/Pptx to Doc/Xls/Ppt throughout the codebase
  • Breaking change: Refactored HashRoundTripReport from exposing individual H1-H4 properties to a slot-based API with Evidence(slot), LogicalEquals(slot), and PhysicalEquals(slot) methods
  • Refactored EvidenceHashing into a facade with internal services (EvidenceHashingCore, EvidenceHashingRoundTrip, EvidenceHashingIo)
  • Added utility classes (GuardUtils, EnumUtils, IterableUtils) to support the refactoring
  • Added governance tests (PublicApiAllowlistTests, CodePolicy045ComplianceTests) with compliance documentation
  • Implemented SharpCompress API compatibility layer using reflection to support both OpenArchive and Open method names
  • Updated version to 6.0.0 across Directory.Build.props, FileTypeDetectionLib.vbproj, and documentation

Reviewed changes

Copilot reviewed 55 out of 55 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Directory.Build.props Updated RepoVersion from 5.2.1 to 6.0.0
src/FileTypeDetection/FileTypeDetectionLib.vbproj Updated Version and PackageVersion to 6.0.0
tools/versioning/check-version-policy.sh Enhanced to validate version convergence between RepoVersion, Version, and PackageVersion
src/FileTypeDetection/Abstractions/Detection/FileKind.vb Renamed enum values: DocxDoc, XlsxXls, PptxPpt
src/FileTypeDetection/Abstractions/Hashing/HashRoundTripReport.vb Complete refactoring to slot-based model with HashSlot enum and accessor methods
src/FileTypeDetection/EvidenceHashing.vb Reduced to facade, delegating to internal services
src/FileTypeDetection/Abstractions/Hashing/Internal/EvidenceHashingCore.vb New internal service for core hashing logic
src/FileTypeDetection/Abstractions/Hashing/Internal/EvidenceHashingRoundTrip.vb New internal service for RoundTrip pipeline
src/FileTypeDetection/Abstractions/Hashing/Internal/EvidenceHashingIo.vb New internal service for bounded file reading
src/FileTypeDetection/Utils/GuardUtils.vb New utility class for argument validation
src/FileTypeDetection/Utils/EnumUtils.vb New utility class for enum value retrieval with sorting/range options
src/FileTypeDetection/Utils/IterableUtils.vb New utility class for defensive array copying
src/FileTypeDetection/Infrastructure/ArchiveInternals.vb Added reflection-based SharpCompress API compatibility layer
tests/FileTypeDetectionLib.Tests/Support/SharpCompressApiCompat.cs New test support class for SharpCompress API compatibility
tests/FileTypeDetectionLib.Tests/Contracts/PublicApiAllowlistTests.cs New governance test for public API allowlist
tests/FileTypeDetectionLib.Tests/Contracts/CodePolicy045ComplianceTests.cs New governance test for Policy 045 compliance
tests/FileTypeDetectionLib.Tests/Contracts/public-api.snapshot.txt Updated snapshot reflecting breaking API changes
Multiple test files Updated all test assertions to use new FileKind enum values and HashRoundTripReport API
docs/governance/045_COMPLIANCE_STATUS_DE.MD New compliance status documentation
docs/versioning/* Updated version history and changelogs (German and English)
src/FileTypeDetection/Abstractions/Hashing/Internal/README.md Added documentation for internal hashing module
src/FileTypeDetection/Utils/README.md Added documentation for utils module

Comment thread src/FileTypeDetection/Abstractions/Detection/FileKind.vb Outdated
Comment thread src/FileTypeDetection/Abstractions/Hashing/HashRoundTripReport.vb

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16829ebaf1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/FileTypeDetection/Utils/EnumUtils.vb Outdated
@tomtastisch

Copy link
Copy Markdown
Owner Author

Prüfung ob unter "Utils/", beziehungsweise nach Anpassung "Utils/Guards/" wirklich alle Util-klassen Guard-bezeichnungen korrekt im namen haben oder eine andere Zuordnung sinnvoller wäre

- move guard-focused utilities to Infrastructure/Utils/Guards

- rename GuardUtils to ArgumentGuard and IoGuards to IOGuards

- keep non-guard helpers (EnumUtils/IterableUtils) at Utils root

- add Guards README and update governance/docs references
- add XML docs for internal ctor/helper members in HashEvidence

- add XML docs for Clone/Normalize and filename normalization in HashOptions
- add XML docs for normalization/digest helper methods and NormalizedEntry members

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

Comment thread src/FileTypeDetection/Detection/FileTypeRegistry.vb
Comment thread .github/workflows/ci.yml Outdated
Comment thread Directory.Build.props
- deduplicate early HashRoundTripReport failure construction

- build alias map in stable FileKind order

- remove unused SECURITY_CLAIMS_TOKEN from ci version-convergence job
- add missing HashDigestSet member docs per policy

- replace ambiguous builder variable names in FileTypeRegistryConfig

- initialize alias map temp variable to avoid warnings

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 68 out of 68 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 2 comments.

Comment thread tests/FileTypeDetectionLib.Tests/Unit/HashingEvidenceTests.cs
Comment thread Directory.Build.props

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 70 out of 70 changed files in this pull request and generated no new comments.

@tomtastisch tomtastisch left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Änderungen bearbeiten!

Comment thread src/FileTypeDetection/Abstractions/Hashing/Internal/EvidenceHashingIo.vb Outdated
Comment thread src/FileTypeDetection/Infrastructure/Utils/IoGuards.vb Outdated
Comment thread src/FileTypeDetection/Infrastructure/Utils/GuardUtils.vb Outdated
Comment thread src/FileTypeDetection/Infrastructure/Utils/IoGuards.vb Outdated
Comment thread src/FileTypeDetection/Infrastructure/Utils/GuardUtils.vb Outdated
Comment thread src/FileTypeDetection/Detection/FileTypeRegistry.vb
Comment thread .github/workflows/ci.yml Outdated
Comment thread Directory.Build.props
Comment thread tests/FileTypeDetectionLib.Tests/Unit/HashingEvidenceTests.cs
Comment thread Directory.Build.props
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs area:versioning feature New compatible feature or datatype impl:security versioning:minor New compatible functionality; requires MINOR bump

Projects

None yet

3 participants