Skip to content

feat(meter): surface timeSignatureCandidates evidence (accuracy PR-B1) - #204

Merged
slittycode merged 1 commit into
mainfrom
claude/asa-integration-producer-bp82ws
Jul 4, 2026
Merged

feat(meter): surface timeSignatureCandidates evidence (accuracy PR-B1)#204
slittycode merged 1 commit into
mainfrom
claude/asa-integration-producer-bp82ws

Conversation

@slittycode

Copy link
Copy Markdown
Owner

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_signature already 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:

"timeSignatureCandidates": [
  { "timeSignature": "4/4", "dominance": 1.42, "positionMeans": [2.1, 1.4, 1.6, 1.5] },
  { "timeSignature": "3/4", "dominance": 1.11, "positionMeans": [1.9, 1.7, 1.6] }
]

fundamentalsQuality.domains.meter.evidence gains {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/Confidence are 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_phase1 forwarding — caught by the golden's forwarding guard, which is exactly what that guard exists for · types/measurement.ts (TimeSignatureCandidate) · backendPhase1Client.ts reconstructor (drops malformed entries) · phase1FullPayload fixture · 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 verify green (unit + build + 51 smoke).

🤖 Generated with Claude Code

https://claude.ai/code/session_01T4wfz87k6kzJqkKLKZE7YL


Generated by Claude Code

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
@slittycode
slittycode merged commit 782aada into main Jul 4, 2026
5 checks passed
@slittycode
slittycode deleted the claude/asa-integration-producer-bp82ws branch July 4, 2026 00:09
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.

2 participants