Skip to content

feat(config): recipe profiles for machine/recipe classification - #25

Merged
mad01 merged 1 commit into
mainfrom
alexander/mad-85-featralph-recipe-profiles-classify-machines-recipes
Jun 23, 2026
Merged

feat(config): recipe profiles for machine/recipe classification#25
mad01 merged 1 commit into
mainfrom
alexander/mad-85-featralph-recipe-profiles-classify-machines-recipes

Conversation

@mad01

@mad01 mad01 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Replaces hostname pinning with semantic profile labels. A machine declares profiles = [...] in its config.local.toml; a recipe declares the profiles it belongs to via [recipe] profiles = [...] in recipe.toml. A recipe applies when its profiles intersect the machine's — a recipe with no profiles applies everywhere (same back-compat default as empty hosts). Coexists with hosts (both must pass when both set). Vocabulary is freeform, no enum validation.

Profile-mismatched recipes are frozen into the existing HostFilteredRecipes bucket, identical to host-filtered recipes.

  • internal/config/types.goProfiles on Config (machine) and RecipeMetadata (recipe)
  • internal/config/local.go — overlay sets machine profiles (slice-replace)
  • internal/config/host.goShouldApplyForProfiles (intersection; empty ⇒ applies everywhere)
  • internal/config/recipe.go — profile filter in ProcessRecipes
  • ralph doctor — one config.local.toml line: loaded+profiles / loaded-no-profiles (warn) / missing (warn)
  • ralph list recipes — shows each recipe's profiles
  • docs/configuration.md — profiles model + doctor warning

Closes MAD-85

Replace hostname pinning with semantic profile labels. A machine declares
profiles in its config.local.toml (`profiles = ["personal"]`); a recipe
declares the profiles it belongs to in recipe.toml (`[recipe] profiles =
[...]`). A recipe applies when its profiles intersect the machine's; a
recipe with no profiles applies everywhere. Coexists with `hosts` (AND).

Profile-mismatched recipes are frozen into the existing HostFilteredRecipes
bucket, same as host-filtered recipes. Vocabulary is freeform (no enum).

- types.go: Profiles on Config (machine) and RecipeMetadata (recipe)
- local.go: overlay sets machine profiles (slice-replace)
- host.go: ShouldApplyForProfiles (intersection; empty = applies everywhere)
- recipe.go: profile filter in ProcessRecipes after load
- ralph doctor: single config.local.toml line — loaded+profiles / loaded
  no-profiles (warn) / missing (warn)
- ralph list recipes: show each recipe's profiles
- docs/configuration.md: profiles model + doctor warning

Closes MAD-85
@mad01
mad01 merged commit c168e82 into main Jun 23, 2026
1 check passed
mad01 added a commit that referenced this pull request Jul 3, 2026
Replace hostname pinning with semantic profile labels. A machine declares
profiles in its config.local.toml (`profiles = ["personal"]`); a recipe
declares the profiles it belongs to in recipe.toml (`[recipe] profiles =
[...]`). A recipe applies when its profiles intersect the machine's; a
recipe with no profiles applies everywhere. Coexists with `hosts` (AND).

Profile-mismatched recipes are frozen into the existing HostFilteredRecipes
bucket, same as host-filtered recipes. Vocabulary is freeform (no enum).

- types.go: Profiles on Config (machine) and RecipeMetadata (recipe)
- local.go: overlay sets machine profiles (slice-replace)
- host.go: ShouldApplyForProfiles (intersection; empty = applies everywhere)
- recipe.go: profile filter in ProcessRecipes after load
- ralph doctor: single config.local.toml line — loaded+profiles / loaded
  no-profiles (warn) / missing (warn)
- ralph list recipes: show each recipe's profiles
- docs/configuration.md: profiles model + doctor warning

Closes MAD-85
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