Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/internals/requirements/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,25 @@ Testing
* allow links to covered artifacts via ``covers``
* allow links to backing documents or work products via ``evidence`` and ``realizes``

.. tool_req:: Support machine-readable inspection records
:id: tool_req__docs_inspection_record_need
:tags: Verification Evidence
:implemented: YES
:version: 1
:satisfies: gd_req__verification_checks
:parent_covered: NO: process wording defines verification checks, while the tool models a first-class inspection record artifact.

Docs-as-Code shall support a machine-readable inspection record need type.

The need type shall:

* use ``mod_insp`` as directive type
* classify the inspection by ``inspection_type`` and ``inspection_state``
* record the checklist reference and reviewer list via ``checklist_ref`` and ``reviewers``
* link the inspection to the verified module via ``belongs_to``
* link the inspected artifacts via ``inspects``
* allow links to backing evidence via ``evidence``

🧪 Tool Verification Reports
############################

Expand Down
35 changes: 35 additions & 0 deletions src/extensions/score_metamodel/metamodel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,38 @@ needs_types:
- verification_report
parts: 3

# Formal inspection evidence modeled as a first-class artifact.
# req-Id: tool_req__docs_inspection_record_need
mod_insp:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not fully understand how this will be used. My assumption based on the example in eclipse-score/persistency#330 is that it is a part of the verification report but has one instance per each inspection evidence. E.g. in baselibs this would be about ten records for requirements inspections (one per avery component). Comments given based on this assumption.

title: Module Inspection Record
prefix: mod_insp__
mandatory_options:
# req-Id: tool_req__docs_common_attr_safety
safety: ^(QM|ASIL_B)$
# req-Id: tool_req__docs_common_attr_security
security: ^(YES|NO)$
# req-Id: tool_req__docs_common_attr_status
status: ^(valid|invalid)$
# req-Id: tool_req__docs_inspection_record_need
inspection_type: ^(requirements|architecture|implementation)$
inspection_state: ^(planned|in_review|rework_required|approved)$

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state "planned" is the same as having a checklist document in "draft" state, "in_review" would be as long as the PR to fill out the checklist is in draft/open, "rework_required" would mean checklist has a "NO", "approved" means all checkpoints are "YES". Expect this is filled out automatically?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say this is manual when human steps in means until rework_required. So what to change then?

checklist_ref: ^.*$

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in your example this links to a template (gd_temp), but why have this attribute? information can be derived already from "inspection_type"

@FScholPer FScholPer Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept checklist_ref for now so the concrete checklist instance can be referenced explicitly, but happy to drop it if you prefer deriving it from inspection_type. I think also for versioning it would make sense

reviewers: ^.*$

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what importance has this for the verification report (same for moderator and approver below)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept reviewers/moderator/approver for now as they capture who performed the inspection; open to removing if they are out of scope for the report.

optional_options:
moderator: ^.*$
approver: ^.*$
mandatory_links:
# req-Id: tool_req__docs_inspection_record_need
belongs_to: mod
inspects: ANY
optional_links:
# req-Id: tool_req__docs_inspection_record_need
evidence: ANY
approved_by: role
supported_by: role
tags:
- inspection
parts: 3

# https://eclipse-score.github.io/process_description/main/permalink.html?id=gd_temp__change_decision_record
dec_rec:
Expand Down Expand Up @@ -1109,6 +1141,9 @@ needs_extra_links:
incoming: evidence_for
outgoing: evidence

inspects:
incoming: inspected_by
outgoing: inspects

##############################################################
# Graph Checks
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
..
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
#CHECK: check_options


.. Base architecture and requirement objects used by inspection record tests

.. feat:: Inspection Feature
:id: feat__inspection_feature
:security: YES
:safety: ASIL_B
:status: valid

.. comp:: Inspection Component
:id: comp__inspection_component
:security: YES
:safety: ASIL_B
:status: valid
:belongs_to: feat__inspection_feature

.. mod:: Inspection Module
:id: mod__inspection_module
:security: YES
:safety: ASIL_B
:status: valid
:includes: comp__inspection_component

.. comp_req:: Inspection Requirement
:id: comp_req__inspection__sample
:reqtype: Functional
:security: YES
:safety: ASIL_B
:status: valid

Requirement text for inspection record tests.


.. Valid machine-readable inspection record need
#EXPECT-NOT[+2]: does not follow pattern

.. mod_insp:: Inspection Record Valid
:id: mod_insp__inspection__valid
:safety: ASIL_B
:security: YES
:status: valid
:inspection_type: requirements
:inspection_state: approved
:checklist_ref: gd_chklst__req_inspection
:reviewers: reviewer_a,reviewer_b
:moderator: moderator_a
:approver: approver_a
:belongs_to: mod__inspection_module
:inspects: comp_req__inspection__sample


.. Invalid inspection_state value in module inspection record
#EXPECT[+2]: mod_insp__inspection__bad_state.inspection_state (approved_late): does not follow pattern

.. mod_insp:: Inspection Record Invalid State
:id: mod_insp__inspection__bad_state
:safety: ASIL_B
:security: YES
:status: invalid
:inspection_type: architecture
:inspection_state: approved_late
:checklist_ref: gd_chklst__arch_inspection_checklist
:reviewers: reviewer_a
:belongs_to: mod__inspection_module
:inspects: comp_req__inspection__sample
Loading