mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 21:28:59 +00:00
test: make mutation oracles explicit before v1.76.0-beta.1
Run 34760156615 exposed stale registry witnesses under the honest #550 outcome taxonomy. Keep behavioural checks out of setup chains, retarget the preflight mutation to the editor host, and make the junction cache smoke exercise same-object in-place geometry changes. Release: v1.76.0-beta.1 Issue: #550 User-Visible: no
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
anchorSpan, anchorRegion, parseDiffRanges, ANCHOR_RADIUS_LINES,
|
||||
witnessFingerprint, readLedger, recordCaught, splitByLedger, LEDGER_SCHEMA,
|
||||
} from '../scripts/mutation-gate.mjs';
|
||||
import { guardPhases } from '../scripts/mutation-guard-outcome.mjs';
|
||||
|
||||
const repoRoot = fileURLToPath(new URL('..', import.meta.url));
|
||||
|
||||
@@ -64,6 +65,24 @@ test('every mutant explains itself', () => {
|
||||
assert.ok(MUTANTS.length >= 6, 'стартовый набор — шесть мутантов по дырам из #85');
|
||||
});
|
||||
|
||||
test('#550: assertion witnesses have no behavioural oracle hidden in setup', () => {
|
||||
const behavioural = /(?:node --test|(?:^|\s)node demo\/(?:smoke|benchmark)_|(?:^|\s)(?:python3? -m )?pytest\b)/;
|
||||
for (const mutant of MUTANTS.filter(({ oracle }) => (oracle || 'assertion') === 'assertion')) {
|
||||
const phases = guardPhases(mutant.guard, 'assertion');
|
||||
for (const command of phases.setup) {
|
||||
assert.doesNotMatch(command, behavioural,
|
||||
`${mutant.id}: behavioural command is setup, not the declared oracle`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('#550: preflight saved-config mutant targets the editor host and still compiles', () => {
|
||||
const mutant = MUTANTS.find(({ id }) => id === 'preflight-fingerprint-from-saved-config');
|
||||
assert.ok(mutant);
|
||||
assert.equal(mutant.patches[0].file, 'src/houseplan-editor-runtime.ts');
|
||||
assert.match(mutant.patches[0].replace, /this\.host\._serverCfg/);
|
||||
});
|
||||
|
||||
test('#486 panel registration, cleanup and read-only protections have mutation witnesses', () => {
|
||||
const ids = new Set(MUTANTS.map(({ id }) => id));
|
||||
for (const id of [
|
||||
|
||||
Reference in New Issue
Block a user