Skip to content

feat(metamodel): add optional document.belongs_to links - #942

Draft
AlexanderLanin wants to merge 2 commits into
mainfrom
steward/eclipse-score-docs-as-code/work-8f649e008a76
Draft

AlexanderLanin wants to merge 2 commits into
mainfrom
steward/eclipse-score-docs-as-code/work-8f649e008a76

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Why

Generic documents need a way to identify the module, component, or feature they document, as agreed in the meeting decision. Documents without such an owner can continue to omit the link.

Add optional document.belongs_to links restricted to mod, comp, and feat, and document the allowed targets and omission semantics. Regression coverage accepts all three target types, rejects a work-product target, and retains the existing document without an ownership link.

Closes #940

AI analyzed #940 and selected it for automated implementation. This PR is the result of that implementation.

This comment was marked as outdated.

@a-zw

a-zw commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Decision in the process meeting was to go for mod_ver_report.

Judging from the requirements, we don't need belongs_to for documents, so this PR is obsolete?

@AlexanderLanin

Copy link
Copy Markdown
Member Author

Still required AFAIK, but I do not have any kind of overview.

antonkri added a commit that referenced this pull request Oct 13, 2026
…eports"

This reverts commit d2ed665 (#941) and so restores #933.

#941 reverted the change because the process plan was read as mandating
the generic `document` type (#940). That reading has since been
clarified: the dedicated `mod_ver_report` type is the intended model, so
the original change applies again.

Superseding #942, which added `belongs_to` to `document` instead. Note
that #942 only extended the metamodel; nothing read the new link, so the
report still derived its module by parsing the report id.

Two changes on top of the original #933:

- Version scoping reuses the existing optional `applies_to_module_version`
  attribute of `mod_ver_report` instead of introducing a second,
  near-identical `report_version` attribute. `document.report_version`
  stays as it is, it still scopes the platform verification report.
- The file-based test for `tool_req__docs_verification_report_need` now
  fully verifies the requirement, with one case per statement, instead of
  partially verifying it.
antonkri added a commit that referenced this pull request Oct 13, 2026
…eports"

This reverts commit d2ed665 (#941) and so restores #933.

the generic `document` type (#940). That reading has since been
clarified: the dedicated `mod_ver_report` type is the intended model, so
the original change applies again.

Superseding #942, which added `belongs_to` to `document` instead. Note
that #942 only extended the metamodel; nothing read the new link, so the
report still derived its module by parsing the report id.

Two changes on top of the original #933:

- Version scoping reuses the existing optional `applies_to_module_version`
  attribute of `mod_ver_report` instead of introducing a second,
  near-identical `report_version` attribute. `document.report_version`
  stays as it is, it still scopes the platform verification report.
- The file-based test for `tool_req__docs_verification_report_need` now
  fully verifies the requirement, with one case per statement, instead of
  partially verifying it.
a-zw pushed a commit that referenced this pull request Oct 13, 2026
)

This reverts commit d2ed665 (#941) and so restores #933.

the generic `document` type (#940). That reading has since been
clarified: the dedicated `mod_ver_report` type is the intended model, so
the original change applies again.

Superseding #942, which added `belongs_to` to `document` instead. Note
that #942 only extended the metamodel; nothing read the new link, so the
report still derived its module by parsing the report id.

Two changes on top of the original #933:

- Version scoping reuses the existing optional `applies_to_module_version`
  attribute of `mod_ver_report` instead of introducing a second,
  near-identical `report_version` attribute. `document.report_version`
  stays as it is, it still scopes the platform verification report.
- The file-based test for `tool_req__docs_verification_report_need` now
  fully verifies the requirement, with one case per statement, instead of
  partially verifying it.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 14:27
AlexanderLanin added a commit that referenced this pull request Oct 16, 2026

This comment was marked as outdated.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-942: https://eclipse-score.github.io/docs-as-code/pr-942/

Comment thread src/extensions/docs/metamodel.md Outdated
Comment on lines +77 to +79
Generic Documents (`document`) may optionally link with `belongs_to` to the
Module (`mod`), Component (`comp`), or Feature (`feat`) they document. The link
can be omitted when the document has no such owner.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

does not belong here. This document only described the schema, not a concrete metamodel

AlexanderLanin added a commit that referenced this pull request Oct 16, 2026
Copilot AI balanced review requested due to automatic review settings October 16, 2026 20:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The scoped schema change, regression coverage, documentation, and snapshot are consistent, with no unresolved findings.

0 open findings

🧠 Review effort: Balanced

@AlexanderLanin
AlexanderLanin force-pushed the steward/eclipse-score-docs-as-code/work-8f649e008a76 branch from b4c389e to 71ddebd Compare November 5, 2026 14:07
Copilot AI balanced review requested due to automatic review settings November 5, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the optional document ownership-link changes.

No open issues 🎉

Review effort: Balanced


.. test_metadata:: Document and TVR Attribute Validation
:id: test_metadata__doc_tool_attrs
:fully_verifies_list: tool_req__docs_doc_generic_mandatory,tool_req__docs_tvr_safety,tool_req__docs_tvr_security,tool_req__docs_tvr_status,tool_req__docs_tvr_confidence_level

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.

Extend tool_req__docs_doc_generic_mandatory accordingly. I assume this will become mandatory eventually.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

its not mandatory right now. we can create a new _optional requirement I guess

Comment thread docs/how-to/write_docs.rst Resolved
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.

feat(metamodel): add document.belongs_to

3 participants