mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-04 21:58:56 +00:00
fix(openings): preserve gate flip turn direction
Address code review H1 by keeping gate flip direction observable without a second vertical mirror. Add fail-closed golden contracts, smoke coverage, and a mutation guard for the affected opening-symbol geometry. Issue: #242 User-Visible: yes
This commit is contained in:
@@ -1598,6 +1598,19 @@ export const MUTANTS = [
|
||||
replace: " if (!flipV || type === 'passage') return { ox: 0, oy: 0 };",
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'opening-gate-flip-cancels-turn',
|
||||
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
|
||||
+ '&& node --test --test-name-pattern="shared renderer centres defaults" '
|
||||
+ 'test/opening-symbol.test.mjs',
|
||||
because: 'restoring the second flip_v inversion makes shared and partition gates emit '
|
||||
+ 'the same first-leaf turn sign for both saved values even though their origin stays centred',
|
||||
patches: [{
|
||||
file: 'src/render/opening-symbol.ts',
|
||||
find: ' const gateAngle = spec.face.side * 10 * amount;',
|
||||
replace: ' const gateAngle = spec.face.side * sy * 10 * amount;',
|
||||
}],
|
||||
},
|
||||
];
|
||||
|
||||
// --- механика ---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user