Problem
dependable_element() already accepts maturity = "development" | "release" and uses it to soften certified-scope checks in _dependable_element_index_impl. However, the generated lobster test script (in _dependable_element_impl) always exits non-zero on coverage gaps, regardless of maturity. This means a development-maturity element fails bazel test even when gaps are expected and intentional.
Proposed Change
private/dependable_element.bzl
- Add
"maturity" attr to _dependable_element_test rule (mirrors the existing attr on _dependable_element_index):
"maturity": attr.string(
default = "release",
values = ["release", "development"],
doc = "'release' treats lobster coverage gaps as errors; 'development' reports them but does not fail.",
),
- In
_dependable_element_impl, use it to append || true for development mode:
exit_suffix = " || true" if ctx.attr.maturity == "development" else ""
command = "set -o pipefail; {ci} {report}{suffix}".format(..., suffix = exit_suffix)
- Forward
maturity = maturity from the dependable_element() macro to the _dependable_element_test(...) call.
Motivation
During active development, traceability coverage will be incomplete by design. Forcing bazel test to fail blocks CI for work-in-progress branches. Mirroring the existing development-mode behaviour of the certified-scope checks gives a consistent and predictable experience across both check types.
Problem
dependable_element()already acceptsmaturity = "development" | "release"and uses it to soften certified-scope checks in_dependable_element_index_impl. However, the generated lobster test script (in_dependable_element_impl) always exits non-zero on coverage gaps, regardless of maturity. This means adevelopment-maturity element failsbazel testeven when gaps are expected and intentional.Proposed Change
private/dependable_element.bzl"maturity"attr to_dependable_element_testrule (mirrors the existing attr on_dependable_element_index):_dependable_element_impl, use it to append|| truefor development mode:maturity = maturityfrom thedependable_element()macro to the_dependable_element_test(...)call.Motivation
During active development, traceability coverage will be incomplete by design. Forcing
bazel testto fail blocks CI for work-in-progress branches. Mirroring the existing development-mode behaviour of the certified-scope checks gives a consistent and predictable experience across both check types.