Skip to content

Add guardrail against Bazel legacy C++ feature regressions#102

Merged
nradakovic merged 1 commit into
mainfrom
nira_add_guard_test
Jul 16, 2026
Merged

Add guardrail against Bazel legacy C++ feature regressions#102
nradakovic merged 1 commit into
mainfrom
nira_add_guard_test

Conversation

@nradakovic

Copy link
Copy Markdown
Member

Add no_legacy_features_guard_test, an analysis-driven test rule under tests/guardrails/ that resolves the active C++ toolchain and fails as a test if the explicit-feature contract regresses -- i.e. the no_legacy_features marker is no longer enabled or a Bazel implicit legacy feature (legacy_compile_flags, legacy_link_flags, sysroot) becomes active again. The verdict is deterministic and surfaced via the test's exit status, so it needs no target hardware and runs on any --config.

Wire the new guardrail_tests suite into every platform CI workflow and document what it validates and how to interpret failures in tests/guardrails/README.md and docs/tests_and_validation.md.

resolves #82

@nradakovic nradakovic self-assigned this Jul 15, 2026
Copilot AI review requested due to automatic review settings July 15, 2026 15:57
@nradakovic nradakovic requested a review from antonkri as a code owner July 15, 2026 15:57
@nradakovic nradakovic added documentation Improvements or additions to documentation wip Work in progress unit test Add or update unit tests p3 Medium/Low - handle it within normal process labels Jul 15, 2026
@nradakovic nradakovic moved this from Backlog to In Progress in S-CORE Roadmap Jul 15, 2026

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

Adds an analysis-driven Bazel test guardrail to prevent regression back to Bazel’s implicit legacy C/C++ feature behavior, and wires it into CI plus documentation so regressions are detected deterministically across supported --configs.

Changes:

  • Introduces no_legacy_features_guard_test (Starlark test rule) to assert the no_legacy_features contract and detect re-enabled Bazel legacy features.
  • Adds a guardrail_tests suite and runs it in platform CI workflows.
  • Documents the new guardrail and test workspace structure.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/guardrails/README.md Documents what the guardrail checks, how to run it, and how to interpret failures.
tests/guardrails/legacy_feature_guard.bzl Implements the analysis-driven guardrail test rule that resolves the active C++ toolchain and checks the explicit-feature contract.
tests/guardrails/BUILD Declares the no_legacy_features_guard_test target in the guardrails package.
tests/BUILD Adds guardrail_tests test suite aggregating the new guardrail target.
docs/tests_and_validation.md Documents the new tests/guardrails/ area and links to interpretation guidance.
.github/workflows/x86_64-linux.yml Runs the new guardrail suite in the x86_64 Linux CI workflow.
.github/workflows/autosd.yml Runs the new guardrail suite in the AutoSD CI workflow.
.github/workflows/aarch64-linux.yml Runs the new guardrail suite in the aarch64 Linux CI workflow.
.github/workflows/aarch64-ebclfsa.yml Runs the new guardrail suite in the EBcLfSA CI workflow.

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

Comment thread tests/guardrails/README.md Outdated
Comment thread .github/workflows/x86_64-linux.yml Outdated
Add no_legacy_features_guard_test, an analysis-driven test rule under
tests/guardrails/ that resolves the active C++ toolchain and fails as a
test if the explicit-feature contract regresses -- i.e. the
no_legacy_features marker is no longer enabled or a Bazel implicit legacy
feature (legacy_compile_flags, legacy_link_flags, sysroot) becomes active
again. The verdict is deterministic and surfaced via the test's exit
status, so it needs no target hardware and runs on any --config.

Wire the new guardrail_tests suite into every platform CI workflow and
document what it validates and how to interpret failures in
tests/guardrails/README.md and docs/tests_and_validation.md.

resolves #82
@nradakovic nradakovic force-pushed the nira_add_guard_test branch from 8a3474c to 7e8a02e Compare July 16, 2026 07:51
@nradakovic nradakovic merged commit 0215ecf into main Jul 16, 2026
12 checks passed
@nradakovic nradakovic deleted the nira_add_guard_test branch July 16, 2026 08:11
@github-project-automation github-project-automation Bot moved this from In Progress to Done in INF - Infrastructure Community Jul 16, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in S-CORE Roadmap Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation p3 Medium/Low - handle it within normal process unit test Add or update unit tests wip Work in progress

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add a guardrail test to prevent future reintroduction of Bazel legacy feature dependencies

3 participants