feat(meter): surface timeSignatureCandidates evidence (accuracy PR-B1) - #204
Merged
Merged
Conversation
Behavior-neutral: analyze_time_signature computed per-candidate accent
evidence (dominance + per-bar-position onset means for bar lengths 3-7)
and threw it away. Now it rides the payload as an additive, full-mode-only
top-level field, strongest candidate first, empty on every fallback branch:
timeSignatureCandidates: [{timeSignature, dominance, positionMeans[]}]
fundamentalsQuality.domains.meter.evidence gains {bestCandidate, margin,
candidateCount} derived from it, so the trust layer can say HOW ambiguous
the meter read was rather than just that it was ambiguous. This is the
evidence surface the meter improvement track (accuracy program Phases
B/C — the measured weak layer) builds on; downstream must never treat a
candidate as an override of timeSignature (invariant #1).
Contract mirrors (tripwire #4): JSON_SCHEMA.md inventory + full-only list
+ field table; server_phase1._build_phase1 forwarding (caught by the
golden's forwarding guard); src/types/measurement.ts +
backendPhase1Client.ts reconstructor (drops malformed entries);
phase1FullPayload fixture; golden re-baselined (new key, structural).
Tests: meter-evidence summary (backend), parser filtering (Vitest),
full-mode key set. Backend suite 1295 OK; fundamentals gate 15/15;
frontend verify green (877+ unit, 51 smoke).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T4wfz87k6kzJqkKLKZE7YL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First Phase B change of the accuracy program: behavior-neutral evidence surfacing for the measured weak layer (meter → downbeats, per
audits/accuracy-baseline-2026-07-03.md).What
analyze_time_signaturealready computed per-candidate accent evidence — downbeat dominance and per-bar-position onset means for every scoreable bar length (3/4, 4/4, 5/4, 6/8, 7/8) — and discarded it. It now rides the payload as an additive, full-mode-only top-level field, strongest candidate first,[]on every fallback branch:fundamentalsQuality.domains.meter.evidencegains{bestCandidate, margin, candidateCount}so the trust layer states how ambiguous a meter read was, not just that it was. No measured value changes —timeSignature/Source/Confidenceare byte-identical; candidates are evidence, never an override (invariant #1).Why
The baseline showed meter is the pipeline's weak layer (3/4, 6/8, 7/8 all read 4/4; downbeats follow). Both upgrade paths — margin-rule tuning and the pre-registered beat_this backend (PR-C1/C2) — need this evidence visible to compare against, and the UI's meter tooltip (Phase D) reads it directly.
Contract mirrors (tripwire #4, all sides)
JSON_SCHEMA.md (inventory + full-only list + field table) ·
server_phase1._build_phase1forwarding — caught by the golden's forwarding guard, which is exactly what that guard exists for ·types/measurement.ts(TimeSignatureCandidate) ·backendPhase1Client.tsreconstructor (drops malformed entries) ·phase1FullPayloadfixture · golden re-baselined (new key, structural only).Tests
Backend: meter-evidence summary + no-candidates fast-mode case, full-mode key set, golden + server contract — 1295 OK, fundamentals gate 15/15. Frontend: parser filtering test, parity/citation gates, full
npm run verifygreen (unit + build + 51 smoke).🤖 Generated with Claude Code
https://claude.ai/code/session_01T4wfz87k6kzJqkKLKZE7YL
Generated by Claude Code