Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ jobs:
docs:
secrets: inherit
uses: ./.github/workflows/docs.yml
quality_pack_comment:
secrets: inherit
permissions:
contents: read
pull-requests: write
Comment thread
lurtz marked this conversation as resolved.
Outdated
uses: ./.github/workflows/quality_pack_comment.yml
static-code-analysis:
secrets: inherit
uses: ./.github/workflows/static-code-analysis.yml
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/quality_pack_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# *******************************************************************************
# 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
# *******************************************************************************

# Builds the docs, runs the upstream //:traceability_gate against the resulting
# _build/metrics.json, and posts (or edits) a sticky PR comment with the gate
# output and pass/fail status.
#
# The comment step is best-effort: PRs from forks get a read-only GITHUB_TOKEN
# and the sticky-comment action will fail with 403 — marked continue-on-error
# so those PRs still surface the numbers via the job log and artifact.

name: Quality pack coverage comment

on:
workflow_call:

jobs:
quality-pack-comment:
runs-on: ubuntu-24.04
steps:
- uses: eclipse-score/more-disk-space@v1
- name: Checkout repository
uses: actions/checkout@v7
- name: Create Bazel output base directory
run: |
sudo mkdir -p /mnt/.bazel
sudo chown -R $USER:$USER /mnt/.bazel
- name: Create config indicator file
run: echo "host" > .bazel_config
- name: Setup Bazel
uses: eclipse-score/cicd-actions/setup-bazel-cache@212bbf86267e9381da9d2daf962d12f6feafbc90 # v0.0.2
with:
unique-cache-name: ${{ github.job }}
- name: Allow linux-sandbox
uses: eclipse-score/cicd-actions/unblock-user-namespace-for-linux-sandbox@212bbf86267e9381da9d2daf962d12f6feafbc90 # v0.0.2
- name: Build unit + component tests (needed for test links)
run: bazel test //:unit_tests //:component_tests
- name: Build docs
run: bazel run //:docs
# Thresholds default to 0 while comp_req coverage is being (re-)built up
# against the SOME/IP protocol spec. Raise the --min-* flags as
# links land, so the gate never regresses without a follow-up ticket.
- name: Run traceability gate
id: gate
continue-on-error: true
run: |
mkdir -p .llm_tmp
Comment thread
lurtz marked this conversation as resolved.
Outdated
# --need-type=comp_req scopes the gate to component requirements;
# feat_req / stkh_req live upstream in eclipse-score/score and would
# otherwise pull the numbers to zero and flap the gate.
bazel run //:traceability_gate -- \
--metrics-json "$PWD/_build/metrics.json" \
--need-type=comp_req \
> .llm_tmp/gate.txt
- name: Render sticky comment body
run: |
if [ "${{ steps.gate.outcome }}" = "success" ]; then
status="**PASS**"
else
status="**FAIL**"
fi
{
echo '<!-- quality-pack-coverage -->'
echo "### Quality pack traceability — gate: $status"
echo
echo '```text'
cat .llm_tmp/gate.txt
echo '```'
echo
echo "<sub>Produced by \`//:traceability_gate\` against \`_build/metrics.json\`.</sub>"
} > .llm_tmp/comment.md
cat .llm_tmp/comment.md
- name: Upload metrics + gate output
if: always()
uses: actions/upload-artifact@v7
with:
name: quality-pack-metrics
path: |
_build/metrics.json
.llm_tmp/gate.txt
.llm_tmp/comment.md
if-no-files-found: warn
retention-days: 14
- name: Post sticky PR comment
if: github.event_name == 'pull_request'
continue-on-error: true
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1
Comment thread
lurtz marked this conversation as resolved.
Outdated
with:
header: quality-pack-coverage
path: .llm_tmp/comment.md
Comment thread
lurtz marked this conversation as resolved.
Outdated
56 changes: 54 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,70 @@ use_format_targets(
# Documentation
# ==============================================================================

# ==============================================================================
# Quality-pack aggregate test suites
# ==============================================================================
# Unit tests (tagged `unit`). A test_suite in a top-level BUILD file cannot use
# a package wildcard like `//score/...` in its `tests` attribute, so unit tests
# are aggregated by explicit label. Run with:
# bazel test //:unit_tests
test_suite(
name = "unit_tests",
tests = [
"//score/serializer:null_serializer_test",
"//score/socom/test/unit:socom_test",
],
visibility = ["//visibility:public"],
)

# Component-level tests (integration / stress, tagged `component`). Run with:
# bazel test //:component_tests
test_suite(
name = "component_tests",
tests = [
"//score/gateway_ipc_binding/test:gateway_ipc_binding_test",
"//score/socom/test/stress:socom_stress_test",
],
visibility = ["//visibility:public"],
)

docs(
bundles = [
{
"bundle": "//score/socom/docs:docs_bundle",
"mount_at": "socom",
"bundle": "//score/config/docs:docs_bundle",
"mount_at": "config",
"attach_to": "components",
},
{
"bundle": "//score/gateway_ipc_binding/docs:docs_bundle",
"mount_at": "gateway_ipc_binding",
"attach_to": "components",
},
{
"bundle": "//score/gatewayd/docs:docs_bundle",
"mount_at": "gatewayd",
"attach_to": "components",
},
{
"bundle": "//score/serializer/docs:docs_bundle",
"mount_at": "serializer",
"attach_to": "components",
},
{
"bundle": "//score/socom/docs:docs_bundle",
"mount_at": "socom",
"attach_to": "components",
},
{
"bundle": "//score/someip/docs:docs_bundle",
"mount_at": "someip",
"attach_to": "components",
},
{
"bundle": "//score/someipd/docs:docs_bundle",
"mount_at": "someipd",
"attach_to": "components",
},
],
source_dir = "docs",
)
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,34 @@ bazel run @score_tooling//coverage:generate_coverage_html

The HTML report is stored at `coverage_linux/index.html`. You can open it in a web browser to view the coverage results.

## Quality pack

Requirements traceability is produced by the documentation build. Run the tests
first: the docs build reads `bazel-testlogs` to link each requirement to the
tests that verify it.

```sh
bazel test //:unit_tests //:component_tests
bazel run //:docs
```

This generates:

- `_build/index.html` — documentation, showing the source-code and test
links on each requirement
- `_build/needs.json` — the requirements model
- `_build/metrics.json` — traceability metrics

To print the traceability summary on the command line:

```sh
bazel run //:traceability_gate -- --metrics-json "$PWD/_build/metrics.json"
```

CI runs the same gate on every pull request with thresholds attached, and
posts the summary as a sticky comment — see
`.github/workflows/quality_pack_comment.yml`.

### Start the daemons

Start the daemons in this order:
Expand Down
22 changes: 22 additions & 0 deletions score/config/docs/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# *******************************************************************************
# 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
# *******************************************************************************

load("@score_docs_as_code//:docs.bzl", "docs_bundle")

# Docs bundle for this component. Kept in its own package so the parent
# BUILD does not need to load @score_docs_as_code.
docs_bundle(
name = "docs_bundle",
source_dir = "",
visibility = ["//visibility:public"],
)
31 changes: 31 additions & 0 deletions score/config/docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
..
# *******************************************************************************
# 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
# *******************************************************************************

.. _config:

Config
######

.. comp:: Config
:id: comp__config
:security: NO
:safety: QM
:status: valid
:version: 1
:belongs_to: feat__someip_gateway

Abstract
========

Provides the FlatBuffers schema (mw_someip_config.fbs) and JSON schema used to define and validate gateway configuration.
12 changes: 11 additions & 1 deletion score/gateway_ipc_binding/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

.. _gateway_ipc_binding:

Gateway IPC Binding
===================
###################

.. comp:: Gateway IPC Binding
:id: comp__gateway_ipc_binding
:security: NO
:safety: QM
:status: valid
:version: 1
:belongs_to: feat__someip_gateway

Gateway IPC Binding bridges SOCom service discovery and event transport across a local IPC link.
It combines:
Expand Down
1 change: 1 addition & 0 deletions score/gateway_ipc_binding/test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ cc_test(
},
features = COMPILER_WARNING_FEATURES,
linkstatic = True,
tags = ["component"],
visibility = ["//tests/integration_test:__pkg__"],
deps = [
"//score/gateway_ipc_binding",
Expand Down
22 changes: 22 additions & 0 deletions score/gatewayd/docs/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# *******************************************************************************
# 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
# *******************************************************************************

load("@score_docs_as_code//:docs.bzl", "docs_bundle")

# Docs bundle for this component. Kept in its own package so the parent
# BUILD does not need to load @score_docs_as_code.
docs_bundle(
name = "docs_bundle",
source_dir = "",
visibility = ["//visibility:public"],
)
23 changes: 23 additions & 0 deletions score/gatewayd/docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
..
# *******************************************************************************
# 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
# *******************************************************************************

.. _gatewayd:

gatewayd
########

Abstract
========

The gateway daemon. Bridges local IPC service instances with remote SOME/IP service instances across the ASIL boundary, handling service offers, requests, event subscriptions, and payload transfer.
1 change: 1 addition & 0 deletions score/serializer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ cc_test(
size = "small",
srcs = ["null_serializer_test.cpp"],
linkstatic = True,
tags = ["unit"],
visibility = ["//tests/integration_test:__pkg__"],
deps = [
":null_serializer_impl",
Expand Down
22 changes: 22 additions & 0 deletions score/serializer/docs/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# *******************************************************************************
# 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
# *******************************************************************************

load("@score_docs_as_code//:docs.bzl", "docs_bundle")

# Docs bundle for this component. Kept in its own package so the parent
# BUILD does not need to load @score_docs_as_code.
docs_bundle(
name = "docs_bundle",
source_dir = "",
visibility = ["//visibility:public"],
)
Loading
Loading