Skip to content

feat!(metamodel): update dec_rec type with complete mandatory attributes - #943

Open
FScholPer wants to merge 13 commits into
mainfrom
align_dr_to_template
Open

FScholPer wants to merge 13 commits into
mainfrom
align_dr_to_template

Conversation

@FScholPer

@FScholPer FScholPer commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor
  • Add mandatory 'id' attribute with pattern validation
  • Add mandatory 'version' attribute
  • Make 'tracking' mandatory with eclipse-score/score issue URL pattern
  • Make 'consequences' mandatory
  • Constrain 'affects' link to requirement types only
  • Update tool_req__docs_dec_rec_type to version 2
  • Update test file with new mandatory attributes

📌 Description

Changes mandatory fields in drs to track their consequences

🚨 Impact Analysis

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

Frank Scholter Peres frank.scholter_peres@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information

- Add mandatory 'id' attribute with pattern validation
- Add mandatory 'version' attribute
- Make 'tracking' mandatory with eclipse-score/score issue URL pattern
- Make 'consequences' mandatory
- Constrain 'affects' link to requirement types only
- Update tool_req__docs_dec_rec_type to version 2
- Update test file with new mandatory attributes
The version option is already defined in global_base_opts.mandatory_options,
causing an overlap error. Remove the duplicate from dec_rec directive.
FScholPer added a commit that referenced this pull request Oct 13, 2026
The metamodel changes for valid_inspected status and graph_checks
are already included in PR #943. Removing them from this branch.
FScholPer added a commit that referenced this pull request Oct 13, 2026
These changes (valid_inspected status, graph_checks updates, etc.)
are already in PR #943 (align_dr_to_template). Keeping only
schema_export specific changes in this branch.
dec_rec:
title: Decision Record
mandatory_options:
id: ^dec_rec__(Platform|Feature|Component|arch|proc|strat|infra|int)__[0-9a-zA-Z_-]+$

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.

This is a breaking change (e.g. dec_rec__platform__feature_delivery) and we try to avoid this by fixing it first in the other repos for a smooth migration.

Same with the other mandatory options.

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.

yeah this is only for the score repo I guess. I will prepare a first pr to introduce the new mandatory things

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.

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.

It is not just the platform repo. The downstream checks show that it affects multiple repos.

@a-zw a-zw changed the title feat(metamodel): update dec_rec type with complete mandatory attributes feat!(metamodel): update dec_rec type with complete mandatory attributes Oct 13, 2026
@FScholPer

Copy link
Copy Markdown
Contributor Author

@a-zw please check again with the eclipse-score/score#3349 it should be fine

* ``version`` (mandatory)
* ``consequences`` (mandatory, non-empty)

A Decision Record shall be able to link to other needs via the optional ``affects`` link.

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.

Suggested change
A Decision Record shall be able to link to other needs via the optional ``affects`` link.
A Decision Record shall be able to link to requirements via the optional ``affects`` link.

The PR description says "Constrain 'affects' link to requirement types only". If that is true, then this requirement should be adapted accordingly.

Likewise the implementation in metamodel.yaml. Currently, it allows "ANY" and not just requirements.

Comment on lines +42 to +45
GITHUB_TRACKING_LINK_REGEX = (
r"(?P<url>https://github\.com/eclipse-score/"
r"(?P<repo>[^/]+)/(?:issues|pull)/(?P<number>\d+))"
)

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.

Suggested change
GITHUB_TRACKING_LINK_REGEX = (
r"(?P<url>https://github\.com/eclipse-score/"
r"(?P<repo>[^/]+)/(?:issues|pull)/(?P<number>\d+))"
)
GITHUB_TRACKING_LINK_REGEX = (
r"(?P<url>https://github\.com/[^/]+/"
r"(?P<repo>[^/]+)/(?:issues|pull)/(?P<number>\d+))"
)

Keep it as relaxed as before. Checking the URL for validity happens via the regex in metamodel.yaml and we must not be more restrictive here.

Currently, the problem is that this affects mitigation_issue and probably not intentionally.

.. test_metadata:: Test Decision Record Type
:id: test_metadata__dec_rec
:partially_verifies_list: tool_req__docs_dec_rec_type
:fully_verifies_list: tool_req__docs_dec_rec_type[version==2]

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.

Also verify that a wrong id pattern results in a warning.

dec_rec:
title: Decision Record
mandatory_options:
id: ^dec_rec__(Platform|Feature|Component|arch|proc|strat|infra|int)__[0-9a-zA-Z_-]+$

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.

It is not just the platform repo. The downstream checks show that it affects multiple repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants