Skip to content

yaml: Mode_C 2-line body floor drops every single-line 'run:' step from the function census (functions_found 3 vs 13) #2649

Closed

Description

@squid-protocol

Found by the #2560 rosetta classification sweep (yaml tracking issue #2606): yaml records functions_found = 3 against 13 func_start matches — a 77% census loss.

Cause

_slice_by_indentation (detector.py ~line 4753) discards any sliced block under 2 lines unless the language is in a hardcoded exemption tuple: ("haskell","python","embedded_python","typescript","javascript"). yaml is correctly routed into Mode_C (GitHub Actions run: steps are indentation-scoped) but is not in the exemption tuple, so every single-line step (- run: 'pytest') produces a 1-line block and is silently dropped from the function census. A single-line run: step is the single most common real-world GitHub Actions form, not a degenerate match.

Evidence

Rosetta corpus: a.yml/b.yml/c.yml's run: steps are all single-line → all three files census 0 functions each; main.yml keeps 3 of 4 (its single-line - run: ':' is dropped). 9 of 13 corpus func_start matches lost.

Fix shape

Add "yaml" to the exemption tuple — or better, make the 2-line floor per-language-configurable instead of a hardcoded id list. Verify no regressions on other Mode_C languages, then the usual golden-master re-bless.

Found via keyword-rosetta classification; cause-key mode-c-two-line-floor-drop.

Activity

  1. added
    bug
    core-engine
    on Sep 2, 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

    bugcore-engine

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions