Skip to content

Fix keyboard-arrangement misclassification and highway_3d chord-diagram mirroring - #42

Open
carochacs wants to merge 11 commits into
mainfrom
local
Open

Fix keyboard-arrangement misclassification and highway_3d chord-diagram mirroring#42
carochacs wants to merge 11 commits into
mainfrom
local

Conversation

@carochacs

@carochacs carochacs commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What

  • Keyboard/keys arrangements are no longer misclassified as guitar. GP6+
    often notates piano/keys parts on a fretted string template, so
    string_pitches alone can't tell a keyboard part from a real guitar. GP
    import track selection now checks is_keys before is_guitar, the manifest
    type field is now authoritative (over name-sniffing) in both
    lib/song.py's Lead/Rhythm/Bass grouping and highway_3d's
    matchesArrangement, and the highway WS payload now carries type /
    arrangement_type so the frontend can act on real instrument type instead
    of guessing from the display name (fixes a keys arrangement literally named
    "Combo" being swept into the guitar bucket and stealing the song from the
    piano viz).
  • highway_3d's chord diagram overlay no longer mirrors when Invert is on.
    Its orientation is fixed regardless of the highway's own Invert toggle now;
    both call sites pass inverted: false. CLAUDE.md documentation and
    plugin.json version bumped to match.
  • Stems-plugin Web-Audio takeover no longer races the transport button.
    _stemsRerouteInProgress is checked the same way _juceRerouteInProgress
    already is, so the deliberate pause/play the stems plugin does while
    building its multi-stem transport doesn't stomp the play/pause button state.
  • .gitignore now excludes the local /library and /static/sloppak_cache
    working directories.

feedpak surface

  • This PR does not change how the app reads/writes feedpaks (manifest
    keys, pack files, folder layout) — type is a pre-existing manifest key,
    not a new one.

Checklist

  • CHANGELOG.md [Unreleased] updated (user-visible changes)
  • Tests added/updated for new behaviour
  • Commits are DCO signed off (git commit -s) — this PR targets this
    fork's own main, not got-feedback/feedBack upstream

Notes

convert_wem is called directly (not via run_in_executor) inside the async
highway_ws handler — flagged by CodeRabbit's automated checks. Pre-existing,
not touched by this PR's diff; same out-of-scope call already noted on #17.

carochacs and others added 4 commits August 3, 2026 13:32
Adds explicit `type` field to WebSocket song_info and arrangements, allowing viz auto-selection to match on real instrument type instead of name-sniffing. Fixes misclassification of keyboard arrangements (e.g., GP imports with piano parts labeled 'Combo') by checking manifest `type` before arrangement name patterns. Reorders GP track classification to yield keyboard parts before assuming guitar. Also adds `_stemsRerouteInProgress` guards matching `_juceRerouteInProgress` to prevent spurious play/pause events during stems plugin Web-Audio takeover.
drawChordDiagram() was passed inverted: _invertedCached at both call
sites, flipping its column order (high-e/low-E swapped) whenever the
highway's Invert toggle was on. The diagram's orientation should be
fixed regardless of that toggle, so both sites now pass
inverted: false.

Note: plugins/highway_3d/CLAUDE.md had documented the mirroring as
this overlay's contract, but that line traces only to a single
squashed "Clean release snapshot" commit with no surviving design
rationale -- treated here as an inaccurate description of a bug, not
a protected feature, and updated accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Update the bundled `highway_3d` plugin version from 3.34.1 to 3.34.2.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b3bc0224-0f4d-46b5-ad2d-4b4d46ee01bf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Changes

Arrangement typing and highway selection

Layer / File(s) Summary
Arrangement type classification and propagation
lib/gp2rs_gpx.py, lib/routers/ws_highway.py
Keyboard tracks are classified as keys before guitar tracks. Normalized arrangement types are included in highway metadata and selected-arrangement payloads.
Authoritative type checks for naming and matching
lib/song.py, plugins/highway_3d/screen.js
Manifest types prevent non-lead instruments from entering fallback name grouping. Highway matching excludes keys arrangements before keyword matching.

Highway chord orientation

Layer / File(s) Summary
Fixed chord diagram orientation
plugins/highway_3d/screen.js, plugins/highway_3d/plugin.json, plugins/highway_3d/CLAUDE.md, CHANGELOG.md
Chord diagrams always use non-inverted orientation. The plugin version, documentation, and changelog were updated.

Stems reroute transport handling

Layer / File(s) Summary
Reroute playback-state guards
static/app.js, static/js/transport.js
Playback events and transport rejection handling ignore transient stems reroute activity.

Repository ignore rules

Layer / File(s) Summary
Generated path exclusions
.gitignore
The repository ignores /library and /static/sloppak_cache.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GPXSelector
  participant Song
  participant HighwayWebSocket
  participant HighwayScreen
  GPXSelector->>Song: Classify keyboard tracks as keys
  Song->>HighwayWebSocket: Provide normalized arrangement type
  HighwayWebSocket->>HighwayScreen: Send arrangement_type and arrangement metadata
  HighwayScreen->>HighwayScreen: Reject keys before name matching
Loading

Suggested reviewers: byrongamatos, chrisbewithyou

🚥 Pre-merge checks | ✅ 21 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Blocking Route Handlers Use Def Not Async ⚠️ Warning The modified async highway_ws directly calls convert_wem at lines 459 and 481; convert_wem performs synchronous subprocess audio conversion without an executor wrapper. Wrap both convert_wem calls and related blocking work in run_in_executor/asyncio.to_thread, or make the handler a synchronous def dispatched through the executor.
✅ Passed checks (21 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Plugin Folder Name Matches Manifest Id ✅ Passed The touched manifest is plugins/highway_3d/plugin.json; its id is exactly "highway_3d", matching the containing directory name character-for-character.
No Print()/Console.Log In Routes.Py ✅ Passed The PR adds no print(...) or traceback.print_exc(...) lines in changed Python files; no routes.py or setup(app, context) is modified, and route imports contain no such calls.
Sibling Imports Use Load_sibling ✅ Passed The PR changes no plugin Python modules; its only plugin changes are documentation, JSON, and screen.js, so it adds no sibling import requiring load_sibling.
Routes Namespaced Under /Api/Plugins/Id ✅ Passed AST audit found every registered HTTP route under /api/plugins/<plugin.json id>/; folder_library uses an effective prefixed APIRouter, and no plugin WebSocket routes exist.
Plugin.Json Version Bumped On Change ✅ Passed The PR changes functional plugins/highway_3d/screen.js and bumps plugin.json from valid semver 3.34.1 to strictly greater 3.34.2.
No Per-Frame Dom Queries In Draw/Raf ✅ Passed Modified JS has no exact draw function or MutationObserver; rAF callbacks and the 16.67ms interval contain no document.querySelector/querySelectorAll calls.
Shortcuts Unregistered With Matching Scope ✅ Passed The PR diff adds no registerShortcut call; the existing player-scoped tuner registration is unchanged from the base commit, so this check is not applicable.
Idempotent Guard On Top-Level Listeners ✅ Passed The PR's screen.js diff adds no addEventListener, setInterval, playSong, or showScreen call; its changes only set chord inversion and filter keys arrangements.
Server_files Entries Are Safe Relpaths ✅ Passed The only plugin.json diff changes the version; its server_files entries are relative, use forward slashes, contain no '..' or leading dot segment, and do not start with '/'.
Setrenderer Factory Has Init/Draw/Destroy ✅ Passed The renderer factory returns init(canvas,bundle), draw(bundle), and destroy(). initScene mounts WebGL/overlay resources and listeners; destroy calls teardown, removes them, disposes WebGL, and null...
Overlay Gates On Isdefaultrenderer Instructions ✅ Passed The PR adds no highway.project(...) or highway.fretX(...) positioning calls; it only changes chord overlay options to inverted:false, so the conditional renderer gate and RAF checks do not apply.
V3 Ui Mounts Via Playercontrolslot ✅ Passed The PR adds no #player-controls lookup or DOM insertion code; added JavaScript lines only guard reroute events and update highway rendering.
New Feedpak Manifest Keys Declared In Spec ✅ Passed The PR does not modify manifest readers or writers; it uses pre-existing arrangement type, which current-main feedpak schemas declare under arrangementEntry.
Feedpak Manifest Required Keys Present ✅ Passed The PR diff has no feedpak/feedpakr path and does not touch manifest assembly; changed code only reads manifest metadata or writes GP XML.
Changelog Unreleased Section Updated ✅ Passed The PR changes application behavior and adds a new highway_3d fix bullet under CHANGELOG.md [Unreleased] → Fixed, using Keep a Changelog structure.
New Python Modules Have Pytest Coverage ✅ Passed The PR diff adds no new Python files. It only modifies existing Python modules, so the new-module pytest coverage check is not applicable.
No Hardcoded Secrets Or Tokens In Diff ✅ Passed The 59 added lines contain no AWS AKIA keys, PEM private-key headers, or TOKEN/SECRET/API_KEY/PASSWORD assignments with literal values.
Title check ✅ Passed The title clearly summarizes the two primary functional changes: keyboard-arrangement classification and highway_3d chord-diagram mirroring.
Description check ✅ Passed The description follows the template and clearly documents the changes, feedpak impact, changelog status, checklist status, and out-of-scope note.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch local
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch local

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@carochacs carochacs self-assigned this Aug 7, 2026
Resolves the CHANGELOG.md conflict between this branch's highway_3d
chord-diagram fix and main's count-in meter fix -- both entries kept.
@carochacs carochacs changed the title Local Fix keyboard-arrangement misclassification and highway_3d chord-diagram mirroring Aug 8, 2026
@pullfrog

pullfrog Bot commented Aug 8, 2026

Copy link
Copy Markdown

Fixed the core-commit-labeling failure on PR #42 (check suite 84780437492).

Diagnosis: The fork-audit.yml core-commit-labeling job rejects any commit this PR introduces (371d7a4..b63f088) that touches a core path without a core:/hook:/sync:/fix: subject prefix. Three commits failed:

  • b63f088 "Merge main into local" (merge touching lib/, static/app.js) → labeled sync: (policy prefix for merging base changes in)
  • 3627fb5 "Add arrangement type to WS and fix keyboard detection" → labeled fix:
  • 304a050 "Update .gitignore" (.gitignore is a core path) → labeled core:

Fix: Rewrote only the subject lines via git filter-branch --msg-filter keyed on $GIT_COMMIT over the base..head range, then force-pushed to origin/local (the PR's head branch; new HEAD 190c60c).

Verification:

  • Content-only rewrite confirmed: all five commit tree hashes are byte-identical to the originals; the merge commit preserved both parents; commit message bodies/trailers untouched.
  • Re-ran the job's exact check step locally against the rewritten range → PASS ("all core-touching commits carry a valid prefix").
  • origin/local matches local HEAD and the working tree is clean.

This is the documented fix for this check (fork-maintenance policy / historical procedure) — the offending subjects had to be rewritten in place, so a new commit could not satisfy it.

Task list (7/7 completed)

Pullfrog  | View workflow run | via Pullfrog | Using Big Pickle (free) | 𝕏

@deepsource-io

deepsource-io Bot commented Aug 8, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in bf80de3...8817a2a on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade  

Focus Area: Reliability
Security  

Reliability  

Complexity  

Hygiene  

Feedback

Type shape vs. actual usage

  • A bunch of the reliability issues cluster around loose typing: chord_to_wire called with int, object used where a Dict/Optional[Dict] is expected, indexing Dict | None, and tuple-shape mismatches in tunings.py.
  • All of these suggest the same thing: the logical data shape is there in your head, but the code/API signatures aren’t yet aligned with it.

Highway 3D plugin state handling

  • In screen.js you’ve got several related issues: unused vars, function declarations inside loops closing over pChordBox, use-before-definition (highwayCanvas), and even a =- operator.
  • They all point at the same fragile area: state and scoping inside this plugin are easy to get subtly wrong, which is exactly where your visual/mirroring bugs live.

Code Review Summary

Analyzer Status Updated (UTC) Details
Docker Aug 16, 2026 3:10p.m. Review ↗
JavaScript Aug 16, 2026 3:10p.m. Review ↗
Python Aug 16, 2026 3:10p.m. Review ↗
Shell Aug 16, 2026 3:10p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Copy link
Copy Markdown
Collaborator Author

Checked all 3 DeepSource Python findings against the actual diff — each is a small, surgical addition to an already-large pre-existing function, not something this PR's diff drives up:

  • _auto_select_gpx complexity 38 (lib/gp2rs_gpx.py) — this PR adds and not is_keys to an existing condition and moves one elif is_keys branch earlier (net +6 lines) to fix the keys-misclassification bug. The function's complexity is the pre-existing GP-track-classification logic.
  • highway_ws complexity 241 (lib/routers/ws_highway.py) — this PR adds two dict-key assignments (type, arrangement_type) to the WS payload inside an already-massive handler. The PR description itself already flags this function has other pre-existing out-of-scope issues (the convert_wem blocking-call note, shared with Add regression for failed sloppak websocket load #17) — the complexity here predates this change by a wide margin.
  • compute_smart_names complexity 31 (lib/song.py) — this PR adds a 2-line early-return branch (arr_type in ("keys", "vocals", "drums") → None) inside the nested _resolve helper, to make manifest type authoritative over name-sniffing (the actual bug fix). Same story: pre-existing bulk.

All three are legitimate architectural debt in genuinely large functions, but refactoring any of them is well out of scope for a targeted bug-fix PR (keyboard misclassification + chord-diagram mirroring + stems-transport race). All 7 real CI jobs (test, lint, manifest-validation, feedpak-spec, tailwind-fresh, core-commit-labeling, upstream-drift) are green.


Generated by Claude Code

convert_wem shells out to vgmstream-cli/ffmpeg via subprocess.run with
a 120s timeout. Called bare inside async def highway_ws, it blocked
the whole event loop for the duration of the conversion, stalling
every other concurrent WebSocket connection on that worker.

Wrap both call sites in loop.run_in_executor(), reusing the
contextvars.copy_context() snapshot already taken earlier in the
function so the bound ws_conn_id correlation ID still applies to log
lines raised inside the executor thread (matches this file's existing
pattern for load_song/sloppak_mod.load_song).

Flagged by CodeRabbit on #42; pre-existing, unrelated to that PR's
diff, so fixed separately here.
carochacs pushed a commit that referenced this pull request Aug 10, 2026
convert_wem shells out to vgmstream-cli/ffmpeg via subprocess.run with
a 120s timeout. Called bare inside async def highway_ws, it blocked
the whole event loop for the duration of the conversion, stalling
every other concurrent WebSocket connection on that worker.

Wrap both call sites in loop.run_in_executor(), reusing the
contextvars.copy_context() snapshot already taken earlier in the
function so the bound ws_conn_id correlation ID still applies to log
lines raised inside the executor thread (matches this file's existing
pattern for load_song/sloppak_mod.load_song).

Flagged by CodeRabbit on #42; pre-existing, unrelated to that PR's
diff, so fixed separately here.
@pullfrog

pullfrog Bot commented Aug 10, 2026

Copy link
Copy Markdown

Fixed the failing core-commit-labeling check on PR #42 and force-pushed the fix.

Diagnosis. The check suite's only failure was the core-commit-labeling job in .github/workflows/fork-audit.yml. It flagged commit 36d96da ("Offload convert_wem calls in highway_ws off the event loop") because it touches core path lib/routers/ws_highway.py but its subject lacks a core:/hook:/sync:/fix: prefix (per docs/fork-maintenance.md Rule 2). This commit is part of the PR's own range, so adding a new commit couldn't satisfy the check — the offending commit's subject itself had to be rewritten.

Fix. Rewrote the commit's subject with git filter-branch --msg-filter (prepending fix: to line 1 only), then cleaned up the refs/original backup ref and force-pushed the PR branch. Verified content preservation before pushing:

  • Tree hashes byte-identical before/after (d9326938… and c4321864…), full commit messages and author/committer metadata intact.
  • The 190c60c sync: Merge main into local merge commit is untouched (same hash, both parents preserved).
  • Reproduced the workflow's exact check over 371d7a4..HEAD: the rewritten commit now matches the ^(core|hook|sync|fix)(\([^)]*\))?: regex and no other commit in the range trips the rule.

Remote branch local now points to rewritten tip f111804; working tree clean. Note: the range uses HEAD rather than a bare SHA as the filter-branch ref because git rev-parse --symbolic-full-name (used by filter-branch to detect refs to rewrite) omits non-ref SHA inputs.

Task list (7/7 completed)

Pullfrog  | View workflow run | via Pullfrog | Using Big Pickle (free) | 𝕏

Comment thread plugins/highway_3d/screen.js Outdated

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Commit 36d96da fails the fork's core-commit-labeling check, so this PR currently has a red CI check and can't merge as-is.

Reviewed changes — This run covers the delta since 190c60c (the last reviewed version): the convert_wem event-loop offload and its CHANGELOG entry. The rest of the PR (keyboard-arrangement classification, type/arrangement_type WS payload, highway_3d chord-diagram mirroring, stems transport guard) is unchanged from the prior review.

  • Offloaded audio conversion off the event loop — Both convert_wem call sites in lib/routers/ws_highway.py (loose-folder and archive WEM conversion) now run through loop.run_in_executor, reusing the contextvars.copy_context() snapshot taken earlier in the handler so the ws_conn_id correlation ID still propagates into the worker thread — the same pattern the handler already uses for load_song. The change is correct and idiomatic.
  • Documented the fix — Added a [Unreleased] CHANGELOG entry describing the blocking-subprocess bug and the executor fix.

⚠️ Commit 36d96da fails the fork's core-commit-labeling check

The commit introducing this delta's code change touches lib/routers/ws_highway.py — a core path under the fork's maintenance policy — but its subject has no core:/hook:/sync:/fix: prefix. The core-commit-labeling job is red on this PR ("Commit 36d96da ... touches core path(s) but its subject isn't prefixed ..."), so the PR can't merge as-is. The executor change itself is sound — this is purely a commit-labeling matter.

Technical details
# Commit `36d96da` fails `core-commit-labeling`

## Affected sites
- `.github/workflows/fork-audit.yml:43` — regex `^(core|hook|sync|fix)(\([^)]*\))?:` does not match the subject "Offload convert_wem calls in highway_ws off the event loop".
- Commit `36d96dadcb683c882237ec2d81c419841365cecf` — touches `lib/routers/ws_highway.py` (core); the only PR commit the check flags.

## Required outcome
- Reword `36d96da`'s subject to carry a valid prefix (e.g. `fix: Offload convert_wem calls in highway_ws off the event loop`) and force-push the `local` branch. The check iterates every commit in `base..head`, so a follow-up commit cannot satisfy it — the offending commit itself must be rewritten (docs/fork-maintenance.md, Rule 2). `3306b47` (CHANGELOG-only, not core) can be re-parented/reworded as part of the same rewrite.

## Suggested approach
- Rewrite just the subject with `git filter-branch --msg-filter` over the base..head range, confirm the tree hashes are unchanged, then force-push `local` via the MCP push tool.

Pullfrog  | Fix it ➔View workflow run | Using Big Pickle (free) | 𝕏

@pullfrog

pullfrog Bot commented Aug 10, 2026

Copy link
Copy Markdown

ec1157a is main's HEAD (descendant of the 371d7a4 merge-base). CI's ec1157a..HEAD range is authoritative. Let me collect all messages, trees, and confirm the topology above the offenders.

Task list (1/6 completed)

Pullfrog  | View workflow run | via Pullfrog | Using Big Pickle (free) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The core-commit-labeling check is still red on head 97dbce9, so the PR still can't merge.

Reviewed changes — This run covers the incremental delta since the prior pullfrog review (old head 3306b47, since rewritten): the convert_wem commit subject rewrite, two branch-merge commits at the head, and a single-blank-line tree change in CHANGELOG.md.

  • Rewrote the convert_wem offload commit with a valid prefix36d96dac4aba80 fix: Offload convert_wem calls in highway_ws off the event loop, which now matches the fork-audit regex (and main's merged 371d7a4 extends rule 2 to accept fix:). This specific prior flag is addressed.
  • Merged the two divergent local histories together981c389 and 97dbce9 bring the un-prefixed original commits back into base..head, keeping the check red (see below).
  • Net tree change is one blank line in CHANGELOG.md — all ten files from the initial pass are otherwise unchanged.

⚠️ Un-prefixed duplicate commits reintroduced by the head merges

The two Merge branch 'local' … into local merges at the head pulled the original, un-prefixed versions of two commits back into BASE..HEAD. core-commit-labeling iterates every commit in the range (fork-audit.yml:34), and the check annotation for head 97dbce9 flags exactly:

  • 304a050 "Update .gitignore" — tree-identical to 8abbb56 core: Update .gitignore (tree 97d9b18…)
  • 3627fb5 "Add arrangement type to WS and fix keyboard detection" — tree-identical to cb6407b fix: Add arrangement type to WS and fix keyboard detection (tree 6443946…)

Since both offenders have byte-identical trees to properly-prefixed commits already in the range, a follow-up commit cannot satisfy the check — the un-prefixed lineage must leave base..head.

Technical details
# Un-prefixed duplicate commits keep `core-commit-labeling` red

## Affected sites
- Commit `304a050` ("Update .gitignore") — no `core:`/`hook:`/`sync:`/`fix:` prefix, `.gitignore` is core.
- Commit `3627fb5` ("Add arrangement type to WS and fix keyboard detection") — no prefix, touches `lib/`, `static/` (core).
- Both are in `BASE..HEAD` only because merges `981c389`/`97dbce9` joined the divergent `local` histories; the tree content already exists in-prefix as `8abbb56`/`cb6407b`.

## Required outcome
- Remove the un-prefixed duplicate lineage from `base..head` so the check goes green. Their content is fully represented by the prefixed commits, so the clean fix is to rebuild `local` on the prefixed lineage (drop the `304a050`/`3627fb5` side of the merge, keep `c4aba80`/`f111804` on top) and force-push.
- Alternatively reword `304a050``core:` and `3627fb5``fix:` using the shallow-clone-safe amend + `git commit-tree` recipe (learnings "Fixing a core-commit-labeling failure"), preserving merge topology and tree hashes, then force-push.

## Suggested approach
- Verify against the workflow's exact step after pushing: `for sha in $(git rev-list $BASE..HEAD); do … grep -qE '^(core|hook|sync|fix)(\([^)]*\))?:' …` — no commit in the range may touch a core path without a matching prefix.

## Open questions for the human
- Are the two duplicate histories expected to persist on this branch, or can `local` be collapsed onto the prefixed lineage before merge?

Pullfrog  | Fix it ➔View workflow run | Using Big Pickle (free) | 𝕏

@pullfrog

pullfrog Bot commented Aug 15, 2026

Copy link
Copy Markdown

Fixed the core-commit-labeling CI failure by rewriting the PR branch history and force-pushing to local.

Root cause: PR #42 contained two parallel lines of identical work. Line A carried the required commit prefixes (core:/fix:/fix(highway_3d):); line B — 304a050 "Update .gitignore" and 3627fb5 "Add arrangement type to WS and fix keyboard detection" — touched core paths (lib/**, static/**, .gitignore) without a prefix, so the fork-audit check flagged them.

Fix: Used git filter-branch with a msg-filter (prefixed the two offending subjects) plus a commit-filter that re-created only line B and the dependent merge chain, keeping every other commit byte-identical (main-side gpg signatures preserved). Line B deduplicated onto line A's already-prefixed commits via content-addressing — the resulting range BASE..HEAD contains only prefixed / non-core commits.

Verification:

  • Re-ran the exact check logic from fork-audit.yml against the new HEAD → exit=0 (was exit=1 before).
  • HEAD tree cc3b6fdf... is byte-identical to the original; git diff --merge-base BASE HEAD shows the same 10-file content change as before (no code touched).
  • Old unprefixed shas no longer reachable; main-side commits keep original SHAs.
  • Branch local force-pushed; PR Fix keyboard-arrangement misclassification and highway_3d chord-diagram mirroring #42 now points at 89a9172 — CI will re-run on the push.
Task list (1/7 completed)

Pullfrog  | View workflow run | via Pullfrog | Using Big Pickle (free) | 𝕏

Comment thread lib/routers/ws_highway.py
Comment thread lib/routers/ws_highway.py
Comment thread lib/routers/ws_highway.py
Comment thread lib/routers/ws_highway.py

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The new commit is clean, but the previously-flagged core-commit-labeling failure is still red on head 7b4f4e6 — the only thing standing between this PR and a green CI.

Reviewed changes — This run covers the incremental delta since the prior pullfrog review (head 97dbce9): one new commit, 7b4f4e6 "fix: restore error handling for sloppak loading in websocket handler".

  • Restored clean error handling for sloppak load failuressloppak_mod.load_song now runs inside a try/except in highway_ws (lib/routers/ws_highway.py:212-228) that logs the real cause server-side via log.exception and sends the client a generic {"error": "Failed to load sloppak"} before closing, instead of letting the exception reach the outer handler where str(e) (lib/routers/ws_highway.py:1159-1165) would leak filesystem paths to the client. I verified the load-bearing claims: load_song raises rather than returning None on failure (lib/sloppak.py:1025), the frontend already renders {error} WS messages (static/highway.js:1936-1939), and except Exception does not swallow asyncio.CancelledError (a BaseException on the 3.12 runtime), so handler cancellation still propagates. The commit also carries a valid fix: prefix, so it adds no new labeling offense.

⚠️ core-commit-labeling still failing on head 7b4f4e6 (prior flag, unchanged)

Not a new finding — this is the outstanding item from the last review, and it is still open. Confirmed against the current head via the check-run annotations: the fork-audit job still flags exactly 304a050 ("Update .gitignore") and 3627fb5 ("Add arrangement type to WS and fix keyboard detection"), both un-prefixed duplicate commits whose content already exists in the range as 8abbb56 core: … and cb6407b fix: …. ci / test, ci / lint, and the other checks are green on head, so this is the only blocker left.

Technical details
# core-commit-labeling still red

## Affected sites
- Commit `304a050` ("Update .gitignore") — touches core `.gitignore`; unprefixed subject.
- Commit `3627fb5` ("Add arrangement type to WS and fix keyboard detection") — touches `lib/` + `static/` (core); unprefixed subject.
- Both are in `base..head` only via the `981c389`/`97dbce9` merge of the divergent `local` histories; tree-identical, properly-prefixed counterparts `8abbb56`/`cb6407b` already sit in the range.

## Required outcome
- Get `304a050`/`3627fb5` out of `base..head` (rebuild `local` on the prefixed lineage and force-push), or reword their subjects to `core:`/`fix:`. A follow-up commit cannot satisfy the check — fork-audit.yml iterates every commit in `BASE..HEAD`.

## Suggested approach
- The prior review and the repo learnings carry the recipe (cherry-pick rebuild, or the shallow-clone-safe `git commit-tree` merge recreation), then force-push via the MCP push tool.

ℹ️ Nitpicks

  • Consider pinning the no-path-leak behavior with a testtests/test_ws_highway_disconnect.py already drives highway_ws with a stub WebSocket; a sibling test feeding a corrupt sloppak (e.g. a non-zip bad.sloppak) and asserting the payload is exactly {"error": "Failed to load sloppak"} would fail against the pre-fix code (which sent str(e)) and would have caught this regression directly.

Pullfrog  | Fix it ➔View workflow run | Using Big Pickle (free) | 𝕏

Trivial simplification flagged by DeepSource — (songInfo && songInfo.arrangement) || '' and songInfo?.arrangement || '' are equivalent.
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