mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-07-22 12:52:29 +00:00
The single largest handler in server.py — the 902-line /ws/highway/{filename}
chart streamer — plus its 3 exclusive helpers (_pick_smart_arrangement,
_sanitize_authors, _sanitized_song_offset). server.py: 9,008 -> 8,003 (-1,005,
the biggest single R3 cut).
Clean move despite the size: the handler's only server-module deps are the 4
path constants + 3 exclusive helpers + app + log. Everything else it uses is
either NESTED inside the handler (_evict_audio_cache, _fill_scale_degree,
_manifest_entries, _tone_names, _xml_rank, _send_keepalives) or imported from
the shared lib modules (song/audio/sloppak/drums/notation/dlc_paths/metadata_db).
- Path constants read through the appstate seam: added static_dir /
sloppak_cache_dir / audio_cache_dir slots (config_dir already there);
server.py configures them. Bodies otherwise verbatim (@app.websocket ->
@router.websocket, PATHS -> appstate.*, log -> module logger).
- sloppak_cache_dir IS setattr-patched, so the 3 test_highway_ws_* suites now
also `setattr(appstate, "sloppak_cache_dir", ...)` next to their existing
server patch. _sanitize_authors unit tests import it from routers.ws_highway
(it moved). No other test churn.
- Removed 23 now-dead imports from server.py (song/audio/drums/notation/
bisect/contextvars/structlog/WebSocket*/_arr_smart_sort_key) — diffed against
the origin/main unused-import baseline so only NEWLY-dead ones went.
owns_tmp (assigned, never read) moved verbatim — it's pre-existing dead on
origin/main too; left as-is to keep the move faithful.
Verified: route table identical to origin/main (143, paths/methods/order);
handler body verbatim spot-checked; pyflakes clean (server has no new
undefined/dead); pytest 2400 passed; packaging guard 53; eslint 0. Boot smoke:
the highway WS streams the full chart (song_info/beats/sections/notes/chords/
notation/anchors/drum_tab -> ready) BYTE-for-byte the same message sequence as
origin/main across arrangements 0/1/2, zero tracebacks.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| benchmarks | ||
| diagnostics | ||
| skills | ||
| 3dhighway-open-string-double-sustain.jpg | ||
| capability-domains.md | ||
| capability-recipes.md | ||
| capability-review-preflight.md | ||
| capability-roadmap.md | ||
| capability-safety-matrix.md | ||
| diagnostics-bundle-spec.md | ||
| host-theme-contract.md | ||
| library.png | ||
| NOTE_FAILURE_PLAN.md | ||
| NOTE_FAILURE_SPEC.md | ||
| note-detect-tuning.md | ||
| perf-baseline.md | ||
| player-2d.jpg | ||
| player-3d.jpg | ||
| player-3d.webp | ||
| plugin-capability-inventory.md | ||
| plugin-manifest.schema.json | ||
| plugin-modules.md | ||
| plugin-styles.md | ||
| plugin-v3-ui.md | ||
| size-exemptions.md | ||
| sloppak-hand-editing.md | ||
| sloppak-spec.md | ||
| working-tuning-on-device-tests.md | ||