Skip to content

fix(tools): restrict legacy platform metadata check to wave-test directives - #588

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
Visio-Vanitas:fix-583-wave-test-directives
Sep 11, 2026
Merged

fix(tools): restrict legacy platform metadata check to wave-test directives#588
LunaStev merged 1 commit into
wavefnd:masterfrom
Visio-Vanitas:fix-583-wave-test-directives

Conversation

@Visio-Vanitas

Copy link
Copy Markdown
Contributor

Summary

Restrict the legacy platform metadata validation in tools/case_manifest.py (_validate_case_layout) so that host-os= and host-arch= are only matched inside actual leading // wave-test: directives rather than across arbitrary source file contents.

Motivation

Fixes #583. Previously, _validate_case_layout searched the entire Wave source text for substring matches of host-os= and host-arch=. This caused legitimate cases containing these strings in code literals or normal comments to be falsely rejected as legacy metadata.

Target and compatibility impact

None. Tooling validation only; does not affect compiler or runtime targets.

Validation

  • Added unit tests in tools/test_case_manifest.py verifying:
    • Cases with host-os= or host-arch= in string literals and ordinary comments pass layout validation.
    • Directives with deprecated keys (host-os=, host-arch=, with or without whitespace, standalone or comma-separated) are rejected with CaseManifestError.
  • Ran python3 -m unittest tools.test_case_manifest tools.test_test_contracts: all 23 tests passed.
  • Ran python3 -m unittest discover tools: all 40 tests passed.

Checklist

  • Commits include a DCO Signed-off-by line.
  • Tests cover new behavior or the PR explains why no test is needed.
  • User-facing changes include documentation or diagnostics updates.
  • The change preserves the license boundary between the compiler and std/.

…ctives

Signed-off-by: Visio Vanitas <visiovanitas@atdove.dev>
@LunaStev

Copy link
Copy Markdown
Member

LGTM. Thanks for the contribution! I’ll merge this once all CI checks have completed.

@LunaStev
LunaStev merged commit b882e91 into wavefnd:master Sep 11, 2026
23 of 26 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.

Match legacy platform metadata only in actual wave-test directives

2 participants