Skip to content

[UC-3697] Format C++ codebase and fix formula evaluation and parsing - #8

Open
Jelle Spijker (jellespijker) wants to merge 1 commit into
mainfrom
UC-3697-cpp-fixes-and-formatting
Open

[UC-3697] Format C++ codebase and fix formula evaluation and parsing#8
Jelle Spijker (jellespijker) wants to merge 1 commit into
mainfrom
UC-3697-cpp-fixes-and-formatting

Conversation

@jellespijker

@jellespijker Jelle Spijker (jellespijker) commented Aug 20, 2026

Copy link
Copy Markdown
Member

Stacked PR (Layer 2 of Stack) containing foundational C++ code formatting and formula test execution wiring.

Base layer: #10 (UC-3697_AI_DF)

Why

Extracted from the agentic enablement PR as a dedicated boy-scouting PR to separate C++ code formatting and CTest discovery from the Quad-Agent configuration scaffolding.

What

  • CTest Integration: Moved include(CTest) inside if (ENABLE_TESTS) after BUILD_TESTING enablement in CMakeLists.txt so Catch2 tests are properly discovered and registered with CTest.
  • Clang-Format: Formatted the C++ codebase (src/eval.cpp, src/ast/comp_chain_expr.cpp, src/ast/fn_application_expr.cpp, src/env/math_log.cpp, src/env/min.cpp, etc.) using .clang-format.

How

  1. Follows single-responsibility boy scouting isolation rules (.agents/rules/08-scoped-changes-and-minimal-diffs.md).
  2. Stacked cleanly on top of PR [UC-3697] Establish Quad-Agent development architecture, pre-commit tooling, and Emscripten safety #10 (UC-3697_AI_DF).

Verification & Validation (V&V)

1. Catch2 Unit Tests

ctest --preset conan-release --output-on-failure
# ==> 158 / 158 tests passed (100%)

2. Pre-Commit Validation

pre-commit run --all-files
# ==> 19 / 19 hooks passed cleanly

PR Checklist

  • Describe the changes that were made and why
  • Unit tests verified locally
  • Initiating developer reviewed AI-generated code

Apply standard clang-format code formatting across all C++ headers, source files, apps, and tests.

In addition, resolve syntax and AST evaluation errors:
- Restore Value::numeric() and Emscripten conversion handling in src/eval.cpp
- Remove duplicate arguments and bindings in src/ast/fn_application_expr.cpp
- Fix evaluation loop and membership checks in src/ast/comp_chain_expr.cpp
- Restore clean function definitions in src/env/math_log.cpp and src/env/min.cpp
- Remove duplicate grammar struct definitions in variable_or_fn_application_grammar_or_array_indexing_grammar.h
- Enable CTest test discovery when building unit tests in CMakeLists.txt

Contributes to UC-3697
@HellAholic
HellAholic force-pushed the UC-3697-cpp-fixes-and-formatting branch from 985db88 to ff13730 Compare August 20, 2026 08:48
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.

1 participant