Skip to content

Playground/bitmanipulation seooc lobster report - #775

Draft
antonkri wants to merge 5 commits into
mainfrom
playground/bitmanipulation-seooc-lobster-report
Draft

Playground/bitmanipulation seooc lobster report#775
antonkri wants to merge 5 commits into
mainfrom
playground/bitmanipulation-seooc-lobster-report

Conversation

@antonkri

Copy link
Copy Markdown
Contributor

📌 Description

🚨 Impact Analysis

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

Renders a pre-built Lobster traceability JSON report (e.g. from
dependable_element()/component()) as an HTML table with real
sphinx-needs cross-references to Component Requirement and GoogleTest
testcase needs, mirroring score_source_code_linker's disk-scan
pattern to avoid Bazel testonly propagation into the docs build.
…oss-references

Previously the lobster-traceability-report directive only rendered the
Component Requirements / Unit Test pools; all other pools (Feature
Requirements, Forwarded AoUs, Architecture, Public API, Failure Modes,
Control Measures, Root Causes) were missing entirely.

- Render every pool ('level') found in the JSON report generically, with
  no per-pool hard-coding, so new/renamed pools show up automatically.
- Give every item a stable internal anchor (lobster-item-<sha1(tag)>) and
  turn every refs/ref_up/ref_down entry into a clickable link to that
  anchor, mirroring the cross-linking already used by
  dependable_element's own separately-generated traceability_report.
- Where an item is itself a genuine requirement registered as a real
  Sphinx-needs element elsewhere in the docs (feat_req/comp_req/aou_req/
  tool_req/stkh_req), link it with :need: instead of a report-local
  anchor, same as Component Requirements already did.
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 0aba06c3-5527-4524-9785-5fc42dd75c3d
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: src
WARNING: Target pattern parsing failed.
ERROR: Skipping '//src:license-check': no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
ERROR: no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
INFO: Elapsed time: 6.473s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

Adds an alternative producer for test links that reads the *.lobster
activity pools emitted by lobster-gtest instead of scanning
bazel-testlogs/**/test.xml. This is a drop-in replacement for
xml_parser.run_xml_parser: it writes the same two caches
(score_testcaseneeds_cache.json, score_xml_parser_cache.json), so the
combining/repo-grouping/injection steps stay untouched.

Selected via a new docs(testlink_source = "xml"|"lobster"|"none")
attribute, wired through TESTLINK_SOURCE / --define=score_testlink_source
to a new score_testlink_source Sphinx config value.

Known fidelity losses versus the XML producer, both inherent to
lobster-gtest itself: failed-test messages are dropped (no result_text),
and skipped tests are reported as passed (lobster-gtest only inspects the
<failure> element).

Verified against the bitmanipulation SEooC PoC in baselibs: both modes
produce byte-identical needs.json (503 needs, 0 testlink/source_code_link
diffs) and identical testlink caches (43 entries).
Unit test links rendered the generated need id (e.g.
testcase__CheckBit__WithUInt64_acmyg) as their link text. Its repeated
double underscores sit on the text baseline, where they visually merge
with the browsers own link-underline decoration - the links looked like
they had several stacked lines under them.

_need_ref() now takes an optional display argument, rendering RSTs
explicit :need:`text <id>` link-text syntax. Unit test links pass the
Lobster reports own name field (e.g. CheckBit:WithUInt64), which is the
original colon-separated JUnit suite:case spelling that
_unit_test_need_id() only converts to __ form to reconstruct the id.

Requirement links (component/feature/AoU/tool/stakeholder) are
deliberately left alone: their double underscores are the projects own
id naming convention, and no separate human-readable title exists in the
Lobster JSON to substitute.
Render the report along the direction of decomposition instead of pool
by pool, so it reads like the traceability argument it documents:

- New "Feature Requirements <-> Component Requirements" section, placed
  before "Component Requirements <-> Unit Tests".
- Coverage pie charts (inline SVG, no new dependency) for both of those
  sections and for Architecture, each centered above its table.
- All tables wrapped in a <details>/<summary> block, collapsed by
  default. A small script opens the enclosing <details> when a
  "#lobster-item-..." anchor is navigated to, so cross-links keep
  working.
- The four FMEA/FTA pools (Public API, Failure Modes, Control Measures,
  Root Causes) are joined into one "Safety Analysis" table with one row
  per root cause, since on their own each is just a list of names whose
  meaning only emerges from the chain. A root cause is linked to its
  failure mode via the fault tree file they share; items repeated across
  rows are spelled out once and then shown by name only.
@MaximilianSoerenPollak

Copy link
Copy Markdown
Contributor

Mark this as ready to review once we should take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants