Skip to content

Add optional enhanced metadata fields to test categories - #4109

Merged
tony-davis merged 2 commits into
users/dravindr/ctest_miopenfrom
users/todavis/optional-metadata-miopen
Feb 20, 2026
Merged

tony-davis merged 2 commits into
users/dravindr/ctest_miopenfrom
users/todavis/optional-metadata-miopen

Conversation

@tony-davis

Copy link
Copy Markdown
Contributor

Add Optional Enhanced Metadata Fields to Test Categories

This PR adds optional fields to the test_categories.yaml schema to enable richer test documentation and future AI-assisted test selection.

Key Points ✅

  • All new fields are optional - Zero burden on teams that don't want them
  • 100% backward compatible - Existing YAML files work unchanged
  • Minimal code changes - Parser naturally ignores unknown fields (no code changes needed!)
  • Incremental adoption - Teams add fields only when they see value
  • Clear documentation - Enhanced README with examples and use cases

Changes

  1. README.md: Document optional enhancement fields with examples and use cases

Examples

Minimal usage (works exactly as base PR):

test_categories:
  smoke:
    description: "Quick sanity tests"
    test_patterns: ["*smoke*"]
    labels: ["smoke"]

Enhanced usage (when team wants better documentation):

test_categories:
  smoke:
    description: "Quick sanity tests"
    notes: "Run for any API changes. Critical path tests."
    source_coverage: ["library/src/api.cpp"]
    api_coverage: ["initialize", "cleanup"]
    feature_tags: ["fast", "critical-path"]
    test_patterns: ["*smoke*"]
    labels: ["smoke"]

Why Include Optional Fields in the Standard?

  1. Consistency - Teams wanting richer metadata have a standardized structure
  2. Flexibility - No mandatory adoption, teams use what they need
  3. Prevents divergence - Projects like hipBLASlt that need extra metadata can adopt the standard as-is rather than creating project-specific extensions
  4. Future-proof - Enables innovation (AI-assisted test selection, better documentation) without breaking changes

Testing

  • ✅ Parser gracefully ignores optional fields (no code changes needed)
  • ✅ CTest execution behavior unchanged
  • ✅ Backward compatible with existing deployments

Context

This enables projects like hipBLASlt (with ~200+ test configurations) to adopt the standardized approach with rich test metadata, rather than implementing project-specific extensions that would defeat the standardization effort.

This PR is a rebase of #3897 to target the new MIOpen branch (users/dravindr/ctest_miopen from PR #3513) instead of the abandoned PR #2411.

@tony-davis
tony-davis marked this pull request as ready for review January 27, 2026 19:48
@tony-davis
tony-davis requested a review from a team as a code owner January 27, 2026 19:48
Copilot AI review requested due to automatic review settings January 27, 2026 19:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the shared CTest YAML schema documentation with optional metadata fields to support richer test categorization and future AI-assisted test selection without changing existing parsing behavior.

Changes:

  • Document an “enhanced” YAML structure for test_categories.yaml, introducing optional fields such as notes, source_coverage, api_coverage, feature_tags, dependencies, and a top-level llm_context.
  • Add a summary table and key points clarifying that these enhancement fields are optional, informational, and backward compatible with the existing parser and CTest integration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread shared/ctest/README.md Resolved
Comment thread shared/ctest/README.md Resolved

@tony-davis tony-davis left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed - clarified that optional fields are for documentation/downstream tooling only, not enforced by the parser. Thanks for catching this!

@dileepr1
dileepr1 force-pushed the users/dravindr/ctest_miopen branch from 2fdbbca to 471c08f Compare February 18, 2026 19:49
@dileepr1
dileepr1 requested a review from a team as a February 18, 2026 19:49
@dileepr1
dileepr1 force-pushed the users/dravindr/ctest_miopen branch from cef22d4 to 0970331 Compare February 20, 2026 21:44
- Add documentation for optional fields (notes, source_coverage, api_coverage, feature_tags, dependencies)
- Add clarifying comment to parser (no logic changes - YAML naturally ignores unknown fields)
- Enhance level1 category as example, keep level2-level6 minimal to show backward compatibility

All fields are optional and backward compatible. Teams can adopt incrementally.
Enables richer test documentation and future AI-assisted test selection.
@tony-davis
tony-davis force-pushed the users/todavis/optional-metadata-miopen branch from e57dca0 to dabf769 Compare February 20, 2026 22:17
@tony-davis
tony-davis merged this pull request into users/dravindr/ctest_miopen Feb 20, 2026
5 checks passed
@tony-davis
tony-davis deleted the users/todavis/optional-metadata-miopen branch February 20, 2026 22:18
dileepr1 pushed a commit that referenced this pull request Feb 23, 2026
## Add Optional Enhanced Metadata Fields to Test Categories

This PR adds optional fields to the `test_categories.yaml` schema to
enable richer test documentation and future AI-assisted test selection.

### Key Points ✅

- **All new fields are optional** - Zero burden on teams that don't want
them
- **100% backward compatible** - Existing YAML files work unchanged
- **Minimal code changes** - Parser naturally ignores unknown fields (no
code changes needed!)
- **Incremental adoption** - Teams add fields only when they see value
- **Clear documentation** - Enhanced README with examples and use cases

### Changes

1. **README.md**: Document optional enhancement fields with examples and
use cases

### Examples

**Minimal usage (works exactly as base PR):**
```yaml
test_categories:
  smoke:
    description: "Quick sanity tests"
    test_patterns: ["*smoke*"]
    labels: ["smoke"]
```

**Enhanced usage (when team wants better documentation):**
```yaml
test_categories:
  smoke:
    description: "Quick sanity tests"
    notes: "Run for any API changes. Critical path tests."
    source_coverage: ["library/src/api.cpp"]
    api_coverage: ["initialize", "cleanup"]
    feature_tags: ["fast", "critical-path"]
    test_patterns: ["*smoke*"]
    labels: ["smoke"]
```

### Why Include Optional Fields in the Standard?

1. **Consistency** - Teams wanting richer metadata have a standardized
structure
2. **Flexibility** - No mandatory adoption, teams use what they need
3. **Prevents divergence** - Projects like hipBLASlt that need extra
metadata can adopt the standard as-is rather than creating
project-specific extensions
4. **Future-proof** - Enables innovation (AI-assisted test selection,
better documentation) without breaking changes

### Testing

- ✅ Parser gracefully ignores optional fields (no code changes needed)
- ✅ CTest execution behavior unchanged
- ✅ Backward compatible with existing deployments

### Context

This enables projects like hipBLASlt (with ~200+ test configurations) to
adopt the standardized approach with rich test metadata, rather than
implementing project-specific extensions that would defeat the
standardization effort.

This PR is a rebase of #3897 to target the new MIOpen branch
(`users/dravindr/ctest_miopen` from PR #3513) instead of the abandoned
PR #2411.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants