Skip to content

♻️ Guard against KeyError escape from validate_settings_rules#289

Merged
Gudsfile merged 2 commits into
mainfrom
169-cli-boundaries-a
Jun 20, 2026
Merged

♻️ Guard against KeyError escape from validate_settings_rules#289
Gudsfile merged 2 commits into
mainfrom
169-cli-boundaries-a

Conversation

@Gudsfile

@Gudsfile Gudsfile commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

Refs #169

  • validate_settings_rules could theoretically raise a KeyError if a future rule bypasses the get_rules_supported_by_settings pre-filter. The catch is added defensively so any such escape is wrapped as an actionable InvalidSettingsError rather than a generic crash.
  • A code path that was never reachable has been removed.

@Gudsfile Gudsfile changed the base branch from main to refactor/decouple-current-tag-sync June 20, 2026 13:54
Base automatically changed from refactor/decouple-current-tag-sync to main June 20, 2026 15:21
@Gudsfile Gudsfile force-pushed the 169-cli-boundaries-a branch from 7dddbff to 5295dfd Compare June 20, 2026 20:41
@Gudsfile Gudsfile changed the title Fix settings validation error handling 🐛 Fix settings validation error handling Jun 20, 2026
@Gudsfile Gudsfile changed the title 🐛 Fix settings validation error handling ♻️ guard against KeyError escape from validate_settings_rules Jun 20, 2026
Gudsfile added 2 commits June 20, 2026 22:53
validate_settings_rules could theoretically raise a KeyError if a
future rule bypasses the get_rules_supported_by_settings pre-filter.
The catch is added defensively so any such escape is wrapped as an
actionable InvalidSettingsError rather than a generic crash.
The "requires the optional" phrase only appears in MissingOptionalDependencyError.install_hint,
not in ModuleNotFoundError messages. The string check in _build_server_app
could never match, so it was dead code that added noise without effect.
@Gudsfile Gudsfile force-pushed the 169-cli-boundaries-a branch from 5295dfd to 74aced7 Compare June 20, 2026 20:54
@Gudsfile Gudsfile changed the title ♻️ guard against KeyError escape from validate_settings_rules ♻️ Guard against KeyError escape from validate_settings_rules Jun 20, 2026
@Gudsfile Gudsfile self-assigned this Jun 20, 2026
@Gudsfile Gudsfile marked this pull request as ready for review June 20, 2026 20:54
@Gudsfile Gudsfile merged commit 5aaaeb3 into main Jun 20, 2026
@Gudsfile Gudsfile deleted the 169-cli-boundaries-a branch June 20, 2026 20:55
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