mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-09-11 03:14:29 +00:00
refactor(h3d-carve-17): cut-17 — alias removal + stale doc comment cleanup
Cleanups: - scene-init.js: remove dead DI alias getHighwayCanvas:_getHighwayCanvasAlias (Creed note) setHighwayCanvas now correctly gains its own line in the DI block - note-renderer.js: two stale line-number refs → module-relative refs (Toby r4 LOW) - arp.js: stale 'at line 4025' doc comment → 'factory-scope fn in screen.js' Gates: - ESLint: 0 errors on scene-init.js - plugin.json: 3.52.0 → 3.53.0 - Tests: 448/448 (alias kill test added; DI count repinned 178→179; version test updated) Note: DI count is 179 post-edit (setHighwayCanvas promoted to line-first position) CAF sweep: waived (no setter-arg changes in scope) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014uZ169yfoFYArXz962g7KW
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
6c15ed9dda
commit
a6efd4ee5e
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "highway_3d",
|
||||
"name": "3D Highway",
|
||||
"version": "3.52.0",
|
||||
"version": "3.53.0",
|
||||
"type": "visualization",
|
||||
"scriptType": "module",
|
||||
"bundled": true,
|
||||
|
||||
@@ -21,7 +21,7 @@ export function createArp({
|
||||
// ── plain const shorthand (fn refs or number consts, never reassigned) ──
|
||||
validString, // IIFE fn decl ~line 3736
|
||||
filterValidNotes, // IIFE fn decl ~line 3767 — used by arpeggioLaneDividerFrameAccentMul
|
||||
sY, // const fn at line 4025: s => S_BASE + (...) * S_GAP (captures live vars)
|
||||
sY, // factory-scope fn: s => S_BASE + (...) * S_GAP (captures live vars)
|
||||
K, // module-level const line 124
|
||||
S_GAP, // module-level const line 203
|
||||
BEHIND, // module-level const line 206
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// h3d-carve-14: V-section (note renderer) → src/note-renderer.js
|
||||
// Source: plugins/highway_3d/screen.js lines 10172–11604 (pre-cut).
|
||||
// Factory pattern: createNoteRenderer({DI}) → { drawNote, drawArpBrackets, drawNotedetectLabels, chordHarmonyLabels }
|
||||
// chordHarmonyLabels is also called from update() (U-section) at line 9016.
|
||||
// chordHarmonyLabels is also called from update() (U-section) in src/renderer.js.
|
||||
//
|
||||
// DI surface: 130 params
|
||||
// - 27 constants (shorthand)
|
||||
@@ -928,14 +928,14 @@ export function createNoteRenderer({
|
||||
// open-note body. Fretted notes keep the
|
||||
// single-trail path. Offsets are scaled by
|
||||
// `openWScale` (the same body-width scale
|
||||
// computed at line 7367) so the trails stay
|
||||
// underneath the body's edges no matter how wide
|
||||
// computed above via openChordBoxWidth) so the trails
|
||||
// stay underneath the body's edges no matter how wide
|
||||
// the anchor lane is. Chord-member open strings
|
||||
// can't reach here (guarded at the `hasSus`
|
||||
// check above).
|
||||
//
|
||||
// openTrailOff is always > 0 because openWScale
|
||||
// is clamped >= 0.22 at line 7368 (or defaults
|
||||
// is clamped >= 0.22 above (or defaults
|
||||
// to 1 when there's no openChordBoxWidth), so
|
||||
// openTrailOff >= NW * 3 * 0.22 = 3.3 * K.
|
||||
// No degenerate-small-offset fallback needed.
|
||||
|
||||
@@ -84,7 +84,7 @@ export function createSceneInit({
|
||||
getBeatG, setBeatG,
|
||||
getLblG, setLblG,
|
||||
getLyricsCanvas, setLyricsCanvas, setLyricsCtx,
|
||||
getHighwayCanvas: _getHighwayCanvasAlias, setHighwayCanvas,
|
||||
setHighwayCanvas,
|
||||
getVisibilityHandler, setVisibilityHandler,
|
||||
getCanvasReplacedHandler, setCanvasReplacedHandler,
|
||||
getOnCtxLost, setOnCtxLost,
|
||||
|
||||
@@ -96,9 +96,10 @@ test('createSceneInit receives ≥150 DI parameters (anti-vacuity floor)', () =>
|
||||
// Anti-vacuity floor — if regex changes and extracts 0, this fails loudly
|
||||
assert.ok(names.size >= 150, `anti-vacuity: expected ≥150 DI params, got ${names.size}`);
|
||||
// Exact pinned count — update this if DI surface intentionally changes
|
||||
// Cut-16 tip: 183. After F2 (remove 5 dead-param lines): 178.
|
||||
assert.strictEqual(names.size, 178,
|
||||
`exact DI param count must be 178 (got ${names.size}) — update if DI surface changes`);
|
||||
// Cut-16 tip: 183. After F2 (remove 5 dead-param lines): 178. Cut-17 alias removal: 179.
|
||||
// (removing the alias moved setHighwayCanvas to line-start, adding it to the line-first count)
|
||||
assert.strictEqual(names.size, 179,
|
||||
`exact DI param count must be 179 (got ${names.size}) — update if DI surface changes`);
|
||||
});
|
||||
|
||||
// ── §5 Import correctness ─────────────────────────────────────────────────────
|
||||
@@ -177,10 +178,10 @@ test('_bcSyncMode no longer defined in screen.js (moved to scene-init.js)', () =
|
||||
|
||||
// ── §8 plugin.json version bump ───────────────────────────────────────────────
|
||||
|
||||
test('plugin.json version is 3.52.0 (bumped for cut-16)', () => {
|
||||
test('plugin.json version is 3.53.0 (bumped for cut-17)', () => {
|
||||
const pkg = JSON.parse(fs.readFileSync(pluginJson, 'utf8'));
|
||||
assert.equal(pkg.version, '3.52.0',
|
||||
'plugin.json must be bumped to 3.52.0 for cut-16');
|
||||
assert.equal(pkg.version, '3.53.0',
|
||||
'plugin.json must be bumped to 3.53.0 for cut-17');
|
||||
});
|
||||
|
||||
// ── §9 Setter-call kill tests (§10 of contract) ───────────────────────────────
|
||||
@@ -456,3 +457,9 @@ test('smoke: new-Function harness — factory construction + null-canvas early g
|
||||
// paths that require WebGL. ESLint no-undef is the compensating layer for
|
||||
// WRITE paths in sloppy-mode new-Function.
|
||||
});
|
||||
|
||||
test('_getHighwayCanvasAlias does not appear in scene-init.js (dead alias removed in cut-17)', () => {
|
||||
const src = fs.readFileSync(sceneInitJs, 'utf8');
|
||||
assert.ok(!src.includes('_getHighwayCanvasAlias'),
|
||||
'_getHighwayCanvasAlias must not appear in scene-init.js — dead alias was removed in cut-17');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user