The host trims the value, removes hyphens and spaces, and uppercases it. It keeps the value only in the 12-character ISRC form (2 letters, 3 letters or digits, 7 digits). Any other value is dropped without rejecting the track.
IPC StreamingTrack carries a nullable isrc.
The host checks only the protocol major, so packages declaring minor 0 keep working and can omit the field.
No UI change.
Acceptance criteria
Part 2 of #693: the protocol and host accept an optional, normalized ISRC on streaming tracks without breaking existing packages. Part 3 (Playable Match) is tracked separately in #693.
Test plan
Verification run locally:
cargo fmt
cd src-tauri && cargo clippy --all-targets -- -D warnings (clean)
cd src-tauri && cargo test -q (1324 + 174 + 320 passed, 14 ignored, 0 failed)
npx tsc --noEmit (clean)
pnpm lint (PASS)
pnpm build (PASS)
pnpm test (PASS, 239 files, 2558 tests)
Not run locally:
Optimized release build (cargo build --profile optimized). CI covers packaging.
The official NetEase source package in openkara-sources does not send isrc yet. It lives in a separate repo.
Contracts updated:
docs/references/contracts/streaming-source-protocol.md (2.1, Track shape, "Changes in 2.1")
Interfaces and compatibility profile: additive minor protocol change, contract docs updated in the same change, old packages unaffected because the host checks only the major version.
Lifecycle/testing profile: Rust test isrc_is_normalized_and_invalid_values_are_dropped in src-tauri/src/catalog/plugin_tests.rs.
Reviewing files that changed from the base of the PR and between 70759ead8e79e3405a08840cc502d8184bbf163a and fdc81a66b123095fd16e588961676a961a756249.
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 88.1%. Comparing base (70759ea) to head (fdc81a6).
:white_check_mark: All tests successful. No failed tests found.