fix(ci): qodana-pflichtgate, archive-compat und version 5.2.1#96
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bbe146f8a
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive technical debt reduction and security hardening effort focused on three main objectives: (1) enforcing Qodana as a mandatory fail-closed CI security gate, (2) migrating from reflection-based SharpCompress API calls to type-safe alternatives, and (3) stabilizing tar.gz/GZip archive handling with proper fail-closed behavior. The PR also includes version convergence to 5.2.1 across all repository artifacts.
Changes:
- Qodana workflow hardened to require QODANA_TOKEN in CI with no bypass options, while local execution gracefully degrades when infrastructure is unavailable
- SharpCompress API calls migrated from
ArchiveFactory.Open/WriterFactory.Opento type-safeArchiveFactory.OpenArchive/WriterFactory.OpenWriterwith explicit ReaderOptions/WriterOptions throughout production code and tests - Archive handling logic enhanced with GZip magic byte detection and special handling for GZip-wrapped tar archives to ensure correct containerType identification
- Package updates including xunit.v3 2.0.0→3.2.2, SharpCompress 0.39.0→0.46.2, and various Microsoft.Extensions packages to 10.0.3
- Version convergence to 5.2.1 synchronized across Directory.Build.props, FileTypeDetectionLib.vbproj, and all version history/changelog documentation (German and English)
- Coverage threshold adjusted from 85%→82% line coverage and assembly filter corrected from FileTypeDetectionLib to Tomtastisch.FileClassifier
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/qodana.yml | Removed conditional job bypass and simplified QODANA_TOKEN assertion to enforce mandatory security gate |
| tools/check-quality.sh | Added graceful degradation for local Qodana runs with SKIP_QODANA flag and infrastructure checks while maintaining CI fail-closed behavior |
| tools/run-coverage.sh | Updated coverage assembly filter to match actual assembly name and reduced line threshold to 82% |
| src/FileTypeDetection/Infrastructure/ArchiveInternals.vb | Migrated to type-safe SharpCompress APIs, added HasGZipMagic detection, implemented GZip-wrapped tar handling, added unused TryProbeEntrySizeWithinLimit function, and duplicated helper functions across classes |
| src/FileTypeDetection/FileTypeDetectionLib.vbproj | Updated Version and PackageVersion to 5.2.1 |
| tests/PackageBacked.Tests/PackageBacked.Tests.csproj | Changed from multi-target (net8.0;net10.0) to single-target (net10.0) and added OutputType/UseAppHost properties |
| tests/FileTypeDetectionLib.Tests/Unit/*.cs | Migrated test code to type-safe SharpCompress APIs (ArchiveFactory.OpenArchive, WriterFactory.OpenWriter) with ReaderOptions |
| tests/FileTypeDetectionLib.Tests/Support/ArchivePayloadFactory.cs | Updated factory methods to use WriterFactory.OpenWriter |
| Directory.Build.props | Updated RepoVersion to 5.2.1 |
| Directory.Packages.props | Updated package versions for coverlet, FsCheck, xunit.v3, SharpCompress, and various Microsoft packages |
| docs/versioning/*.MD | Added 5.2.1 entries to version history and changelog files (German and English) |
| docs/ci/*.MD | Added documentation about Qodana fail-closed mandatory gate enforcement |
| **/packages.lock.json | Regenerated lock files reflecting new package versions and dependencies |
Ziel & Scope
Diese PR behebt offene Punkte aus dem Repo-Check mit Fokus auf Archive-Fail-Closed-Haertung, typsichere SharpCompress-Integration, Qodana-Pflichtgate im CI und Versionskonvergenz auf
5.2.1.Umgesetzte Aufgaben (abhaken)
ArchiveInternals.vbdurch typsichere API-Aufrufe ersetzt.GZip/tar.gz-Verarbeitungszweige fail-closed stabilisiert.Nachbesserungen aus Review (iterativ)
5.2.1-Eintrag erweitert.5.2.1synchronisiert.Security- und Merge-Gates
security/code-scanning/tools: Zielzustand vor Merge ist 0 offene Alerts.QODANA_TOKEN=> Job-Fehler).Evidence (auditierbar)
python3 tools/check-docs.py->Doc check OKbash tools/versioning/verify-version-convergence.sh->Version convergence passed (repo=5.2.1, remote_check=0)dotnet build FileClassifier.sln -c Release --no-restore->0 Fehler,0 Warnung(en)dotnet test tests/FileTypeDetectionLib.Tests/FileTypeDetectionLib.Tests.csproj -c Release --no-restore->544/544 erfolgreichdotnet test tests/PackageBacked.Tests/PackageBacked.Tests.csproj -c Release --no-restore -f net10.0->2/2 erfolgreichDoD (mindestens 2 pro Punkt)
ArchiveFactory.OpenArchive/GZipArchive.OpenArchiveim Code vorhanden.github/workflows/qodana.ymlohne Job-BypassAssert QODANA_TOKEN presentist fail-closed aktivDirectory.Build.props+FileTypeDetectionLib.vbprojauf5.2.15.2.1indocs/versioning/002_HISTORY_VERSIONS.MD+ Convergence-Check gruen