← back to Gmc Titlefix
Require MDC CLI tests to prove intended source rejection
6ed630b8fa112179dd6083a5f74bf1385b751a2e · 2026-09-09 11:50:57 -0700 · Steve Abrams
Files touched
M test-mdc-source-guard.mjsM verification/e2e-proof.json
Diff
commit 6ed630b8fa112179dd6083a5f74bf1385b751a2e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Sep 9 11:50:57 2026 -0700
Require MDC CLI tests to prove intended source rejection
---
test-mdc-source-guard.mjs | 23 +++++++++++++++++++++++
verification/e2e-proof.json | 16 ++++++++++++++--
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/test-mdc-source-guard.mjs b/test-mdc-source-guard.mjs
index a3d91eb..65c1cab 100644
--- a/test-mdc-source-guard.mjs
+++ b/test-mdc-source-guard.mjs
@@ -83,6 +83,29 @@ function cli(label, pages, explicitSource, expectedSuccess = false, builder = fa
} else {
assert.notEqual(result.status, 0, label);
assert.equal(inserts.length, 0, label + ' must stop before insert');
+ const earlyExplicit = explicitSource && !/^accounts\/146735262\/dataSources\/[0-9]+$/.test(explicitSource);
+ if (!earlyExplicit) assert.ok(events.some(e => e.type === 'list'), label + ' must reach source listing');
+ let expected;
+ if (earlyExplicit) expected = 'explicit source is malformed or belongs to another account';
+ else if (label.startsWith('explicit bypass')) expected = 'explicit source is not the unique primary-linked sample title source';
+ else if (label.startsWith('malformed primaryProductDataSource') || label.startsWith('malformed supplementalProductDataSource')) expected = 'source listing has malformed source type';
+ else if (label.startsWith('malformed default rule')) expected = 'source listing has malformed default rule';
+ else if (label.startsWith('malformed link')) expected = 'source listing has malformed primary link';
+ else expected = {
+ missing: 'expected one primary-linked sample title source; found 0',
+ unlinked: 'expected one primary-linked sample title source; found 0',
+ ambiguous: 'expected one primary-linked sample title source; found 2',
+ 'HTTP failure': 'source listing failed: HTTP 503',
+ 'error envelope': 'source listing is malformed or incomplete',
+ 'malformed listing': 'source listing is malformed or incomplete',
+ 'invalid JSON': 'invalid JSON',
+ 'network error': 'offline request failed',
+ 'incomplete second page': 'source listing failed: HTTP 503',
+ 'repeated page token': 'source listing has invalid or repeated page token',
+ 'duplicate resource name': 'source listing has invalid or duplicate resource names',
+ }[label];
+ assert.ok(expected, 'fixture must declare its intended rejection: ' + label);
+ assert.ok(result.stderr.includes('Error: ' + expected), label + ' must report intended resolver rejection: ' + result.stderr);
}
count++;
console.log('PASS | ' + label + ' | ' + (builder ? 'builder' : explicitSource ? 'explicit pusher' : 'default pusher'));
diff --git a/verification/e2e-proof.json b/verification/e2e-proof.json
index b3072ad..48c7525 100644
--- a/verification/e2e-proof.json
+++ b/verification/e2e-proof.json
@@ -8,14 +8,26 @@
"correlation": "dm-mtug50la-61688-skhph3",
"commands": [
"node test-mdc-source-guard.mjs",
- "git diff --check"
+ "git diff --check",
+ "Fresh copied builder process.exit(42) mutation: updated suite must fail"
],
"checks": [
{
"verdict": "PASS",
"name": "CLI boundary negatives and stub happy path",
"assertions": 78,
- "evidence": "/var/folders/rq/j8g1f7nn6jv6_lr1cfmqym6w0000gn/T/mdc-source-proof-rG50t7"
+ "evidence": "/var/folders/rq/j8g1f7nn6jv6_lr1cfmqym6w0000gn/T/mdc-source-proof-mKrYkA"
+ },
+ {
+ "verdict": "PASS",
+ "mutant_suite_exit": 1,
+ "reason": "Builder early-exit mutation is detected at required source listing boundary",
+ "directory": "/private/tmp/mdc-exit-mutation.3VaNcc",
+ "evidence": "/Users/macstudio3/Projects/ticket-system/data/codex-yoloforever/cycle-20260909T1836Z.rZWqkR/mdc-mutation-tests.txt"
+ },
+ {
+ "verdict": "PASS",
+ "name": "Every negative CLI case proves specific resolver rejection and reached-list trace; malformed/foreign explicit source requires specific pre-list rejection"
},
{
"verdict": "PASS",
← 71e1db5 Reject unresolved MDC sample title sources before inserts
·
back to Gmc Titlefix
·
Preserve historical proof and scope MDC evidence to its tick 853cb8f →