Skip to content

fix(profile): use correct config path and merge seatbelt rules#28

Merged
Pierozi merged 4 commits intomainfrom
fix/profiles
Feb 26, 2026
Merged

fix(profile): use correct config path and merge seatbelt rules#28
Pierozi merged 4 commits intomainfrom
fix/profiles

Conversation

@Pierozi
Copy link
Contributor

@Pierozi Pierozi commented Feb 26, 2026

Summary

  • Fix profile loader to use ~/.config/sx/profiles/ instead of dirs::config_dir() which resolves to ~/Library/Application Support on macOS, mismatching the convention in global.rs
  • Fix compose_profiles() to concatenate seatbelt raw rules from all profiles instead of silently dropping them
  • Document custom profile [seatbelt] raw rules, profile resolution order, and merging semantics

Test plan

  • test_compose_profiles_seatbelt_single — single profile preserves raw rules
  • test_compose_profiles_seatbelt_concatenation — multiple profiles concatenate raw rules
  • test_compose_profiles_seatbelt_none_skipped — profiles without seatbelt don't clobber existing rules
  • All 197 tests pass

- Fix profile loader path: use ~/.config/sx/profiles/ instead of dirs::config_dir()
  (which resolves to ~/Library/Application Support on macOS, breaking profile loading)
- Add seatbelt raw rule merging: compose_profiles() now concatenates raw seatbelt
  rules from all profiles instead of silently dropping them
- Merge resolution: kept both ExecSugid union-merge and seatbelt rule concatenation
  logic in compose_profiles()
@Pierozi Pierozi changed the title fix(profile): resolve merge conflict and improve profile system fix(profile): use correct config path and merge seatbelt rules Feb 26, 2026
- Add [seatbelt] raw rules section to PROFILES.md and CONFIGURATION.md
- Document profile resolution order (builtin → project dir → ~/.config/sx/profiles/)
- Add seatbelt concatenation to merging rules
- Update README to reference custom profile capabilities
@Pierozi Pierozi merged commit 0f89bb8 into main Feb 26, 2026
6 checks passed
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