test(analysis): lock verse/chorus chord recovery on a known take - #891
test(analysis): lock verse/chorus chord recovery on a known take#891cursor[bot] wants to merge 6 commits into
Conversation
Keep section harmony honest: a C-then-G rehearsal take, and the reverse order, must recover each section's main chord with duration-weighted recall instead of collapsing to one song-wide answer. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Keep C/G major windows from passing on Cm/Gm. Document that the section bounds are annotated so the lock is not read as form detection. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
There was a problem hiding this comment.
Relation to #890
#890 is the Tier 1 real-audio landing (decoded C-major WAV duration + 120 BPM Acc1). This PR is the section-change complement: annotated C-then-G and G-then-C windows, live recognizer, duration-weighted recall, minor labels rejected.
Do not merge both as competing single-chord locks. Prefer #890 for the WAV/tempo package. Keep this head for the temporal song -> section proof. Rebase after #890 if the shared ADR files conflict.
Do not mix Stem Lab (#884), lock-in (#888), or NIM (#881) here. Do not self-approve.
Sent by Cursor Automation: Fix Issues
seonghobae
left a comment
There was a problem hiding this comment.
Reviewed exact head 92fe915 against protected develop@acdbea6344fe1231c39535b575f4de35e4c607c9. The section-level known-progression acceptance is bounded to test/evidence/docs, uses the production ChordRecognizer + section summary, keeps major/minor distinct, and unions overlapping matching intervals so duplicate-time estimates cannot inflate recall. No actionable inline finding remains in the current diff. APPROVE applies only to this unchanged head and does not waive the still-required #783/#861/central security, coverage, exact-head check, Draft, or branch-protection gates.


Summary
Players copy from the recording. A verse in C and a chorus in G must stay two answers. This branch locks that contract on annotated windows: the production
ChordRecognizerplus section summary must recover C then G, and the reverse order, with duration-weighted chord symbol recall at or above 0.70. Minor labels cannot satisfy a major window.Exact current head:
92fe9155a1896e13ba8e06e1762f6848fc2efdfa.Protected base:
develop@acdbea6344fe1231c39535b575f4de35e4c607c9.This is a distinct analysis-accuracy evidence slice. Do not mix Stem Lab (#884), lock-in (#888), NIM contract (#881), dependency remediation (#783), or Python branch-coverage ownership (#861) onto this PR.
Test-first evidence-integrity repair
Exact-code review found that the test's
_duration_weighted_symbol_recallhelper added every matching segment overlap independently. Overlapping or duplicate recognizer segments could therefore count the same annotated section time twice and inflate the acceptance score above its real covered fraction, including above1.0.e8461e4bbece72193bf6b4f2a548d616e79deb07addstest_duration_weighted_symbol_recall_unions_duplicate_time. The fixture has two overlapping matching C estimates over the first four-second section plus a matching G estimate over the second. Correct covered duration is 8/8 =1.0; the predecessor helper would sum 3 + 3 + 4 seconds and report1.25.5ffb4203b8d92282a7d2dde6bb2178ad4a0cc3cbclips matching estimates to each truth window, sorts them, unions overlapping/adjacent intervals, and accumulates only union duration before dividing by annotated duration.041aa617b573c446f96075c27404dd9ee4a84a9aalignsdocs/doctoring/section-harmony-known-progression.mdwith the evidence boundary.92fe9155a1896e13ba8e06e1762f6848fc2efdfarecords the correction inCHANGELOG.md.This repair changes only test/acceptance evidence and its documentation. No runtime dependency, lockfile, network, filesystem, IPC, database, model, or reviewer-credential authority changes.
Verification
Exact current-head repository workflows have now completed. Terminal-success evidence for
92fe9155a1896e13ba8e06e1762f6848fc2efdfais:cirun31965144636;releaserun31965144735;build-baselinerun31965144724;sbomrun31965144698;SAST Semgreprun31965144727;banditrun31965144654; andsecret-scan-gaterun31965144665.The two remaining repository security failures were inspected at exact job/log level before classification:
security-auditrun31965144651, job95220400339, reachesnpm audit --workspaces --audit-level=highand reports the protected-basenanoid,pdfjs-dist, andundicihigh-severity set. Python and Rust audit stages are skipped after that npm failure. This branch has no JavaScript dependency/root-lock delta, so the failure remains canonical fix(security): establish canonical npm, PDF.js, Nanoid, and Undici baseline #783 dependency-baseline evidence rather than a test(analysis): lock verse/chorus chord recovery on a known take #891 source defect.Security Scanrun31965144657has clean Dependency Review, Scorecard, and OSV base-vs-head comparison; only Trivy job95220423029fails, reporting protected-basepdfjs-distCVE-2026-16633 atpackage-lock.json:6370. It is likewise inherited fix(security): establish canonical npm, PDF.js, Nanoid, and Undici baseline #783 evidence.No review thread is unresolved. The only formal review is COMMENTED automation guidance distinguishing this temporal section-change proof from the single-chord WAV/tempo slice; it is not qualifying independent approval. Exact Python statement+branch evidence remains #861-owned, and current read-only central review/coverage prerequisites are
.github#939/.github#1020.Security Notes
Attack surface
Trust boundary
Mitigations
Cm/Gm.Test points
test_duration_weighted_symbol_recall_unions_duplicate_timetest_canonical_major_symbol_rejects_minor_as_majortest_section_harmony_recovers_verse_c_then_chorus_gtest_section_harmony_keeps_later_c_off_the_opening_windowDependency and Supply Chain
i18n impact
Merge gate
Keep Draft and unmerged until the unchanged exact head has the focused known-progression test and full applicable suite GREEN; exact 100% owned production statement/branch coverage and public-docstring evidence are terminal-success through the canonical #861/central path; all required repository/central SAST/security/SBOM/supply-chain/package/release gates are terminal-success; zero valid unresolved findings remain; #783 and current central prerequisites are integrated/revalidated where applicable; a qualifying independent non-author last-push approval exists; and branch protection permits merge without bypass. Never count absent, queued, skipped-required, failed, predecessor-head, protected-base, model-only, self/author, or bypass evidence as success.