Skip to content

lab: classify cross-line legato boundaries - #208

Merged
PhysShell merged 6 commits into
mainfrom
claude/lab-legato-projection-audit
Sep 22, 2026
Merged

PhysShell merged 6 commits into
mainfrom
claude/lab-legato-projection-audit

Conversation

@PhysShell

@PhysShell PhysShell commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Question

What do the 46 resolved legato relations outside their origin TabLine actually represent, and where does ordinary within-line voice interleaving turn into a suspicious long-span tail?

This is a diagnostic-only follow-up to #207. It does not select or implement a boundary-state architecture.

Methodology

  • retain stable imported-voice note identity and exact source timing through Lab slicing
  • trace the real, ordered slicing boundaries without changing their control flow
  • emit legato-cross-line.jsonl for all 46 cross-line relations
  • emit legato-span-census.json for all 29,758 retained within-line relations
  • emit the deterministic top 50 to legato-longest-within-line.jsonl
  • use reduced rational quarter-note gaps and nearest-rank min/median/p90/p95/p99/max
  • fail closed if the manifest count differs from CutStats::cross_line_legato

Generated corpus artifacts remain under --out and are not committed.

Exact scope exclusions

No changes to the objective, hard/soft formulas, weights, learner, corpus selection, GP importer semantics, production generator, line-cut thresholds, TechniqueEdge, or Stage 2 conclusions. No line joining, automatic transcription repair, boundary constraints, or boundary state.

Regression coverage

Tests pin:

  • cross-line target through a pure rest cut
  • target excluded by a chord boundary, including the complete chord atom range
  • same-string resolution past intervening other-string notes
  • exact span accounting for a long sparse within-line edge
  • deterministic top-N tie ordering
  • hand-computable nearest-rank distributions
  • no cross-line diagnostic for an ordinary immediate same-string edge

The red-first contract is preserved as its own commit.

Corpus census

410 files (3 import failures), 1,149 guitar tracks:

  • 46/46 cross-line relations, 44 origin lines, 15 songs
  • first boundary: 41 chord-only, 4 rest + chord, 1 pure rest
  • all crossed boundary locations: 333 chord, 7 rest; none from unpositioned, max-fret, or pitch mismatch
  • 38 targets are excluded chord-onset atoms
  • only 8 targets are in another kept line; 6 are in the immediately next kept line and 2 are much farther away
  • no target is in a dropped short fragment
  • 36/46 cross exactly one boundary

Cross-line exact quarter-gap distribution: min 1/8, median 1/2, p90 27.5, p95 75, p99/max 182.496875.

Within-line distribution

Across all 29,758 retained relations:

  • note distance: min/median/p90/p95/p99 = 1; max 169
  • intervening onsets and atoms: min/median/p90/p95/p99 = 0; max 168
  • exact quarter gap: min 1/8, median 1/4, p90/p95/p99 1/2, max 212/3
  • 110 relations (0.37%) are non-adjacent
  • top 50 starts at 2.25 quarters and spans 10 songs
  • 14 exceed 8 quarters; 3 exceed 32

Top outliers

  • Say Hi: 70.667 and 57.5 quarters
  • Missed Injections: 39 quarters
  • There's No Dust in the City: 26.5 quarters
  • Frozen One: repeated 23.5-quarter pair
  • repeated phrase families also occur: 16 × 2.5 quarters in Son of Robot, 6 × 10.167 in Say Hi

Repeated families show that “long” is not itself an error. Isolated extreme spans are consistent with stale or overextended source flags, but that is explicitly heuristic and is not used as ground truth.

Interpretation

The 46 are not one population. The dominant 38 are chord targets outside the monophonic representation; only 8 are technique relations between kept lines. This is evidence that some technique context can survive an optimization-line boundary, and it converges with #199's independent anchor_fret result. It does not prove that production must carry boundary technique state.

A falsifiable next experiment should keep the strata separate:

  1. expose the 38 chord targets to evaluation without joining lines or changing the objective;
  2. replay only the 8 kept-target relations with exact observed origin-string boundary state against independent-line inference.

If neither changes feasibility or preregistered metrics on those cases, reject the boundary-state hypothesis.

Stage 2 invariance

The full fingering_gap legato rerun is unchanged. For v1-fit:

  • B / C1 / D1 exactness: 0.9% / 13.3% / 16.8%
  • gap to comparable untapped lines: 19.1 / 7.6 / 4.2 points
  • 226 tapped lines; 29,758 same-string retained relations; 46 cross-line relations
  • control mismatches: 0

Validation

  • cargo fmt --all -- --check
  • cargo test --release --locked --offline -j 1 (119 passed)
  • cargo clippy --all-targets --locked --offline -j 1 -- -D warnings -A clippy::too_many_lines -A clippy::items_after_statements
  • full fingering_gap legato-census rerun
  • full fingering_gap legato invariance rerun

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 2bb15e26-b0c7-465e-8cc6-d000f6ed6502


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PhysShell
PhysShell marked this pull request as draft September 22, 2026 05:32
@PhysShell PhysShell changed the title lab: audit repaired legato projection tail lab: classify cross-line legato boundaries Sep 22, 2026
@PhysShell
PhysShell marked this pull request as ready for review September 22, 2026 06:32
@PhysShell
PhysShell merged commit 2d92d0d into main Sep 22, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant