|
1 | 1 | # Contributing to CDT++ |
2 | 2 |
|
3 | | -Thank you for helping improve CDT++. |
4 | | - |
5 | | -CDT++ v1.0.0-rc3 is the current C++23 release candidate. The project remains maintained as a scientific reference |
6 | | -implementation and regression oracle for |
7 | | -[causal-triangulations](https://github.com/acgetchell/causal-triangulations), its supported Rust successor. The |
8 | | -v1.0.0 release scope is tracked by [issue #90](https://github.com/acgetchell/CDT-plusplus/issues/90). Archiving the |
9 | | -GitHub repository or making it read-only is a separate future maintainer decision, not settled policy for immediately |
10 | | -after v1.0.0. |
11 | | - |
12 | | -## Accepted work |
13 | | - |
14 | | -Contributions should be limited to: |
15 | | - |
16 | | -- correctness fixes, especially for causal invariants, bistellar moves, and scientific results; |
17 | | -- deterministic tests, reproducibility improvements, and cross-implementation validation; |
18 | | -- documentation, build, CI, portability, dependency, and release-readiness fixes; |
19 | | -- work already approved in a project issue or release milestone, including |
20 | | - [Qt restoration #98](https://github.com/acgetchell/CDT-plusplus/issues/98) and |
21 | | - [domain invariant work #101](https://github.com/acgetchell/CDT-plusplus/issues/101) and |
22 | | - [offline C++/Rust comparison #104](https://github.com/acgetchell/CDT-plusplus/issues/104); and |
23 | | -- changes required to complete the v1.0.0 release and Zenodo deposit. |
24 | | - |
25 | | -New simulation features, 3+1D/4D development, and unrelated C++ expansion remain out of scope unless a project issue |
26 | | -explicitly approves them. Potential future 4D research does not authorize implementation by itself. If a change is |
27 | | -not already tracked, open an issue before investing in a substantial implementation so its maintenance value and |
28 | | -scope can be agreed upon. |
29 | | - |
30 | | -## Contribution workflow |
31 | | - |
32 | | -1. Fork the repository and create a short-lived branch from `main`. |
33 | | - |
34 | | -2. Keep the change focused and preserve scientific behavior unless the purpose of the change is to correct a |
35 | | - documented bug. |
36 | | - |
37 | | -3. Add or update deterministic tests for behavior changes. Tests use [doctest] and live in `tests`; register new test |
38 | | - files in `tests/CMakeLists.txt`. Existing tests use descriptive BDD-style `SCENARIO`, `GIVEN`, `WHEN`, and `THEN` |
39 | | - sections where that structure clarifies behavior. |
40 | | - |
41 | | -4. Update relevant documentation and Doxygen comments when interfaces, supported workflows, or scientific behavior |
42 | | - change. |
43 | | - |
44 | | -5. Run the repository-owned validation commands: |
45 | | - |
46 | | - ```bash |
47 | | - just fix |
48 | | - just check |
49 | | - just ci |
50 | | - just build-parallel |
51 | | - ``` |
52 | | - |
53 | | - `just check` is the fast, non-mutating source and tooling gate, including the |
54 | | - repository-owned Semgrep policy and its fixtures. `just ci` adds the |
55 | | - supported build and complete 131-entry CTest suite: 106 doctest scenarios, |
56 | | - 23 CLI integration tests, one compiled C++ API example, and one |
57 | | - arithmetic-backend correctness test. `just build-parallel` builds the |
58 | | - distinct CGAL/oneTBB configuration and runs its 132-entry suite: 106 ordinary |
59 | | - doctest scenarios, one replayable parallel stress launcher containing five |
60 | | - scenarios, the same 23 CLI integration tests, the C++ API example, and the |
61 | | - arithmetic correctness test. When changing C++ |
62 | | - behavior, also run `just clang-tidy` with the pinned LLVM 22 toolchain and |
63 | | - review its advisory diagnostics. |
64 | | - GitHub Actions runs `just ci` in its Ubuntu GCC, Ubuntu Clang, macOS AppleClang, and Windows MSVC jobs. The two |
65 | | - Ubuntu jobs also run `just build-parallel` to exercise the opt-in CGAL/oneTBB contract, and the macOS job runs |
66 | | - `just viewer-build`. Pull requests run the separate coverage and generated-documentation gates. Sanitizer and |
67 | | - coverage builds keep Release assertion semantics while adding their own debug information and optimization settings. A |
68 | | - separate full-suite Debug job is intentionally omitted because several fixtures traverse invalid intermediate |
69 | | - triangulations and abort on CDT++ invariant assertions. Use `just build-debug` to compile production targets with |
70 | | - CDT++ assertions enabled and run the 21 compatible CLI integration CTests. That preset defines `CGAL_NDEBUG` for |
71 | | - supported move paths while excluding `cdt`, `cdt-no-output`, and the doctest unit fixtures because they trip |
72 | | - project assertions on deliberately invalid intermediate states. The Windows job continues to compile with native |
73 | | - MSVC; LLVM tooling is used only for source formatting. Toolchain setup is pkgx-first; |
74 | | - because pkgx does not currently publish its CMake and Ninja packages for Windows, that job uses the exact Justfile |
75 | | - pins available as PyPI wheels through `uv tool install --no-build`. |
76 | | - |
77 | | -6. Run the relevant Linux sanitizer configuration for changes involving memory, lifetime, undefined behavior, or |
78 | | - concurrency: |
79 | | - |
80 | | - ```bash |
81 | | - just sanitize asan |
82 | | - just sanitize lsan |
83 | | - just sanitize tsan |
84 | | - ``` |
85 | | - |
86 | | - MemorySanitizer is experimental because third-party dependencies are not instrumented; run it manually with |
87 | | - `just sanitize msan` when useful. |
88 | | - |
89 | | -7. Open a pull request against `main`, explain the maintenance issue being addressed, and identify any scientific or |
90 | | - reproducibility implications. All required GitHub Actions checks must pass. |
91 | | - |
92 | | -The project [Code of Conduct](CODE_OF_CONDUCT.md) applies to all participation. |
93 | | - |
94 | | -## Style |
95 | | - |
96 | | -The project uses Stroustrup-style formatting with Allman braces, enforced by the repository's `.clang-format` and |
97 | | -LLVM 22. The C++ Core Guidelines inform the `.clang-tidy` policy. Prefer minimal, readable changes over cosmetic |
98 | | -modernization, and do not suppress diagnostics without documenting why the check is inappropriate for this codebase. |
99 | | - |
100 | | -Project source files belong in `src`, public or shared headers in `include`, and tests in `tests`. Use the existing |
101 | | -CMake targets, presets, CTest registrations, Just recipes, and pinned vcpkg manifest rather than introducing parallel |
102 | | -build paths. |
103 | | - |
104 | | -## Release and repository lifecycle |
105 | | - |
106 | | -Release candidates, the final tag, and the Zenodo deposit follow the |
107 | | -[`docs/RELEASING.md`](../docs/RELEASING.md) runbook. The final v1.0.0 release will be tagged from `main`; release |
108 | | -metadata and the Zenodo handoff are tracked by [issue #96](https://github.com/acgetchell/CDT-plusplus/issues/96). |
109 | | -Making the GitHub repository read-only would require a separate explicit maintainer decision. Until then, issues and |
110 | | -pull requests remain governed by the scoped contribution policy above. |
111 | | - |
112 | | -Contributors retain credit through the repository history and resulting project citation metadata. |
113 | | - |
114 | | -[doctest]: https://github.com/doctest/doctest |
115 | | -[Zenodo]: https://zenodo.org/ |
| 3 | +CDT++ v1.0.0 is the final planned C++23 feature release. The repository is |
| 4 | +preserved as a historical scientific reference and regression oracle for |
| 5 | +[causal-triangulations](https://github.com/acgetchell/causal-triangulations), |
| 6 | +the supported Rust successor. Active development, new scientific features, |
| 7 | +and general support belong in that project. |
| 8 | + |
| 9 | +Issue [#97](https://github.com/acgetchell/CDT-plusplus/issues/97) owns the |
| 10 | +final tag, GitHub release, and Zenodo record verification. Issue |
| 11 | +[#155](https://github.com/acgetchell/CDT-plusplus/issues/155) owns the separate |
| 12 | +stabilization gate, tracker closure, and eventual repository archival. |
| 13 | +Archival is not immediate: the repository remains maintenance-only until the |
| 14 | +owner determines that no release blockers remain, after which GitHub will make |
| 15 | +it read-only. |
| 16 | + |
| 17 | +## Final release corrections |
| 18 | + |
| 19 | +Before archival, pull requests are limited to release-blocking correctness, |
| 20 | +reproducibility, security, documentation, and metadata corrections. A |
| 21 | +correction must be tied to an existing release issue, preserve the bounded |
| 22 | +2+1-dimensional spherical scientific contract unless it fixes a documented |
| 23 | +defect, and include deterministic regression evidence when behavior changes. |
| 24 | +A critical defect found after v1.0.0 is published must use a new patch release; |
| 25 | +the v1.0.0 tag is immutable. |
| 26 | + |
| 27 | +Run the repository-owned validation appropriate to the correction: |
| 28 | + |
| 29 | +```bash |
| 30 | +just fix |
| 31 | +just check |
| 32 | +just release-check |
| 33 | +just docs-check |
| 34 | +just ci |
| 35 | +just build-parallel |
| 36 | +``` |
| 37 | + |
| 38 | +`just ci` is the supported headless build and test contract. The two Ubuntu |
| 39 | +compiler cells also run `just build-parallel`; the macOS cell additionally |
| 40 | +runs the opt-in archival viewer. Use `just clang-tidy` for C++ changes and the |
| 41 | +relevant `just sanitize asan`, `just sanitize lsan`, or `just sanitize tsan` |
| 42 | +workflow for memory, lifetime, undefined-behavior, or concurrency changes. |
| 43 | +MemorySanitizer remains experimental because third-party dependencies are not |
| 44 | +instrumented. |
| 45 | + |
| 46 | +Open a focused pull request against `main`, identify the blocking release |
| 47 | +issue, and explain any scientific, compatibility, reproducibility, citation, |
| 48 | +or archival-metadata impact. All required GitHub Actions checks must pass. |
| 49 | + |
| 50 | +## After archival |
| 51 | + |
| 52 | +Do not fork CDT++ merely to continue its retired development line. Use the |
| 53 | +active successor for new work. Historical forks remain subject to the BSD |
| 54 | +3-Clause license but are not supported by this repository and must not imply |
| 55 | +upstream maintenance or compatibility. |
| 56 | + |
| 57 | +Security and support reporting is defined in |
| 58 | +[`SECURITY.md`](../SECURITY.md). The project |
| 59 | +[Code of Conduct](CODE_OF_CONDUCT.md) remains part of the preserved project |
| 60 | +record. |
| 61 | + |
| 62 | +Contributors retain credit through the repository history, `CITATION.cff`, |
| 63 | +and the Zenodo archive. |
0 commit comments