research(mir): preregister structure feature noninferiority evidence - #1228
seonghobae wants to merge 200 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@opencode-agent review exact head |
|
Queued @opencode-agent for PR #1228 at head |
|
@opencode-agent review exact head |
| _REPOSITORY_ROOT = Path(__file__).resolve().parents[2] | ||
| _MEASURED_TRIALS = 20 | ||
|
|
||
| PERFORMANCE_MEASUREMENT_CONTRACT: dict[str, object] = { |
|
|
||
| def _windows_peak_rss_mib() -> float: | ||
| """Return Windows PeakWorkingSetSize for the current worker process.""" | ||
| import ctypes |
|
Queued @opencode-agent for PR #1228 at head |
|
Queued @opencode-agent for PR #1228 at head |
|
Queued @opencode-agent for PR #1228 at head |
Problem
#1223 withdrew the
chroma_cqt→chroma_stftproduction switch because synthetic/mock timing did not establish structure accuracy on rights-cleared decoded audio. #1225 therefore requires preregistered real-audio noninferiority evidence before STFT can become the production default.This Draft owns the Signal-MIR scientific evidence/admission boundary for that decision. Synthetic fixtures are regression evidence only. Production acceptance still requires a reviewed rights-cleared corpus, fixed product/scientific thresholds and claim boundary, exact runtime/host identity, complete-track execution, current-head checks/review, and a separate production-switch change.
Exact current identity
develop@314ddeae7b775a4957594b599358c8255617eb2e.research/structure-noninferiority-1225.e99ccecc20a72d9531d77be5b854ae6090500aff.chroma_feature="cqt"; this PR does not switch production to STFT.Every source movement invalidates predecessor checks/reviews. Only this exact head may satisfy the verification gate.
Frozen scientific semantics
Functional-label ACC is pinned to
ismir-mirex/mirex-evaluation@b9fa0b0b32e2145af31f35830f78fc9d09a4301b:music_structure_analysis.eval_script.calculate_accuracywith the 200 ms frame-grid contract. The segmentation adapter uses the content-addressedmir_eval==0.8.2research overlay and binds detection at 0.5/3.0 s withbeta=1.0, trim=True, deviation withtrim=True, and pairwise grouping withframe_size=0.1, beta=1.0.aggregate_structure_noninferiority.pyownsmacro-track-v1/paired-track-bootstrap-v1: registered track-pair sampling, equal-track weighting, macro P/R→harmonic F, macro deviation/ACC/latency means, maximum peak RSS, paired resampling with replacement,numpy.random.Generator(PCG64), and 0.025/0.975 percentile bounds using NumPymethod="linear". Stored aggregate/CI summaries are admitted only when they exactly match canonical recomputation from the complete stored track receipts and preregistered uncertainty plan.isolated-single-shot-v1owns per-track performance evidence: macOS/Windows only, zero same-process warm-ups, 20 fresh-process observations per lane/track, alternating CQT→STFT / STFT→CQT order,time.perf_counter_ns()around the repository segmenter, NumPy linear p50/p95, and process-lifetime peak RSS (ru_maxrsson macOS;PeakWorkingSetSizeon Windows).The canonical admitted-track consumer gives CQT and STFT the same immutable admitted PCM/reference segmentation and emits schema-v1 track receipts only from complete functional-ACC, recognized segmentation, and registered performance evidence. Public result admission recomputes aggregate and paired CIs from those stored track receipts.
Current RED → GREEN repair: exact execution host and one canonical run path
Fresh review found that
registration.runtime.host_profilewas only validated as non-empty text. Corpus runtime admission verified source commit, lock, Python, librosa, and NumPy, but never proved that the machine executing latency/RSS measurement matched the host described by preregistration. Since p95 latency ratio is a decision criterion, a free-form host label is not sufficient scientific identity.This head adds a purpose-bound execution contract:
7a90b922c0f64090f1ac2717e9afc0369503bd58: require preregistered/observed host mismatch to fail before corpus admission and require host identity to exclude hostname/account identifiers.70b86022323728c6b3f85d5f14468423ebf15478: addrun_structure_noninferiority_experiment.py,structure-performance-host-v1, macOS/Windows host capture, admission→track-evidence binding, canonical result construction, validation, and atomic path-free execution envelope.f1a6971ff7f60af993c05455e40ccc6d57ab593e: make free-form host labels explicitly invalid for canonical scientific execution.a31bebd79d88b940c9f96517d02f7c0364fac485/ fixture alignment7b07c00d9ee8c7ddbb24f3a65bd62aa1e22c05c4: addvalidate_execution_registration()and requirestructure-performance-host-v1:<sha256>before corpus access.7d3c28d55af1b1ba08afc9ed2a6df85274a7d6f7: add TRACEABILITY for host fields, rejected identifiers/alternatives, owner boundaries, claim limitations, and authoritative Apple/Microsoft system-identification sources.e99ccecc20a72d9531d77be5b854ae6090500aff: format the new runner to the repository's 100-column Python lint boundary before treating hosted lint as evidence.The content-addressed host payload contains platform, OS release/version, architecture, hardware model, CPU model, and logical CPU count. It deliberately excludes hostname/computer name, user/account identity, serial number, MAC/IP, and paths. macOS values are dynamically read with fixed
sysctlselectors; Windows values come from fixed machine-level registry locations. Unsupported OSes fail closed. This profile does not claim to freeze thermal state, CPU frequency, power policy, scheduler contention, or page-cache state; those limitations remain in the scientific claim boundary.The new runner composes existing owners rather than reimplementing them: registration/result validator → host gate → Resource Admission → canonical CQT/STFT consumer → exact admission/evidence identity checks → track receipts → canonical aggregation/bootstrap → result admission → atomic execution envelope. Running lower-level corpus admission alone does not authorize latency/RSS evidence.
Earlier integrity repairs retained on this branch
mir_eval==0.8.2artifact/runtime identity and recognized segmentation adapters;isolated-single-shot-v1latency/RSS measurement contract;macro-track-v1aggregate andpaired-track-bootstrap-v1CI recomputation;Claim boundary and remaining work
This branch does not establish approved numeric production margins/latency threshold, adequacy or representativeness of a concrete rights-cleared corpus, adequacy of a chosen bootstrap count/seed, a selected and reviewed concrete host-profile payload, scientific noninferiority or latency superiority on real audio, MIREX leaderboard equivalence, or a production feature switch.
Before candidate results are inspected, reviewers still must freeze concrete corpus membership/representativeness, quality noninferiority margins, maximum candidate latency ratio, exact bootstrap count/seed, the actual macOS/Windows
structure-performance-host-v1payload/content address, and the population/runtime claim. Corpus size and inference-plan adequacy remain scientific review decisions. Only after those choices are frozen may the complete rights-cleared corpus be executed through the canonical runner.A future need for independently verifiable producer attestation or crash-resumable partial scientific execution requires a separately versioned evidence-envelope/checkpoint contract; this PR does not claim that numeric JSON alone proves historical execution provenance.
Verification gate
Fresh workflows for exact
e99ccecc20a72d9531d77be5b854ae6090500affsupersede all predecessor evidence. The PR remains Draft until this exact head has terminal protected CI/security/SBOM/SAST/native-build evidence and a qualifying independent non-author current-head approval.Do not self-approve, force-push, destructively rebase, weaken gates, manufacture statuses, blind-rerun non-terminal jobs, or use no-op commits to obtain fresh evidence.