Skip to content

feat(lobster): include upstream system requirements in dependable_element traceability#326

Open
simon-d-bmw wants to merge 3 commits into
eclipse-score:mainfrom
simon-d-bmw:feat/310-upstream-srcs-in-de-traceability
Open

feat(lobster): include upstream system requirements in dependable_element traceability#326
simon-d-bmw wants to merge 3 commits into
eclipse-score:mainfrom
simon-d-bmw:feat/310-upstream-srcs-in-de-traceability

Conversation

@simon-d-bmw

@simon-d-bmw simon-d-bmw commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

When a feature_requirements() target has deps on assumed_system_requirements(), the system requirement (ASR) lobster files were not included in the dependable_element lobster config or report. This caused derived_from links from feature requirements to system-level requirements to produce unresolved references in the lobster coverage report.

Changes:

  • providers.bzl: add system_req_srcs field to FeatureRequirementsInfo
  • private/requirements.bzl: populate system_req_srcs from AssumedSystemRequirementsInfo.srcs in deps (feature kind only)
  • private/component.bzl: propagate system_req_srcs alongside srcs from FeatureRequirementsInfo
  • private/dependable_element.bzl: collect system_req_list (deduplicated via depset), add {SYSTEM_REQ_SOURCES} substitution, include in all_lobster_inputs
  • lobster/config/lobster_de.conf.tpl: add requirements "System Requirements" { {SYSTEM_REQ_SOURCES} } section
  • test/seooc_test.bzl: add 2 analysis tests asserting system_req_srcs propagation and lobster report input inclusion

Validation: bazel test //:seooc_tests (from bazel/rules/rules_score/test/) — all 11 tests pass.

Closes #310

@simon-d-bmw simon-d-bmw marked this pull request as ready for review July 8, 2026 07:38
@simon-d-bmw simon-d-bmw force-pushed the feat/310-upstream-srcs-in-de-traceability branch 2 times, most recently from 6fb7371 to e92b455 Compare July 9, 2026 06:54
When a feature_requirements() target has deps on assumed_system_requirements(),
the upstream ASR lobster files are now propagated through FeatureRequirementsInfo
to the dependable_element lobster report.

Previously, derived_from links from feature requirements to system-level
requirements produced unresolved references in the lobster coverage report
because the referenced ASR items were absent from the DE lobster config.

Changes:
- providers.bzl: add upstream_srcs field to FeatureRequirementsInfo
- private/requirements.bzl: populate upstream_srcs from AssumedSystemRequirementsInfo.srcs
  in deps when building FeatureRequirementsInfo (feature kind only)
- private/component.bzl: propagate upstream_srcs alongside srcs from FeatureRequirementsInfo
- private/dependable_element.bzl: collect upstream_req_list from upstream_srcs,
  add {UPSTREAM_REQ_SOURCES} substitution, include in all_lobster_inputs
- lobster/config/lobster_de.conf.tpl: add 'System Requirements' section with
  {UPSTREAM_REQ_SOURCES} placeholder between Feature Requirements and Forwarded AoUs
- test/seooc_test.bzl: add analysis tests verifying upstream_srcs propagation
  and DE lobster report action inputs

Closes eclipse-score#310
…test assertion

- dependable_element.bzl: replace list.extend() accumulation with depset
  transitive merge so repeated ASR deps across multiple feature_requirements
  targets cannot produce duplicate {UPSTREAM_REQ_SOURCES} entries or duplicate
  lobster report inputs
- seooc_test.bzl: replace generic count assertion with explicit check that
  'asr_trlc.lobster' is present in the lobster report action inputs
Reviewer feedback: the generic term 'upstream' was ambiguous. Renamed
throughout to 'system_req_srcs' / SYSTEM_REQ_SOURCES to explicitly name
what the field carries: system requirement (ASR) lobster files.

- providers.bzl: FeatureRequirementsInfo.upstream_srcs -> system_req_srcs
- private/requirements.bzl: upstream_lobster_depsets -> system_req_lobster_depsets
- private/component.bzl: use renamed system_req_srcs field
- private/dependable_element.bzl: upstream_req_depsets/upstream_req_list ->
  system_req_depsets/system_req_list; {UPSTREAM_REQ_SOURCES} -> {SYSTEM_REQ_SOURCES}
- lobster_de.conf.tpl: {UPSTREAM_REQ_SOURCES} -> {SYSTEM_REQ_SOURCES}
- test/seooc_test.bzl, test/BUILD: renamed test impls/targets accordingly

No functional change; all 11 seooc tests pass.
@simon-d-bmw simon-d-bmw force-pushed the feat/310-upstream-srcs-in-de-traceability branch from e92b455 to 0963e72 Compare July 14, 2026 09:53
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.

feat(lobster): include upstream system requirements in dependable_element traceability

1 participant