Contributing#

This page is for contributors who change ovclash in a source checkout: the native runtime, the C ABIs (C application binary interfaces), the Python packages, the samples, the build scripts, the tests or the documentation. It states what a change contains, which validation it needs, and the style, license and documentation rules it follows.

Local Development explains how to build, test and package ovclash. AGENTS.md in the ovclash/ folder holds the full engineering rules; this page summarizes the ones that apply to most changes.

Sources of truth#

When sources disagree, trust them in this order:

  1. The public headers under include/ and the executable tests define public API behavior.

  2. The repository README.md defines the supported product workflows and packaging.

  3. The Technical Guide and its topic pages explain the implementation and its performance.

Commit history and review records describe past work, not the current state. Check every status or path claim against the current source before you act on it.

What a change contains#

  • One concern. Keep a change scoped to the area it fixes or adds. Do not reformat unrelated files, and never reformat a file wholesale in an unrelated change.

  • Tests. Add or update the tests that pin the new behavior. Prefer tests that derive their expectations from the source over prose snapshots or copied API and source counts.

  • Documentation. Update the pages that describe the changed behavior in the same change; see Documentation. Keep public commands, their --help output, the repository README.md and AGENTS.md in step.

  • The rationale in the commit message. The changelog is generated from the merged commits at release; see Changelog.

  • Validation evidence. Run the checks that Required validation lists for the affected surface, and record any target you excluded and any GPU coverage you skipped.

Before you hand a change over, inspect its final diff for developer-local paths, stale header names, unquoted path handling, contradictions between pages, and missing backend validation.

A local test never publishes, uploads, signs or contacts an external service unless that action is explicitly requested and configured.

Rules that shape many changes#

  • Backend parity. ovstage, the runtime through which ovclash reads USD, is the product backend. The OpenUSD backend is an unpublished, unchanged reference: for the same stage and settings, the default ovstage configuration must match it, except for the differences Backends lists. Reproduce an unexpected difference in a test that runs on both backends and compares result payloads, then correct ovstage. Never change the OpenUSD adapter or the engine’s arithmetic to manufacture agreement.

  • Shared engine sources. source/usdclash/ holds the shared clash-detection engine sources, which ovclash does not modify. Keep standalone adapter changes in source/OpenUsdClashBackend.cpp. scripts/usdclash_sources.cmake lists the native inputs; add a new source file there and to CMakeLists.txt, or it does not compile.

  • Public API. Adding, removing or changing a public declaration needs the API inventory tests, both backend implementations, the Python bindings, the samples and the documentation, the export checks, and a deliberate version and compatibility decision.

  • Build scripts. Scripts must not depend on the checkout location. Anchor paths to the script, quote and escape paths, keep writable caches inside the checkout, and make every local dependency root overridable. Windows and Linux entry points behave the same, and an unsupported option fails explicitly.

Required validation#

Run the narrowest relevant tests while you develop (Run focused tests), then the full checks for each surface the change touches:

Change

Required evidence

ovstage-only runtime

ovstage native and Python tests, and build_ovstage.* --release --validate

OpenUSD adapter

OpenUSD native and Python tests, and build_openusd.* --release --validate

Engine or public behavior

Both backend validations (test_all.* --release)

Canonical or Suite ABI and bindings

API, export and inventory tests, and both backend validations

Wheel, SDK archive, licenses

Packaging and unit tests, product wheel verification, packaged sample tests and the SDK archive C-consumer check; the OpenUSD wheel check when shared code changes. For the external ovstage runtime also test_external_runtime_packaging.py, test_external_runtime_selection.py, test_sdk_consumer_config.py, test_sdk_consumer_startup.py, test_sdk_consumer_archive.py, test_sample_launcher_external_runtime.py and test_kpi_runtime_metadata_producer.py

Wrapper, path or tool discovery

Focused script-mode tests on each affected OS and the arbitrary-working-directory and special-character fixtures; for output paths also test_generated_layout.py

Documentation or commands

build_docs.* --links-only, relative link and anchor checks, test_shipped_skills.py, python scripts/check_repo_structure.py for the entry files, and executable --help or command checks where available

Sample viewer on ovRTX, NVIDIA’s RTX rendering runtime

Sample-app tests and the detection-only one-shot sample smoke; optionally the rendering smoke on a GPU host

Test and validate describes the validation run and its output, and Troubleshooting in Local Development covers build, download and validation failures. Ordinary --validate excludes the full KPI workloads and the Sentinel checker and correctness runs; they have their own entry points. Sentinel checks engine correctness and serialization equivalence, and KPI measures performance.

The ovRTX rendering smoke (OVCLASH_TEST_OVRTX) and the sample-app suite (test_python_sample_app) are opt-in; rendering needs a GPU and the Vulkan graphics API. A passing run without rendering does not prove ovRTX rendering.

Run the backend C-consumer and sample checks one backend at a time. test_c_compat.cmake recreates the shared _build/c_compat_install, and the C++ Suite sample builds in _build/samples/clash_suite_api by default, so separate backend trees do not isolate them. Sequential validations of both backends in one checkout are supported.

Code style#

  • Native C and C++ code follows the C/C++ code style.

  • Python code follows the Python code style. Its MUST rules apply to all project-owned Python: a module docstring and docstrings for public classes, functions and methods (test methods included); full annotations on public non-test functions and methods; snake_case functions and CapWords classes; the Black code formatter and the isort import sorter at 120 columns; and no module over 100,000 bytes.

  • Where a guide is silent, match the surrounding file. Vendored code, the shared engine sources and adapted third-party code keep their own conventions.

repo format, the format command of the repo tool that repo.sh and repo.bat run, applies the Python formatters and the license headers. Before you begin, have a source checkout; the first run fetches the tool’s dependencies with Packman, and Troubleshooting in Local Development covers a failed download. Run it from ovclash/, with repo.bat on Windows and ./repo.sh on Linux:

./repo.sh format --python-only --modified    # format the Python files you changed
./repo.sh format --legal-only --verify       # check every license header, change nothing

Each command exits with code 0 on success. With --verify, a nonzero exit code means that a header differs, and the command names each such file.

Tooling and review lists the other selections. CI checks only license headers, so format every Python file you change before review. Reviewers apply the other style rules by hand.

License headers#

ovclash source is licensed under Apache-2.0 (LICENSE.txt). A new source file carries this two-line SPDX header (Software Package Data Exchange, a standard for machine-readable license tags), written in the file’s comment syntax:

SPDX-FileCopyrightText: Copyright (c) <years> NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0

Field

Type

Required

Default or values

Description

SPDX-FileCopyrightText

Text

Yes

Copyright (c) <years> NVIDIA CORPORATION & AFFILIATES. All rights reserved.

The copyright line. <years> is the creation year, or a range that ends with the current year, such as 2025-2026.

SPDX-License-Identifier

SPDX license identifier

Yes

Apache-2.0

The license of the file. A file under another license is listed in the OTHER_LICENSES of tests/python_tests/test_source_licenses.py.

  • The header comes first, after a shebang or @echo off when the file has one, and is followed by one blank line. In C and C++, a file comment never joins the pair.

  • For a new original file, <years> is the creation year. Preserve an existing notice, its license and its start year when you edit, move or derive a file.

  • repo.toml sets use_current_year_as_end_year, so every header names the current year as its end year, for example 2025-2026. When the year changes, ./repo.sh format --legal-only on Linux, or repo.bat format --legal-only on Windows, updates every header; commit that update as one change of its own.

  • Markdown pages and JSON files carry no header. reStructuredText pages carry the pair as .. SPDX-... comment lines.

Two checks enforce the rules:

  • ./repo.sh format --legal-only --verify (repo.bat on Windows) reports every C/C++, Python and cmake/**/*.h.in file whose header differs from the template in repo.toml, without changing files. It checks no code formatting. Its file lists exclude the shared engine link source/usdclash/, third-party code and _build/. CI runs the same check, and a mismatch fails it.

  • tests/python_tests/test_source_licenses.py runs in the Python runtime suite of every --validate run. It covers the file kinds in its CHECKED_PATTERNS: C/C++, Python, CMake, shell, batch, .cmd and PowerShell scripts, .in templates, TOML, .cfg, YAML, XML, linker maps, pip requirements and reStructuredText files. It requires that:

    • every tracked file of those kinds carries the Apache-2.0 SPDX pair with an NVIDIA copyright line;

    • a file under another license is listed in the test’s OTHER_LICENSES and declared in THIRD-PARTY-NOTICES.txt, and a file that cannot carry a header is listed in its NO_SPDX_HEADER;

    • no tracked file declares a proprietary license or carries a proprietary notice;

    • licenses/physx/LICENSE.md matches the license file of the PhysX SDK, NVIDIA’s physics SDK, when a physx/ source tree sits beside ovclash/; without one, the copy is authoritative.

The wheel and the SDK archive are governed by licenses/LICENSE-binary.txt.

Documentation#

docs/ is the source tree of two sites that the Sphinx documentation generator renders to HTML, rooted at docs/index.md (the full site) and docs/index_public.md (the public site, which a public source export renders). Its pages belong to one of these sets:

Set

Where

Ships as Markdown

Consumer pages

docs/consumer/

Yes, at the same path in the SDK archive. The wheel ships no consumer page.

API reference

docs/api.md (Doxygen, the C/C++ documentation generator) and docs/python_api.rst (autodoc, the docstring reader of Sphinx)

No

Source and contributor pages

Every other page under docs/

No

All three sets render to HTML. An SDK archive built from the public source carries the Markdown pages only, never the rendered site. The repository README.md and the READMEs under benchmarks/ and tests/sentinel/ follow the rules of the source and contributor pages.

Rules for every change to the documentation:

  • Add a page to the right {toctree}, the directive of a root page that lists its site’s table of contents, in docs/index.md and in docs/index_public.md, and to docs/README.md, in the same change. A page that stays off the public site goes in the exclude list of the ovclash-public project in repo.toml instead of docs/index_public.md; add the page’s path to it. A page in no toctree of its site fails the render.

    Field

    Type

    Required

    Default or values

    Description

    sphinx_exclude_patterns, in [repo_docs.projects.ovclash-public] of repo.toml

    TOML array of strings

    Yes: the public site must exclude index.md, the root of the full site

    Sphinx glob patterns relative to docs/, such as "index.md" or "api/**"

    The files that the public site does not render.

  • Write consumer pages for the installed package. They link only to sibling pages in docs/consumer/ and never use ../. They name no scripts/, tests/, _build or other source-checkout path, describe no build from source and contain public information only. The wheel ships no consumer page; its own Markdown names one with the label (SDK archive): in front of the reference.

  • Use standard Markdown for links, headings, tables, code blocks and notes (> **Note** blockquotes). MyST is the Markdown dialect that Sphinx reads; the only MyST constructs allowed are {toctree} in docs/index.md and docs/index_public.md, {eval-rst} in docs/api.md, and {literalinclude} of a public C ABI header under include/.

  • Name source, test, script and configuration files as backticked paths, such as scripts/usdclash_sources.cmake, not as links. Sphinx copies every linked file that is not a page into the rendered site, and the SDK archive ships that site. Links to the public headers under include/ are the exception.

  • Never copy sample, test or implementation source into a page. Show a short snippet with only the lines that make the point.

  • Link between pages with relative links to the .md file, written out in full, such as backends.md or consumer/persistence.md#clash-states.

  • Describe current behavior only. Do not record dated measurements, profiling history, incident stories, commit hashes or absolute and developer-local paths.

  • Record no benchmark results. A time, speedup, ratio or throughput measured on one machine does not hold on other hardware. Say how to measure and how to read the result, and show placeholders such as <seconds> in example output.

  • Use lowercase file names joined by underscores. Markdown pages carry no SPDX header.

After every documentation edit, run the link check of the shipped Markdown. It needs no build tree and takes seconds. From ovclash/, on Linux:

./build_docs.sh --links-only

On Windows:

build_docs.bat --links-only

The check passes when it prints two documentation payload OK lines, one for the SDK archive layout and one for the wheel layout, and exits with code 0. A broken link prints ERROR: <problem> and then Documentation link check failed for the <layout> layout (exit code: <code>), and the check keeps its stage under _build/docs-link-check/ for inspection.

The full render (build_docs without --links-only) needs an install tree. Without one, build_docs.sh stops with No installed library at <path>. and build_docs.bat with FAILED: installed runtime check. No library at "<path>". Building this documentation describes both gates, and AGENTS.md (“Doc authoring conventions”) has the complete authoring rules.

Changelog#

CHANGELOG.md is the only changelog in the tree. Its version section is written once, at release, from the merged commits and the descriptions of the changes that brought them.

  • Do not add changelog entries in a feature change. Concurrent changes that append to one version heading conflict with each other. Put the rationale in the commit message instead, which the generator reads.

  • A change to the file’s structure, such as its heading format, belongs with the change that defines it.

  • Keep CHANGELOG.md historical: add entries, never rewrite released facts.

  • docs/consumer/CHANGELOG.md is its generated consumer copy, rendered as the Changelog page. Never edit it: every build regenerates it from CHANGELOG.md.