v0.3.2-alpha.1: B-O3 complete and release-candidate hardening#14
Merged
Conversation
- Remove 5 exception-swallowing try/with blocks in Dbc.fs that silently returned defaults on parse failures, risking incorrect C code generation - Add GenerateError DU to preserve error type info through the pipeline (ParseError/ValidationError/CodeGenError no longer flattened to string) - Update Api.fs, Library.fs facade, and CLI to match GenerateError variants - Add Core test project with 13 tests (10 Dbc + 3 Api error propagation) - Fix Windows test compatibility: use mingw32-make and .exe extension - All 29 tests pass (16 Generator + 13 Core), 0 failures
- ConfigTests: 16 tests for Config.validate and Config.loadFromYaml - CodegenTests: 8 tests for Codegen.generate with inline IR - EdgeCaseTests: 4 tests for empty DBC, Motorola LSB, signed, 64-bit signals Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- FacadeTests: 4 tests verifying exception type mapping - ApiTests: 1 E2E happy-path test with examples/sample.dbc - fsproj: add compile items and Signal.CANdy project reference Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Mark H-1c~H-1g, H-3a~H-3c as complete in ROADMAP - Add session report for 34 new tests (63 total, 0 failures) Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Remove 8 duplicated .fs files from Generator (~1100 lines), replacing them with an 83-line Compat.fs backward-compatibility bridge that re-exports Core types under the Generator namespace. Generator.fsproj now references Core directly and carries zero package dependencies of its own. Key changes: - Generator.fsproj: remove 7 Compile items + 5 PackageReferences, add Core ref - Compat.fs: bridge modules for Ir, Config, Dbc, Codegen, Result (active pattern) - Program.fs: rewritten to use Core API (Config/Dbc/Codegen/Errors) directly - Core Dbc.fs: add missing validateMuxStructure (was in legacy Generator only) All 63 tests pass (47 Core + 16 Generator), E2E roundtrip verified.
…le (M-2, M-3, M-4)
- Fix get_bits_le/set_bits_le: replace hardcoded 8-byte loop with dynamic n_bytes - Fix 64-bit mask UB: use UINT64_MAX when length==64 - Fix memset: use message.Length instead of hardcoded 8 - Add 6 F# tests (codegen + edge cases) for CAN FD payloads up to 64 bytes - Add canfd_test.dbc (DLC=64, 3 signals) and E2E test_fd_roundtrip in main.c - Update README: supported features + limitations reflect CAN FD support - get_bits_be/set_bits_be already use dynamic bit-by-bit loops, no change needed
…ode (L-4c) - Add canfd_dlc_to_len() / canfd_len_to_dlc() to generated utils (ISO 11898-1) - Fix signed signal decode: cast uint64_t to int64_t before float conversion to prevent negative values from being interpreted as huge positive numbers
- Add comprehensive_test.dbc with 18 signals covering LE/BE, signed, packed, non-aligned, and scale/offset configurations - Add 7 C E2E test functions verifying byte-level encode/decode correctness - Add 5 F# unit tests for DLC mapping codegen and signal pattern generation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…orward Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sisyphus: 🪨⬆️ (OpenCode)
Sisyphus: 🪨⬆️ (OpenCode)
Sisyphus: 🪨⬆️ (OpenCode)
Sisyphus: 🪨⬆️ (OpenCode)
Sisyphus: 🪨⬆️ (OpenCode)
…ript) - Add .config/dotnet-tools.json with ReportGenerator 5.4.5 local tool manifest - Add run-coverage.ps1 PowerShell script for HTML coverage report generation - Add TestResults/ and coverage_report/ to .gitignore Sisyphus: 🪨⬆️ (OpenCode)
…ated vectors - Add TRACE printf lines to test_roundtrip and test_fixed_roundtrip for visual verification - Expand motorola_lsb_suite.dbc from 1 to 4 signals (3 unsigned + 1 signed, byte-aligned) - Add test_moto_lsb_comprehensive with mathematically derived known_data byte arrays Sisyphus: 🪨⬆️ (OpenCode)
- Add runCGeneratorWithDbc helper to support arbitrary DBC file paths - Add 11 new [Fact] integration tests covering LE/BE/signed/nonalign/packed/scale, CAN FD, multiplex, value table, and Motorola LSB byte-level verification - Generator test count: 16 -> 27, total: 74 -> 85 Sisyphus: 🪨⬆️ (OpenCode)
Sisyphus: 🪨⬆️ (OpenCode)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
There was a problem hiding this comment.
Pull request overview
Updates Signal-CANdy to v0.3.2 with expanded validation coverage (Python “oracle” harness + vendor DBC corpus) and several correctness/UX fixes around DBC parsing and error surfacing.
Changes:
- Add Oracle cross-validation pipeline (cantools-based), integration tests, and a curated vendor DBC corpus with results documentation.
- Improve DBC parsing correctness (byte order fallback) and extend test coverage for DbcParserLib behavior assumptions.
- Bump package/library versioning to 0.3.2 and plumb
CodeGenError.UnsupportedFeaturethrough facade/CLI/generator surfaces.
Reviewed changes
Copilot reviewed 107 out of 124 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Signal.CANdy.Core.Tests/FacadeTests.fs | Adds regression test ensuring facade surfaces UnsupportedFeature as SignalCandyCodeGenException. |
| tests/Signal.CANdy.Core.Tests/DbcTests.fs | Adds tests validating DbcParserLib ByteOrder mapping and BE fallback behavior. |
| tests/oracle/vendor_dbc/toyota_prius_2010_pt.dbc | Adds vendor DBC fixture for oracle corpus. |
| tests/oracle/vendor_dbc/README.md | Documents vendor corpus provenance, selection criteria, and usage. |
| tests/oracle/vendor_dbc/mercedes_benz_e350_2010.dbc | Adds vendor DBC fixture for oracle corpus. |
| tests/oracle/vendor_dbc/gm_global_a_chassis.dbc | Adds vendor DBC fixture for oracle corpus. |
| tests/oracle/vendor_dbc/ford_fusion_2018_pt.dbc | Adds vendor DBC fixture for oracle corpus. |
| tests/oracle/vendor_dbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc | Adds vendor DBC fixture for oracle corpus. |
| tests/oracle/vendor_dbc/acura_ilx_2016_nidec.dbc | Adds vendor DBC fixture for oracle corpus. |
| tests/oracle/vendor_dbc/.gitkeep | Keeps vendor corpus directory tracked. |
| tests/oracle/tests/test_vector_gen.py | Tests vector generation (bounds, adversarial cases, mux branches). |
| tests/oracle/tests/test_tolerance.py | Tests tolerance and byte comparison logic. |
| tests/oracle/tests/test_mux_assumptions.py | Validates cantools multiplexing API assumptions used by oracle logic. |
| tests/oracle/tests/test_metadata.py | Tests metadata extraction and comparison reporting. |
| tests/oracle/tests/test_harness.py | Tests harness C generation/compile and JSON protocol encode/decode. |
| tests/oracle/tests/test_engine.py | Integration tests for end-to-end oracle pipeline and mux vector generation. |
| tests/oracle/tests/conftest.py | Adds pytest fixtures for DBC/config paths and markers. |
| tests/oracle/tests/init.py | Ensures oracle package import path setup for tests. |
| tests/oracle/templates/oracle_harness.c | Adds a C JSON-protocol harness template used for oracle encode/decode validation. |
| tests/oracle/templates/.gitkeep | Keeps templates directory tracked. |
| tests/oracle/run_oracle.py | CLI runner for single-DBC oracle pipeline execution. |
| tests/oracle/run_matrix.py | CLI runner for config-matrix execution (parallel-capable). |
| tests/oracle/requirements.txt | Defines Python deps for oracle tooling. |
| tests/oracle/pyproject.toml | Adds Python project metadata for oracle tooling. |
| tests/oracle/oracle/vector_gen.py | Implements per-signal/message vector generation incl. mux support and adversarial cases. |
| tests/oracle/oracle/tolerance.py | Implements tolerance calculation and compare helpers. |
| tests/oracle/oracle/report.py | Placeholder report module for future extension. |
| tests/oracle/oracle/metadata_compare.py | Implements metadata extraction/comparison report structures. |
| tests/oracle/oracle/harness.py | Generates/compiles/runs the oracle harness and dispatch glue. |
| tests/oracle/oracle/init.py | Initializes oracle package. |
| tests/oracle/ORACLE_RESULTS.md | Documents oracle run outcomes and reproduction commands. |
| tests/oracle/CATEGORY_C_EXCEPTIONS.md | Documents categorized known divergences/limitations and resolutions. |
| tests/oracle/init.py | Documents oracle package purpose at top-level. |
| tests/Generator.Tests/CodegenTests.fs | Adds more generator+gcc integration tests over example DBC suites. |
| templates/utils.c.scriban | Updates LE bit get/set logic for CAN FD sizing and 64-bit masking. |
| src/Signal.CANdy/Signal.CANdy.fsproj | Bumps facade package version to 0.3.2. |
| src/Signal.CANdy/README.NuGet.md | Updates NuGet install version to 0.3.2. |
| src/Signal.CANdy/Library.fs | Surfaces UnsupportedFeature in facade exception mapping. |
| src/Signal.CANdy.Core/Signal.CANdy.Core.fsproj | Bumps core package version to 0.3.2. |
| src/Signal.CANdy.Core/README.NuGet.md | Updates NuGet install version to 0.3.2. |
| src/Signal.CANdy.Core/Errors.fs | Adds UnsupportedFeature case to CodeGenError. |
| src/Signal.CANdy.Core/Dbc.fs | Fixes ByteOrder fallback mapping using DbcParserLib raw byte order. |
| src/Signal.CANdy.Core/Api.fs | Updates version() to 0.3.2. |
| src/Signal.CANdy.CLI/Program.fs | Adds UnsupportedFeature formatting for CLI error output. |
| src/Generator/Program.fs | Updates banner version and handles UnsupportedFeature in error reporting. |
| run-coverage.ps1 | Adds PowerShell helper to generate HTML coverage reports. |
| ROADMAP.md | Updates tracking sections and references (Report→Reports), adds Oracle tracking block, updates last-updated note. |
| Reports/20260313_1428_v0.3.2_release_blocker_fix_UnsupportedFeature.md | Documents the UnsupportedFeature caller-handling fix and verification. |
| Reports/20260313_1410_v0.3.2_pre_release_readiness.md | Documents pre-release readiness audit. |
| Reports/20260313_1258_B-O3_valid_bitmask_auto_widening.md | Documents B-O3 implementation and test status. |
| Reports/20260312-1447_Oracle_tracking_source_of_truth_sync.md | Documents Oracle tracking/source-of-truth sync work. |
| Reports/20260312-1235_Oracle_Overflow_Guardrails.md | Documents overflow guardrails for oracle pipeline. |
| Reports/20260312-1235_Oracle_DBC_Parse_Triage.md | Documents cantools parse incompatibility triage. |
| Reports/20260312-1235_DbcParserLib_Type_Probe_Test.md | Documents DbcParserLib type probe findings. |
| Reports/20260312-1235_Bug4_ZeroRange_Sentinel_Fix.md | Documents Bug #4 fix session evidence. |
| Reports/20260312-1235_Bug2_LE_Clamp_Fix.md | Documents Bug #2 fix session evidence. |
| Reports/20260312-1235_Bug1_ByteOrder_Fallback_Fix.md | Documents Bug #1 fix session evidence. |
| Reports/20260312-1118_Active_Boulder_AGENTS_Audit.md | Documents boulder/AGENTS audit notes. |
| Reports/20260312_1800_B-O2_Oracle_Multiplex_Mode.md | Documents mux oracle mode completion and outcomes. |
| Reports/20260312_1705_Oracle_mux_assumptions_validation.md | Documents mux assumptions validation evidence. |
| Reports/20260213_1952_Oracle_Integration_Result_Report.md | Documents prior oracle integration results. |
| Reports/20260213_1848_Oracle_Tolerance_Metadata_Comparison.md | Documents tolerance/metadata implementation evidence. |
| Reports/20260213_0730_Git_Workflow_Setup.md | Documents Git workflow setup work. |
| Reports/20260213_0000_Morning_Briefing.md | Morning briefing snapshot (historical). |
| Reports/20260212_1615_main_c_comprehensive_bitpattern_tests.md | Documents comprehensive C bitpattern test additions (historical). |
| README.md | Updates install version to 0.3.2 and documents valid bitmask behavior changes. |
| README.ko.md | Updates install version to 0.3.2 and documents valid bitmask behavior changes (KR). |
| examples/motorola_lsb_suite.dbc | Extends Motorola LSB suite with more signals for coverage. |
| examples/main.c | Adds more trace output and a comprehensive Motorola LSB test entry point. |
| CHANGELOG.md | Removes changelog file per documented decision. |
| AGENTS.md | Adds evidence/source-of-truth guidance and updates reporting rules to Reports/. |
| .sisyphus/boulder.json | Adds boulder state file (agent working state). |
| .gitignore | Adds Python cache and coverage output ignores; fixes indentation of _backup/. |
| .config/dotnet-tools.json | Adds ReportGenerator as a repo-local dotnet tool. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
# Conflicts: # README.ko.md # README.md # ROADMAP.md # src/Signal.CANdy.Core/Api.fs # src/Signal.CANdy.Core/Codegen.fs # src/Signal.CANdy.Core/README.NuGet.md # src/Signal.CANdy.Core/Signal.CANdy.Core.fsproj # src/Signal.CANdy/README.NuGet.md # src/Signal.CANdy/Signal.CANdy.fsproj # templates/utils.c.scriban # tests/Signal.CANdy.Core.Tests/CodegenTests.fs # tests/oracle/CATEGORY_C_EXCEPTIONS.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CodeGenError.UnsupportedFeatureexplicitly in facade/CLI/generator callersValidation
dotnet build --configuration Release --nologo→ warnings 0 / errors 0dotnet test --configuration Release -v minimal --nologo→ 106/106 pass>64mux signals) confirms intended message path:Code generation failed: Message 'MUX65_MSG' has 65 signals (>64); valid bitmask cannot be represented in 64 bits.Notes
FS0025incomplete pattern matches) is resolvedv0.3.2-alpha.1has been created and pushed fromdevCHANGELOG.mdstale