mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-08-12 03:41:40 +00:00
Purge external-format terminology from code, tests and docs
Reword comments/docstrings/strings and rename identifiers that referenced the external game and its file formats: - format-id "psarc" -> "archive"; local vars psarc_path -> song_path, psarc_base -> tone_base - lyrics provenance value "sng" -> "notechart" (legacy "sng" still accepted) - highway_3d fret-ghost scope value "rocksmith" -> "chords" (invalid/legacy values fall back to the default, preserving behaviour) - neutralise references in prose, test names/data, .gitattributes and docs No functional change beyond the renamed identifiers; all Python compiles.
This commit is contained in:
@@ -817,7 +817,7 @@ test('mapping helpers call core mapping API with provider-tagged payloads', asyn
|
||||
|
||||
const saved = await window.slopsmith.audioEffects.upsertMapping({
|
||||
song_key: 'settings-v1-song',
|
||||
filename: 'Artist - Song_p.psarc',
|
||||
filename: 'Artist - Song_p.archive',
|
||||
tone_key: 'Dist',
|
||||
provider_id: 'rig-builder',
|
||||
provider_ref: 'chain:99',
|
||||
@@ -880,7 +880,7 @@ test('bridge hits are safe and diagnosable', async () => {
|
||||
routeKey: 'desktop-main',
|
||||
bridgeId: 'audio-effects.legacy-nam-routing',
|
||||
pluginId: 'rig_builder',
|
||||
legacySurface: 'fetch /Users/example/song.psarc token=abc123',
|
||||
legacySurface: 'fetch /Users/example/song.archive token=abc123',
|
||||
},
|
||||
});
|
||||
const dbResult = await api.dispatch({
|
||||
|
||||
@@ -22,13 +22,13 @@ test('audio session lifecycle and snapshots redact source identity with per-snap
|
||||
const window = loadAudioSession();
|
||||
const audioSession = window.slopsmith.audioSession;
|
||||
|
||||
audioSession.startSession({ sessionId: 'main:/Users/example/DLC/song.psarc', songKey: '/Users/example/DLC/song.psarc', songFormat: 'psarc' });
|
||||
audioSession.startSession({ sessionId: 'main:/Users/example/DLC/song.archive', songKey: '/Users/example/DLC/song.archive', songFormat: 'archive' });
|
||||
audioSession.setRoute({ routeKind: 'html5', availability: 'available', deviceLabel: 'Scarlett 2i2 Serial 1234' });
|
||||
audioSession.registerInputSource({ sourceId: 'mic-raw-id', logicalSourceKey: 'browser:instrument:primary', providerId: 'browser', kind: 'instrument', channelCount: 2, availability: 'available', label: 'Scarlett 2i2 Serial 1234' });
|
||||
|
||||
const snapshot = audioSession.snapshot();
|
||||
const encoded = JSON.stringify(snapshot);
|
||||
assert.equal(snapshot.session.songFormat, 'psarc');
|
||||
assert.equal(snapshot.session.songFormat, 'archive');
|
||||
assert.match(snapshot.domains['audio-input'].sources[0].diagnosticsPseudonym, /^source-\d{2}$/);
|
||||
assert.equal(encoded.includes('Scarlett'), false);
|
||||
assert.equal(encoded.includes('/Users/example'), false);
|
||||
@@ -156,7 +156,7 @@ test('audio-mix diagnostics include faders routes analysers bridge hits and reda
|
||||
const window = loadAudioSession();
|
||||
const api = window.slopsmith.capabilities;
|
||||
const audioSession = window.slopsmith.audioSession;
|
||||
audioSession.startSession({ sessionId: 'main:/Users/example/DLC/song.psarc', songKey: '/Users/example/DLC/song.psarc' });
|
||||
audioSession.startSession({ sessionId: 'main:/Users/example/DLC/song.archive', songKey: '/Users/example/DLC/song.archive' });
|
||||
audioSession.setRoute({ routeKind: 'desktop', availability: 'degraded', deviceLabel: 'Secret Studio Output', fallbackReason: 'fallback token=abc123 at /Users/example/device' });
|
||||
audioSession.setAnalyser({ source: 'plugin', availability: 'available', participantId: 'plugin.visualizer', reason: 'ok', rawFft: [1, 2, 3] });
|
||||
audioSession.recordBridgeHit({ domain: 'audio-mix', bridgeId: 'audio-mix.fader-registry', legacySurface: 'registerFader', participantId: 'legacy.delay', outcome: 'failed', reason: 'password=abc path /Users/example/plugin' });
|
||||
|
||||
@@ -205,7 +205,7 @@ test('re-registering a mix participant without handlers preserves the existing s
|
||||
// every song load and re-registers core.song WITHOUT get/set handlers.
|
||||
// registerMixParticipant replaces the participant, so before the fix this
|
||||
// wiped the fader.set-value handler installed at init — the mixer slider
|
||||
// then moved visually but never applied the volume (PSARC and sloppak).
|
||||
// then moved visually but never applied the volume (archive and sloppak).
|
||||
const window = loadAudioSession();
|
||||
const audioSession = window.slopsmith.audioSession;
|
||||
audioSession.startSession({ sessionId: 'main:test-song', songKey: 'test-song', songFormat: 'sloppak' });
|
||||
|
||||
@@ -111,10 +111,10 @@ test('audio-input selection and registered providers survive song session switch
|
||||
const open = await api.dispatch({ capability: 'audio-input', command: 'open-source', source: 'note_detect', payload: { requesterId: 'note_detect', requiredChannelShape: 'mono' } });
|
||||
assert.equal(open.outcome, 'handled');
|
||||
|
||||
const next = audioSession.startSession({ sessionId: 'main:second-song', songKey: 'second-song.psarc', songFormat: 'psarc' });
|
||||
const next = audioSession.startSession({ sessionId: 'main:second-song', songKey: 'second-song.archive', songFormat: 'archive' });
|
||||
const listed = await api.dispatch({ capability: 'audio-input', command: 'list-sources', source: 'note_detect' });
|
||||
|
||||
assert.equal(next.session.songFormat, 'psarc');
|
||||
assert.equal(next.session.songFormat, 'archive');
|
||||
assert.equal(next.domains['audio-input'].selected.logicalSourceKey, 'switch:instrument:primary');
|
||||
assert.equal(next.domains['audio-input'].totalOpenSessions, 0);
|
||||
assert.equal(listed.payload.sources.some(source => source.logicalSourceKey === 'switch:instrument:primary'), true);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Pins the fret-spacing setting in plugins/highway_3d/screen.js (PR #329).
|
||||
// The board can render fret columns either Uniform (equal width, Rocksmith
|
||||
// The board can render fret columns either Uniform (equal width, the source game
|
||||
// Remastered style) or Logarithmic (real instrument geometry), switchable at
|
||||
// runtime via window.h3dSetFretSpacing and persisted in localStorage. A
|
||||
// refactor that renames the storage key, drops the uniform/log branch in
|
||||
|
||||
@@ -9,14 +9,14 @@ test('register + list returns applicable actions sorted by order', () => {
|
||||
freshIds();
|
||||
reg.register({ id: 'b', label: 'B', order: 20, run() {} });
|
||||
reg.register({ id: 'a', label: 'A', order: 10, run() {} });
|
||||
const ids = reg.list({ filename: 'x.psarc' }).map((a) => a.id);
|
||||
const ids = reg.list({ filename: 'x.archive' }).map((a) => a.id);
|
||||
assert.deepStrictEqual(ids, ['a', 'b']);
|
||||
});
|
||||
|
||||
test('applies() filters out non-applicable actions', () => {
|
||||
freshIds();
|
||||
reg.register({ id: 'bassonly', label: 'Bass', applies: (s) => s.format === 'sloppak', run() {} });
|
||||
assert.strictEqual(reg.list({ filename: 'x.psarc', format: 'psarc' }).length, 0);
|
||||
assert.strictEqual(reg.list({ filename: 'x.archive', format: 'archive' }).length, 0);
|
||||
assert.strictEqual(reg.list({ filename: 'y.sloppak', format: 'sloppak' }).length, 1);
|
||||
});
|
||||
|
||||
@@ -33,10 +33,10 @@ test('run() invokes the handler and reports handled', async () => {
|
||||
freshIds();
|
||||
let got = null;
|
||||
reg.register({ id: 'go', label: 'Go', run: (song) => { got = song.filename; return 'done'; } });
|
||||
const r = await reg.run('go', { filename: 'song.psarc' }, {});
|
||||
const r = await reg.run('go', { filename: 'song.archive' }, {});
|
||||
assert.strictEqual(r.ok, true);
|
||||
assert.strictEqual(r.outcome, 'handled');
|
||||
assert.strictEqual(got, 'song.psarc');
|
||||
assert.strictEqual(got, 'song.archive');
|
||||
});
|
||||
|
||||
test('run() of a disabled / non-applicable / unknown action does not throw', async () => {
|
||||
|
||||
@@ -49,7 +49,7 @@ test('reset counters via bindRuntime song lifecycle', () => {
|
||||
};
|
||||
|
||||
const runtime = hud.bindRuntime(sm);
|
||||
sm.emit('song:loading', { filename: 'song.psarc' });
|
||||
sm.emit('song:loading', { filename: 'song.archive' });
|
||||
assert.equal(runtime.isActive(), true);
|
||||
|
||||
runtime.onHit();
|
||||
@@ -59,7 +59,7 @@ test('reset counters via bindRuntime song lifecycle', () => {
|
||||
assert.equal(runtime.getCounters().misses, 1);
|
||||
assert.equal(runtime.getCounters().streak, 0);
|
||||
|
||||
sm.emit('song:arrangement-changed', { filename: 'song.psarc', arrangement: 1 });
|
||||
sm.emit('song:arrangement-changed', { filename: 'song.archive', arrangement: 1 });
|
||||
assert.deepEqual(runtime.getCounters(), { hits: 0, misses: 0, streak: 0, bestStreak: 0 });
|
||||
|
||||
sm.emit('song:stop', { time: 12 });
|
||||
@@ -103,7 +103,7 @@ test('DOM text updates after hit and miss events', () => {
|
||||
};
|
||||
|
||||
const runtime = hud.bindRuntime(sm, els);
|
||||
sm.emit('song:loading', { filename: 'song.psarc' });
|
||||
sm.emit('song:loading', { filename: 'song.archive' });
|
||||
|
||||
assert.equal(els.percent.textContent, '\u2014');
|
||||
assert.equal(els.hits.textContent, 'Waiting for notes');
|
||||
@@ -140,7 +140,7 @@ test('HUD stays hidden until the first note arrives, then reveals', () => {
|
||||
};
|
||||
|
||||
const runtime = hud.bindRuntime(sm, els);
|
||||
sm.emit('song:loading', { filename: 'song.psarc' });
|
||||
sm.emit('song:loading', { filename: 'song.archive' });
|
||||
// Primed (tallying) but not yet visible — a user without note detection
|
||||
// never gets note:hit/note:miss, so the HUD must not show on load alone.
|
||||
assert.equal(runtime.isActive(), true);
|
||||
@@ -152,7 +152,7 @@ test('HUD stays hidden until the first note arrives, then reveals', () => {
|
||||
// A new song re-hides until the next note.
|
||||
sm.emit('song:stop', { time: 1 });
|
||||
assert.ok(els.root.className.includes('hidden'));
|
||||
sm.emit('song:loading', { filename: 'song2.psarc' });
|
||||
sm.emit('song:loading', { filename: 'song2.archive' });
|
||||
assert.ok(els.root.className.includes('hidden'));
|
||||
});
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ test('diagnostics contribution is redaction-safe', async () => {
|
||||
const contribution = window.__diagnosticsContributions.get('note-detection-capability');
|
||||
assert.equal(contribution.schema, 'slopsmith.note_detection_capability.v1');
|
||||
const serialized = JSON.stringify(contribution);
|
||||
assert.ok(!/Yamaha|deviceLabel|filename|\.sloppak|\.psarc/i.test(serialized), serialized);
|
||||
assert.ok(!/Yamaha|deviceLabel|filename|\.sloppak|\.archive/i.test(serialized), serialized);
|
||||
});
|
||||
|
||||
test('legacy setNoteStateProvider surface is wrapped and accounted', () => {
|
||||
@@ -227,7 +227,7 @@ test('_contextSummary whitelists arrangement kind — unknown values are dropped
|
||||
// Arbitrary string must not appear in context summary.
|
||||
const open2 = await api.dispatch({
|
||||
capability: 'note-detection', command: 'open-binding',
|
||||
source: 'caller', payload: { context: { arrangement: '/Users/victim/song.psarc' } },
|
||||
source: 'caller', payload: { context: { arrangement: '/Users/victim/song.archive' } },
|
||||
});
|
||||
assert.equal(open2.outcome, 'handled');
|
||||
const snap2 = window.slopsmith.noteDetection.snapshot();
|
||||
|
||||
@@ -68,8 +68,8 @@ test('legacy bridge hits are attributed to playback compatibility shims', () =>
|
||||
|
||||
test('legacy song events update playback state without exposing raw filenames', () => {
|
||||
const window = loadPlayback();
|
||||
window.slopsmith.emit('song:loading', { filename: '/Users/example/Secret Folder/Artist - Song_p.psarc', arrangement: 0 });
|
||||
window.slopsmith.emit('song:loaded', makeTarget({ filename: '/Users/example/Secret Folder/Artist - Song_p.psarc' }));
|
||||
window.slopsmith.emit('song:loading', { filename: '/Users/example/Secret Folder/Artist - Song_p.archive', arrangement: 0 });
|
||||
window.slopsmith.emit('song:loaded', makeTarget({ filename: '/Users/example/Secret Folder/Artist - Song_p.archive' }));
|
||||
window.slopsmith.emit('song:play', { time: 4, audioT: 4, chartT: 4 });
|
||||
window.slopsmith.emit('song:seek', { from: 4, to: 12, reason: 'seek-by' });
|
||||
|
||||
@@ -81,7 +81,7 @@ test('legacy song events update playback state without exposing raw filenames',
|
||||
assert.match(playback.state.target.settingsKey, /^settings-v1-[a-z0-9]{7}$/);
|
||||
assert.ok(playback.bridges.some(bridge => bridge.bridgeId === 'playback.song-events'));
|
||||
assert.doesNotMatch(encoded, /Secret Folder/);
|
||||
assert.doesNotMatch(encoded, /Artist - Song_p\.psarc/);
|
||||
assert.doesNotMatch(encoded, /Artist - Song_p\.archive/);
|
||||
});
|
||||
|
||||
test('route changes are captured as redaction-safe playback lifecycle events', () => {
|
||||
|
||||
@@ -9,7 +9,7 @@ test('exported diagnostics pseudonymize targets while local inspector may show d
|
||||
authorization: 'user-action',
|
||||
requesterId: 'core.player.controls',
|
||||
target: makeTarget({
|
||||
filename: '/Users/example/DLC/Private Artist - Private Song_p.psarc',
|
||||
filename: '/Users/example/DLC/Private Artist - Private Song_p.archive',
|
||||
title: 'Private Song',
|
||||
artist: 'Private Artist',
|
||||
arrangement: 'Lead',
|
||||
@@ -36,7 +36,7 @@ test('diagnostic history is bounded for current and stopped sessions', async ()
|
||||
window.slopsmith.playback.registerTransportAdapter(makeAdapter());
|
||||
|
||||
for (let index = 0; index < 7; index += 1) {
|
||||
await dispatch(window, 'start', { authorization: 'user-action', requesterId: 'core.player.controls', target: makeTarget({ filename: `song-${index}.psarc`, title: `Song ${index}` }) });
|
||||
await dispatch(window, 'start', { authorization: 'user-action', requesterId: 'core.player.controls', target: makeTarget({ filename: `song-${index}.archive`, title: `Song ${index}` }) });
|
||||
for (let seek = 0; seek < 12; seek += 1) {
|
||||
await dispatch(window, 'seek', { requesterId: 'core.player.controls', time: seek });
|
||||
}
|
||||
@@ -96,7 +96,7 @@ test('diagnostics redact requester ids and raw camel-case payload keys', async (
|
||||
accessToken: 'plain-secret-token',
|
||||
nativeHandleRef: 'native-secret-handle',
|
||||
mediaStream: 'raw-stream-id',
|
||||
reason: '/Users/example/private song.psarc token=secret',
|
||||
reason: '/Users/example/private song.archive token=secret',
|
||||
safeDetail: 'safe value',
|
||||
});
|
||||
window.slopsmith.playback.recordBridgeHit({
|
||||
|
||||
@@ -57,7 +57,7 @@ test('start requires a target and explicit user authorization for fresh audible
|
||||
test('settings key is stable across arrangements while target id remains arrangement scoped', async () => {
|
||||
const window = loadPlayback();
|
||||
window.slopsmith.playback.registerTransportAdapter(makeAdapter());
|
||||
const base = makeTarget({ filename: '/Users/example/DLC/Artist - Song_p.psarc', arrangement: 'Lead', arrangementIndex: 0 });
|
||||
const base = makeTarget({ filename: '/Users/example/DLC/Artist - Song_p.archive', arrangement: 'Lead', arrangementIndex: 0 });
|
||||
|
||||
await dispatch(window, 'start', { requesterId: 'core.player.controls', authorization: 'user-action', target: base });
|
||||
const leadTarget = diagnosticsSnapshot(window).state.target;
|
||||
|
||||
@@ -41,12 +41,12 @@ function dispatch(window, command, payload = {}, requester = 'test') {
|
||||
|
||||
function makeTarget(overrides = {}) {
|
||||
return {
|
||||
filename: overrides.filename || '/Users/example/DLC/Secret Artist - Song_p.psarc',
|
||||
filename: overrides.filename || '/Users/example/DLC/Secret Artist - Song_p.archive',
|
||||
title: overrides.title || 'Visible Title',
|
||||
artist: overrides.artist || 'Visible Artist',
|
||||
arrangement: overrides.arrangement || 'Lead',
|
||||
arrangementIndex: overrides.arrangementIndex ?? 0,
|
||||
format: overrides.format || 'psarc',
|
||||
format: overrides.format || 'archive',
|
||||
sourceKind: overrides.sourceKind || 'local',
|
||||
...overrides,
|
||||
};
|
||||
|
||||
@@ -172,7 +172,7 @@ test('new song load resets the HTML audio rate, not only the visible speed contr
|
||||
const sandbox = buildSandbox();
|
||||
loadPlaySong(sandbox);
|
||||
|
||||
await sandbox.__playSong('next-song.psarc');
|
||||
await sandbox.__playSong('next-song.archive');
|
||||
|
||||
assert.equal(sandbox.__elements.get('speed-slider').value, 100);
|
||||
assert.match(sandbox.__elements.get('speed-label').textContent, /^1\.0{1,2}x$/);
|
||||
@@ -184,7 +184,7 @@ test('new song load resets the desktop backing rate when the API is available',
|
||||
const sandbox = buildSandbox({ juceMode: true });
|
||||
loadPlaySong(sandbox);
|
||||
|
||||
await sandbox.__playSong('next-song.psarc');
|
||||
await sandbox.__playSong('next-song.archive');
|
||||
await new Promise((resolve) => setImmediate(resolve));
|
||||
|
||||
assert.equal(sandbox.jucePlayer._speed, 1);
|
||||
|
||||
@@ -240,7 +240,7 @@ test('diagnostics contribution is redaction-safe (no song identity)', () => {
|
||||
const contribution = window.__diagnosticsContributions.get('visualization-capability');
|
||||
assert.equal(contribution.schema, 'slopsmith.visualization_capability.v1');
|
||||
const serialized = JSON.stringify(contribution);
|
||||
assert.ok(!/filename|title|artist|\.sloppak|\.psarc/i.test(serialized), serialized);
|
||||
assert.ok(!/filename|title|artist|\.sloppak|\.archive/i.test(serialized), serialized);
|
||||
assert.deepEqual(
|
||||
JSON.parse(JSON.stringify(contribution.lastAutoMatch)),
|
||||
{ resolved: 'piano', matched: true },
|
||||
|
||||
Reference in New Issue
Block a user