Skip to content

feat: seed F# frontend conformance - #502

Draft
DamianReeves wants to merge 7 commits into
mainfrom
feat/fsharp-compile
Draft

DamianReeves wants to merge 7 commits into
mainfrom
feat/fsharp-compile

Conversation

@DamianReeves

@DamianReeves DamianReeves commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Start the F# compile implementation with its portable conformance foundation. Production compiler binding and the compile command remain in the following tasks.

This change adds:

  • The frontend PRD and epic [EPIC] F# source frontend and morphir compile steel thread #499 tracking, with pinned MEP/out-directory fixtures and SHA-256 provenance tests.
  • A hand-authored frontend-fsharp seed covering a mutable-binding refusal across IR versions 1–4 and all three source input kinds.
  • Morphir.Conformance: the official Gherkin reader, closed vocabulary and tag validation, complete matrices with explained exclusions, and independent observation comparison.
  • A library adapter that receives input without expectations. Typed operational failures retain partial diagnostics, and later cases still run.
  • Deterministic JSON reports with case-set digest, actual runner version, implementation identity, complete requests, stable diagnostic fields and exact model text, including invalid payloads.
  • Native AOT and negative-control tests. The generic JSON comparison is a seed primitive; production model-family normalization, schema and behavioral qualification remain task 3.8.

The branch includes the plan merged in #495 and the current main guidance from #501. Existing IR models, production command behavior and compiler/Core pins are unchanged. Gherkin 35.0.0 is already used transitively by Reqnroll; the central pin promotes the same version in existing lock files.

Validation:

  • Full Release test target passed, including package checks, in 5m27s after the Windows checkout fix.
  • Focused project: 28/28 tests passed. Tests were observed failing before their implementing changes.
  • AltCover: 94.39% sequence and 73.13% branch coverage for Morphir.Conformance, with no handwritten code excluded.
  • Native osx-arm64 smoke ran all twelve variants against an intentionally incorrect adapter and emitted an unqualified JSON report. Its expanded AOT/trim warning details are a subset of the existing CLI baseline; existing FSharp.Core warnings remain visible.
  • Repository lint target completed; explicit Fantomas checks passed for every new F# file. The lint target retains its existing unsupported-F# formatter messages.
  • Both OpenSpec changes validate strictly, relative links resolve, whitespace checks pass and the new agent-skill sync check passes.

An earlier local full run hit the machine-home tripwire when a Rust CLI log appeared outside the test sandboxes. No test-isolation rule was weakened; the final full run passed.

OpenSpec progress is 4/53 tasks. This PR completes the tracking, fixture and MCK seed tasks; the match-reconstruction proof is already on main. Next are compile acceptance scenarios and native compilation contracts/builders/writers, followed by the in-process F# frontend.

Refs #499

Windows CI follow-up: preserve pinned upstream bytes under autocrlf, accept LF/CRLF manifests, and keep case-set bytes LF-stable. The regression failed before the fix; a disposable Git checkout with core.autocrlf=true now preserves every pinned hash and case artifact.

Add planning artifacts only; no production code changes.

- openspec/changes/add-fsharp-compile: steel thread for `morphir compile`
  with an F# frontend, refusal diagnostics, native classic and v4 IR
  builders and writers, project-file sources (--project-file), task
  records, compile --target, streaming --json-lines, and a MEP
  0.2.0-draft.1 compileModel guest and host. Its corpus seeds the first
  Morphir Compatibility Kit suite (Gherkin).
- openspec/changes/establish-morphir-compatibility-kit: morphir-dotnet as
  the home of the MCK and the conformance oracle (case data, not an
  implementation), with `morphir mck`.
- docs/adr/0001: proposed decision that morphir-dotnet provides the
  default Morphir CLI and hosts the oracle, subject to the maintainers.
- PRD for the default CLI: command parity, incremental delivery and
  measurable proof criteria.
Pin upstream compile and MEP inputs with provenance checks. Record the FCS compatibility failure and the disproved exact match-range join before production lowering depends on it. Refs #499.
Add portable Gherkin cases, checked matrices and independent observations. Preserve diagnostics and raw model payloads in deterministic reports.

Refs #499

This branch has not been deployed

No deployments
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