Module verification report: work product table never matches documents for components titled "<module>::<component>"
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
阅读第169行附近的 src/needs_templates/module_verification_report.need,以及第343行附近 src/extensions/score_sphinx_needs_templates/__init__.py 中的 _WorkproductRows,以确认组件 slug 如何与文档 ID 匹配。检查第219行附近 platform_verification_report.need 中相同的 slug 模式。根据需要更新组件和功能的匹配,然后验证 persistency::kvs 的五个工作产品行能否找到对应文档。
由索引模型根据 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_tofrom 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 小时
- 30 天内合并 PR
- 47
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-score/docs-as-code 的其他 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 82/100
eclipse-score/docs-as-code#1031 ·
维护者通常 1 天内回复
-
intentionally-limited
难度 1/5 1 小时以内 新手友好度 88/100
eclipse-score/docs-as-code#1019 ·
维护者通常 1 天内回复
-
Graph-check unit tests fail under direct pytest because logger fixtures assume Bazel runfiles可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
eclipse-score/docs-as-code#999 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
eclipse-score/docs-as-code#920 · 2 条评论 ·
维护者通常 1 天内回复
-
Add project name to headline ...可能重新可做 关联的 PR 已关闭且未合并。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-score/docs-as-code#613 · 1 条评论 ·
维护者通常 1 天内回复
查看 eclipse-score/docs-as-code 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
aws-samples/sample-per-model-bedrock#795 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
Pretalx reports older version to be the latest release than what is actually installed and available未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
micropython/micropython#19906 ·
维护者通常 1 天内回复