Skip to content

Test user-facing error messages for configuration mistakes #1093

Open

Description

@coderabbitai

Summary

Add tests for a variety of mistakes in user-written Phlex configurations. Check that the error messages users see explain the problem in terms meaningful to users, not only to implementers.

Motivation and scope

PR #1068 changes identifier validation and removes a creator-specific empty-name check in phlex/core/product_selector.hpp. The review asks whether a failed creator-name construction produces a clear message. Test this case as part of a broader review of configuration diagnostics, including the configuration conversion in phlex/configuration.cpp and existing tests in test/config_test.cpp and test/product_selector_test.cpp.

Acceptance criteria

  • Add tests for several representative invalid configurations, including an empty creator name, an empty layer name, and invalid identifier characters. Include other common mistakes where appropriate.
  • Exercise the user-facing configuration path and check the resulting diagnostic, not just that an exception occurs.
  • Check that messages identify the configuration problem and give users enough context to correct it. Improve diagnostics where the tests show that is needed.
  • Preserve valid uses of omitted optional selector fields.

Requested by @marcpaterno.

PR: #1068
Review comment: #1068 (comment)

Activity

  1. coderabbitai commented on Nov 20, 2026

    @coderabbitai
    ContributorAuthor
    🔗 Related PRs

    #1073 - Check for unknown keys in product_selector JSON segments [merged]
    #1081 - Layer definitions with paths instead of names [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions