Skip to content

Kotlin listeners: Result.onSuccess { } counts as an event-listener registration #9426

Backlog

Description

@squid-protocol

Found by the SOP-002 gap-cell decoy suite (protocol SOP-002-v1, epic #8863).

Construct: kotlin.Result.onSuccess { } / onFailure { }. The listeners branch \.on[A-Z]\w*\s*[({] matches any .onXxx { call, so these count as event-listener registrations.

Snippet: result.onSuccess { }
Expected: 0 listeners hits. signal_contracts.py defines listeners as "a registration to receive from an external broadcast"; Result.onSuccess runs its lambda immediately on an in-hand value and registers nothing. Actual: 1 hit. (flow.onEach { } also hits; that one is arguably a registration, so it is not asserted.)

Rule: gitgalaxy/standards/language_standards/languages/kotlin.py, listeners.

Locked in tests/decoys/test_decoy_kotlin.py as xfail(strict=True).

Activity

  1. added
    bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions