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

Aberta Para iniciantes
#1,029 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
78/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
python
Domínio
documentation

Direção de pesquisa

Leia src/needs_templates/module_verification_report.need perto da linha 169 e _WorkproductRows em src/extensions/score_sphinx_needs_templates/__init__.py perto da linha 343 para confirmar como o slug do componente é comparado aos IDs dos documentos. Confira o mesmo padrão de slug em platform_verification_report.need perto da linha 219. Atualize a correspondência de componentes e funcionalidades conforme necessário e, em seguida, verifique se as cinco linhas de produtos de trabalho de persistency::kvs encontram seus documentos.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Python
Estrelas
11
Forks
39
Merge médio
1d 13h
PRs com merge (30d)
46

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

  • Sem Dockerfile nem arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de eclipse-score/docs-as-code

Todas as issues de eclipse-score/docs-as-code

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.