feat(swift,kotlin): mirror the recipe → Pattern rename in the ports — phase 2 - #1062
Conversation
…— phase 2 Phase 2 of the recipe -> Pattern rename epic — the Swift + Kotlin port mirror of the JS phase-1 public-boundary rename (#1061). FieldRecipe -> FieldPattern, CompiledRecipe -> CompiledPattern, compileRecipe -> compilePattern, and the FieldRecipes catalog namespace -> FieldPatterns, in both FundamentalCore (Swift) and :fundamental-core (Kotlin), plus the FieldLab / lab consumers. Internal references are migrated to the new names (Swift/Kotlin emit real build warnings on deprecated-alias use, unlike JS JSDoc); the old names are kept as @available(deprecated) / @deprecated aliases for back-compat, removed at 1.0 — mirroring phase 1's alias set. Internal helper type names (BodyRecipe, RecipeTier, ...) are left as-is, matching phase 1 (a later phase). Verified locally: - Swift: `swift build` complete (all targets incl. FieldLab); `swift test` 234 tests pass incl. the cross-plane conformance golden ("every golden case is reproduced by the Swift force within tolerance"). - Kotlin: `:fundamental-core:test :lab:test` BUILD SUCCESSFUL, 217 tests, 0 failures (JDK 17; local default JDK 26 crashes the bundled Kotlin compiler's version parse — an environment issue, not the diff). The parity-matrix regen + CHANGELOG note land at finalize, once #1061 (phase 1) is on main, so the matrix shows all three planes aligned rather than ports-ahead-of-JS.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1a8795f6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| typealias FieldRecipe = FieldPattern | ||
|
|
||
| @Deprecated("Renamed to FieldPatterns", ReplaceWith("FieldPatterns")) | ||
| typealias FieldRecipes = FieldPatterns |
There was a problem hiding this comment.
Preserve the deprecated Kotlin JVM symbols
For Java callers or already-compiled Kotlin/JVM clients that still use the 0.x recipe API, these typealias declarations are erased and do not emit the old com.fundamental.core.recipes.FieldRecipe / FieldRecipes bytecode. That makes the advertised deprecation window source-only for Kotlin and a hard compile/load break for those clients instead of a warning; keep deprecated wrapper classes/objects (and the old CompiledRecipe JVM type/signatures) if the old names are meant to remain usable until 1.0.
Useful? React with 👍 / 👎.
Rolls the seven publishable packages **0.9.3 → 0.9.4** (additive release) and dates the CHANGELOG `[Unreleased]` as **`[0.9.4]` — 2026-07-10**. `FIELD_VERSION` bumped in lockstep (enforced by `version.test.ts`). `apps/site` (0.2.0) + `apps/starter` (0.1.0) version independently and are untouched. **0.9.4 collects (all additive — 0.x patch):** - **focus / attention substrate** (EXPERIMENTAL) — operator attention as an input, agent attention as an output over one field ([#1063](#1063)). - **recipe → `Pattern` rename** phases 1 + 2 — JS public API ([#1061](#1061)) + Swift/Kotlin ports ([#1062](#1062)), with deprecation aliases (old names still work, removed at 1.0). - **core folder standardization** — `src/core` → `src/engine`, `math/` extraction. Verified: `build` · `version.test.ts` lockstep · `check:api` · `check:readme` green. **Publish is yours:** merging this doesn't publish — pushing the `v0.9.4` tag triggers the provenance publish workflow. I don't tag/publish autonomously.
Phase 2 of the recipe → Pattern rename epic — the Swift + Kotlin port mirror of phase 1's public-boundary rename (#1061).
Renamed (with deprecation aliases) in
FundamentalCore(Swift) and:fundamental-core(Kotlin), plus theFieldLab/labconsumers:FieldRecipe→FieldPatternCompiledRecipe→CompiledPatterncompileRecipe→compilePatternFieldRecipescatalog namespace →FieldPatternsInternal references are migrated to the new names (Swift/Kotlin emit real build warnings on deprecated-alias use, unlike JS JSDoc); the old names stay as
@available(*, deprecated)/@Deprecatedaliases, removed at1.0. Internal helper type names (BodyRecipe,RecipeTier, …) are deferred — an exact mirror of phase 1.Verified locally:
swift buildcomplete (all targets incl.FieldLab);swift test234 tests pass, incl. the cross-plane conformance golden ("every golden case is reproduced by the Swift force within tolerance").:fundamental-core:test :lab:test→ 217 tests, 0 failures (JDK 17).The parity matrix (
data/parity-matrix.json) tracks force catalogs + FieldHandle, not recipe symbols — confirmed unaffected by this rename.