Skip to content

Update API types to latest#639

Open
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:update-types-may-12th
Open

Update API types to latest#639
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:update-types-may-12th

Conversation

@celdrake
Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Review Change Stack

Summary by CodeRabbit

  • New Features
    • Added vulnerability alerting for critical and moderate CVE detections, resolutions, device OS image changes, and dependency modifications.
    • Introduced vulnerability summary reporting by severity for devices and fleets, with CVE counts and affected device metrics.
    • Enhanced semantic versioning support in catalog item version management.
    • Expanded event tracking system with new alert reasons for vulnerability and dependency changes.

Walkthrough

PR adds comprehensive vulnerability tracking types for CVEs, devices, and fleets via OpenAPI code generation; extends semantic versioning for software catalog items; implements event system support for vulnerability and dependency change notifications; and updates UI translations accordingly with minor type system adjustments.

Changes

Vulnerability types and event system

Layer / File(s) Summary
Core vulnerability and severity models
libs/types/alpha/models/Vulnerability.ts, libs/types/alpha/models/VulnerabilityGroup.ts, libs/types/alpha/models/VulnerabilityGroupItem.ts, libs/types/alpha/models/CveCountsBySeverity.ts, libs/types/alpha/models/DeviceCountsBySeverity.ts, libs/types/alpha/models/VulnerabilitySeveritySummary.ts, libs/types/alpha/models/SemVer.ts, libs/types/alpha/models/SemVerRange.ts
Base OpenAPI types for CVE records, grouped findings by digest, per-severity counts for CVEs and devices, and semantic version type aliases for version range constraints.
Summary responses and paginated lists
libs/types/alpha/models/DeviceVulnerabilitySummaryResponse.ts, libs/types/alpha/models/VulnerabilitySummaryResponse.ts, libs/types/alpha/models/VulnerabilityList.ts, libs/types/alpha/models/VulnerabilityGroupList.ts, libs/types/alpha/models/VulnerabilityImageRef.ts
API response wrappers for device and estate-wide severity summaries, paginated list containers for vulnerabilities and groups, and image digest references within vulnerability findings.
Fleet summaries and CVE impact tracking
libs/types/alpha/models/FleetVulnerabilitySummary.ts, libs/types/alpha/models/FleetVulnerabilitySummaryResponse.ts, libs/types/alpha/models/VulnerabilityImpact.ts, libs/types/alpha/models/AffectedFleet.ts
Fleet-level vulnerability summaries with unique digest counts, CVE blast-radius across affected fleets and fleetless devices, and response structure for per-fleet impact details.
Semantic versioning for software upgrades
libs/types/alpha/models/CatalogItemVersion.ts
CatalogItemVersion version, replaces, skips, and skipRange fields now use SemVer and SemVerRange types instead of plain strings for upgrade graph constraints.
Event system extensions
libs/types/models/Event.ts, libs/types/models/DependencyChangeDetectedDetails.ts, libs/types/models/DeviceVulnerabilityCveDetails.ts, libs/types/models/EventDetails.ts
Event.reason enum extended with device vulnerability critical/resolved/warning, OS image change, and dependency change reasons. New discriminated event detail types for device CVE and dependency changes appended to EventDetails union.
Type exports and public API
libs/types/alpha/index.ts, libs/types/index.ts
Alpha barrel re-exports all new vulnerability models and semantic versioning types. Main types index exports new event detail types for consumer access.
Event translations and UI mappings
libs/i18n/locales/en/translation.json, libs/ui-components/src/components/Events/useEvents.ts
New translation strings for vulnerability and dependency alerts. getEventReasonTitles extended with device OS image, device vulnerability, and dependency change event mappings; resource sync translation calls simplified.
Provider spec and condition type updates
libs/types/models/K8sProviderSpec.ts, libs/types/imagebuilder/models/ImageBuildConditionReason.ts, libs/types/models/ConditionType.ts
K8sProviderSpec organizationAssignment and roleAssignment made optional and non-nullable. ImageBuildConditionReason and ConditionType enums gain GeneratingSBOM and TPM verification members respectively.

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, making it impossible to evaluate relevance to the changeset. Add a description explaining what API types were updated, which models/types are affected, and why the update was necessary.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: updating API type definitions to the latest versions across multiple type files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@celdrake celdrake force-pushed the update-types-may-12th branch from 9fecc5a to d8f568a Compare May 12, 2026 07:37
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
libs/types/alpha/models/FleetVulnerabilitySummaryResponse.ts (1)

13-15: ⚡ Quick win

Use a literal type for kind via the OpenAPI schema.

kind is documented as always FleetVulnerabilitySummary, but string allows invalid values and weakens type narrowing. Please set this field as const/single-value enum in the OpenAPI spec so generation emits a literal type (same applies to the other new kind fields in this PR).

As per coding guidelines, "-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@libs/types/alpha/models/FleetVulnerabilitySummaryResponse.ts` around lines 13
- 15, The `kind` property in FleetVulnerabilitySummaryResponse is currently
typed as `string`, but it should be a literal `"FleetVulnerabilitySummary"`;
update the OpenAPI schema for the FleetVulnerabilitySummaryResponse model to set
`kind` as a const or single-value enum (e.g. enum: ["FleetVulnerabilitySummary"]
or x-const) so the generated TypeScript emits a string literal type instead of
`string`; apply the same change to the other new `kind` fields introduced in
this PR to ensure proper type narrowing and stronger typing across models.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@libs/types/alpha/models/FleetVulnerabilitySummaryResponse.ts`:
- Around line 13-15: The `kind` property in FleetVulnerabilitySummaryResponse is
currently typed as `string`, but it should be a literal
`"FleetVulnerabilitySummary"`; update the OpenAPI schema for the
FleetVulnerabilitySummaryResponse model to set `kind` as a const or single-value
enum (e.g. enum: ["FleetVulnerabilitySummary"] or x-const) so the generated
TypeScript emits a string literal type instead of `string`; apply the same
change to the other new `kind` fields introduced in this PR to ensure proper
type narrowing and stronger typing across models.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: b26f5b1f-21fe-4425-a646-13b37ea8bc36

📥 Commits

Reviewing files that changed from the base of the PR and between 6d08224 and d8f568a.

📒 Files selected for processing (29)
  • libs/i18n/locales/en/translation.json
  • libs/types/alpha/index.ts
  • libs/types/alpha/models/AffectedFleet.ts
  • libs/types/alpha/models/CatalogItemVersion.ts
  • libs/types/alpha/models/CveCountsBySeverity.ts
  • libs/types/alpha/models/DeviceCountsBySeverity.ts
  • libs/types/alpha/models/DeviceVulnerabilitySummaryResponse.ts
  • libs/types/alpha/models/FleetVulnerabilitySummary.ts
  • libs/types/alpha/models/FleetVulnerabilitySummaryResponse.ts
  • libs/types/alpha/models/SemVer.ts
  • libs/types/alpha/models/SemVerRange.ts
  • libs/types/alpha/models/Vulnerability.ts
  • libs/types/alpha/models/VulnerabilityGroup.ts
  • libs/types/alpha/models/VulnerabilityGroupItem.ts
  • libs/types/alpha/models/VulnerabilityGroupList.ts
  • libs/types/alpha/models/VulnerabilityImageRef.ts
  • libs/types/alpha/models/VulnerabilityImpact.ts
  • libs/types/alpha/models/VulnerabilityList.ts
  • libs/types/alpha/models/VulnerabilitySeveritySummary.ts
  • libs/types/alpha/models/VulnerabilitySummaryResponse.ts
  • libs/types/imagebuilder/models/ImageBuildConditionReason.ts
  • libs/types/index.ts
  • libs/types/models/ConditionType.ts
  • libs/types/models/DependencyChangeDetectedDetails.ts
  • libs/types/models/DeviceVulnerabilityCveDetails.ts
  • libs/types/models/Event.ts
  • libs/types/models/EventDetails.ts
  • libs/types/models/K8sProviderSpec.ts
  • libs/ui-components/src/components/Events/useEvents.ts

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