Skip to content

Conversation

@guejan
Copy link
Contributor

@guejan guejan commented Nov 6, 2025

📌 Description

  • Remove all PROCESS_ prefixes from requirements and related files.
  • Eliminate id_prefix from external needs configuration and code.
  • Update tests and extensions to work without prefix logic.
  • Make id_prefix handling optional in score_source_code_linker.

Why:

S-CORE requires bi-directional traceability for compliance (see gd_req__req_traceability).
Previously, modules used prefixes for external needs, but this breaks integration when building a single, unified documentation site ("mega-build").

This change implements "Option S: Single documentation build" from decision record DR-004-Infra: Bi-directional traceability in docs (https://eclipse-score.github.io/score/main/design_decisions/DR-004-infra.html).

Option S was chosen because it enables quick integration and unified navigation, even though it results in longer build times and requires dropping prefixes.
Since our id schemas already provide namespacing, removing prefixes does not risk id clashes. This refactoring aligns with the decision to prioritize integration speed and documentation consistency for releases.

🚨 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

- Remove all PROCESS_ prefixes from requirements and related files.
- Eliminate id_prefix from external needs configuration and code.
- Update tests and extensions to work without prefix logic.
- Make id_prefix handling optional in score_source_code_linker.

Why:
S-CORE requires bi-directional traceability for compliance
(see gd_req__req_traceability).
Previously, modules used prefixes for external needs, but this breaks
integration when building a single, unified documentation site
("mega-build").

This change implements "Option S: Single documentation build" from
decision record DR-004-Infra: Bi-directional traceability in docs
(https://eclipse-score.github.io/score/main/design_decisions/DR-004-infra.html).

Option S was chosen because it enables quick integration and unified
navigation, even though it results in longer build times and requires
dropping prefixes.
Since our id schemas already provide namespacing, removing prefixes
does not risk id clashes. This refactoring aligns with the decision to
prioritize integration speed and documentation consistency for releases.
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: fae57bb3-5cdc-497c-be54-55f35bae731c
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: src
Analyzing: target //src:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //src:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //src:license-check (71 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (73 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (123 packages loaded, 2269 targets configured)

Analyzing: target //src:license-check (134 packages loaded, 2484 targets configured)

INFO: Analyzed target //src:license-check (137 packages loaded, 4500 targets configured).

INFO: Found 1 target...
Target //src:license.check.license_check up-to-date:
  bazel-bin/src/license.check.license_check
  bazel-bin/src/license.check.license_check.jar
INFO: Elapsed time: 14.819s, Critical Path: 0.69s
INFO: 13 processes: 3 disk cache hit, 9 internal, 1 processwrapper-sandbox.
INFO: Build completed successfully, 13 total actions
INFO: Running command line: bazel-bin/src/license.check.license_check src/formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@AlexanderLanin
Copy link
Member

@AlexanderLanin
Copy link
Member

I'm missing something... Why don't we get errors when building score documentation?

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

The created documentation from the pull request is available at: docu-html

Copy link
Member

@AlexanderLanin AlexanderLanin left a comment

Choose a reason for hiding this comment

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

This introduces a major change... although not reported by testing :/

assert isinstance(config.needs_external_needs, list) # pyright: ignore[reportUnknownMemberType]
config.needs_external_needs.append( # pyright: ignore[reportUnknownMemberType]
{
"id_prefix": needs_json_data["project_prefix"],
Copy link
Contributor

Choose a reason for hiding this comment

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

The trick for a backwards-compatible change would probably be to assign an id_prefix here unless some flag in conf.py is set to do otherwise. Then every repo has to set DISABLE_EXTERNAL_NEEDS_PREFIXES=True. Once everybody has done so, we can actually remove this line. Then everybody can remove the DISABLE_EXTERNAL_NEEDS_PREFIXES from their conf.py again.

That sounds like too much work considering that "everybody" is effectively only the score Platform repo.

# Making the prefixes uppercase here to match sphinx_needs,
# as it does this internally too.
assert isinstance(config.allowed_external_prefixes, list) # pyright: ignore[reportAny]
config.allowed_external_prefixes.append( # pyright: ignore[reportUnknownMemberType]
Copy link
Contributor

Choose a reason for hiding this comment

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

We can delete even more. Nobody in the whole score organization is actually doing anything with "allowed_external_prefixes" and it appears two more times in this repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the hint. I've now done another cleanup and removed the remaining unnecessary code as well.

Remove all remaining prefix configuration and logic that became
unnecessary code after removing the PROCESS_ prefixes from requirements.

Changes:
- Remove project_prefix from docs/conf.py
- Remove allowed_external_prefixes config value from score_metamodel
- Simplify find_need() by removing prefix parameter and logic
- Update tests to match new function signatures
- Remove prefix-related test cases from test_codelink.py
@AlexanderLanin
Copy link
Member

Random example:
image

@masc2023 @aschemmel-tech

I'll merge this now. If there are strong reservations, we can still revert it.

@AlexanderLanin
Copy link
Member

Another note: due to time constraints (and simply not being worth it), I'll make this into a major release.
We'll update some repos accordingly from infrastructure side.

@AlexanderLanin AlexanderLanin merged commit 37ba26d into eclipse-score:main Nov 7, 2025
13 checks passed
@AlexanderLanin AlexanderLanin deleted the dr-004-infra-remove-prefix branch November 7, 2025 17:05
@github-project-automation github-project-automation bot moved this from Draft to Done in Infrastructure Nov 7, 2025
@masc2023
Copy link
Contributor

masc2023 commented Nov 8, 2025

Random example: image

@masc2023 @aschemmel-tech

I'll merge this now. If there are strong reservations, we can still revert it.

Looks good, including source links already, I think for process description, there should be no impact, but we would need to update everything in score-repo for upgrading it.

guejan added a commit to etas-contrib/score_score that referenced this pull request Nov 10, 2025
Remove prefixes for mega-build (DR-004-Infra) and
align with docs-as-code 2.0.0 to enable single documentation
mega-build where all repositories can be built together without
prefix conflicts.

Changes:
- Remove project_prefix "S-CORE_" from docs/conf.py
- Remove PROCESS_ prefix from all external need references
- Fix incorrect need ID: wp__platform_sw_aou ->
  wp__requirements_sw_platform_aou

Rationale:
docs-as-code 2.0.0 removed module prefixes to support the
mega-build approach where documentation from all repositories
is built in a single Sphinx instance. Requirement IDs remain
globally unique through built-in namespacing,
eliminating the need for repository-specific prefixes.

The mega-build also improves validation: the incorrect reference
to wp__platform_sw_aou was only detected after removing
prefixes, demonstrating better error detection in the unified
build.

Related:
- eclipse-score/docs-as-code#293
- https://eclipse-score.github.io/score/main/design_decisions/DR-004-infra.html
FScholPer pushed a commit to eclipse-score/score that referenced this pull request Nov 11, 2025
Remove prefixes for mega-build (DR-004-Infra) and
align with docs-as-code 2.0.0 to enable single documentation
mega-build where all repositories can be built together without
prefix conflicts.

Changes:
- Remove project_prefix "S-CORE_" from docs/conf.py
- Remove PROCESS_ prefix from all external need references
- Fix incorrect need ID: wp__platform_sw_aou ->
  wp__requirements_sw_platform_aou

Rationale:
docs-as-code 2.0.0 removed module prefixes to support the
mega-build approach where documentation from all repositories
is built in a single Sphinx instance. Requirement IDs remain
globally unique through built-in namespacing,
eliminating the need for repository-specific prefixes.

The mega-build also improves validation: the incorrect reference
to wp__platform_sw_aou was only detected after removing
prefixes, demonstrating better error detection in the unified
build.

Related:
- eclipse-score/docs-as-code#293
- https://eclipse-score.github.io/score/main/design_decisions/DR-004-infra.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants