Module verification report: work product table never matches documents for components titled "<module>::<component>"

オープン 初心者向け
#1,029 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
documentation

調査の方向性

src/needs_templates/module_verification_report.needの169行目付近と、src/extensions/score_sphinx_needs_templates/__init__.pyの343行目付近にある_WorkproductRowsを読み、コンポーネントのスラッグがドキュメントIDとどのように照合されるか確認してください。platform_verification_report.needの219行目付近で同じスラッグパターンを確認してください。必要に応じてコンポーネントと機能の照合を更新し、persistency::kvsの5つの作業成果物の行がそれぞれのドキュメントを見つけられることを検証してください。

索引モデルが issue の本文から書いたものです。

説明

Description

In the module verification report, the table "Verification & Safety Analysis Documents" shows "No needs passed the filters" for every work product of a component, even though matching documents exist.

Example: https://eclipse-score.github.io/persistency/main/verification_report/module_verification_report.html (component persistency::kvs). All five rows are empty: requirements, architecture and implementation inspection, DFA and FMEA.

Root cause

src/needs_templates/module_verification_report.need (line 169) builds the slug from the component title:

{% set component_slug_norm = component_title|replace("_", "")|replace(" ", "")|lower %}

_WorkproductRows in src/extensions/score_sphinx_needs_templates/__init__.py (line 343) then filters:

type == "document" and "{slug_norm}" in id.replace("_", "").lower() and "{wp_id}" in realizes

The naming convention gives component titles the form <module>::<component>, so the slug becomes persistency::kvs. That string can never be part of a document id: doc__kvs_dfa is normalised to dockvsdfa. The type and realizes parts of the filter would match:

Document realizes
doc__kvs_req_inspection wp__requirements_inspect[version==1]
doc__kvs_arc_inspection wp__sw_arch_verification[version==1]
doc__kvs_impl_inspection wp__sw_implementation_inspection[version==1]
doc__kvs_dfa wp__sw_component_dfa[version==1]
doc__kvs_fmea wp__sw_component_fmea[version==1]

Seen with score_docs_as_code 8.6.0. The code on main is the same.

Problem notifications

No response

Analysis results

No response

Solution

Proposed fix

  • Short term: build the slug from the part after the last ::, e.g. component_title|split("::")|last|replace("_", "")|replace(" ", "")|lower.
  • Long term: stop matching documents through substrings of their ids, which is fragile and can produce false positives. Use an explicit link instead, e.g. belongs_to from the document to the component, or the docname or directory of the component.

The same pattern is used for features in platform_verification_report.need (line 219) and should be checked too.

Error Occurrence Rate

None

How to reproduce

see above

Supporting Information

No response

Classification

Minor

First Affected Release

0.8

Last Affected Release

0.9

Expected Fixed Release

1.0

Category
  • Safety Relevant
  • Security Relevant
主要言語
Python
スター
11
フォーク
39
平均マージ
1日 12時間
マージ済み PR(30日)
47

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-score/docs-as-code のほかの issue

eclipse-score/docs-as-code の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。