Skip to content

feat(dependable_element): non-failing lobster test for development-maturity elements #311

Description

@simon-d-bmw

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

  1. 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.",
),
  1. 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)
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions