Skip to content

v0.3.2-alpha.1: B-O3 complete and release-candidate hardening#14

Merged
InitusNovus merged 99 commits into
mainfrom
dev
Mar 13, 2026
Merged

v0.3.2-alpha.1: B-O3 complete and release-candidate hardening#14
InitusNovus merged 99 commits into
mainfrom
dev

Conversation

@InitusNovus

Copy link
Copy Markdown
Owner

Summary

  • complete v0.3.2 B-O3 valid bitmask auto-widening deliverables (core implementation, docs, roadmap/oracle updates, version alignment)
  • harden release-candidate error surfaces by handling CodeGenError.UnsupportedFeature explicitly in facade/CLI/generator callers
  • add facade regression coverage for UnsupportedFeature and finalize readiness/session reports

Validation

  • dotnet build --configuration Release --nologo → warnings 0 / errors 0
  • dotnet test --configuration Release -v minimal --nologo → 106/106 pass
  • manual generator smoke (>64 mux signals) confirms intended message path:
    • Code generation failed: Message 'MUX65_MSG' has 65 signals (>64); valid bitmask cannot be represented in 64 bits.

Notes

  • release blocker from pre-release readiness (FS0025 incomplete pattern matches) is resolved
  • tag v0.3.2-alpha.1 has been created and pushed from dev
  • non-blocking items intentionally left out of this PR scope:
    • CHANGELOG.md stale
    • legacy generator help banner version drift

InitusNovus and others added 30 commits February 12, 2026 12:53
- 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.
- 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)
…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)
InitusNovus and others added 22 commits March 12, 2026 17:40
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.UnsupportedFeature through 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.

Comment thread templates/utils.c.scriban
Comment thread templates/utils.c.scriban
Comment thread .sisyphus/boulder.json Outdated
# 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
@InitusNovus InitusNovus merged commit 15a91ca into main Mar 13, 2026
4 checks passed
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