You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MISRA-CERT-18] No deterministic build / reproducible output guarantee #280
CERTCERT C Secure Coding Standard complianceMISRAMISRA C:2024 compliance for safety-critical generated codecertificationSafety certification path (DO-178C, ISO 26262, ECSS)compilerenhancementNew feature or request
Safety certification requires reproducible builds: the same Flow source must produce byte-identical C output every time. The C generator does not guarantee this.
Potential sources of nondeterminism:
Dict/set iteration order in Python (module resolution, struct field ordering, span typedef emission).
File system traversal order for module discovery.
Timestamps in generated comments (if any).
Standards
DO-178C requires reproducible builds for tool qualification.
ISO 26262 requires deterministic tool output.
Fix
Audit src/flow/c_generator.py and src/flow/module_resolver.py for nondeterministic iteration (use sorted() on dict/set keys before emitting).
Add a CI test: compile the same Flow file twice, diff the C output, fail if different.
Document the reproducible build guarantee in docs/certification/reproducible-builds.md.
Add flow compile --deterministic flag that enforces sorted iteration everywhere.
Audit ID: MISRA-CERT-18
Severity: Medium | Category: Build system - reproducibility
Implemented: C output is deterministic for the same input. Documented in docs/certification/reproducible-builds.md. Test in tests/unit/test_reproducible_c.py verifies byte-identical output across runs.
CERTCERT C Secure Coding Standard complianceMISRAMISRA C:2024 compliance for safety-critical generated codecertificationSafety certification path (DO-178C, ISO 26262, ECSS)compilerenhancementNew feature or request
Activity
feat(safety): Phase 2 — certification docs, @safe/@unsafe, analyze
Merge pull request #394 from flooooooooooow/cursor/misra-phase2-b994
godofecht commentedon Aug 10, 2026
Implemented: C output is deterministic for the same input. Documented in docs/certification/reproducible-builds.md. Test in tests/unit/test_reproducible_c.py verifies byte-identical output across runs.