Skip to content

feat(performance): perf-metrics, diagnostics and diagnostic-logs over REST - #36

Merged
hanrw merged 3 commits into
mainfrom
improve/perf-rest
Oct 11, 2026
Merged

hanrw merged 3 commits into
mainfrom
improve/perf-rest

Conversation

@hanrw

@hanrw hanrw commented Oct 10, 2026

Copy link
Copy Markdown
Member

Why

asc perf-metrics, asc diagnostics and asc diagnostic-logs were CLI-only. Their routes were registered but nothing served them, so _links resolved to nothing.

What changed

CLI REST
perf-metrics list --app-id GET /api/v1/apps/:appId/perf-metrics?metric-type=
perf-metrics list --build-id GET /api/v1/builds/:buildId/perf-metrics?metric-type=
diagnostics list --build-id GET /api/v1/builds/:buildId/diagnostics?diagnostic-type=
diagnostic-logs list --signature-id GET /api/v1/diagnostics/:signatureId/logs
  • The models use structuredAffordances and Presentable. CLI output is byte-identical; the existing command tests pass unedited.

How it was verified

  • Red first: missing table conformance, missing affordanceMode, then 8 link tests with empty _links.
  • REST tests assert the full JSON, with hrefs equal to the served paths.
  • swift test passes.

Checklist

  • A failing test came first; swift test passes
  • A command that returns data is also served by asc web-server
  • User-visible change: one line under ## [Unreleased] in CHANGELOG.md
  • make docs && make check-docs passes
  • No API key, .p8, issuer ID or Apple ID session in the diff, output or screenshots

🤖 Generated with Claude Code

…s over REST

PerformanceMetric, DiagnosticSignatureInfo and DiagnosticLogEntry now
declare structuredAffordances (CLI output unchanged) and Presentable;
the list commands take affordanceMode. New routes for build metrics,
build diagnostics and signature logs, served by PerfMetricsController
and DiagnosticsController.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f843759a-8fb3-49e8-8e66-7baac22b4e05

📥 Commits

Reviewing files that changed from the base of the PR and between 6fb5ffb and b570d86.


📒 Files selected for processing (21)
  • CHANGELOG.md
  • Sources/ASCCommand/Commands/Performance/DiagnosticLogsCommand.swift
  • Sources/ASCCommand/Commands/Performance/DiagnosticsCommand.swift
  • Sources/ASCCommand/Commands/Performance/PerfMetricsCommand.swift
  • Sources/ASCCommand/Commands/Web/Controllers/DiagnosticsController.swift
  • Sources/ASCCommand/Commands/Web/Controllers/PerfMetricsController.swift
  • Sources/ASCCommand/Commands/Web/RESTRoutes.swift
  • Sources/Domain/Apps/Performance/DiagnosticLogEntry.swift
  • Sources/Domain/Apps/Performance/DiagnosticSignatureInfo.swift
  • Sources/Domain/Apps/Performance/PerfPowerMetric.swift
  • Sources/Domain/Apps/Performance/Performance+RESTRoutes.swift
  • Sources/Domain/Shared/RESTPathResolver.swift
  • Sources/Infrastructure/Apps/AssetLibrary/Images/SDKLibraryImageRepository.swift
  • Sources/Infrastructure/Apps/AssetLibrary/Placements/SDKAssetPlacementRepository.swift
  • Sources/Infrastructure/Apps/AssetLibrary/Videos/SDKLibraryVideoRepository.swift
  • Sources/Infrastructure/Shared/SDKFilter.swift
  • Tests/ASCCommandTests/Commands/Web/RESTRoutesTests.swift
  • Tests/DomainTests/Apps/Performance/DiagnosticLogEntryTests.swift
  • Tests/DomainTests/Apps/Performance/DiagnosticSignatureInfoTests.swift
  • Tests/DomainTests/Apps/Performance/PerfPowerMetricTests.swift
  • docs/features/performance/README.md

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

hanrw and others added 2 commits October 11, 2026 10:56
CI and release builds use Swift 6.2.4, which can't infer `.init(rawValue:)`
inside `value.flatMap { .init(…) }.map { [$0] }` (Swift 6.4 can), so main
has failed to build on CI since #32. Route the eight filter parameters
through a generic `sdkFilter(_:)` whose SDK type comes from the parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.91837% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.68%. Comparing base (79d213a) to head (b570d86).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
...brary/Placements/SDKAssetPlacementRepository.swift 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   82.04%   82.68%   +0.63%     
==========================================
  Files         492      519      +27     
  Lines       14362    15637    +1275     
==========================================
+ Hits        11784    12929    +1145     
- Misses       2578     2708     +130     
Files with missing lines Coverage Δ
...d/Commands/Performance/DiagnosticLogsCommand.swift 57.14% <100.00%> (+15.03%) ⬆️
...mand/Commands/Performance/DiagnosticsCommand.swift 62.50% <100.00%> (+15.13%) ⬆️
...mand/Commands/Performance/PerfMetricsCommand.swift 71.42% <100.00%> (+17.58%) ⬆️
...s/Domain/Apps/Performance/DiagnosticLogEntry.swift 72.50% <100.00%> (+3.05%) ⬆️
...ain/Apps/Performance/DiagnosticSignatureInfo.swift 75.00% <100.00%> (+3.57%) ⬆️
...rces/Domain/Apps/Performance/PerfPowerMetric.swift 76.92% <100.00%> (+4.83%) ⬆️
...main/Apps/Performance/Performance+RESTRoutes.swift 100.00% <100.00%> (ø)
Sources/Domain/Shared/RESTPathResolver.swift 100.00% <100.00%> (ø)
...ssetLibrary/Images/SDKLibraryImageRepository.swift 97.50% <100.00%> (ø)
...ssetLibrary/Videos/SDKLibraryVideoRepository.swift 98.66% <100.00%> (ø)
... and 2 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hanrw
hanrw merged commit 5bd0c6d into main Oct 11, 2026
5 checks passed
@hanrw
hanrw deleted the improve/perf-rest branch October 11, 2026 04:04
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