Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
29b59ee
Register adapter-backed nominal record schemas in parser
sparent_adobe Nov 17, 2026
338d124
Fix parser record registration sequencing
sparent_adobe Nov 17, 2026
b99463b
Align record adapter test names
sparent_adobe Nov 17, 2026
ddb44ec
Accept decimal integer-form f64 literals
sparent_adobe Nov 17, 2026
94e6735
Cover integer-form floats in parity corpus
sparent_adobe Nov 17, 2026
5c8b676
Reject misplaced exponent signs in numeric literals
sparent_adobe Nov 17, 2026
e090f99
Separate CEL record names from runtime identities
sparent_adobe Nov 18, 2026
6eb5ba5
Use released cel-runtime 1.1.0
sparent_adobe Nov 18, 2026
1048d85
Use published runtime dependency in CPM
sparent_adobe Nov 18, 2026
605d44d
Verify Rust numeric reference before parity
sparent_adobe Nov 18, 2026
21e63e3
Use cpp-library automatic runtime dependency mapping
sparent_adobe Nov 18, 2026
d2d8d91
Use cpp-library 6 defaults for language and Doxygen
sparent_adobe Nov 18, 2026
cdcabd8
Restore installed runtime consumer validation
sparent_adobe Nov 18, 2026
303009e
Update runtime dependency evidence
sparent_adobe Nov 18, 2026
2bb3d71
Pin cel-runtime dependency to reviewed commit
sparent_adobe Nov 18, 2026
4bf6132
fix: use released cpp-library dependency tracking
sparent_adobe Nov 18, 2026
7abd34f
build: pin cel-runtime 1.1.1
sparent_adobe Nov 18, 2026
a6febf7
docs: record Scout memory votes
sparent_adobe Nov 18, 2026
a0a16c7
docs: refresh numeric literal Scout memory
sparent_adobe Nov 18, 2026
08d77d4
docs: merge Scout memory vote from main checkout
sparent_adobe Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 6 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Derived from cpp-library (https://github.com/stlab/cpp-library).
# CPM fetches the pinned runtime source; runners need Git read access to it.
# Auto-generated from cpp-library (https://github.com/stlab/cpp-library)
# Do not edit this file directly - it will be overwritten when templates are regenerated
# Dependency versions are defined in cpp-library's cmake/cpp-library-ci.cmake
# (https://github.com/stlab/cpp-library/blob/main/cmake/cpp-library-ci.cmake), not in this repo

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
run: |
cmake --preset=default
cmake --build --preset=default
cmake --install build/default --prefix ${{ runner.temp }}/install
cmake --install build/default --prefix "${{ runner.temp }}/install"
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
Expand All @@ -71,31 +71,12 @@ jobs:
run: |
cmake --preset=default
cmake --build --preset=default
cmake --install build/default --prefix ${{ runner.temp }}/install
cmake --install build/default --prefix "${{ runner.temp }}/install"
if: ${{ !matrix.cc }}

- name: Test find_package
shell: bash
- name: Check installed package artifacts
run: |
# Create a minimal test to verify the installation works with find_package
mkdir -p ${{ runner.temp }}/test-find-package
cd ${{ runner.temp }}/test-find-package

# Create test CMakeLists.txt
cat > CMakeLists.txt << EOF
cmake_minimum_required(VERSION 3.20)
project(test-find-package CXX)

find_package(cel-parser REQUIRED)

message(STATUS "Successfully found cel-parser")
EOF

# Convert paths to forward slashes for CMake (works on all platforms)
INSTALL_PREFIX=$(echo '${{ runner.temp }}/install' | sed 's|\\|/|g')

# Test find_package with CMAKE_PREFIX_PATH
cmake -B build -S . -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}"
cmake "-DPACKAGE_TEST_PREFIX=${{ runner.temp }}/install" -P build/default/cpp-library-test-package.cmake

clang-tidy:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/provisioned-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: |
test -f "$REFERENCE_SOURCE/cel-parser/Cargo.toml"
test -f "$REFERENCE_SOURCE/Cargo.lock"
- name: Debug and Release unit, negative compilation, parity, and installed clients
- name: Debug and Release unit, negative compilation, and parity
shell: bash
env:
REFERENCE_SOURCE: ${{ inputs.reference_source }}
Expand Down
7 changes: 6 additions & 1 deletion .scout/memory/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@

- [[knowledge/admit-numeric-values-by-literal-form-not-converted-binary64-payload.md|Admit numeric values by literal form, not converted binary64 payload]] (pattern, 0.99) `parser` `literals` `rust-parity` `tuple-selectors`
- [[knowledge/custom-parser-emitters-must-transfer-runtime-capture-ownership.md|Custom parser emitters must transfer runtime capture ownership]] (pattern, 0.97) `ownership` `public-contracts` `operation-emitters`
- [[knowledge/initialize-shared-installation-defaults-before-cpm-runtime-and-parser-targets.md|Initialize shared installation defaults before CPM runtime and parser targets]] (decision, 0.99) `cmake` `cpm` `dependencies` `installation`
- [[knowledge/initialize-shared-installation-defaults-before-cpm-runtime-and-parser-targets.md|Initialize shared installation defaults before CPM runtime and parser targets]] (decision, 0.10) `cmake` `cpm` `dependencies` `installation`
- [[knowledge/keep-cel-runtime-out-of-parser-installation.md|Keep cel-runtime out of parser installation]] (decision, 0.99) `cmake` `cpm` `dependencies` `installation`
- [[knowledge/keep-operator-local-storage-out-of-recursive-precedence-frames.md|Keep operator-local storage out of recursive precedence frames]] (discovery, 0.98) `parser` `recursion` `stack-usage` `MSVC`
- [[knowledge/pin-cpm-dependencies-to-reviewed-commits.md|Pin CPM dependencies to reviewed commits]] (decision, 0.10) `cmake` `cpm` `dependencies` `supply-chain` `installation`
- [[knowledge/pin-runtime-source-with-a-versioned-cpm-uri.md|Pin runtime source with a versioned CPM URI]] (decision, 0.99) `cmake` `cpm` `dependencies` `supply-chain`
- [[knowledge/separate-cel-constructor-names-from-runtime-record-identities.md|Separate CEL constructor names from runtime record identities]] (decision, 1.00) `records` `parser` `identifiers` `registration`
- [[knowledge/test-preset-can-inherit-cached-parity-flag.md|Test preset can inherit cached parity flag]] (discovery, 0.97) `cmake` `testing` `parity` `cache`
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,24 @@ title: "Admit numeric values by literal form, not converted binary64 payload"
entity_type: pattern
confidence: 0.99
created: 2026-11-11T05:46:06Z
last_accessed: 2026-11-11T05:46:06Z
last_reinforced: 2026-11-11T05:46:06Z
access_count: 1
last_accessed: 2026-11-18T06:48:35Z
last_reinforced: 2026-11-18T06:48:35Z
access_count: 2
sources:
- "include/cel/parser.hpp:62-80"
- "src/compiler.cpp:405-418"
- "src/parser.cpp:373-429"
- "src/compiler.cpp:415-419"
- "src/parser.cpp:379-422"
- "src/lexer.hpp:15-25"
- "tests/expression_test.cpp:157-194"
tags: ["parser", "literals", "rust-parity", "tuple-selectors"]
tier: knowledge
votes_up: 1
votes_down: 1
last_voted: 2026-11-18T06:48:54Z
---

# Admit numeric values by literal form, not converted binary64 payload

The text lexer converts numeric tokens to binary64 even when numeric_form is integer. That payload does not make an integer spelling an f64 language value: canonical Rust retains integer literal kinds. Reject integer forms in primary-expression compilation, while retaining integer/radix tokens and raw spelling for tuple selectors. Rejecting integers globally in the lexer would break valid selectors; converting them to f64 in primary would violate the Rust acceptance subset. Keep actual floating spellings such as 1.0, 1e0 and 1.0f64 in positive expression examples and tests.
The parser admits decimal integer-form tokens as binary64 values only when they have the `f64` suffix, such as `1f64`; bare integers and radix-prefixed forms remain unsupported as values. Keep integer/radix token spelling available to tuple selectors, and apply the value-form check in primary-expression compilation rather than globally rejecting tokens. The lexer also requires an exponent sign immediately after `e` or `E`; underscores may follow the sign, but not precede it.
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
---
title: "Initialize shared installation defaults before CPM runtime and parser targets"
entity_type: decision
confidence: 0.99
confidence: 0.10
created: 2026-11-10T22:04:27Z
last_accessed: 2026-11-10T22:04:27Z
last_reinforced: 2026-11-10T22:04:27Z
access_count: 1
last_accessed: 2026-11-18T05:05:33Z
last_reinforced: 2026-11-18T04:09:44Z
access_count: 4
sources:
- "CMakeLists.txt:20-29"
- "CMakeLists.txt:30-49"
- "tests/installed_consumer.cmake.in:3-6"
- "CMakeLists.txt:22-25"
- "CMakeLists.txt:28-47"
- "tests/installed_consumer.cmake.in:3-7"
- "tests/installed_consumer.cmake.in:30-45"
- "tests/installed_consumer.cmake.in:54-78"
tags: ["cmake", "cpm", "dependencies", "installation"]
tier: knowledge
votes_up: 1
votes_down: 2
last_voted: 2026-11-18T06:46:42Z
superseded_by: "[[Keep cel-runtime out of parser installation]]"
---

# Initialize shared installation defaults before CPM runtime and parser targets

cel-parser acquires cel-runtime as a pinned CPM source dependency before cpp_library_setup. Initialize CEL_INSTALL from PROJECT_IS_TOP_LEVEL before adding the dependency: both libraries use the cel namespace and therefore share cpp-library's installation option. Keep dependency acquisition before parser target setup; the runtime's directory-local docs post-build hook must not see the parser's docs target. Scope BUILD_TESTING OFF through CPM OPTIONS so runtime development targets do not collide with parser tests, without disabling the parser's own tests. The installed-consumer test installs both libraries recursively from this build tree; it must not infer an installed runtime prefix from source-target include directories.
Initialize CEL_INSTALL before acquiring cel-runtime: both libraries share this option. Acquire the runtime before setting up the parser so the runtime documentation hook does not capture the parser docs target. CPM URI shorthand excludes the dependency from the default build and recursive installation unless EXCLUDE_FROM_ALL is explicitly set to NO. Preserve that override so installed consumers receive cel-runtime. Export the minimum compatible runtime version; the installed-consumer test checks both packages resolve from the installation and rejects an older runtime.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: "Keep cel-runtime out of parser installation"
entity_type: decision
confidence: 0.99
created: 2026-11-18T06:31:07Z
last_accessed: 2026-11-18T06:31:07Z
last_reinforced: 2026-11-18T06:31:07Z
access_count: 1
sources:
- "CMakeLists.txt:22-24"
- "CMakeLists.txt:42"
- "docs/validation.md:121-130"
supersedes: "[[Initialize shared installation defaults before CPM runtime and parser targets]]"
tags: ["cmake", "cpm", "dependencies", "installation"]
tier: knowledge
relationships:
- type: relates_to
target: "Pin CPM dependencies to reviewed commits"
- type: relates_to
target: "Initialize shared installation defaults before CPM runtime and parser targets"
votes_up: 1
votes_down: 0
last_voted: 2026-11-18T06:46:33Z
---

# Keep cel-runtime out of parser installation

Set `CEL_INSTALL` before adding `cel-runtime` so both projects see the intended option. Add the runtime with its versioned commit URI and keep CPM's short-form `EXCLUDE_FROM_ALL` default; do not override it to `NO`. With `cpp-library` 6.0.2, CPM registry resolution supplies the package/version without an explicit `cpp_library_map_dependency`. The source-consumer test remains; installed-consumer testing is intentionally omitted, and the generated package check verifies component presence only.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: "Pin CPM dependencies to reviewed commits"
entity_type: decision
confidence: 0.10
created: 2026-11-18T05:29:20Z
last_accessed: 2026-11-18T05:29:20Z
last_reinforced: 2026-11-18T05:29:20Z
access_count: 1
sources:
- "CMakeLists.txt:28"
- "CMakeLists.txt:48"
- "docs/evidence.md:16-18"
tags: ["cmake", "cpm", "dependencies", "supply-chain", "installation"]
tier: knowledge
relationships:
- type: relates_to
target: "Initialize shared installation defaults before CPM runtime and parser targets"
votes_up: 0
votes_down: 2
last_voted: 2026-11-18T06:46:45Z
superseded_by: "[[Pin runtime source with a versioned CPM URI]]"
---

# Pin CPM dependencies to reviewed commits

Select CPM source dependencies with an immutable upstream commit SHA rather than a movable release tag. Keep the public package compatibility requirement separate in `cpp_library_map_dependency`, and record the release tag-to-commit relationship in evidence documentation. Package-version validation and installed-consumer checks establish compatibility; they do not pin which source revision CPM fetches.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "Pin runtime source with a versioned CPM URI"
entity_type: decision
confidence: 0.99
created: 2026-11-18T06:31:11Z
last_accessed: 2026-11-18T06:31:11Z
last_reinforced: 2026-11-18T06:31:11Z
access_count: 1
sources:
- "CMakeLists.txt:6"
- "CMakeLists.txt:24"
- "docs/evidence.md:94-95"
supersedes: "[[Pin CPM dependencies to reviewed commits]]"
tags: ["cmake", "cpm", "dependencies", "supply-chain"]
tier: knowledge
relationships:
- type: relates_to
target: "Pin CPM dependencies to reviewed commits"
- type: relates_to
target: "Keep cel-runtime out of parser installation"
- type: relates_to
target: "Initialize shared installation defaults before CPM runtime and parser targets"
votes_up: 1
votes_down: 0
last_voted: 2026-11-18T06:46:38Z
---

# Pin runtime source with a versioned CPM URI

Pin `cel-runtime` with a CPM URI that includes both the compatibility release (`1.1.1`) and reviewed full commit SHA `e47232f8ed6cb83bc11f4cb418a8a2249c2415cf`. Keep the release tag-to-commit relationship in `docs/evidence.md`. `cpp-library` 6.0.2 resolves the dependency from CPM's registry, so do not add a separate `cpp_library_map_dependency` for this CPM package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Separate CEL constructor names from runtime record identities"
entity_type: decision
confidence: 1.00
created: 2026-11-18T01:41:05Z
last_accessed: 2026-11-18T01:41:05Z
last_reinforced: 2026-11-18T01:41:05Z
access_count: 1
sources:
- "include/cel/parser/lookup.hpp:233-257"
- "src/lookup.cpp:41-79"
- "src/lookup.cpp:143-153"
tags: ["records", "parser", "identifiers", "registration"]
tier: knowledge
---

# Separate CEL constructor names from runtime record identities

Runtime record identities are nominal and may contain characters that CEL identifiers cannot spell, such as `sample.point`. Register an adapted record with an explicit CEL constructor alias via `register_record_type<T>(name)`; multiple aliases can refer to the same runtime descriptor without changing dispatch identity. Registration validates the alias and every nested record field against the actual lexer before inserting the type, and constructor aliases also reject contextual keywords `if`, `else`, and `as`. Keep this validation separate from the runtime's unrestricted record identities.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Test preset can inherit cached parity flag"
entity_type: discovery
confidence: 0.97
created: 2026-11-18T06:35:07Z
last_accessed: 2026-11-18T06:35:07Z
last_reinforced: 2026-11-18T06:35:07Z
access_count: 1
sources:
- "CMakeLists.txt:77-85"
- "CMakePresets.json:15-28"
tags: ["cmake", "testing", "parity", "cache"]
tier: knowledge
votes_up: 1
votes_down: 0
last_voted: 2026-11-18T06:46:40Z
---

# Test preset can inherit cached parity flag

The `test` configure preset does not set `CEL_PARSER_ENABLE_PARITY`; CMake's `option(... OFF)` only supplies the default when the cache key is absent. Reusing a `build/test` cache previously configured with parity enabled can therefore require a stale or missing `CEL_PARSER_REFERENCE_SOURCE` and fail configuration. For the ordinary local suite, pass `-DCEL_PARSER_ENABLE_PARITY=OFF` or configure a fresh build directory; enable parity only with a valid local Rust reference checkout.
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"$gcc",
"$msCompile"
],
"detail": "Release build for installing the library and its source dependencies Requires the CMake Tools extension (ms-vscode.cmake-tools) — without it, this task fails to start.",
"detail": "Release build for installation with CPM_USE_LOCAL_PACKAGES enabled for testing installed packages Requires the CMake Tools extension (ms-vscode.cmake-tools) — without it, this task fails to start.",
"windows": {
"options": {
"shell": {
Expand Down
19 changes: 3 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.24)
include(cmake/CPM.cmake)

set(CPP_LIBRARY_VERSION "" CACHE STRING "CEL parser package version override")
CPMAddPackage("gh:stlab/cpp-library@6.0.1")
CPMAddPackage("gh:stlab/cpp-library@6.0.2")
include(${cpp-library_SOURCE_DIR}/cpp-library.cmake)

# Enable dependency tracking before project()
Expand All @@ -21,18 +21,12 @@ endif()

# Both cel packages share CEL_INSTALL; choose its default before adding dependencies.
option(CEL_INSTALL "Enable installation for cel libraries" ${PROJECT_IS_TOP_LEVEL})
# Keep the dependency eligible for installation; CPM shorthand excludes it.
CPMAddPackage(
NAME cel-runtime
GITHUB_REPOSITORY stlab/cel-runtime
GIT_TAG a8e753b040664172fd3f526f9cf46029858ff788
)
CPMAddPackage("gh:stlab/cel-runtime@1.1.1#e47232f8ed6cb83bc11f4cb418a8a2249c2415cf")

# Setup library
cpp_library_setup(
DESCRIPTION "UTF-8 CEL expression compilation and checked library extensions"
NAMESPACE cel
REQUIRES_CPP_VERSION 20
HEADERS parser.hpp parser/diagnostic.hpp parser/lookup.hpp parser/compiler.hpp parser/all.hpp
SOURCES parser.cpp lookup.cpp type.cpp compiler.cpp
EXAMPLES example.cpp cached_decoded.cpp
Expand All @@ -44,10 +38,7 @@ cpp_library_setup(
DOCS_OPTIONS "USE_MDFILE_AS_MAINPAGE = ${CMAKE_CURRENT_SOURCE_DIR}/README.md"
"EXCLUDE_SYMBOLS = cel::detail cel::detail::* cel::parser_detail cel::parser_detail::*"
"FULL_PATH_NAMES = NO"
"STRIP_FROM_PATH = ${CMAKE_CURRENT_SOURCE_DIR}"
"STRIP_FROM_INC_PATH = ${CMAKE_CURRENT_SOURCE_DIR}/include"
)
cpp_library_map_dependency("cel::runtime" "cel-runtime 1.0.1 CONFIG")
target_link_libraries(parser PUBLIC cel::runtime)
if(TARGET parity_driver_test)
target_sources(parity_driver_test PRIVATE tools/parity/driver.cpp)
Expand All @@ -66,15 +57,11 @@ if(PROJECT_IS_TOP_LEVEL AND BUILD_TESTING)
add_library(header_${header_id} OBJECT "${header_source}")
target_link_libraries(header_${header_id} PRIVATE cel::parser)
endforeach()
configure_file(tests/installed_consumer.cmake.in installed_consumer.cmake @ONLY)
configure_file(tests/source_consumer.cmake.in source_consumer.cmake @ONLY)
add_test(NAME installed_consumer
COMMAND "${CMAKE_COMMAND}" "-DCONFIG=$<CONFIG>"
-P "${CMAKE_CURRENT_BINARY_DIR}/installed_consumer.cmake")
add_test(NAME source_consumer
COMMAND "${CMAKE_COMMAND}" "-DCONFIG=$<CONFIG>"
-P "${CMAKE_CURRENT_BINARY_DIR}/source_consumer.cmake")
set_tests_properties(installed_consumer source_consumer tests PROPERTIES TIMEOUT 180)
set_tests_properties(source_consumer tests PROPERTIES TIMEOUT 180)
endif()

option(CEL_PARSER_BUILD_MEASUREMENTS "Build execution timing workloads" OFF)
Expand Down
4 changes: 2 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@
{
"name": "install",
"displayName": "Install Configuration",
"description": "Release build for installing the library and its source dependencies",
"description": "Release build for installation with CPM_USE_LOCAL_PACKAGES enabled for testing installed packages",
"binaryDir": "${sourceDir}/build/install",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_TESTING": "OFF",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_CXX_EXTENSIONS": "OFF",
"CPM_USE_LOCAL_PACKAGES": "OFF",
"CPM_USE_LOCAL_PACKAGES": "ON",
"CPM_SOURCE_CACHE": "${sourceDir}/.cache/cpm"
}
}
Expand Down
Loading
Loading