Skip to content

feat: Unified repository servers - #82

Draft
hhvrc wants to merge 17 commits into
developfrom
feature/unified-repository-server
Draft

feat: Unified repository servers#82
hhvrc wants to merge 17 commits into
developfrom
feature/unified-repository-server

Conversation

@hhvrc

@hhvrc hhvrc commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

hhvrc and others added 17 commits February 11, 2026 12:08
…support

Rename DesktopRepositoryServer to RepositoryServer with unified namespace
OpenShock.RepositoryServer. Reorganize controllers into V1 (backwards-compat
desktop endpoints at /v1/) and V2 (desktop at /v2/desktop/, firmware at
/v2/firmware/). Add full firmware repository with chips, boards, versions,
artifacts, and release notes backed by PostgreSQL enums and EF Core entities.
Includes public OTA endpoints and admin CRUD with token auth. Update Docker,
CI/CD workflows, and generate AddFirmwareTables migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add PUT /v2/firmware/admin/versions/{version}/boards/{board}/upload
  endpoint that accepts multipart binary uploads, computes SHA256,
  uploads to BunnyCDN via HTTP API, and stores artifact metadata
- Add CdnStorageService wrapping BunnyCDN Storage HTTP API
- Extend FirmwareConfig with CdnStorageUrl and CdnStorageApiKey
- Update LatestController to return all artifact types (not just Merged)
  and add optional ?board= query filter
- Unify FirmwareLatestResponse to use List<FirmwareArtifactDto> matching
  FirmwareVersionResponse shape
- Make artifacts optional in CreateFirmwareVersionRequest
- Extract shared GetArtifactFileName into FirmwareArtifactFileNames util
- Delete unused FirmwareBoardArtifact model

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…penshock/RepositoryServers into feature/unified-repository-server
Restores RepoServerDb/Module.cs, RepoServerDb/Version.cs and V1/CiCdController.cs
to their pre-firmware-rewrite state. The firmware work should not be modifying
desktop module code.
- Test fixture now injects config via UseSetting so values reach Program.cs
  before ApiConfig validation (ConfigureAppConfiguration overlays only apply
  at Build() in minimal hosting)
- Make RepoServerContext.MapEnums the single source of enum mappings with
  pinned DB names; drop the duplicate HasPostgresEnum block and map enums in
  the migration-tool path too
- Register only the pooled DbContext factory and derive scoped contexts from
  it; the AddDbContextPool + AddPooledDbContextFactory combo applied MapEnums
  twice and broke type mapping on first model use
- Order advisories by CLR severity rank in memory since MapEnum creates PG
  enum labels alphabetically
- Opt into the Microsoft.Testing.Platform dotnet test runner via global.json
  and update the documented test command
…erable transitives

- Generate the firmware/USB/repositories schema migration (enums, 14 new
  tables, unique constraints); desktop tables intentionally untouched
- Declare the usb_serial_filters unique (vid, pid) NULLS NOT DISTINCT index
  fluently via AreNullsDistinct(false) instead of the never-written raw-SQL
  migration the model comment referenced
- Test fixture now applies real migrations through MigrationOpenShockContext
  instead of EnsureCreated, so the suite validates the migration chain
- Enable CPM transitive pinning and pin Microsoft.OpenApi 2.7.5
  (GHSA-v5pm-xwqc-g5wc) and OpenTelemetry.Api 1.15.3 (GHSA-g94r-2vxg-569j)
- Replace deprecated HasCount(n) assertions with Count().IsEqualTo(n)
- Pass the Postgres image via the PostgreSqlBuilder constructor instead of
  the obsolete parameterless constructor + WithImage
C# mirrors of the ReleaseData/ChangeEntry/NoticeEntry/ReleaseNoteEntry/
Repository structs emitted by the OpenShock release-tool (schema_version 1).
Not consumed yet — ingestion wiring lands separately once the integration
point is decided.
…pository-server

# Conflicts:
#	.github/workflows/ci-build.yml
#	Directory.Packages.props
#	RepositoryServer/Controllers/V1/RepoController.cs
#	RepositoryServer/ExceptionHandler/ExceptionHandler.cs
#	RepositoryServer/appsettings.json
@hhvrc hhvrc self-assigned this Aug 4, 2026
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