feat: module verification report / complex templates - #763
Draft
AlexanderLanin wants to merge 6 commits into
Draft
feat: module verification report / complex templates#763AlexanderLanin wants to merge 6 commits into
AlexanderLanin wants to merge 6 commits into
Conversation
Contributor
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
Contributor
|
Documentation preview for this pull request is available at: |
AlexanderLanin
marked this pull request as ready for review
August 27, 2026 20:42
AlexanderLanin
requested review from
MaximilianSoerenPollak,
a-zw,
dcalavrezo-qorix and
nradakovic
as code owners
August 27, 2026 20:42
This was referenced Aug 27, 2026
There was a problem hiding this comment.
Pull request overview
This PR adds infrastructure for complex Sphinx-Needs .need templates (including graph traversal and a post-merge re-render pass) and introduces an initial “tiny” module verification report template that generates real Sphinx sections for navigation/ToC.
Changes:
- Added a new
score_sphinx_needs_templatesSphinx extension that (a) registers the shared templates folder, (b) exposes alinked_needs()helper, and (c) re-reads pages with markedpost_templates after parallel Needs collection is merged. - Added a complex
mod_ver_report_tiny.needtemplate that builds feature/component sections and summary tables/pies from the Need graph. - Wired the new extension into the Sphinx bundle and added a new
auto_mod_ver_reportneed type.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/needs_templates/mod_ver_report_tiny.need | New complex post-template for module verification reports with feature/component sections and statistics. |
| src/extensions/score_sphinx_needs_templates/README.md | Documents the new extension behavior and the linked_needs helper. |
| src/extensions/score_sphinx_needs_templates/BUILD | Bazel target for the new extension, including templates as runtime data. |
| src/extensions/score_sphinx_needs_templates/init.py | Implements template folder discovery, linked_needs, and the marked-page second read. |
| src/extensions/score_sphinx_bundle/BUILD | Drops direct template data dependency and depends on the new templates extension instead. |
| src/extensions/score_sphinx_bundle/init.py | Loads score_sphinx_needs_templates and removes bundle-local template folder config. |
| src/extensions/score_metamodel/metamodel.yaml | Adds auto_mod_ver_report need type. |
| src/BUILD | Exposes the new extension’s sources at the top-level filegroup. |
Suppressed comments (1)
src/needs_templates/mod_ver_report_tiny.need:259
- Same as above: these
needpiefilters depend onlocals()/len(), which may not be available in Sphinx-Needs filter expressions. Using direct boolean checks on the backlink fields is simpler and avoids evaluation errors.
type == "comp_req" and "{{ component_id }}" in satisfied_by and ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0)
type == "comp_req" and "{{ component_id }}" in satisfied_by and ("partially_verifies_back" in locals() and len(partially_verifies_back) > 0) and not ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0)
type == "comp_req" and "{{ component_id }}" in satisfied_by and not ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0) and not ("partially_verifies_back" in locals() and len(partially_verifies_back) > 0)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+131
to
+133
| type == "feat_req" and "{{ feature_id }}" in satisfied_by and ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0) | ||
| type == "feat_req" and "{{ feature_id }}" in satisfied_by and ("partially_verifies_back" in locals() and len(partially_verifies_back) > 0) and not ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0) | ||
| type == "feat_req" and "{{ feature_id }}" in satisfied_by and not ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0) and not ("partially_verifies_back" in locals() and len(partially_verifies_back) > 0) |
|
|
||
| pages_to_rerender = sorted(complex_post_template_docs) | ||
| for docname in pages_to_rerender: | ||
| app.events.emit("env-purge-doc", env, docname) |
AlexanderLanin
marked this pull request as draft
August 27, 2026 21:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.