<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #49489 Custom host vitals were skipped when host name template enforcement (#38806) shipped, since both features were in development at the same time. This adds `$FLEET_HOST_VITAL_<id>` support to host name templates, matching the existing secret-variable pattern (validation, per-host resolution, resend on value change). I also introduced a new `IsInvalidReferencedCustomHostVitalsError` call after Copilot's comment below. # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [x] Added/updated automated tests - [x] QA'd all new/changed functionality manually <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit * **New Features** * Added support for `$FLEET_HOST_VITAL_<id>` in Apple host name templates. * Device-name template reconciliation now expands referenced per-host vital values and updates automatically when those values change. * **Bug Fixes** * Prevents deleting custom host vitals that are referenced by host name templates. * If a referenced vital has no value for a host, device-name delivery is marked failed for that host (retryable). * **Improved Error Handling** * Refined validation behavior so unknown/malformed vital references return user-facing invalid-argument errors, while infrastructure errors propagate unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Welcome to the "source available" section of the Fleet codebase. Please note files and functionality under this directory are covered by the Fleet EE License, and require a valid Fleet subscription for production use. See the full license for details.