Skip to content

feat(compile): thread meta from NormalizedRhs through CompiledRhs#53

Merged
jc-macdonald merged 3 commits intomainfrom
feat/11-compile-meta-threading
Apr 8, 2026
Merged

feat(compile): thread meta from NormalizedRhs through CompiledRhs#53
jc-macdonald merged 3 commits intomainfrom
feat/11-compile-meta-threading

Conversation

@jc-macdonald
Copy link
Copy Markdown
Collaborator

Closes #11

Summary

NormalizedRhs.meta (axes, kernels, operators, etc.) was dropped during compilation — CompiledRhs had no meta field. This meant downstream consumers (e.g. the flepimop2 provider) couldn't access structural metadata without re-normalizing the spec.

Changes

  • Add meta: Mapping[str, Any] field to CompiledRhs (defaults to empty MappingProxyType({}))
  • Pass rhs.meta through in compile_rhs()
  • Add 3 tests: axes+kernels round-trip, bare spec empty meta, compile_spec facade end-to-end

2 files changed, +56 lines across 3 focused commits.

Commits

  1. fdcf105feat(compile): add meta field to CompiledRhs
  2. 3b27f19feat(compile): thread meta from NormalizedRhs through compile_rhs
  3. 922cdc3test(compile): add meta threading tests

Add a Mapping[str, Any] meta field to CompiledRhs with an empty
MappingProxyType default. Existing callers are unaffected — the
field is optional and backward-compatible.

Part of #11.
Pass rhs.meta to CompiledRhs in compile_rhs(), preserving axes,
kernels, and operators metadata through the compile pipeline.

Part of #11.
Verify that:
- compile_rhs preserves axes and kernels metadata
- bare specs produce empty meta collections
- compile_spec facade round-trips meta end-to-end

Refs: #11
@jc-macdonald jc-macdonald force-pushed the feat/11-compile-meta-threading branch from bde0ba7 to 3727f71 Compare April 8, 2026 12:12
@jc-macdonald jc-macdonald added enhancement New feature or request testing Test infrastructure and coverage architecture Structural or design-level changes labels Apr 8, 2026
@jc-macdonald jc-macdonald added this to the Core Internals milestone Apr 8, 2026
@jc-macdonald jc-macdonald merged commit c341fc0 into main Apr 8, 2026
5 checks passed
@jc-macdonald jc-macdonald deleted the feat/11-compile-meta-threading branch April 8, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture Structural or design-level changes enhancement New feature or request testing Test infrastructure and coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile meta threading

2 participants