InsertKoinIO / InsertKoinIO/koin-compiler-plugin

Compile-safety regression sentinel only checks method names, not behavior

Open
#80 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:improvement
Dominant language
Kotlin
Stars
82
Forks
15
Avg merge
1m
Merged PRs (30d)
1

Description

Found during an independent pre-merge review of #79 (1.1.0).

CompileSafetyValidatorSentinelTest (added in 1.1.0 to guard against reintroducing per-module A2-style validation) only reflects over method names — it asserts validate/flushDeferred are absent and validateFullGraph is present. A semantically-equivalent reintroduction of per-module validation logic under a different method name, or inlined directly into validateFullGraph, would pass this sentinel undetected.

The real protection today is the behavioral regression tests (e.g. cross_module_peer_provider_ok.kt), which are sound on their own. This sentinel is closer to documentation-as-test than an actual guard.

Possible directions (not decided): a behavioral sentinel that asserts a genuine per-module false-positive shape (like the :core:notifications/PeerService case that motivated the 1.1.0 removal) stays green regardless of internal refactoring, rather than asserting anything about method names.

Scope: 1.1.1 or 1.2.0, not blocking 1.1.0.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CompileSafetyValidatorSentinelTest and the behavioral regression coverage around cross_module_peer_provider_ok.kt. Review the :core:notifications/PeerService case that motivated the 1.1.0 change, then determine how to make the sentinel behavioral rather than method-name based. Done means the genuine per-module false-positive shape remains green despite internal refactoring.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
compilers, testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.