Changelog

Unreleased

  • Finalize sealed @Derive root-vs-leaf semantics: root-only sealed derivation now stays explicitly covered as “derive the root and the needed leaf rules”, leaf-only derivation remains standalone and does not imply the sealed root, mixed root+leaf annotations are pinned as idempotent rather than ambiguous, and cross-module leaf-typed consumers now exercise root-synthesized leaf rules directly.
  • Finalize the remaining orphan-location edge case for top-level @Instance declarations: declared nested head arguments like TC<Foo, Boo<Baz>> now make Baz.kt and Boo.kt legal hosts, but entailed supertypes such as Eq<Foo> from a declared Ord<Foo> no longer confer orphan-host ownership.
  • Support inherited/default typeclass-deriver methods end to end: FIR and IR now resolve deriveProduct, deriveSum, and deriveEnum through implemented deriver superinterfaces instead of only scanning companion-local declarations, and the derivation capability suite now covers inherited product/sum/enum defaults directly.
  • Fix the latest FIR/IR review regressions around derivation and inference: sealed-root FIR masking no longer short-circuits to derivable on the first unexpressible subclass, FIR deriver validation now accepts Any-typed object/constructor return shapes that IR already supports, constructive product derivation rejects non-public stored properties and private primary constructors instead of emitting illegal accesses, and receiver-backed typeclass evidence now participates in FIR call-site type inference.
  • Emit traced FIR-side [TC_NO_CONTEXT_ARGUMENT] diagnostics for ordinary missing-context call roots under @DebugTypeclassResolution, so FAILURES / FAILURES_AND_ALTERNATIVES now explain missing evidence even when Kotlin aborts before IR and the living tracing spec can assert failure-side traces directly.
  • Implement scoped typeclass-resolution tracing behind @DebugTypeclassResolution and the mode-based typeclassTraceMode compiler option: successful roots now emit [TC_TRACE] INFO messages, plugin-owned failure/ambiguity/derivation errors can carry supplemental trace blocks, and focused integration coverage now exercises success tracing, derivation tracing, mode precedence, and deterministic candidate reporting.
  • Promote the implemented tracing behavior into DebugTypeclassResolutionSpec and DebugTypeclassResolutionPrecedenceSpec directly, retire the separate duplicate tracing test suite, and leave only the still-unimplemented tracing edges individually ignored inside the living spec files.
  • Add DebugTypeclassResolutionSpec as a detailed design suite for a future scoped resolution-tracing facility, covering file/class/function/property/local-variable scopes, nearest-scope precedence, success-vs-failure tracing, deterministic ambiguity traces, derivation-specific trace content, DeriveVia path explanations, and cross-module external-rule reporting boundaries.
  • Refine DebugTypeclassResolutionSpec with a master trace knob, inherited trace-setting semantics, single-request phase ownership, stable ordering rules for local/builtin/synthetic candidates, authored-vs-normalized DeriveVia trace expectations, and additional ignored fixtures for trace = INHERIT, nested trace = DISABLED, local-context ambiguity ordering, separate-compilation no-semantic-effect checks, and runnable DeriveVia / cross-module success cases.
  • Further tighten DebugTypeclassResolutionSpec around explicit INFO success-trace output, stable secondary-diagnostic trace envelopes, derivation-vs-resolution root kinds, nested trace re-enablement, declaration-vs-local ordering rules, and additional ignored derivation-focused fixtures for @DeriveEquiv, explained-alternative failures, declaration-root-only tracing, and file-level trace suppression on derived declarations.
  • Rename the proposed tracing enum surface in DebugTypeclassResolutionSpec to TypeclassTraceSetting, add PROPERTY-target coverage plus recipe-style/defaulting guidance, and extend the ignored suite with edge cases for inherited success knobs under disabled tracing, success-detail inheritance through muted parents, and explainAlternatives without success tracing.
  • Further refine DebugTypeclassResolutionSpec around property participation in scope precedence, explicit [TC_TRACE] envelopes and INFO success-channel semantics, effective-config display, friendly local-context labels, and success traces that still appear alongside unrelated compilation failures.
  • Simplify DebugTypeclassResolutionSpec precedence language to the real nearest-enclosing lexical rule, add an explicit caller-side-resolution note for ordinary declarations, make the default-enables-tracing rule harder to miss, and tighten the separate-compilation A/B fixture so the annotation is the only semantic delta.
  • Split the tracing design coverage into DebugTypeclassResolutionSpec for the normal user-facing behavior model and DebugTypeclassResolutionPrecedenceSpec for inheritance/override edge cases, so the main spec reads like a guide instead of a precedence stress test.
  • Simplify the tracing-design surface from three independent tri-state knobs to a single public TypeclassTraceMode in the spec suites, keep bare @DebugTypeclassResolution as failure/ambiguity tracing, make DISABLED a true local barrier, and add first-class local-variable scope coverage plus simpler mode-based precedence examples.
  • Enrich plugin-owned diagnostics with explicit Why it failed / How to fix narratives for invalid @Instance, invalid Equiv, derivation failures, ambiguous instance selection, missing IR-context resolution, and builtin-evidence failures; add a shared parser/renderer model with round-trip tests for those narratives; and tighten the integration harness so negative tests assert parsed structured diagnostics instead of loose fragments.
  • Add DerivationOptimizationSpec as a detailed design suite for the planned derivation-optimization pass, covering local product/sum/enum specialization, recursive knot handling, DeriveVia transport fusion, and explicit no-inlining boundaries across compilation units and modules.
  • Enable reviewed builtin and overload-resolution regressions, remove star-projected context-parameter fixtures that are now considered prohibited, and move callable-reference and contextual-property blocked coverage into a dedicated integration.blocked package.
  • Match GadtDerivationPolicy by its full one.wabbit.typeclass identity in IR instead of by short-name coincidence, add the public runtime annotation surface for the policy override, and cover collisions with unrelated same-named annotations from other packages.
  • Expand @DeriveVia IR rule emission through inherited typeclass superinterfaces so backend-generated rules stay aligned with FIR derivability for cases like Ord<T> : Eq<T>, and add a focused regression proving @DeriveVia(Ord::class, ...) can satisfy Eq<...> call sites.
  • Tighten review-driven FIR/IR consistency around derivation and discovery: FIR now checks direct-owner product prerequisites before masking derived contexts, Equiv target acceptance across dependency annotations is precise, deriver discovery/validation resolves real contract overrides instead of bare helper names, and FIR contextual-call/rule discovery shares one traversal instead of scanning the whole classpath twice.
  • Extend that FIR masking fix to the reproduced same-source monomorphic sealed-sum case as well, so missing case prerequisites no longer create false overload ambiguity while valid generic and binary sealed derivation paths keep their existing behavior.
  • Extend the same review-driven FIR masking fix to the reproduced simple generic sealed-sum case too, so Option<Payload>-style missing leaf evidence no longer biases overload selection while more complex binary/GADT sealed derivation still stays on the older conservative path.
  • Unify binary derivation metadata for derive, derive-via, and derive-equiv: generated markers now carry precise payloads, FIR and IR decode the same GeneratedDerivedMetadata model for cross-module reconstruction, DeriveVia paths preserve waypoint-vs-pinned-Iso segments, and the new codec unit tests pin that payload contract directly.
  • Expand DerivationBoundaryTest with stronger split-file and dependency-boundary negatives: incomplete sealed hierarchies now have “supported case still fails” regressions, split-file manual-vs-derived root conflicts are covered directly, and mixed multi-@Derive(...) success/failure is now pinned in both same-compilation and cross-module boundary shapes.
  • Fix the review-driven compiler regressions around @DeriveVia recursion tracking, @Derive/@DeriveVia/@DeriveEquiv derivability filtering, full terminal via type preservation, active-rule-scoped recursive planning, stricter deriver return-type validation, and explicit review regressions for repeated sibling transport, nullable/parameterized via targets, generic/non-unary unsupported derivation sites, and recursive-rule scoping.
  • Implement the active GADTDerivationTest contract: classify effective variance from typeclass signatures, honor conservative GADT-policy overrides, synthesize specialized sealed-root derivation heads for admissible result-head refinements, preserve ordinary covariant Nothing cases in generic sealed ADTs, and keep user-written instances ambiguous against derived ones instead of letting GADT-specific rule priority hide them.
  • Implement @DeriveVia and @DeriveEquiv end to end, including compiler-owned Equiv evidence, FIR/IR validation for invalid Equiv declarations, last-slot typeclass transport, pinned Iso path segments, structural transportability checks, and active DeriveViaSpec coverage.
  • Add cross-module @DeriveVia / @DeriveEquiv regressions, including upstream-module waypoint and pinned-Iso transport plus a two-dependency @DeriveEquiv(A::class) export case, and harden FIR/IR derivation discovery so binary generated markers and external DeriveVia/DeriveEquiv rules remain visible across module boundaries.
  • Add first-class enum class derivation via deriveEnum, including IR-generated enum metadata and JSON-codec regressions that prove derived enum/product output can match kotlinx.serialization for enum-bearing ADTs.
  • Make the test-model JSON codec treat primitive-backed sum cases symmetrically on decode, and add a sealed-root regression where an enum case encodes through {"type": "...", "value": ...} rather than an object payload.
  • Split serialization runtime support from the serialization compiler plugin in the test harness, and run pure model JsonCodec derivation regressions against the runtime-only classpath so they catch hidden plugin dependencies.
  • Add richer Compose/contextual interop regressions for composable lambda bodies, default parameter expressions, remembered lambdas, and effect scopes.
  • Add operator and delegated-property regressions for delegation operators, unary operators, += fallback through plus, and pending explicit-argument invoke regressions.
  • Expand derivation law coverage for richer ADTs, including generic Either<A, B>-style sums, enums with constructor parameters, nested sealed subclasses, and mixed object / data object / data class / plain-class sealed hierarchies.
  • Add constructive product-derivation support via ProductTypeclassMetadata.construct(...), require ProductTypeclassDeriver for product-only typeclasses, and require full TypeclassDeriver only for sealed-sum derivation.
  • Add value-class metadata to constructive derivation for both products and sealed-sum cases, and cover a recursive JsonElement codec that mirrors sealed KSerializer-style output for products, sums, objects, and value classes without JVM reflection.
  • Expand constructive-derivation coverage for generic value classes, empty products, and sealed sums whose cases share field names, and add declaration-site rejection for product derivation without a primary constructor.
  • Reject @Derive on open roots and on non-constructible product shapes whose stored properties cannot be rebuilt from the primary constructor, and cover the new capability contract with dedicated integration tests.
  • Replace legacy // ERROR integration-test assertions with line-scoped // E:TC_* / // W:TC_* markers, and teach the harness to merge those source markers with the older message-fragment expectations.
  • Add TC_INVALID_BUILTIN_EVIDENCE plus source-located IR reporting for builtin proof/materialization failures, and tag IR missing/recursive resolution failures with TC_NO_CONTEXT_ARGUMENT so negative tests can assert stable ids across both FIR and IR.
  • Rewrite ImportVisibilityTest around the stricter orphan policy: same-file top-level and companion-associated instances stay covered, unrelated-file top-level orphan cases are now declaration-site specs, and dependency-boundary visibility stays covered for internal and private/public companion instances.
  • Enforce the stricter orphan policy in FIR and IR: unrelated-file top-level @Instance declarations now fail at declaration site and are no longer indexed into resolution, and the old “extra file changes resolution” tests were rewritten around that policy.
  • Add builtin-shadowing regressions proving explicit local KClass<T> and KSerializer<T> evidence beat synthetic builtin evidence, and add harness-determinism regressions for repeated runs, fail-then-succeed behavior, file-order stability, and dependency-run isolation.
  • Add smart-cast call-site regressions covering is branches, when branches, and non-null checks so contextual render(x) uses the refined expression type without pretending flow analysis synthesizes new proof objects.
  • Add law-bearing derivation regressions for derived Eq on products and sums, plus smart-cast helper/non-leak regressions covering ?.let, also, run, and branch-local refinement boundaries.
  • Add a law-bearing derived Monoid regression for products, using reflective reconstruction in the test deriver so derived combine / empty semantics are exercised instead of just compile-time smoke.
  • Add stable TC_* diagnostic ids for invalid @Instance declarations, ambiguous instance resolution, derivation failures, and harness-classified missing-context failures, and make the integration harness parse and prefer those ids before matching message text.
  • Strip explicit TC_* prefixes back out of parsed diagnostic messages in the harness so existing fragment assertions stay readable while still matching ids first.
  • Tag parsed diagnostics in the integration harness as FIR- or IR-originated so negative tests can distinguish frontend declaration/call failures from backend plugin reports without relying on message wording.
  • Make direct instance-rule ids include prerequisite and type-parameter shape so overloaded @Instance functions with the same callableId and provided head no longer collapse into missing evidence or lost ambiguity.
  • Add focused regressions proving overloaded instance rules with the same name and provided head still resolve the applicable candidate and still report ambiguity when both prerequisites are available.
  • Remove the dead TypeclassWrapperKey / hidden-wrapper FIR-IR bookkeeping path after auditing that it had no remaining producer, and keep the wrapper marker parameter handling only where it is still live in IR rewriting.
  • Remove the dead FIR status-transformer shell and the empty FIR generation extension shell, leaving only the registered FIR registrar and the live wrapper-signature helper so the extension surface matches the actual implementation.
  • Filter KnownType<T>, TypeId<T>, KClass<T>, and builtin KSerializer<T> candidates using call-site runtime materializability, so nested non-reified shapes like KnownType<List<T>> stop compiling through FIR/IR planning and now fail earlier as ordinary missing-context errors.
  • Add focused regressions proving nested non-reified KnownType, TypeId, and builtin KSerializer prerequisites fail early, while the same nested prerequisites still participate in ordinary rule search from inline reified call sites.
  • Reject direct self-recursive @Instance function rules against every expanded provided type, so wrapper-returning or inherited-@Typeclass heads like WrappedShow<Box<A>> : Show<Box<A>> can no longer dodge declaration-site recursion validation.
  • Add focused regressions for wrapper-returning instance rules, proving recursive expanded heads are rejected while nonrecursive wrapper-returning rules still compile and run.
  • Filter impossible IsTypeclassInstance<TC> builtin goals before planning when TC is visibly not a typeclass application, so those fake candidates cannot create spurious ambiguity or survive until IR-only failure.
  • Add focused regressions proving that an impossible IsTypeclassInstance<List<Int>> prerequisite no longer distorts ordinary rule search while a valid IsTypeclassInstance<Show<Int>> prerequisite still works.
  • Fix a FIR scanner crash on @Instance functions and properties with implicit return types by using the callable symbol's resolved return type instead of assuming the raw returnTypeRef is already a FirResolvedTypeRef.
  • Add a focused FIR regression covering Brewing-shaped companion @Instance val ... = ... declarations with implicit types plus a downstream contextual updateComponent<T>(...) call.
  • Enable a small batch of low-risk core regressions covering fun-interface typeclasses, use-site variance in ordinary typeclass goals, non-discovery of local @Instance declarations, definitely-non-null typeclass goals, and filtering of inapplicable associated sealed-supertype candidates.
  • Enable the PHASE17 all-open/no-arg interop coverage and extend the integration harness with explicit AllOpen(...) and NoArg(...) support plugins that forward annotation-based compiler-plugin options.
  • Enable the PHASE13G TypeId regressions, preserve use-site variance in the internal semantic type model, and materialize reified TypeId<T> evidence through typeOf<T>() plus a runtime KType factory.
  • Enable the PHASE13E and PHASE13F utility-proof regressions, synthesize builtin Nullable, NotNullable, and TypeId evidence, and keep the proof surface usable from end-user code without leaking InternalTypeclassApi opt-in requirements.
  • Add an explicit regression proving that end users can summon and use builtin proof evidence without opting into InternalTypeclassApi.
  • Enable the PHASE16 AtomicFU interop coverage and keep the harness generic enough to load AtomicFU as an explicit support plugin rather than treating it as ambient test infrastructure.
  • Enable the PHASE15 Parcelize interop coverage and extend the integration harness so support plugins can contribute synthetic support sources alongside runtime jars, compiler plugin jars, and plugin options.
  • Enable the PHASE13C and PHASE13D proof-operator regressions, add runtime-facing equality/subtyping combinators, and synthesize builtin StrictSubtype evidence as the conjunction of Subtype and NotSame.
  • Enable the PHASE14 Power Assert interop coverage and extend the integration harness so support plugins can declare compiler plugin ids plus repeated -P plugin:<id>:... options instead of smuggling raw option strings through ad hoc arguments.
  • Make FIR contextual-call masking honest: only fully solved typeclass contexts are hidden now, while ambiguous/recursive/unrelated @Derive cases stay visible and fail earlier as ordinary no context argument frontend errors.
  • Track @Derive facts by (target class, requested typeclass) instead of by class alone, so @Derive(Show::class) no longer makes FIR pretend that unrelated heads like Eq<User> are derivable.
  • Enable the PHASE13B utility-proof regressions so builtin proofs can act as prerequisites for ordinary rule search, and tighten the builtin KSerializer gate to reject star-projected serializer goals before runtime.
  • Enable the PHASE13 Compose interop suite and replace source-sniffed support detection in the integration harness with explicit requiredPlugins declarations that can contribute runtime jars, compiler plugin jars, compiler arguments, and minimum JVM targets.
  • Add Gradle-cache fallback lookup for harness support artifacts so interop tests can resolve third-party compiler plugins and runtimes without assuming they are already on the test JVM classpath.
  • Keep the integration harness default JVM target at 1.8, while allowing specific interop plugins such as Compose to raise the minimum target they need for their own bytecode.
  • Implement PHASE12 utility-proof builtins for Same, NotSame, Subtype, KnownType, SameTypeConstructor, and IsTypeclassInstance, including IR materialization through runtime proof singletons, star-projection support in the internal type model, and the knownType(kType) factory.
  • Enable the PHASE12 utility-proof regression suite and fix the invalid invariant-fixture shape so the tests exercise subtype proof failures instead of Kotlin front-end parse errors.
  • Generalize the integration harness around source-detected support bundles so tests can attach extra runtime jars and compiler plugins, and use that mechanism to exercise kotlinx.serialization without making it a blanket assumption for every compilation.
  • Implement PHASE10A declaration-site checks for invalid instance-function prerequisites, including non-typeclass contexts, star-projected prerequisites, and definitely-non-null typeclass prerequisites.
  • Implement PHASE11 builtin KSerializer evidence by routing synthesized instances through the official kotlinx.serialization.serializer<T>() API, while gating FIR/IR builtin-rule selection so obvious non-serializable concrete types still fail at compile time.
  • Add compiler options for builtin KClass and KSerializer typeclass evidence, and enable the PHASE10 builtin-KClass regression coverage.
  • Normalize packed IR value-argument prefixes with a backtracking matcher so contextual rewriting can distinguish omitted typeclass contexts from named/default argument shapes.
  • Infer generic owner type arguments from the apparent types of generic call expressions, which fixes default typeclass methods that require additional contextual evidence.
  • Fix origin=EQ contextual set operator rewrites by swapping Kotlin's lowered extension-receiver/index layout and trimming the synthetic trailing null assignment shim argument.
  • Enable the active PHASE9 operator and resolution regressions, and reclassify contextual property-getter coverage plus the invalid private-field contains fixture as blocked tests instead of phase-gated work.
  • Represent recursive derived-instance metadata slots with runtime cells instead of reflective/provider indirection, and emit cell setter calls from IR so recursive ADT derivation survives JVM codegen and runtime access checks.
  • Stop assuming every IR callee has a callableId; wrapper lookup and diagnostics now tolerate local and late-bound functions so contextual rewriting works inside anonymous objects, local functions, constructor delegation, and interface delegation.
  • Target Kotlin 2.3.10 with context-parameter inference for @Typeclass contexts only.
  • Support object and function instances, including associated companion lookup for target types and type arguments.
  • Add IR-backed @Derive support for product types and sealed sums through TypeclassDeriver companions.
  • Make the compiler integration tests portable by removing hardcoded jar paths and adding compile-and-run coverage for derivation and contextual extensions.
  • Added the one.wabbit.typeclass Gradle plugin path as the recommended way to load the compiler plugin in Gradle builds.
  • Generate non-reflective product field accessors and sum-case matchers in derivation metadata, and cover library summon() in integration tests.
  • Scope FIR contextual-function indexing per session so IntelliJ K2 analysis does not reuse wrapper-generation state from the wrong module session.
  • Replace FIR file-by-package scanning with symbol-provider enumeration so IntelliJ FIR analysis no longer trips LLFirProvider.getFirFilesByPackage.
  • Make compiler integration tests fall back to compiled JVM classes when the local runtime jar artifact is unavailable or empty.
  • Resolve generated contextual wrapper statuses before FIR validation and cover generic companion factory wrappers in integration tests.
  • Fix IR context-slot indexing for member contextual helpers, infer rewritten call type arguments from receivers as well as surviving value arguments, and add regressions for member customSummon-style helpers plus dispatch+extension operator calls.
  • Document the current compiler-plugin edge cases and Kotlin IR slot-layout learnings in LEARNINGS.md.
  • Fix IR rewriting for preserved explicit context arguments inside contextual lambdas, overloaded self-calls in anonymous functions, and generic summon<T>() calls whose contextuality only appears after type substitution.
  • Add regressions for platform-type safe calls, cross-file overloaded wrappers, and star-projected contextual lambdas that forward associated typeclass evidence through higher-order calls.
  • Fix receiver-only FIR type inference for contextual extension/operator calls, and stop synthetic implicit receiver injection from polluting unrelated lambda overload resolution such as run { ... }.
  • Add FIR declaration-site validation for invalid @Instance scopes and shapes, propagate recursive instance search failures instead of downgrading them to missing evidence, and enable the PHASE2 regression tests that cover those cases.
  • Expand @Instance declarations through inherited @Typeclass supertypes, reject non-@Typeclass intermediates that try to smuggle inherited instances, and enable the remaining PHASE3 hierarchy regressions including local Group -> Monoid -> Semigroup evidence.
  • Reject @Instance function rules whose type parameters do not participate in the provided head, reject direct self-recursive rules at declaration site, and enable the full PHASE4 regression slice including integer-literal stability and transparent typealias resolution.
  • Fix IR type-argument reconstruction for local generic functions and preserved explicit context arguments supplied as instance objects, report contextual binding conflicts as normal compilation errors, and enable the full PHASE5 regression slice including local contextual functions, nullary typeclasses, sealed-interface derivation, and nested generic shadowing.
  • Enable the full PHASE6 regression slice covering contextual single-vs-vararg overloads, nested typealias transparency, trailing-lambda vararg rewrites, inline reified summon, and secondary-constructor delegation rewrites in Kotlin-supported source forms.
  • Bind owner-class type parameters when rewriting generic typeclass member methods in IR, improve FIR generic-call inference for vararg and generic-constructor arguments, and enable the PHASE7 slice covering captured local evidence, duplicate nullary instances, typeclass default methods with extra context, nested generic sealed derivation, and contextual field-instance derivation.
  • Split callable-reference integration coverage out of SurfaceTest into a dedicated CallableReferenceTest while leaving property-reference cases in SurfaceTest.
  • Split contextual property and property-reference integration coverage out of SurfaceTest into a dedicated PropertyTest.
  • Enable another batch of previously ignored core regressions covering contravariant Nothing exact-match selection, expected-type and receiver-driven contextual inference, alias/generic overlap diagnostics, definition-site evidence capture for returned lambdas and objects, multi-head instance objects with superclass evidence, value-class prerequisite specificity, and projection-specific prerequisite specificity.
  • Stop indexing illegal @Instance declarations from non-companion member scopes during FIR/IR rule discovery, add regression coverage proving those bad declarations no longer create spurious call-site ambiguity, and extend the integration harness with unexpectedMessages assertions for diagnostic-shape checks.
  • Tighten IR explicit-context preservation so an existing argument must still satisfy the expected contextual type before it can be rebound to a typeclass slot during wrapper rewriting.
  • Reject sealed derivation for non-generic roots whose generic subclasses introduce free type variables that are not quantified by the sealed root, and cover that failure mode in ReviewRegressionTest.
  • Fix contextual in / contains operator rewriting by swapping Kotlin's lowered IrStatementOrigin.IN receiver/value layout back into the original extension-call shape, and enable the rewritesContextualContainsOperatorCalls integration test.
  • Filter obviously impossible model-only builtin proof rules such as NotSame<A, A>, nullable KClass<T?>, and mismatched SameTypeConstructor<F<_>, G<_>> before planning so they cannot create spurious ambiguity or disappear only at IR materialization time.
  • Filter obviously impossible Subtype and StrictSubtype proof goals before planning when the plugin can prove they fail from source-visible variance and hierarchy metadata, and add review regressions so impossible builtin prerequisites no longer interfere with ordinary instance search.
  • Read generated derive metadata for dependency classes from FIR resolved annotations instead of source-only annotation lists, which restores cross-module sealed derivation for dependency roots split across files and modules.
  • Add DerivationBoundaryTest coverage for cross-file and dependency-module sealed derivation, including generic sealed roots and a control case proving ordinary dependency companion instances already worked.
  • Add chained multi-module derivation coverage where module A owns the typeclass deriver, module B owns the derived sealed ADT, and the consumer module only sees the transitive dependency graph.
  • Add pure BuiltinGoalSupportTest coverage for KClass, KnownType, TypeId, IsTypeclassInstance, and KSerializer admissibility logic, and factor out the pure KSerializer shape gate so it no longer relies only on integration regressions.
  • Add negative derivation-boundary regressions for missing dependency-side field evidence, manual-vs-derived exported instance conflicts, and partial multi-@Derive success across module boundaries.
  • Expand WrapperPlannerTest with local-evidence precedence, cycle-plus-valid-alternative success, rule-order stability, and explicit competing-plan ambiguity checks.
  • Align impossible Subtype and StrictSubtype negative tests with the earlier FIR TC_NO_CONTEXT_ARGUMENT failure mode now that impossible builtin proof candidates are filtered before later materialization.
  • Reject deriveProduct and deriveSum implementations when FIR can statically see they return the wrong typeclass constructor for their enclosing @Typeclass.