Skip to content

(CEM-6541) Fix workstation profile appearing in sce_linux REFERENCE.md#87

Merged
Tu2607 merged 1 commit into
mainfrom
CEM-6541
Jun 11, 2026
Merged

(CEM-6541) Fix workstation profile appearing in sce_linux REFERENCE.md#87
Tu2607 merged 1 commit into
mainfrom
CEM-6541

Conversation

@Tu2607

@Tu2607 Tu2607 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Control#filtered_profiles_levels used .concat (union) when both --select-profile and --select-level were given, causing workstation entries to appear in the generated REFERENCE.md even when -p server,... was explicitly passed
  • Fixed by changing .concat to & (intersection) so only entries matching both the profile and level filters are returned
  • Added a default_profile_for_sce_linux! guard in MarkdownGenerator that defaults select_profile to ['server'] for sce_linux when no -p flag is provided, covering the no-flag case

Test plan

  • bundle exec rspec spec/abide_dev_utils/sce/benchmark_spec.rb — includes new intersection test (passes for sce_linux, skips for sce_windows which has no workstation controls)
  • bundle exec rspec spec/abide_dev_utils/sce/generate/reference/markdown_generator_spec.rb — three unit tests for the opts-defaulting behavior
  • Verify generated REFERENCE.md for sce_linux contains no workstation entries when run with -p server,... or without -p

🤖 Generated with Claude Code

`Control#filtered_profiles_levels` used `.concat` (union) when both
`--select-profile` and `--select-level` were given. This caused
`profiles_levels_by_level` to return all profiles at the requested
levels — including `workstation` — regardless of what was passed via
`-p`. The fix changes `.concat` to `&` (intersection) so only entries
matching both filters are returned.

A second guard in `MarkdownGenerator#generate` defaults `select_profile`
to `['server']` for `sce_linux` when no `-p` flag is provided at all,
covering invocations that omit the flag entirely. The guard is extracted
into a private `default_profile_for_sce_linux!` helper to avoid
increasing the cyclomatic complexity of `generate`. Version bumped to
0.18.8.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@Tu2607 Tu2607 requested a review from a team as a code owner June 11, 2026 20:18
@Tu2607 Tu2607 requested a review from pocketgeek June 11, 2026 20:18
@Tu2607 Tu2607 merged commit 73e1fc1 into main Jun 11, 2026
3 checks passed
@Tu2607 Tu2607 deleted the CEM-6541 branch June 11, 2026 21:23
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.

2 participants