feat(roles): wire measured register overlap into section warnings - #873
feat(roles): wire measured register overlap into section warnings#873cursor[bot] wants to merge 54 commits into
Conversation
- 레지스터 중복 감지 이중 루프를 필터-루프로 개선하여 O(N^2) 성능 오버헤드 완화 - 대형 배열 오디오 처리에 의한 Unbounded Memory Consumption 완화 위해 사이즈 제한 적용 - trivy-fs 스캔에서 보고된 pdfjs-dist 취약점 패치 및 예외 처리
- 레지스터 중복 감지 이중 루프를 필터-루프로 개선하여 O(N^2) 성능 오버헤드 완화 - 대형 배열 오디오 처리에 의한 Unbounded Memory Consumption 완화 위해 최대 1억 샘플 사이즈 제한 적용 - 수많은 stem 인풋으로 인한 Denial of Service 방지를 위해 최대 stem 갯수 100개 제한 적용 - trivy-fs 스캔에서 보고된 pdfjs-dist 취약점 패치 및 예외 처리
- 레지스터 중복 감지 이중 루프를 필터-루프로 개선하여 O(N^2) 성능 오버헤드 완화 - 대형 배열 오디오 처리에 의한 Unbounded Memory Consumption 완화 위해 최대 1억 샘플 사이즈 제한 적용 - 수많은 stem 인풋으로 인한 Denial of Service 방지를 위해 최대 stem 갯수 100개 제한 적용 - trivy-fs 스캔에서 보고된 pdfjs-dist 취약점 패치 및 예외 처리
- 레지스터 중복 감지 이중 루프를 필터-루프로 개선하여 O(N^2) 성능 오버헤드 완화 - 대형 배열 오디오 처리에 의한 Unbounded Memory Consumption 완화 위해 최대 1억 샘플 사이즈 제한 적용 - 수많은 stem 인풋으로 인한 Denial of Service 방지를 위해 최대 stem 갯수 100개 제한 적용 - trivy-fs 스캔에서 보고된 pdfjs-dist 취약점 패치 및 예외 처리
- 레지스터 중복 감지 이중 루프를 필터-루프로 개선하여 O(N^2) 성능 오버헤드 완화 - 대형 배열 오디오 처리에 의한 Unbounded Memory Consumption 완화 위해 최대 10,000,000 샘플 사이즈 제한 적용 - 수많은 stem 인풋으로 인한 Denial of Service 방지를 위해 최대 stem 갯수 10개 제한 적용 - trivy-fs 스캔에서 보고된 pdfjs-dist 취약점 패치 및 예외 처리
Revert the latest branch-wide dependency, Trivy, Jules-note, and altered resource-limit drift. Preserve the previously reviewed two-file register-overlap optimization and its focused resource-guard regressions; coordinated dependency security remains owned by #783.
Drop the Bolt-head 10M-sample and 10-stem silent guards, the Trivy ignore, and the npm/PDF.js lock churn so this change stays an overlap optimization. Keep fail-closed invalid thresholds and the policy-owned admission regressions. Co-authored-by: Seongho Bae <[email protected]>
Stop fabricating keyboard and vocal clash copy. Slice admitted stems to each section, format honest accompaniment labels, and refresh rehearsal priority from measured occupancy. Co-authored-by: Seongho Bae <[email protected]>
Keep mixed accompaniment evidence off named keyboard and guitar roles in the RoleExtractor suite, and omit overlap warnings when section windows are missing or do not match the section list so a song-wide FFT cannot repeat on every card. Co-authored-by: Seongho Bae <[email protected]>
There was a problem hiding this comment.
Stale comment
Head
8cf7d26e27a685181d4561643562d900c3bf7a96still has two merge-blocking honesty bugs. Do not merge this Draft. The landing vehicle is #876 (9f1e166d).Identity contract is not locked through
RoleExtractor. Production already maps mixedotherto no role IDs, so Bass Guitar + accompaniment may warnbass-guitaronly. The only extractor test that measures overlap still requireskeys-leftto share that warning. That assertion is the old unsafe contract and will failci / build-and-teston this head.Missing section windows fail open. When stems exist and
boundariesis missing or shorter thansections,_section_overlap_warningsFFTs the whole song and repeats that average on every card. Doctoring already forbids that atomistic path. Fail closed instead.Also restore the accidental deletion of the historical 0.1.1 changelog line, and use
_STEM_TO_ROLE_IDS.get(stem, ())so a later display-only name cannot KeyError.Local successor evidence on #876, not transferable to this head: focused overlap/role tests 42 passed; full engine
679 passed, 24 skipped, 100%statement coverage. Hosted checks on this exact SHA are still queued and are not counted as success.Leave #801 inside this lineage; do not merge it separately. Leave #783 / #781 / #866 on their owners. Do not self-approve or merge #873 or #876 from this review.
Sent by Cursor Automation: Fix Issues
There was a problem hiding this comment.
Review (9f1e166da9acf043b7f4b8b6df84b5e1a2417706)
Prior threads on 8cf7d26e are fixed on this head.
- Missing or short
boundariesno longer measures the whole song. Admission isstemspluslen(boundaries) == len(sections); otherwise_section_overlap_warningsreturns{}. - Mixed htdemucs
otherstays role-agnostic (_STEM_TO_ROLE_IDS["other"] = ()). Bass or Lead Vocal can carry the measured warning; Keyboard Left/Right and Acoustic Guitar stay empty. - Extractor tests lock both contracts, including
other + vocalsand missing/mismatched windows.
CodeRabbit CLI is not authenticated in this environment (automatic_login_failed). Fallback correctness/security pass on this 10-file slice found no new blocking defect: no added I/O, network, subprocess, or fail-open window path.
Do not merge this Draft on review text. Exact-head repository/central checks, #783/#861/#781/#866 lineage, and an independent non-author last-push approval remain merge evidence.
Out of this slice
Browser-fallback, shared-types, and Rust demo fixtures still ship fabricated Density warning / Melodic overlap copy, and map_stems_to_roles still marks Keyboard Left/Right and Acoustic Guitar active from mixed other. That is the next successor, not a reopen of this wiring PR.
Sent by Cursor Automation: Fix Issues
Keep htdemucs other from activating Keyboard Left/Right or Acoustic Guitar, and replace fabricated demo clash copy with the engine next-action wording on unambiguous bass and vocal roles. Co-authored-by: Seongho Bae <[email protected]>
There was a problem hiding this comment.
Review (23678f3931dd497dc3c21312544e5843da99a9d4)
Prior threads on 8cf7d26e remain fixed on this head. The new delta is 23678f39 (closed #883 folded in): mixed other no longer activates Keyboard Left/Right or Acoustic Guitar, and demo / browser-fallback / Rust fixtures use the same next-action sentence the engine emits.
- Admission is still
stemspluslen(boundaries) == len(sections); otherwise_section_overlap_warningsreturns{}. _STEM_TO_ROLE_IDS["other"] = ()still holds. Bass or Lead Vocal can carry the measured warning; named keyboard and guitar roles stay empty and inactive on the stem path.- Heuristic no-stem extraction still builds the catalog roles, as the plan requires.
- Known-frequency RMSE (80 Hz verse vs 1 kHz chorus) still locks section-local copy.
- No added I/O, network, subprocess, or fail-open window path.
The PR body now binds this exact SHA and both plans. Do not reopen #883.
CodeRabbit CLI is not authenticated here (not_authenticated). Fallback correctness/security pass found no Critical defect.
Residuals (not merge-blocking)
- Measured extractor tests lock warning text and presence, not the HIGH/MEDIUM priority refresh on that same fixture. A successor on this run adds those assertions plus retires the leftover
Melodic overlappriority-unit phrase. - Do not widen the SectionRoadmap
queryByTextregex withKeyboard 1 Right Hand. That name is still a visible demo catalog card; matching the whole tree would fail for the wrong reason. Warning-string locks already live in shared-types. - Demo still shows Keyboard Right Hand as an active catalog part. That is accepted heuristic demo, not a clash-copy lie.
Out of this slice
A dedicated accompaniment role card needs a later contract. Leave #801 inside this lineage. Leave #783 / #781 / #866 on their owners. Do not self-approve or merge this Draft. Exact-head repository/central checks and an independent non-author last-push approval remain merge evidence.
Sent by Cursor Automation: Fix Issues
Keep the 80 Hz verse / 1 kHz chorus fixture from dropping HIGH/MEDIUM priority when warnings attach or clear, and retire the leftover Melodic overlap phrase in the priority unit test. Co-authored-by: Seongho Bae <[email protected]>


Canonical buyer-visible slice
This Draft replaces fabricated role-overlap copy with section-windowed measured overlap, keeps mixed htdemucs
otheroff named keyboard/guitar identity, and preserves the isolated active-stem optimization.Protected base:
develop@acdbea6344fe1231c39535b575f4de35e4c607c9.Exact current head:
9423ae62492fd9bc3530f9a603bbd5b864322a21.Product / evidence contract
otherremains accompaniment and cannot authorize Keyboard Left Hand, Keyboard Right Hand, or Acoustic Guitar identity/presence.Test-first current-head repairs
Boolean temporal/sample-rate authority
Exact-code review found Python
boolvalues could pass ordinary numeric checks becauseboolis anintsubtype:sr=Truecould enter FFT frequency construction, and Boolean section start/end/sample-rate values could become 0/1 timing authority.2b2ca42f1bbfa604943177aad124e9b26b1d7e11adds direct Boolean sample-rate and section-window regressions.2db7a4797e57f4271bae260efc090fa99e51692frejects Boolean sample rate inband_energy_profileand Boolean start/end/rate evidence inslice_stems_to_window, returning zero/empty evidence without I/O authority.e7ef5eadbaf1db8809318a0938467e03d6e76621records the repair in CHANGELOG.9423ae62492fd9bc3530f9a603bbd5b864322a21alignsdocs/doctoring/register-overlap.mdwith the exact trust/test boundary and preserves the APA 7 psychoacoustic/MIR references.Earlier branch repairs remain current: malformed multichannel stems fail closed before FFT; non-finite direct sample rates fail closed; finite raw timing whose scaled sample-index product overflows fails closed; matching result ordering and role-honesty are preserved.
Exact-current-head verification
The first workflow generation for
9423ae62492fd9bc3530f9a603bbd5b864322a21was cancelled before repository jobs executed. Job inspection showed cancelled CI jobs with no executed steps; the log endpoint had no job log because execution never started. Cancelled evidence is not success.After that exact cancellation boundary was inspected,
cirun31972445814was rerun on the unchanged head and is currently queued, therefore still non-passing. The other exact-head workflow runs remain cancelled and are also non-passing:security-audit31972445819secret-scan-gate31972445831SAST Semgrep31972445850release31972445830bandit31972445853Security Scan31972445818build-baseline31972445824sbom31972445862Do not infer source failure from the cancellation and do not count the rerun until terminal. Any subsequently failed job must be inspected at exact job/check-run/annotation/log level before source edits or another rerun.
Dependency / merge gate
This branch changes no JavaScript dependency/root lock or vulnerability suppression. Protected-base dependency findings remain canonical #783-owned only after exact-current-head log confirmation and must never be suppressed or copied here. Python statement+branch merge evidence remains #861-owned. The current central required-workflow replacement is read-only
.github#1020; historical #1008 is closed unmerged.Keep Draft and unmerged until the unchanged then-current head has realistic focused/full tests GREEN, exact 100% owned production statement/branch coverage and public docstrings, applicable numerical parity, all required repository/central SAST/security/SBOM/supply-chain/package/release gates terminal-success, zero valid unresolved findings, dependency prerequisites integrated/regenerated, a qualifying independent non-author last-push approval, and ordinary branch-protection acceptance without bypass. Never count queued, cancelled, skipped-required, failed, predecessor-head, protected-base, model-only, self/author, or bypass evidence as success.