refactor(contracts): bind only the interactor families an owner implements

Merged
TH
7d ago
+740-353

Summary

Two contracts aggregates made every runtime owner value-import every operation family:

  • interactor-operation-catalog.ts held all 31 rows and the adapters, so tv-cdp/runtime.ts → catalog → keyboard-runtime.ts (and clipboard, alert, settings, orientation, app-event).
  • platform-runtime-unavailable.ts called each family's facts builder, 21 families in all.

Now each family declares its rows beside its binders. The adapters move to interactor-operation-binding.ts and take the rows to walk. The catalog is the concatenation, for owners that implement every family. The TV runtime (Tizen, webOS) and Vega pass their own families. The unavailable hub states each operation by name, as it already did for fold.

No behaviour, wire, or plugin contract change. Facts still decide what binds. Not device-facing.

Value

Entrycontracts files value-reachedreachable lines
Tizen41 → 2716,013 → 14,317
webOS41 → 2715,889 → 14,193
Vega38 → 1911,883 → 9,212
Linux41 → 3716,149 → 15,893

Cherry-picked onto 0.22 in a scratch copy: Tizen plugin dist 92,076 → 85,194 bytes, webOS 90,648 → 83,766. Revyl, which binds every family, grows 164,175 → 165,101.

Validation

At 10215d4de8: pnpm check:quick, check:layering, check:fallow, check:production-exports, check:package, and the eager-closure budget test pass. 252 targeted test files pass (contracts, tv-cdp, Vega, Linux, Tizen, webOS, Limrun, Revyl, webdriver, HarmonyOS, Android runtime, Apple navigation/system, repo guards). The unavailable facts value is byte-identical before and after for distinct per-cell inputs. New tests in tv-cdp and Vega fail if facts admit a catalog operation the owner does not bind.

CI owns full unit coverage and device lanes. The final commit regenerates the contracts export snapshot for the new interactor-operation-binding subpath.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.