Skip to content

feat: upgrade dependencies & expand test coverage to 147 tests#6

Merged
elbruno merged 6 commits into
mainfrom
squad/upgrade-dependencies-latest
Apr 6, 2026
Merged

feat: upgrade dependencies & expand test coverage to 147 tests#6
elbruno merged 6 commits into
mainfrom
squad/upgrade-dependencies-latest

Conversation

@elbruno

@elbruno elbruno commented Apr 6, 2026

Copy link
Copy Markdown
Owner

Summary

Upgrades all NuGet dependencies to latest stable and expands test coverage from 65 to 147 tests across 4 phases.

Dependency Upgrades

  • Library: Microsoft.Extensions.DependencyInjection.Abstractions & Logging.Abstractions 9.0.0 → 10.0.5
  • Tests: Microsoft.NET.Test.Sdk 17.12.0 → 18.3.0, xunit.runner.visualstudio 2.8.2 → 3.1.5, DI 9.0.0 → 10.0.5

Test Coverage Expansion (+82 tests)

Phase Tests What
Phase 1 +34 Security & validation (path traversal, null/empty, malformed inputs)
Phase 2 +14 Core download flow (mocked HTTP, progress, atomic writes)
Phase 3 +9 Error handling (HTTP 401/403/404/500, cancellation, cleanup)
Phase 4 +25 Auth/config (ResolveToken, Bearer headers, UserAgent, edge cases)

Infrastructure

  • Added InternalsVisibleTo for direct ResolveToken() testing
  • All 147 tests pass (0 failures, 0 skipped)
  • Builds for both net8.0 and net10.0

New Test Files

  • AuthenticationAndConfigurationTests.cs — 17 auth & config tests
  • Extended: HuggingFaceDownloaderTests.cs, HuggingFaceUrlBuilderTests.cs, DefaultPathHelperTests.cs, ByteFormatHelperTests.cs, ServiceCollectionExtensionsTests.cs

elbruno and others added 6 commits April 6, 2026 09:48
- Trinity: Upgraded NuGet dependencies to latest stable (Microsoft.Extensions 10.0.5, Microsoft.NET.Test.Sdk 18.3.0, xunit.runner.visualstudio 3.1.5). All 65 tests passed.
- Agent Smith: Comprehensive test coverage analysis with 75-test 4-phase strategy proposal (security, HTTP mocking, error handling, authentication).
- Orchestration logs recorded for both agents.
- Session summary log created.
- Decision inbox merged into decisions.md (removed duplicates).
- Agent history files updated with session learnings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- URL builder: path traversal, null/empty inputs, malformed repoId/filePath/revision
- Options: timeout validation for zero/negative values
- DefaultPathHelper: null/empty input edge cases

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Mocked HTTP download tests for single/multiple/mixed file scenarios
- Progress reporting verification (stages, percentages, file tracking)
- Atomic write behavior tests (temp file + rename)
- HTTP error handling (401/403/404/500) for required and optional files
- Cancellation handling and temp file cleanup
- Null progress handler safety
- HEAD request resolution and skip behavior
- File skip logic for already-existing files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Orchestration logs:
- Phase 1: 34 security & validation tests (URL builder, options timeout, path helper)
- Phase 2+3: 23 download flow & error handling tests (HTTP mocking, atomic writes, 401/403/404/500, cancellation)

Session log: Brief summary of test implementation phases 1-3

Decisions merged from inbox:
- Phase 1-3 test implementation complete (57 new tests, 122 total, all pass)
- User directive: Phase 4 deferred to next week

Agent history updates:
- Agent Smith: Phase 1-3 completion status and learnings
- Trinity: Cross-agent alert about DefaultPathHelper validation gaps for future hardening

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sts)

- Add AuthenticationAndConfigurationTests.cs (17 tests):
  ResolveToken logic, Bearer header propagation, User-Agent headers,
  constructor config smoke tests
- Add ByteFormatHelper edge cases (5 tests): negative, zero, boundary values
- Add download edge cases (3 tests): empty required + optional,
  binary content verification, throwing progress handler
- Add InternalsVisibleTo for direct ResolveToken() testing
- All 147 tests pass (0 failures, 0 skipped)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Orchestration log: 2026-04-06T14-11-06Z-agentsmith.md
- Session log: 2026-04-06T14-11-06Z-phase4-tests.md
- Decisions: Merged Phase 4 test implementation decision from inbox
- Removed: agentsmith-phase4-auth-tests.md from decisions/inbox/

Phase 4 test strategy now fully implemented with all 147 tests passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@elbruno elbruno merged commit 8db99b2 into main Apr 6, 2026
2 checks passed
@elbruno elbruno deleted the squad/upgrade-dependencies-latest branch April 6, 2026 14:38
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