Skip to content

Port the f64 CEL standard library to C++ - #1

Merged
sean-parent merged 4 commits into
mainfrom
feat/f64-port
Nov 14, 2026
Merged

sean-parent merged 4 commits into
mainfrom
feat/f64-port

Conversation

@sean-parent

@sean-parent sean-parent commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add a C++20 cel::std library using cpp-library and CPM, with pinned
    cel-parser and transitive cel-runtime dependencies.
  • Install the 35 Rust f64 operations except powi; retain structural
    sin_cos tuples, ordinary/receiver calls, and closure visibility.
  • Preserve Rust numeric edge cases with standard-library functions and small
    adapters. Reject invalid clamp bounds, avoid NaN ordering preconditions,
    and round ties to even independently of the ambient rounding mode.
  • Add a compiled Doxygen tutorial and reference linking each retained
    signature to the CEL language book. Use Markdown reference input so
    GitHub and generated-page navigation both resolve.
  • Add source/installed consumers, cross-platform CI, licensing, and the
    approved design, implementation plan, and handoff.

Test plan

Validated locally on macOS at 7f692612b57df49a6e35b03b7fcc2f3eeec61dfd:

  • cmake --preset=test, cmake --build --preset=test --parallel 2,
    ctest --preset=test --no-tests=error: all 4 tests pass, including the
    unit executable, tutorial example, CPM source consumer, and installed consumer.
    Unit tests contain 12 cases and 248 assertions.
  • cmake --preset=default, cmake --build --preset=default --parallel 2,
    and cmake --install build/default --prefix .../build/pr-install.
  • cmake --preset=clang-tidy, cmake --build --preset=clang-tidy --parallel 2,
    ctest --preset=clang-tidy --no-tests=error: analyzer and all 4 tests pass.
  • cmake --fresh --preset=docs -G 'Unix Makefiles' and
    cmake --build --preset=docs: Doxygen warnings treated as errors.
    The generator override preserves this machine's existing docs build generator;
    --fresh resets CPM metadata after switching to the preset's source cache.
  • clang-format --dry-run --Werror on every authored C++ source/header.
  • Debug and Release builds with -Wall -Wextra -Wpedantic -Werror;
    complete consumer suites under AddressSanitizer/UBSan and Ninja Multi-Config.
  • Generated documentation navigation, fragments, included example, and
    all 35 published language-book operation anchors verified.
  • GitHub CI
    at the same head: Linux GCC/Clang, macOS, Windows, analyzer, and docs.

An independent local branch review identified broken generated reference
navigation; it is fixed and verified. All findings from that review are addressed.
A subsequent Talos local review
completed six personas and the challenge pass at the same head.
It published one HIGH-priority finding at cmake/CPM.cmake:16:
the bootstrap download needs explicit total and inactivity timeouts.
That finding remains open. See the review for its coverage and workflow adaptations.

Generated with GitHub Copilot CLI

sparent_adobe and others added 4 commits November 13, 2026 13:20
Register Rust-compatible numeric operations for the C++ parser and runtime, excluding powi and retaining structural sin_cos tuples.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build Doxygen through cpp-library, link all retained operation contracts to the CEL book, and exercise source and installed consumers. Include repeatable CI, deterministic static analysis, and license notices.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep NaN values outside std::clamp's ordering preconditions and validate bounds first. Use Markdown reference input so GitHub and Doxygen resolve the same navigation links.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@sean-parent sean-parent left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Talos local review

Verdict: needs attention. One HIGH-priority operational finding remains open. Six baseline personas completed, followed by the challenge reviewer. This is a COMMENT review, not an approval.

Reviewed feat/f64-port at 7f692612b57df49a6e35b03b7fcc2f3eeec61dfd against main (merge base a507cfe8c78ee652303ecb394f40646a14d783e3).

Severity Persona Total
HIGH 1 1

Change overview

The branch adds the C++20 f64-only CEL standard-library installer, parser/runtime integration, source and installed consumers, documentation, and CI. It retains sin_cos and excludes powi.

Alignment check

The branch and commits align with the f64-port scope. The accepted finding concerns dependency bootstrap reliability, not a numeric result defect. The review did not modify tracked implementation files.

HIGH

# Location Issue Fix Source
1 cmake/CPM.cmake:16 A stalled CPM bootstrap transfer has no total or inactivity deadline and can leave initial CMake configuration blocked indefinitely. Add explicit download TIMEOUT and INACTIVITY_TIMEOUT limits. operations

Coverage and verification

Files Reviewers Candidates -> validated -> accepted Shown Tests
27 changed paths; 3 generated templates skipped 6 personas plus challenge 1 -> 1 -> 1 1 of 1, posted inline Fresh configure/build and all 4 CTest entries passed

The personas were security, correctness, standards, architecture, devops, and documentation. Generated-template exclusions: .clang-format, .gitattributes, and docs/index.html. No findings were dropped during validation or duplicate merging. No latent findings, duplicate existing comments, unanchored findings, or inline overflow (accepted 1; posted 1; overflow 0).

Fresh local validation: cmake --preset=test, cmake --build --preset=test --parallel 2, and ctest --preset=test --no-tests=error. The four passing entries cover unit tests, the compiled tutorial example, the independent CPM source consumer, and the installed-package consumer. Existing Linux GCC/Clang, macOS, Windows, analyzer, and documentation CI checks also pass at the reviewed head: https://github.com/stlab/cel-std/actions/runs/43513124864 .

No applicable rule files or GitHub custom instructions existed at the base commit; no active OpenSpec changes were found. Local untracked Scout memory-bank files are outside this review. A passing test run does not exercise a stalled external download.

Workflow adaptations: each persona received the same full, verbatim saved patch as a private read-only artifact rather than an inline duplicate in its prompt. Agents inherited the host's configured models rather than applying the skill's suggested model pins. Scout's section is abbreviated to omit private retrieval counts and local workstation paths.

Persona routing: static roster (DCAP routing off; rerun with --dcap to enable).

Org knowledge: off (rerun with --knowledge).

Scout

Used: risk MEDIUM, evidence HIGH, status COMPLETE (scout 0.9.135).
Scout evidence is incomplete (rows cut by the packet budget); reviewers treated missing evidence as unknown, not as proof.

Scout's listed test surface is tests/consumer/main.cpp, covered by the fresh passing source and installed consumer tests. Cross-file leads were supplied to the evidence-consuming personas and challenge reviewer.

Comment thread cmake/CPM.cmake
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
else()
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
endif()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

[HIGH] Bound the CPM bootstrap download

When the bootstrap is not already cached and a connection stalls after being established, this file(DOWNLOAD) has neither a total timeout nor an inactivity timeout. CMake configuration can therefore remain blocked indefinitely; the checksum and TLS checks do not impose a deadline. The top-level CMakeLists.txt includes this bootstrap before configuring the library and dependencies, so source consumers are affected too.

Set explicit TIMEOUT and INACTIVITY_TIMEOUT values on this download so a stalled transfer fails within a bounded interval. CMake documents both controls in file(DOWNLOAD).

Verified by the Talos devops and challenge reviewers at 7f692612b57df49a6e35b03b7fcc2f3eeec61dfd.

@sean-parent

Copy link
Copy Markdown
Member Author

Tracked upstream as cpm-cmake/CPM.cmake#722: cpm-cmake/CPM.cmake#722 . This covers the Talos bootstrap-timeout finding at cmake/CPM.cmake:16. Per the requested disposition, the issue remains tracked upstream rather than fixed in this PR; merging does not imply that the missing download timeouts have been resolved locally.

@sean-parent
sean-parent merged commit e93ea83 into main Nov 14, 2026
12 checks passed
@sean-parent
sean-parent deleted the feat/f64-port branch November 14, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants