feat(player): admit and bind playable stem artifacts - #1160
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review Please review the exact current Draft head with emphasis on Rust compilation, custom |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== revision =='
git rev-parse HEAD
git status --short
git show -s --format='%H%n%P%n%s' HEAD
printf '%s\n' '== candidate files =='
fd -t f -e rs . apps/desktop/core | sort
fd -t f 'Cargo\.toml' apps/desktop/core | sort
printf '%s\n' '== contract outline =='
ast-grep outline apps/desktop/core/src/playable_stem_contract.rs --items all --view expanded || true
printf '%s\n' '== module and symbol references =='
rg -n -C 3 --type rust \
'(playable_stem_contract|PlaybackStemKind|PlayableStemArtifactSet|PlayableStemArtifact|deserialize|Deserialize)' \
apps/desktop/core
printf '%s\n' '== Cargo configuration =='
cat -n apps/desktop/core/Cargo.toml
printf '%s\n' '== contract source =='
cat -n apps/desktop/core/src/playable_stem_contract.rs
printf '%s\n' '== test sources mentioning contract =='
rg -n -C 5 --type rust \
'(playable_stem_contract|PlaybackStemKind|PlayableStemArtifactSet|PlayableStemArtifact)' \
apps/desktop/coreLength of output: 72208 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== complete contract integration test =='
cat -n apps/desktop/core/tests/playable_stem_artifact_reference.rs
printf '%s\n' '== exact-head diff =='
git diff --no-ext-diff --unified=80 \
c5cfac357240f7126a33bf84b4d1798cee9eb0c2..2f4892008cfd13681feb4dc658f6c073312f3079 \
-- apps/desktop/core/src/playable_stem_contract.rs \
apps/desktop/core/tests/playable_stem_artifact_reference.rs \
apps/desktop/core/src/lib.rs \
apps/desktop/core/Cargo.toml
printf '%s\n' '== PR cumulative changed paths =='
git diff --name-status 5da57dfedf699fc158f98588d9e54306e992f8ea..HEAD
git diff --stat 5da57dfedf699fc158f98588d9e54306e992f8ea..HEAD
printf '%s\n' '== export, workspace, toolchain, and lock context =='
rg -n -C 4 --glob '!*target*' \
'(\bmod\s+playable_stem_contract\b|\bpub\s+mod\s+playable_stem_contract\b|bandscope-desktop-core|rust-toolchain|rust-version|name = "serde")' \
Cargo.toml Cargo.lock apps README.md .github 2>/dev/null || true
fd -H -t f -a 'rust-toolchain(\.toml)?|Cargo\.lock|Cargo\.toml' . | sort
printf '%s\n' '== WAV/RIFF contract references =='
rg -n -i -C 4 \
'(canonical.{0,40}(wav|wave)|riff|wave header|pcm16|fileSizeBytes|sampleCount)' \
. -g '!**/node_modules/**' -g '!**/target/**'Length of output: 132793 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Python artifact writer and validation =='
sed -n '100,210p' services/analysis-engine/src/bandscope_analysis/separation/playback_artifacts.py
sed -n '220,350p' services/analysis-engine/src/bandscope_analysis/separation/playback_artifacts.py
sed -n '350,440p' services/analysis-engine/src/bandscope_analysis/separation/playback_artifacts.py
printf '%s\n' '== ADR format and native-contract sections =='
rg -n -i -C 8 \
'(riff|wav|pcm16|44|u32|file size|sample count|path-free|native contract|reference)' \
docs/adr/0001-playable-stem-delivery-and-audition.md \
docs/superpowers/plans/2026-09-04-playable-stem-audition.md
printf '%s\n' '== classic RIFF/WAV boundary calculation =='
python3 - <<'PY'
U32_MAX = 2**32 - 1
HEADER = 44
BYTES_PER_MONO_PCM16_SAMPLE = 2
# RIFF chunk size stores total file bytes after the first 8 bytes.
max_file_bytes = U32_MAX + 8
max_data_bytes = max_file_bytes - HEADER
max_samples = max_data_bytes // BYTES_PER_MONO_PCM16_SAMPLE
print(f"max_file_bytes={max_file_bytes}")
print(f"max_data_bytes={max_data_bytes}")
print(f"max_samples={max_samples}")
print(f"max_canonical_file_size={HEADER + BYTES_PER_MONO_PCM16_SAMPLE * max_samples}")
print(f"first_invalid_samples={max_samples + 1}")
print(f"first_invalid_canonical_file_size={HEADER + BYTES_PER_MONO_PCM16_SAMPLE * (max_samples + 1)}")
PY
printf '%s\n' '== Rust module inclusion and current compile targets =='
sed -n '1,80p' apps/desktop/core/src/lib.rs
find apps/desktop/core -maxdepth 3 -type f \( -name '*.rs' -o -name 'Cargo.toml' \) -print | sortLength of output: 41541
Finding: canonical WAV size limit is incomplete. The contract accepts Add an explicit classic RIFF/WAV maximum before accepting the reference. Add boundary tests for the maximum accepted count and the next count rejected. The existing The custom Rust format, build, test, Clippy, and coverage evidence remains unavailable. Source inspection does not establish those gates.
|
|
Verified and repaired the RIFF format-limit finding rather than treating TDD/source lineage:
The prior |
|
@coderabbitai Please execute the exact current head if your review environment permits it: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -uo pipefail
expected_head='df2a305b3b12b4d02c3ee0b670186218b626b50a'
actual_head="$(git rev-parse HEAD)"
printf '%s\n' '== exact head =='
printf 'expected: %s\nactual: %s\n' "$expected_head" "$actual_head"
if [ "$actual_head" != "$expected_head" ]; then
printf '%s\n' 'HEAD_MISMATCH: Requested commands were not run.'
exit 2
fi
run_command() {
local name="$1"
shift
local output status
printf '\n== %s ==\n' "$name"
output="$(mktemp)"
"$@" >"$output" 2>&1
status=$?
cat "$output"
rm -f "$output"
printf '\n== %s exit status: %s ==\n' "$name" "$status"
return "$status"
}
run_command 'cargo fmt check' \
cargo +1.97.1 fmt --manifest-path apps/desktop/core/Cargo.toml --check
fmt_status=$?
run_command 'targeted contract test' \
cargo +1.97.1 test --manifest-path apps/desktop/core/Cargo.toml --locked \
--test playable_stem_artifact_reference
test_status=$?
printf '\n== summary ==\n'
printf 'cargo fmt check: %s\n' "$fmt_status"
printf 'targeted contract test: %s\n' "$test_status"
if [ "$fmt_status" -ne 0 ]; then
exit "$fmt_status"
fi
exit "$test_status"Length of output: 6580
The first nonzero result was the format command. It exited with status This is a Rust toolchain-component failure. It is not a source-format failure. The environment installed Rust The targeted test command completed successfully: This run compiled If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! You are interacting with an AI system. |
|
@coderabbitai Please run one exact-head integration diagnostic on pub mod analysis_process_status;
pub mod playable_stem_contract;Then execute: If |
Rate Limit Exceeded
|
|
@coderabbitai review Please review exact current Draft head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='f22d1a17a2236603dbae6b1f24985dc93fc3f4d8'
actual_head="$(git rev-parse HEAD)"
printf 'expected HEAD: %s\nactual HEAD: %s\n' "$expected_head" "$actual_head"
if [ "$actual_head" != "$expected_head" ]; then
printf '%s\n' 'HEAD_MISMATCH: stop review; the requested revision is not checked out.'
exit 2
fi
printf '\n== head ==\n'
git show -s --format='%H%n%P%n%s' HEAD
printf '\n== localization-related changed paths (parent..HEAD) ==\n'
git diff --name-status HEAD^..HEAD
git diff --name-status c27f3781ddcbcc013dce07a26c0baf6080e4b2ac..HEAD | \
rg -i '(locale|localization|playback.*source|rehearsal.*player|discover|session|test)' || true
printf '\n== candidate file discovery ==\n'
fd -t f . apps/desktop/src | rg -i '(locale|playback.*source|rehearsal.*player|discover|session|test)' | sort
printf '\n== source structure ==\n'
ast-grep outline apps/desktop/src --items all --type function,class,interface,type --match 'Locale|PlaybackSource|RehearsalPlayer|discoverPlaybackSourceOptions|detectPreferredLocale' || true
printf '\n== localization and selector references ==\n'
rg -n -C 5 --glob '*.{ts,tsx,json}' \
'(detectPreferredLocale|type Locale|interface Locale|PlaybackSource|playbackSource|fieldset|legend|radio|accessible|aria-|sourceOptions)' \
apps/desktop/src
printf '\n== exact localization-focused diff ==\n'
git diff --no-ext-diff --unified=100 HEAD^..HEAD -- apps/desktop/src
printf '\n== resource files ==\n'
fd -t f -e json . apps/desktop/src/locales | sort | while IFS= read -r f; do
echo "--- $f"
cat -n "$f"
doneLength of output: 198548 🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='f22d1a17a2236603dbae6b1f24985dc93fc3f4d8'
test "$(git rev-parse HEAD)" = "$expected_head"
printf '%s\n' '== exact last-commit changed paths and diff =='
git diff-tree --no-commit-id --name-status -r HEAD
git show --no-ext-diff --format=fuller --find-renames --find-copies --unified=120 HEAD -- \
apps/desktop/src/features/workspace/playbackSourceCopy.ts \
apps/desktop/src/features/workspace/RehearsalPlayer.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx \
apps/desktop/src/locales/en/playback-source.json \
apps/desktop/src/locales/ko/playback-source.json
printf '%s\n' '== player wrapper outline and source-selection-specific references =='
ast-grep outline apps/desktop/src/features/workspace/RehearsalPlayer.tsx --items all --view expanded
rg -n -C 12 --glob '*.{ts,tsx}' \
'(createPlaybackSourceCopy|playbackSourceCopy|fieldset|legend|type="radio"|name=|value=|PlaybackSourceOption|selectedAuthority)' \
apps/desktop/src/features/workspace/RehearsalPlayer.tsx \
apps/desktop/src/features/workspace/RehearsalPlayerCore.tsx
printf '%s\n' '== localization adapter, test, and i18n files =='
for f in \
apps/desktop/src/features/workspace/playbackSourceCopy.ts \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx \
apps/desktop/src/i18n/index.ts \
apps/desktop/src/i18n.ts \
apps/desktop/tsconfig.json \
apps/desktop/vitest.config.ts \
apps/desktop/src/test/setup.ts \
apps/desktop/src/setupTests.ts
do
if [ -f "$f" ]; then
echo "--- $f"
cat -n "$f"
fi
done
printf '%s\n' '== locale definition locations =='
rg -n -C 8 --glob '*.{ts,tsx}' \
'(export type Locale|type Locale|detectPreferredLocale|createTranslator)' \
apps/desktop/src
printf '%s\n' '== resource key parity =='
python3 - <<'PY'
import json
from pathlib import Path
en = json.loads(Path("apps/desktop/src/locales/en/playback-source.json").read_text())
ko = json.loads(Path("apps/desktop/src/locales/ko/playback-source.json").read_text())
print("only EN:", sorted(set(en) - set(ko)))
print("only KO:", sorted(set(ko) - set(en)))
print("non-string EN:", [k for k,v in en.items() if not isinstance(v, str)])
print("non-string KO:", [k for k,v in ko.items() if not isinstance(v, str)])
PY
printf '%s\n' '== relevant test names and locale mutation cleanup =='
rg -n -C 6 --glob '*.{test,spec}.{ts,tsx}' \
'(playback source|Playback source|재생 소스|Full mix|전체 믹스|navigator.*language|defineProperty\(window\.navigator)' \
apps/desktop/srcLength of output: 144043
Finding: the Korean mounted regression does not restore A later test can then call Save the original The reviewed implementation otherwise uses the canonical I did not run tests or type checks. Source inspection does not establish hosted gate status. You are interacting with an AI system. |
|
@coderabbitai review Please review exact Draft head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='ae2549621efd72973f751ecba47524f652ebb47e'
actual_head="$(git rev-parse HEAD)"
printf 'expected HEAD: %s\nactual HEAD: %s\n' "$expected_head" "$actual_head"
if [ "$actual_head" != "$expected_head" ]; then
printf '%s\n' 'HEAD_MISMATCH: stop review; requested revision is not checked out.'
exit 2
fi
printf '\n== head ==\n'
git show -s --format='%H%n%P%n%s' HEAD
printf '\n== current commit changed paths ==\n'
git diff-tree --no-commit-id --name-status -r HEAD
printf '\n== cumulative candidate paths ==\n'
git diff --name-status c27f3781ddcbcc013dce07a26c0baf6080e4b2ac..HEAD | \
rg -i '(playback.*source|rehearsal.*player|locale|i18n|discover|session|test|traceability)' || true
printf '\n== candidate file discovery ==\n'
fd -t f . apps/desktop/src docs/traceability | \
rg -i '(playback.*source|rehearsal.*player|locale|i18n|discover|session)' | sort
printf '\n== focused source outlines ==\n'
for f in \
apps/desktop/src/features/workspace/RehearsalPlayer.tsx \
apps/desktop/src/features/workspace/playbackSourceSession.ts \
apps/desktop/src/features/workspace/discoverPlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/derivePlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/playbackSourceCopy.ts
do
if [ -f "$f" ]; then
echo "--- $f"
ast-grep outline "$f" --items all --view expanded || true
fi
done
printf '\n== waiting-state and identity references ==\n'
rg -n -C 10 --glob '*.{ts,tsx,json}' \
'(pendingRequest|Checking playback sources|재생 소스를 확인하는 중|aria-atomic|role="status"|role=.status.|get_playback_source_availability|discoverPlaybackSourceOptions|PlaybackSourceSession|projectId|authority|receipt|requestId)' \
apps/desktop/src
printf '\n== current commit focused diff ==\n'
git diff --no-ext-diff --unified=120 HEAD^..HEAD -- apps/desktop/src docs/traceability
printf '\n== relevant test locations ==\n'
rg -n -C 8 --glob '*.{test,spec}.{ts,tsx}' \
'(Checking playback sources|재생 소스를 확인하는 중|aria-atomic|pendingRequest|PlaybackSourceSession|discoverPlaybackSourceOptions|source selection)' \
apps/desktop/src
printf '\n== resource parity and values ==\n'
python3 - <<'PY'
import json
from pathlib import Path
paths = [
Path("apps/desktop/src/locales/en/playback-source.json"),
Path("apps/desktop/src/locales/ko/playback-source.json"),
]
for path in paths:
if path.exists():
data = json.loads(path.read_text())
print(f"--- {path}")
for key, value in data.items():
print(f"{key}: {value!r}")
if all(p.exists() for p in paths):
en = json.loads(paths[0].read_text())
ko = json.loads(paths[1].read_text())
print("only EN:", sorted(set(en) - set(ko)))
print("only KO:", sorted(set(ko) - set(en)))
print("non-string EN:", sorted(k for k,v in en.items() if not isinstance(v, str)))
print("non-string KO:", sorted(k for k,v in ko.items() if not isinstance(v, str)))
PYLength of output: 203427 🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='ae2549621efd72973f751ecba47524f652ebb47e'
test "$(git rev-parse HEAD)" = "$expected_head"
printf '%s\n' '== wrapper: complete source =='
cat -n apps/desktop/src/features/workspace/RehearsalPlayer.tsx
printf '%s\n' '== session: complete source =='
cat -n apps/desktop/src/features/workspace/playbackSourceSession.ts
printf '%s\n' '== waiting-state mounted test =='
sed -n '1,180p' apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx
printf '%s\n' '== project-rotation and revocation test sections =='
rg -n -A90 -B12 --glob 'RehearsalPlayer.sourceSelection.test.tsx' \
'(rotation|stale|revocation|error|pending|discovery|status)' \
apps/desktop/src/features/workspace
printf '%s\n' '== exact waiting-state commits and focused patches =='
git show --no-ext-diff --format=fuller --stat \
1e2eb0b1654a368286e05b242680d14b0b147020 \
b9592814a24969ff65176e45b545e660429323c2
git diff --no-ext-diff --unified=100 \
1e2eb0b1654a368286e05b242680d14b0b147020^..1e2eb0b1654a368286e05b242680d14b0b147020 \
-- apps/desktop/src
git diff --no-ext-diff --unified=100 \
b9592814a24969ff65176e45b545e660429323c2^..b9592814a24969ff65176e45b545e660429323c2 \
-- apps/desktop/src
printf '%s\n' '== copy adapter and locale type boundary =='
cat -n apps/desktop/src/features/workspace/playbackSourceCopy.ts
rg -n -C 6 --glob '*.{ts,tsx}' \
'(export type Locale|type Locale|detectPreferredLocale|createPlaybackSourceCopy)' \
apps/desktop/srcLength of output: 101981 🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='ae2549621efd72973f751ecba47524f652ebb47e'
test "$(git rev-parse HEAD)" = "$expected_head"
printf '%s\n' '== core status render context =='
sed -n '1080,1150p' apps/desktop/src/features/workspace/RehearsalPlayerCore.tsx
printf '%s\n' '== all mounted source-selection tests after Line 150 =='
sed -n '150,340p' apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx
printf '%s\n' '== all loading-copy use and assertions =='
rg -n -C 8 --glob '*.{ts,tsx,json}' \
'(playbackSourceCopy\("loading"\)|"loading": "Checking playback sources|"loading": "재생 소스를 확인하는 중|Checking playback sources|재생 소스를 확인하는 중)' \
apps/desktop/src
printf '%s\n' '== role=status counts in wrapper/core render sources =='
rg -n -C 4 --glob 'RehearsalPlayer*.tsx' 'role="status"' \
apps/desktop/src/features/workspaceLength of output: 13350
Finding: the new mounted waiting-state regression cannot identify or dismiss the discovery status.
Before the discovery effect commits, Select the new status by its loading text or add a specific test identifier. After settlement, assert that this specific discovery status is absent. Do not assert that all The implementation uses the required I did not run tests or hosted gates. Source inspection shows that the waiting-state test needs correction. You are interacting with an AI system. |
|
@coderabbitai review Exact head advanced to |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='6fa1bb4cd77442dfb86e41954197a3fa09fe92b6'
actual_head="$(git rev-parse HEAD)"
printf 'expected HEAD: %s\nactual HEAD: %s\n' "$expected_head" "$actual_head"
if [ "$actual_head" != "$expected_head" ]; then
printf '%s\n' 'HEAD_MISMATCH: stop review; requested revision is not checked out.'
exit 2
fi
printf '\n== exact head ==\n'
git show -s --format='%H%n%P%n%s' HEAD
printf '\n== repaired commit and cumulative changed paths ==\n'
git show --no-ext-diff --format=fuller --stat \
1fafe1fb391c8d31fa55538b3b8243804cbb0276
git diff --name-status \
c27f3781ddcbcc013dce07a26c0baf6080e4b2ac..HEAD | \
rg -i '(RehearsalPlayer|playback.*source|discover|session|locale|traceability|test)' || true
printf '\n== repair diff ==\n'
git diff --no-ext-diff --unified=120 \
1fafe1fb391c8d31fa55538b3b8243804cbb0276^..1fafe1fb391c8d31fa55538b3b8243804cbb0276 \
-- apps/desktop/src/features/workspace \
apps/desktop/src/locales \
docs/traceability
printf '\n== focused structure ==\n'
for f in \
apps/desktop/src/features/workspace/RehearsalPlayer.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx \
apps/desktop/src/features/workspace/playbackSourceSession.ts \
apps/desktop/src/features/workspace/discoverPlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/derivePlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/playbackSourceCopy.ts \
apps/desktop/src/features/workspace/RehearsalPlayerCore.tsx
do
if [ -f "$f" ]; then
printf '\n--- outline: %s ---\n' "$f"
ast-grep outline "$f" --items all --view expanded || true
fi
done
printf '\n== waiting state, receipt, authority, and revocation references ==\n'
rg -n -C 12 --glob '*.{ts,tsx,json}' \
'(Checking playback sources|재생 소스를 확인하는 중|role="status"|aria-atomic|pendingRequest|requestId|receipt|projectId|authority|revocation|stale|discoverPlaybackSourceOptions|PlaybackSourceSession)' \
apps/desktop/src/features/workspace apps/desktop/src/locales
printf '\n== relevant current sources ==\n'
for f in \
apps/desktop/src/features/workspace/RehearsalPlayer.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx \
apps/desktop/src/features/workspace/playbackSourceSession.ts \
apps/desktop/src/features/workspace/discoverPlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/derivePlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/playbackSourceCopy.ts
do
if [ -f "$f" ]; then
printf '\n--- source: %s ---\n' "$f"
cat -n "$f"
fi
doneLength of output: 203131
I found no new actionable source finding in the waiting-state slice.
A project rotation hides old options and the old waiting status immediately. The effect cleanup invalidates the prior generation. A late completion also must pass the generation check. On selected-stem media error, The mounted tests cover the repaired status query, stale prior-project options, and immediate stem revocation. I did not execute tests or hosted gates. You are interacting with an AI system. |
|
@coderabbitai review Exact head is now |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='6d414bdab6117c3fb2018112427fea483d79d169'
actual_head="$(git rev-parse HEAD)"
printf 'expected HEAD: %s\nactual HEAD: %s\n' "$expected_head" "$actual_head"
if [ "$actual_head" != "$expected_head" ]; then
printf '%s\n' 'HEAD_MISMATCH: stop review; requested revision is not checked out.'
exit 2
fi
printf '\n== head and repair commit ==\n'
git show -s --format='%H%n%P%n%s' HEAD
git show --no-ext-diff --format=fuller --stat HEAD
git diff --no-ext-diff --unified=120 HEAD^..HEAD -- \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.i18n.test.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.tsx \
apps/desktop/src/features/workspace/playbackSourceCopy.ts \
apps/desktop/src/locales
printf '\n== focused source structure ==\n'
for f in \
apps/desktop/src/features/workspace/RehearsalPlayer.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.i18n.test.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx \
apps/desktop/src/features/workspace/playbackSourceSession.ts \
apps/desktop/src/features/workspace/discoverPlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/derivePlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/playbackSourceCopy.ts
do
if [ -f "$f" ]; then
printf '\n--- outline: %s ---\n' "$f"
ast-grep outline "$f" --items all --view expanded || true
fi
done
printf '\n== full focused tests and wrapper ==\n'
for f in \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.i18n.test.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx \
apps/desktop/src/features/workspace/RehearsalPlayer.tsx \
apps/desktop/src/features/workspace/playbackSourceCopy.ts \
apps/desktop/src/features/workspace/playbackSourceSession.ts \
apps/desktop/src/features/workspace/discoverPlaybackSourceOptions.ts \
apps/desktop/src/features/workspace/derivePlaybackSourceOptions.ts
do
if [ -f "$f" ]; then
printf '\n--- source: %s ---\n' "$f"
cat -n "$f"
fi
done
printf '\n== navigator locale mutation and test setup ==\n'
rg -n -C 10 --glob '*.{test,spec}.{ts,tsx}' \
'(navigator\.language|defineProperty\(navigator|defineProperty\(window\.navigator|detectPreferredLocale|afterEach|beforeEach)' \
apps/desktop/src
for f in apps/desktop/src/test/setup.ts apps/desktop/src/setupTests.ts apps/desktop/vitest.config.ts; do
if [ -f "$f" ]; then
printf '\n--- source: %s ---\n' "$f"
cat -n "$f"
fi
done
printf '\n== copy resources and authority/status references ==\n'
for f in \
apps/desktop/src/locales/en/playback-source.json \
apps/desktop/src/locales/ko/playback-source.json
do
if [ -f "$f" ]; then
printf '\n--- source: %s ---\n' "$f"
cat -n "$f"
fi
done
rg -n -C 8 --glob '*.{ts,tsx,json}' \
'(pendingRequest|role="status"|aria-atomic|Checking playback sources|재생 소스를 확인하는 중|fullMixAuthority|selectedAuthority|beginPlaybackSourceDiscovery|completePlaybackSourceDiscovery|value=\{.*authority)' \
apps/desktop/src/features/workspace apps/desktop/src/localesLength of output: 203569 🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='6d414bdab6117c3fb2018112427fea483d79d169'
test "$(git rev-parse HEAD)" = "$expected_head"
printf '%s\n' '== locale test: complete =='
cat -n apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.i18n.test.tsx
printf '%s\n' '== wrapper callbacks, effects, and render: complete =='
cat -n apps/desktop/src/features/workspace/RehearsalPlayer.tsx
printf '%s\n' '== source-selection test: project rotation through end =='
sed -n '160,310p' apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.test.tsx
printf '%s\n' '== discovery adapter and selection derivation: complete =='
for f in \
apps/desktop/src/features/workspace/playbackSourceDiscovery.ts \
apps/desktop/src/features/workspace/playbackSourceSelection.ts \
apps/desktop/src/features/workspace/playbackSourceCopy.ts \
apps/desktop/src/i18n.ts
do
if [ -f "$f" ]; then
echo "--- $f"
cat -n "$f"
fi
done
printf '%s\n' '== selector i18n changes and file-level test isolation =='
git diff --no-ext-diff --unified=100 \
6fa1bb4cd77442dfb86e41954197a3fa09fe92b6..HEAD -- \
apps/desktop/src/features/workspace/RehearsalPlayer.sourceSelection.i18n.test.tsx
rg -n -C 5 --glob 'RehearsalPlayer.sourceSelection.i18n.test.tsx' \
'(beforeEach|afterEach|cleanup|restoreAllMocks|navigator)' \
apps/desktop/src/features/workspaceLength of output: 31592
I found no new actionable source finding in the mounted source-selector, discovery-status, and localization slice.
The mounted selector still limits visible options and the loading status to the session that matches the mounted full-mix authority. Effect cleanup advances the discovery generation. Late completions cannot update the current session. The EN and KO resources have matching keys. The selector keeps native I did not run automated tests or hosted gates. This review does not establish those gates. You are interacting with an AI system. |
Stack role
Draft native-authority/UI child of #1159 on canonical #971 Active Player lineage:
It advances #961 without creating a second transport, playback-authority store, persistence owner, or global i18n owner. MIR quality remains #770/#828, Resource Admission & Decode remains #781/#866, canonical crash-safe/versioned project persistence is #970/#962, and broader shipped localization/accessibility convergence remains #965.
Exact current identity
develop@314ddeae7b775a4957594b599358c8255617eb2e(re-fetch before merge decisions).09bedd835475015379716292e63e6be376fceec9.c27f3781ddcbcc013dce07a26c0baf6080e4b2ac.feat/playable-stem-native-contract-961@6d414bdab6117c3fb2018112427fea483d79d169.Active Player boundary
run_analysis_engineadmits strict status and strips native path/hash/artifact-set data from renderer status. A path-free four-stem reference is admitted only for canonicalvocals,bass,drums,otherPCM16 metadata. Native preflight derives only app-owned fixed stem locations and rejects containment/symlink/reparse/member/regular-file/byte/header/SHA-256/native-identity failures. #971's file-identity primitive andPlaybackAuthorityremain the only native playback authority.get_playback_source_availability,derivePlaybackSourceOptions,discoverPlaybackSourceOptions, andPlaybackSourceSessionenforce same-project/all-or-none membership, canonical ordering, stale-request rejection, hostile-payload fail-closed behavior, exact issued-request completion, immutable snapshots and current-option-only selection.The public
RehearsalPlayermounts the five-source set only when native availability is complete. Project rotation removes stale options synchronously; per-mountuseId()isolates radio groups. A selected-stem media error immediately falls back to the existing full-mix authority and starts a new monotonic native discovery receipt.Same-project source replacement uses
PlaybackSourceSwitchSession: issue the exact receipt beforeaudio.srcmutation, pause and clear admitted duration,load(), admit only exact active session/plan + target + duration/loop/seek, restore seek/rate, resume only captured looping state, then consume with complete/abort. Plans/sessions are immutable and single-use; malformed loop timing and paused count-in fail closed; duplicate metadata is inert after settlement; old-resourceplay()Promise outcomes are retired before replacement.Discovery waiting-state accessibility
Mounted review found that the selector correctly removes stale stem choices while
get_playback_source_availabilityis pending but previously gave no visible or screen-reader explanation. REDc55e15d1884fcb8cfa750ed3434b498917858bbbholds discovery unresolved and requires a status with no premature stem group. Fix1e2eb0b1654a368286e05b242680d14b0b147020derives loading only from the current project's exactpendingRequestand adds EN/KOChecking playback sources…/재생 소스를 확인하는 중…copy.WAI-ARIA
statusis the non-interruptive advisory live-region semantic. Compatibility REDff7b418633cdf053d6a9c46d00282590bb7876ecrequires explicitaria-atomic="true"; fixb9592814a24969ff65176e45b545e660429323c2adds it without focus movement or an assertive alert.Exact-head CodeRabbit review then found the new test itself conflated this discovery status with
RehearsalPlayerCore's separate persistentrole=status. Repair1fafe1fb391c8d31fa55538b3b8243804cbb0276now targets only the discovery live region by exact loading text plus status role and, after settlement, asserts only that specific region is gone. Re-review of6fa1bb4…found no new actionable source finding in that waiting-state slice.A separate valid CodeRabbit finding showed the Korean selector regression overwrote process-global
navigator.languagewithout restoring it. Repair6d414bdab6117c3fb2018112427fea483d79d169captures the original own property descriptor and restores it inafterEach, deleting the temporary own property when no original existed. This is test isolation only; production locale or playback authority is unchanged.docs/traceability/mounted-playback-source-selector.mdrecords the waiting-state problem, RED/fix, review repair and WAI-ARIA 1.2 / WCAG 2.2 SC 4.1.3 / ARIA22 references. The loading text is presentation only: it never becomes playback authority, does not prolong a receipt, and disappears when the exact discovery settles.Project Persistence prerequisite
The earlier #1160 compatibility repair (
0926ab899… → 38b1328b…) proved the product sharedRehearsalSongcontains top-level collaboration and role-levelharmonicExplanation,transpositionPlan,transcription, andpracticeProgress, while strict native persistence had omitted them. That delta remains compatibility evidence here, but durable ownership is #970/#962.Canonical #970 is now at
0185267ab819dd4b9ac1352f5fce1df8e2a7a782, ordinary-descended from protecteddevelop@314ddeae…withbehind_by=0. It has repaired the earlier structural schema mismatch, collaboration/progress domains, omission-vs-explicit-null semantics, and the previously stringly section/role/confidence/provenance/cue/export/manual-override domains while retainingdeny_unknown_fields, finite-positive tempo validation, andprojectFormatVersion: 1. Positive-domain tests cover every currently valid token, including kebab-casepre-chorus,cue-sheet, andchart-summary. A current review finding that project-format TRACEABILITY lacked the rootAGENTS.mdSecurity Notes contract was repaired by REDd7886876…and fix/current head0185267…; the thread is resolved. #970 remains Draft because its exact-head hosted workflows are still queued/non-terminal and no qualifying current-head last-push approval is established.Selected source must persist through #970/#962 as a stable semantic (
full_mix | vocals | bass | drums | other, or the canonical equivalent), never as a revocablebandscope-playbackURL/authority. Reload must re-resolve the semantic through current native availability and fail closed to Full mix if unavailable. #1160 must not create a second project store while that owner work remains unmerged.Localization boundary
The selector no longer owns component-local English. EN/KO visible/accessibility copy, including discovery waiting state, lives under the existing locale tree and uses canonical
Locale/detectPreferredLocale(); translated copy is never playback authority. Nativefieldset/legend/labeled-radio semantics remain. JA/ZH/VI/ES/DE/FR, CJK/text expansion/font fallback, DB-backed/versioned translation-ledger lifecycle and shipped accessibility evidence remain #965/product-level work.Current buyer gap
Source selection, same-project continuity, project/generation reset, stale previous-resource Promise retirement, error-driven stem revocation/fallback, selector EN/KO copy, and a programmatically determinable discovery waiting state are implemented at source level. Remaining buyer-facing work is durable selected-source persistence/reload through #970/#962; distinct discovery failure/empty-state copy only if it gives an actionable distinction beyond safe full-mix fallback; broader localization/accessibility; current-head browser/screen-reader evidence; and rights-cleared audible Windows/macOS acceptance.
Verification / merge gate
Keep Draft. Source/test/TRACEABILITY evidence is not repository GREEN. Current-head hosted check-runs must be materialized and terminal-success, and the unchanged head needs all protected repository/central CI, native Windows/macOS build, dependency/SBOM/security, coverage, qualifying independent last-push approval and zero unresolved actionable threads. Absent, queued, skipped, cancelled, stale, predecessor, author/self, model-only or administrative-bypass evidence is non-passing.