feat(core): parse GP let-ring into a LetRing technique + tag (#75, part 1) - #87
Conversation
Failing test for map_gp_note_marks: a note with effect.let_ring should emit an explicit SpanTechnique::LetRing (a new, missing technique variant). The variant doesn't exist yet, so this fails to compile until green.
…75) Adds SpanTechnique::LetRing and SwancoreTag::LetRing end-to-end: gp.rs maps note.effect.let_ring to an explicit LetRing span; technique.rs derives it to the "let_ring" name and the SwancoreTag::LetRing tag (like palm_mute); span labels added in complement.rs/dump.rs; the tag joins all_variants (serde snake_case → "let_ring", so it's in the web tag palette automatically). First of the #75 technique-parsing slice. core suite green; cli green; clippy clean; web compiles. pull-off (HO/PO direction) and tap (beat-level) follow.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds ChangesLetRing Technique Pipeline
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 029c0f4423
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Vibrato, | ||
| PalmMute, | ||
| /// Let ring — notes left to sustain into following beats. | ||
| LetRing, |
There was a problem hiding this comment.
Bump the corpus schema for the new tag
Adding SwancoreTag::LetRing creates a new serialized corpus tag value ("let_ring"), and all_variants() now exposes it to the CLI/web curation paths that write ChunkMeta.tags, but SCHEMA_VERSION remains 7. A newly curated v7 manifest or chunk containing this tag is no longer readable by older v7 tooling because serde rejects unknown enum variants, so the version no longer identifies compatible corpus data; bump the schema version and document the tag-taxonomy change when adding this persisted enum value.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The mechanism is right (serde rejects unknown variants), but we're deliberately keeping SCHEMA_VERSION = 7 — maintainer's call. Every version v1–v7 is a structural ChunkMeta change (a new optional field under the forward-compatible "pre-vN records keep loading" pattern); none tracks the tag set. A SwancoreTag addition fits neither that mechanism nor that compat direction (yours is backward compat — old reader, new data), and #75 adds ~15 more tags, so versioning the taxonomy would turn SCHEMA_VERSION into a tag counter and muddy what it identifies.
Made the policy explicit so it isn't ambiguous going forward (333a3cc): a note in the SCHEMA_VERSION doc + a decisions-log Y-statement. The residual risk (a pinned pre-tag build hard-rejecting a chunk with a newer tag) is accepted — griff's reader and writer ship together.
Generated by Claude Code
Per the maintainer's call on #87: SCHEMA_VERSION stays 7 for additive SwancoreTag variants (let_ring, #75). The version tracks structural ChunkMeta field additions (the v1–v7 optional-field, forward-compatible pattern), not the tag set — so a new tag isn't a version event. Documented in the SCHEMA_VERSION doc + a decisions-log Y-statement so it isn't re-flagged as #75 adds ~15 more tags.
The browser/phone capture path (`build_chunk_meta_record`) derived and merged only technique tags, so a GP chord the CLI now serializes with `maj7`/`power_chord` was emitted without those harmony tags — making corpus tags depend on which curation front produced the chunk (Codex P2 on #88). Mirror the CLI: derive harmony tags and merge them additively, with a parity test. Also fixes the adjacent technique-parity test, whose hardcoded `tags_idx` "21" no longer selected Intro: #87's LetRing shifted Intro to index 22 in `all_variants()` (web host tests aren't CI-gated, so it went unnoticed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTUbGjzD8ysnVnCJnZJE95
First slice of #75 (auto-derive tags/techniques). #75 is really four independent derivations — technique parsing, syncopated, chord quality, structure — and this starts the technique slice with let-ring, the one that genuinely needs a new model variant (pull-off and tap already have their variants; only their emission is missing, and both need caller/sequence context, so they follow separately).
What
Adds
let-ringend-to-end, mirroring howpalm_muteis handled:event.rs: newSpanTechnique::LetRing.corpus.rs: newSwancoreTag::LetRing(+all_variants).SwancoreTagis#[serde(rename_all="snake_case")], so it serializes as"let_ring"and joins the web tag palette automatically.gp.rs:map_gp_note_marksmapsnote.effect.let_ring→ an explicitLetRingspan.technique.rs:LetRing→ name"let_ring"+ tagSwancoreTag::LetRing.SpanTechniquematches updated incomplement.rsanddump.rs.Approach
Red → green:
70db92fadds the failinggp.rstest (referencesSpanTechnique::LetRing, compile-fail red);029c0f4adds the variant through the stack + a derivation test.Verification
coresuite green (new:gp_let_ring_emits_explicit_span, andlet_ring_span_derives_the_let_ring_tag_and_name— a let-ring note →let_ringtag + name);cligreen;clippy -D warningsclean; web crate compiles (the new tag rippled cleanly).Remaining #75 technique slice
SpanTechnique::PullOff/SwancoreTag::PullOffalready exist; gp.rs must emitPullOffvsHammerOnby direction (the previous same-string pitch, available viaacc.held). Its own PR.NoteMark::Tapexists; set it from the beat'sslap_effect == Tapping. Its own PR.Then the other three #75 derivations (syncopated, chords, structure).
🤖 Generated with Claude Code
https://claude.ai/code/session_01TTUbGjzD8ysnVnCJnZJE95
Generated by Claude Code
Summary by CodeRabbit