feat(scripts_bazel): needs.json -> LOBSTER lobster-req-trace converter#654
Draft
FScholPer wants to merge 3 commits into
Draft
feat(scripts_bazel): needs.json -> LOBSTER lobster-req-trace converter#654FScholPer wants to merge 3 commits into
FScholPer wants to merge 3 commits into
Conversation
…erter Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
…IRECTORY Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
| needs_json = _resolve(args.needs_json) | ||
| output = _resolve(args.output) if args.output is not None else None | ||
|
|
||
| needs_data = json.loads(needs_json.read_text(encoding="utf-8")) |
| if output is None: | ||
| print(payload) | ||
| else: | ||
| output.write_text(payload + "\n", encoding="utf-8") |
…>tool) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Description
Adds
scripts_bazel/needs_to_lobster.py: a converter that turns the sphinx-needsneeds.jsoninto a LOBSTERlobster-req-trace(.lobster) file, so sphinx-needs requirements can be aggregated with the code/test.lobsterartifacts by the LOBSTER CLI (lobster-report/lobster-ci-report).This is the "read-only converter" identified as the way to reuse the existing LOBSTER traceability engine (already used by
rules_score/dependable_elementincommunicationandbaselibs) without re-implementing traceability checks in docs-as-code and without changing authoring or dashboards:RST authoring and sphinx-needs dashboards (
needflow,needtable, …) are untouched — LOBSTER only sits downstream ofneeds.json.Relationship to eclipse-score/score#3097
score#3097 (DR-009-Infra) is a proposed, still-skeletal decision record (its "Options Considered / Evaluation / Decision" sections are empty). It proposes a different route: extend
dependable_elementto read.rst, convert needs to TRLC on the fly, then TRLC -> LOBSTER. It does not contain aneeds.json -> .lobsterconverter. This PR implements the directneeds.json -> .lobsterpath as an alternative that keeps everything Apache-side until the LOBSTER CLI boundary and does not require routing requirements through TRLC.How it works
needs.json.tag(<namespace> <id>),location(file ref fromdocname/lineno),name,refs,just_*,framework=sphinx-needs,kind=<need type>,text,status.satisfieslinks (and any configurable--up-links) become LOBSTERrefs, preserving the process-requirement <-> tool-requirement relationship authored in RST as a LOBSTER up-trace.Model the two sides as separate levels in
lobster.conf:Verified end-to-end with the real LOBSTER CLI: a
tool_req__x :satisfies:twogd_req__*producesref_upon the tool req andref_downon the process reqs, andlobster-ci-reportpasses.Licensing
LOBSTER is AGPLv3. This tool is stdlib-only and never imports LOBSTER — it writes the documented JSON schema and is consumed by the LOBSTER CLI as an external process, keeping the Apache-2.0 code at arm's length. (Making LOBSTER an enforcing CI dependency still needs an Eclipse/legal review; this PR does not add a CI gate.)
🚨 Impact Analysis
New standalone CLI + Bazel target; no changes to the docs build, metamodel, or existing extensions. Draft — opened for discussion of the approach vs. score#3097.
✅ Checklist