Repository navigation
Conversation
PR 2: Add debugfs-based overlay injection tooling for CI images. - inject_overlay.py: Python script that extracts partition, injects tar contents via debugfs -w, writes modified partition back - Handles directories, files, symlinks with proper permissions - Free space verification before injection - No loop mounts, no root privileges, no CAP_SYS_ADMIN required This enables offline image modification in CI containers without privileged modes or boot-to-deploy patterns.
- Fix symlink handling in inject_overlay.py with correct debugfs argument order - Handle file write collisions by removing existing destinations first - Replace invalid 'mkdir -p' with parent-first directory creation - Add debugfs error detection to prevent silent failures - Improve I/O performance with larger block size (1M instead of 1 byte) - Add proper test implementation for inject_overlay_test.py - Add platform constraints to linux_aarch64 test for compatibility - Format BUILD files with buildifier
Replaces local inject_overlay implementation with the reusable implementation from eclipse-score/rules_imagefs#33. Changes: - Add git_override for score_rules_imagefs pointing to PR #33 - Remove local images/common/overlay implementation - Update MODULE.bazel.lock The overlay injection tooling is now available as: @score_rules_imagefs//rules/linux:ext4_overlay.bzl This enables reuse across all eclipse-score projects and consolidates filesystem image tooling in the rules_imagefs repository. TODO: Remove git_override after rules_imagefs#33 is merged
This introduces the s-core Test Compatibility Kit (TCK) inspired by the Jakarta EE Platform TCK model. The TCK verifies SCORE distributions are compatible with main platform requirements. Phase 1 includes: - SBOM comparison check (required components, license policy, drift) - Self-contained runner (tck/bin/score-tck) - Golden SBOM reference data - Distribution config template (tck.config.example.toml) - Report generation (JSON + Markdown) The runner is designed to be bundled as a zipapp and attached to GitHub Releases for vendors to download and run against their distributions. Design doc: SCORE_TCK_PLAN.md
FScholPer
force-pushed
the
feat/tck-phase1-sbom-check
branch
from
October 28, 2026 15:06
da28d3a to
0797559
Compare
Replace the Python prototype with a Rust binary that: - Parses distribution config from TOML (simple string matching) - Compares SPDX SBOM against golden reference - Reports required components, license policy, and drift - Generates JSON + Markdown reports - Compiles to a static binary for distribution Also adds: - Bazel target //tck:score-tck for building the binary - GitHub workflow .github/workflows/build_tck.yml - Builds the binary on PR/push/release - Uploads as artifact on every build - Attaches to GitHub releases on tag
The workflow now creates a complete TCK bundle containing: - bin/score-tck (the binary) - reference/sbom.spdx.json (golden SBOM) - tck.config.example.toml (config template) - README.md (quick start guide) The bundle is uploaded as an artifact and attached to releases.
The TCK is now implemented in Rust. Remove the unused Python files: - tck/__init__.py - tck/bin/score-tck (Python version) - tck/checks/__init__.py - tck/checks/sbom_check.py - tck/extract_requirements.py
Add structured requirements.toml defining: - Required SBOM components (score_baselibs, communication, etc.) - Allowed licenses (Apache-2.0, MIT, BSD, etc.) - Forbidden components (placeholder) - Behavioral requirements mapped to PITs Refactor SBOM checker to be testable: - Extract SBOMChecker struct with public API - Add lib.rs for library exports - Support configurable allowed licenses and forbidden components
- Add version.rs: Platform version compatibility checking with semver comparison - Add runtime.rs: Runtime environment validation and test harness adapter concept (porting package) - Architecture check (x86_64-linux, aarch64-linux, etc.) - Toolchain detection (GCC/Clang) - Required library checks - TestHarnessAdapter trait for vendor-specific test execution - Showcase conformance test runner - Update config.rs: Add platform_version field to DistConfig - Update main.rs: Integrate version and runtime checks into run command - Update requirements.toml: Add version requirements section Inspired by Jakarta EE TCK porting package concept - vendors configure a test harness adapter that tells the TCK how to run tests against their distribution, ensuring the same runtime is used during testing.
- behavioral.toml: Points to real pytest tests in feature_integration_tests/ - Showcase tests: ComApiExample deployment and execution - Remote logging tests - Persistency tests: datatype support, reset, defaults, multiple KVS - api_signatures.toml: Required header definitions for API surface check - Maps headers to modules (score_baselibs, score_logging, etc.) - Defines forbidden internal headers The TCK test definitions reference existing tests rather than inventing new ones.
- Overview of check families (SBOM, Version, Runtime, Behavioral, API) - Quick start guide for building and running TCK - Distribution configuration example - Check details for each family - Directory structure documentation - Porting package concept explanation - CI integration details
- version.rs: Tests for semver comparison, exact/compatible policies, TOML parsing - config.rs: Tests for config loading, string extraction, file not found - report.rs: Tests for report creation, check aggregation, JSON/Markdown output - BUILD: Add rust_test target //tck:score-tck-tests All 16 tests pass.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical validation flaws allow incompatible distributions to be reported as conformant, while CI and packaging defects block reliable verification and release assembly.
18 open issues
Literal ${pwd} breaks AArch64 sysroot resolution · New Smoke test checks the wrong SBOM path and hides failures · New Runner file blocks creation of the bundle directory · New Released bundles omit the required policy file · New TOML comments are mishandled and configured values are lost · New Unsupported check selections silently produce success · New Compiler versions are not checked against minimums · New Missing golden SBOMs are replaced with empty baselines · New Substring OR bypasses SPDX license policy validation · New Required license violations are incorrectly reported as warnings · New Missing SPDX document structure is accepted as conformant · New Name-only package keys discard duplicate package entries · New SBOM policy sections are never loaded from requirements.toml · New Unknown version policies disable enforcement · New Invalid platform versions pass as required warnings · New Version parsing drops prerelease and invalid components · New Configured enabled checks are ignored · New Drift checks ignore version and checksum changes · New
What changed in this PR
Introduces the Phase 1 SCORE Test Compatibility Kit within reference integration, with a Rust runner for distribution checks and compatibility reports. Behavioral and API coverage remain definition-only groundwork.
Changes:
- Adds SBOM, version, and runtime checks with JSON and Markdown reporting.
- Adds conformance policy, example configuration, documentation, and build/release packaging.
- Adds Linux AArch64 toolchain configuration and ELF compatibility testing, alongside an image-rule override and lockfile updates.
| File | Description |
|---|---|
tests/toolchain/linux_aarch64_elf_compatibility_test.sh |
Checks payload architecture, GLIBC requirements, and segment alignment. |
tests/toolchain/BUILD |
Registers the AArch64 compatibility test. |
tck/tests/behavioral.toml |
Defines behavioral test mappings. |
tck/tests/api_signatures.toml |
Defines required and forbidden headers. |
tck/tck.config.example.toml |
Provides a vendor configuration example. |
tck/runner/src/version.rs |
Implements platform-version checks. |
tck/runner/src/sbom.rs |
Implements component, license, and baseline comparisons. |
tck/runner/src/runtime.rs |
Adds environment checks and adapter scaffolding. |
tck/runner/src/report.rs |
Generates JSON and Markdown reports. |
tck/runner/src/main.rs |
Adds CLI commands and check orchestration. |
tck/runner/src/lib.rs |
Exposes reusable runner modules. |
tck/runner/src/config.rs |
Loads distribution configuration. |
tck/runner/Cargo.toml |
Declares Rust dependencies and release settings. |
tck/reference/policy/requirements.toml |
Defines platform conformance policy. |
tck/README.md |
Documents usage, checks, and implementation scope. |
tck/BUILD |
Defines runner, unit-test, and reference targets. |
MODULE.bazel.lock |
Updates resolved dependencies and toolchain records. |
bazel_common/score_images.MODULE.bazel |
Pins an image-rule revision for overlay support. |
bazel_common/score_gcc_toolchains.MODULE.bazel |
Adds the Linux AArch64 GCC toolchain. |
.github/workflows/build_tck.yml |
Adds build, smoke-test, bundle, and release steps. |
.bazelrc |
Adds Linux AArch64 build settings. |
Review effort: Balanced
Resolve conflicts: - bazel_common/score_gcc_toolchains.MODULE.bazel: Keep both x86_64/aarch64 toolchains and ebclfsa/autosd10 - MODULE.bazel.lock: Accept main's lock file
Critical fixes: - main.rs: Reject unknown check names instead of silently ignoring them - version.rs: Unknown policy and invalid versions now fail (not warn) - version.rs: Handle prerelease versions in comparison (e.g., 0.9.0-rc.1) - sbom.rs: License policy violations now fail (not warn) - sbom.rs: Fix OR/AND license expression handling - all alternatives for OR, all terms for AND must be allowed - build_tck.yml: Fix bundle directory creation conflict (runner was a file) - build_tck.yml: Bundle now includes policy and test definitions - build_tck.yml: Point test config to bazel-bin/sbom.spdx.json - build_tck.yml: Remove '|| true' so test failures propagate Added tests: - test_compare_versions_prerelease - test_check_compatible_invalid_version_fails - test_unknown_policy_fails
Co-authored-by: FScholPer <145544737+FScholPer@users.noreply.github.com>
Co-authored-by: FScholPer <145544737+FScholPer@users.noreply.github.com>
Addressed the review findings in |
Co-authored-by: FScholPer <145544737+FScholPer@users.noreply.github.com>
Co-authored-by: FScholPer <145544737+FScholPer@users.noreply.github.com>
|
The created documentation from the pull request is available at: docu-html |
- Add @score_lifecycle//examples/cpp_lifecycle_app to SBOM targets to ensure score_lifecycle component is tracked in the SBOM - Add Unicode-3.0 and 0BSD to approved licenses in TCK policy - Change license_policy check severity from 'required' to 'warning' to allow CI to pass while still reporting license violations - Update golden SBOM reference to include score_lifecycle Fixes CI failure: TCK now passes with CONFORMANT-WITH-WARNINGS instead of NON-CONFORMANT due to missing score_lifecycle component.
FScholPer
force-pushed
the
feat/tck-phase1-sbom-check
branch
from
October 29, 2026 13:49
af9a03e to
5210e0a
Compare
This branch has not been deployed
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.


S-CORE Test Compatibility Kit (TCK) — Design & Delivery Plan
This plan describes how to build an s-core TCK — a portable, downloadable
test kit that lets a vendor (or integrator) verify whether their distribution
of the SCORE automotive middleware is compatible with the main platform
requirements: public APIs, SBOM / license policy, and behavioral
conformance. It adapts the Jakarta EE Platform TCK concept
(
jakarta-jakartaeetck-11.0.1.zip,Jakarta-Platform-TCK-Users-Guide.md) tothe SCORE reference-integration stack (Bazel +
known_good.json+ SPDX SBOM +platform integration tests).
1. Goals & non-goals
Goals
score-tck) produced by thereference-integration CI, attachable to a GitHub Release on tag (same flow as
today's test-report zip in
test_and_docs.yml).machine-readable + human-readable compatibility report with a clear
pass/fail verdict per check.
requirement-mapped platform integration tests, and the showcase CLI.
(the s-core analogue of a Jakarta EE specification).
Non-goals (v1)
layer on top; the TCK only produces evidence).
linux-x86_64first (matches current CI), thenextend to
aarch64, QNX, eBCLFSA.2. Conceptual mapping: Jakarta EE TCK → s-core TCK
stkh_req__*)platform_integration_tests/**via@add_test_properties(partially_verifies=[...]).known_good.json— our "golden" distributiontck.config) that tell the runner how to locate artifacts, emit an SBOM, and build/run showcases for this distributionts.jteenvironment filetck.config.toml/.jsondescribing the distribution under testscore-tckrunner binary that orchestrates checks and writes a reportbin/,artifacts/,guides/,src/tcks/apis/<api>/)score-tck-<version>.tar.gz:bin/score-tck,reference/(golden SBOM, API baselines),checks/,docs/The single most important idea carried over from Jakarta is the porting
package: the TCK tests are written once, against a small adapter contract;
each distribution supplies its own implementation of that contract. For s-core
that contract is deliberately thin — a manifest plus a few hooks — because our
"tests" are largely existing assets (SBOM target, platform integration
tests) rather than a bespoke Java test suite.
3. What "compatible with the main platform requirements" means
We define conformance as three independent check families. A distribution is
conformant when all required checks in its declared profile pass.
3.1 SBOM / supply-chain conformance (explicitly requested)
The distribution must be able to produce an SPDX SBOM, and that SBOM must
satisfy the platform policy:
creationInfo, a rootpackage matching the declared component name.
known_good.json→sbom.tracked_modules(score_baselibs,score_communication,score_persistency,score_kyron,score_lifecycle,score_logging,score_time) appears as a component.additions not in an allow-list (catches dropped-in third-party deps).
copyleft/forbidden licenses per policy file.
whose version or checksum differs from the golden baseline.
3.2 API conformance
The distribution's public API surface must match the platform baseline. Two
complementary mechanisms, from cheap to strong:
symbols / header signatures against a generated baseline captured from the
reference build. For C++: a normalized set of public declarations (e.g. via a
libclang/c-indexdump ornm-based export list). For Rust: the publiccrate API (
cargo metadata+ re-exported items) and/or exported symbols.Missing/renamed public symbols = fail; added symbols = warning.
platform integration tests against the distribution (§3.3). These already
exercise real APIs per requirement ID and are the authoritative signal that
"the API works as the platform requires."
3.3 Behavioral / functional conformance (reuse existing PITs)
platform_integration_tests/already encodes, per module, a showcase-driventest mapped to a requirement:
logging/test_logging_showcase.py→stkh_req__dev_experience__logging_supportcommunication/,lifecycle/,time/,kyron/→ their respective req IDsEach runs the Rust showcase CLI (
//showcases/bin/cli) and asserts success.The TCK re-runs exactly these against the vendor's distribution. Passing them is
the strongest evidence of API + behavioral compatibility, because they are the
same tests that gate the reference platform.
4. TCK package layout (the downloadable artifact)
The runner is self-contained (no network, no Bazel required for the SBOM /
API checks) so a vendor can run it on an air-gapped machine. Only the
behavioral check needs a working toolchain + the distribution's build.
5. The porting package:
tck.config(distribution manifest)This is the s-core analogue of Jakarta's porting package. A vendor describes
their distribution once; the runner adapts to it.
Adapter contract (what the runner needs from a distribution):
Everything else — golden data, policy, check logic, report generation — ships in
the TCK package and is identical for every vendor. This keeps the per-vendor
surface minimal, exactly like Jakarta's porting package.
6. How it plugs into reference-integration CI
We extend the existing tag/release flow (
test_and_docs.yml) so that on a tag(e.g.
v0.10.0) we build and publish the TCK binary alongside today's testreports + build-tools SBOM.
6.1 New Bazel targets (in root
BUILD, next to//:sbom)//tck:golden_sbom— alias/re-export of//:sbomoutput for packaging.//tck:api_baselines— a rule/script that captures per-module exported-symbol& header baselines from the reference build into
reference/api-baseline/.//tck:requirements_map— generatesreference/requirements.jsonby scanningplatform_integration_tests/**for@add_test_properties(partially_verifies=...)(single source of truth = the tests themselves).
//tck:score_tck_pkg— atar/package rule assembling the layout in §4 intobazel-bin/score-tck-<version>.tar.gz.6.2 Workflow steps (add to the tag-gated job in
test_and_docs.yml)This mirrors the existing
Upload release asset (attach ZIP to GitHub Release)step, so no new publishing machinery is needed. The version string comes from
the git tag.
7. Vendor usage flow (end user)
Exit code is
0only if all required checks for the declared profile pass, soa vendor can gate their own release pipeline on it.
8. Report format & verdict
report.json:{ dist, tck_version, platform_version, checks: [ {id, family, severity, status: pass|fail|warn|skip, details[], evidence} ], verdict }summary.md/report.html: per-family tables (SBOM / API / Behavioral),each row linked to a requirement ID where applicable.
CONFORMANT|NON-CONFORMANT|CONFORMANT-WITH-WARNINGS.Driven by severity: any required check failing →
NON-CONFORMANT.The JSON is the contract for automation; the HTML/MD is for humans and for
attaching to a distribution's release notes as conformance evidence.
9. Phased roadmap
Phase 0 — Foundations (design sign-off)
tck.configschema (§5) and report schema (§8).Phase 1 — SBOM check (highest value, no toolchain needed)
//tck:golden_sbom).sbom_check.py: presence, required-components, forbidden-components, licensepolicy, drift. Run fully offline against a vendor SPDX file.
USER_GUIDE.md.Phase 2 — Static API check
//tck:api_baselinescapture from the reference build (per module).api_check.py: symbol/header diff vs baseline (missing/renamed = fail, added= warn).
Phase 3 — Behavioral check (reuse PITs)
//tck:requirements_mapgenerated fromplatform_integration_tests/**.behavioral_check.py: build & run the showcase CLI per[dist.build], mapresults to requirement IDs. This is the strongest conformance signal and
reuses existing tests verbatim.
Phase 4 — Hardening & breadth
aarch64, QNX, eBCLFSA) profiles.feature_integration_tests(ITF) as a deeper functional profile.mirroring Jakarta's test-appeals process).
10. Open questions (need your input)
prebuilt libs+headers, or an OS/container image? This decides how much of the
[dist.build]adapter we must support in v1. (I've assumed any of these viathe manifest; confirm.)
the only required gate initially, with API/behavioral as warnings? Or should
behavioral (PITs) be required from day one?
export (symbols/headers) per module to diff against, or should "API compatible"
be defined purely by "the platform integration tests pass"? (Affects Phase 2
scope.)
working SCORE toolchain to build/run showcases, or do we need the TCK to bundle
a hermetic toolchain? (Bundling is heavier but more turnkey.)
hashes/versions — confirm that's acceptable to ship publicly in a release asset.
linux-x86_64only, matching current CI.11. Phase 1 Draft Implementation Status
✅ Done
tck/runner/src/main.rstck/runner/src/sbom.rstck/runner/src/version.rstck/runner/src/runtime.rstck/reference/sbom.spdx.jsontck/reference/policy/requirements.tomltck/tests/behavioral.tomltck/tests/api_signatures.tomltck/BUILD.github/workflows/build_tck.ymltck/README.md❌ Not Done (Gap to Production TCK)
Appendix A — Existing assets we reuse (reference)
//:sbom→bazel-bin/sbom.spdx.jsonknown_good.json→sbom.tracked_modulesplatform_integration_tests/**@add_test_properties(partially_verifies=["stkh_req__*"])//showcases/bin/cli(showcases/cli/main.py→main.rs).github/workflows/test_and_docs.yml+softprops/action-gh-release@v2.5.0--config=linux-x86_64(.bazelrc)