dsh-vibe-math 2.7.3 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.en.md +682 -682
- package/README.md +683 -683
- package/docs/AUDIT-CHECKLIST.md +758 -744
- package/docs/COMPAT-AUDIT-ROUND2.md +351 -351
- package/docs/COMPAT-AUDIT-ROUND3.md +154 -154
- package/docs/audit-methodology.md +93 -0
- package/docs/final-paper.md +172 -172
- package/docs/formal-verification.md +613 -588
- package/docs/generate_framework_diagram_v2.py +114 -114
- package/docs/generate_framework_diagram_v3.py +127 -127
- package/docs/math-computation.md +195 -194
- package/docs/release-notes/README.en.md +2 -0
- package/docs/release-notes/README.md +2 -0
- package/docs/release-notes/RELEASE-NOTES-2.0.22.md +112 -112
- package/docs/release-notes/RELEASE-NOTES-2.1.0.md +143 -143
- package/docs/release-notes/RELEASE-NOTES-2.2.0.md +266 -266
- package/docs/release-notes/RELEASE-NOTES-2.2.1.md +43 -43
- package/docs/release-notes/RELEASE-NOTES-2.2.2.md +88 -88
- package/docs/release-notes/RELEASE-NOTES-2.3.0.md +207 -207
- package/docs/release-notes/RELEASE-NOTES-2.3.1.md +134 -134
- package/docs/release-notes/RELEASE-NOTES-2.3.10.md +105 -105
- package/docs/release-notes/RELEASE-NOTES-2.3.11.md +57 -57
- package/docs/release-notes/RELEASE-NOTES-2.3.12.md +80 -80
- package/docs/release-notes/RELEASE-NOTES-2.3.2.md +145 -145
- package/docs/release-notes/RELEASE-NOTES-2.3.3.md +115 -115
- package/docs/release-notes/RELEASE-NOTES-2.3.4.md +69 -69
- package/docs/release-notes/RELEASE-NOTES-2.3.5.md +63 -63
- package/docs/release-notes/RELEASE-NOTES-2.3.6.md +66 -66
- package/docs/release-notes/RELEASE-NOTES-2.3.7.md +59 -59
- package/docs/release-notes/RELEASE-NOTES-2.3.8.md +45 -45
- package/docs/release-notes/RELEASE-NOTES-2.3.9.md +70 -70
- package/docs/release-notes/RELEASE-NOTES-2.8.0.en.md +65 -0
- package/docs/release-notes/RELEASE-NOTES-2.8.0.md +65 -0
- package/docs/release-notes/RELEASE-NOTES-2.8.1.en.md +49 -0
- package/docs/release-notes/RELEASE-NOTES-2.8.1.md +49 -0
- package/docs/release-playbook.md +111 -0
- package/docs/slv-playbook.md +117 -0
- package/docs/test-timing.md +158 -157
- package/docs//346/236/266/346/236/204/345/233/276.md +77 -77
- package/installer.js +792 -792
- package/package.json +18 -3
- package/prompt-corpus-v2/formal-verify-v2.json +2 -2
- package/prompt-corpus-v2/formal-verify-v2.md +4 -0
- package/prompt-corpus-v3/formal-verify-v3.json +7 -7
- package/prompt-corpus-v3/formal-verify-v3.md +14 -0
- package/prompt-corpus-v5/prompt-corpus-v5.json +61 -61
- package/prompt-corpus-v5/prompt-corpus-v5.md +122 -0
- package/scripts/clean-temp.mjs +234 -0
- package/scripts/release-check.mjs +181 -0
- package/tests/audit-engine-faces.mjs +298 -0
- package/tests/audit-formal-sensitivity.mjs +345 -342
- package/tests/audit-installer-compat.test.mjs +256 -256
- package/tests/audit-math-computation-sensitivity.mjs +1 -1
- package/tests/audit-persona-sensitivity.mjs +323 -323
- package/tests/audit-persona-surface.test.mjs +431 -431
- package/tests/audit-prompt-duplication.mutants.mjs +3 -2
- package/tests/audit-prompt-invariants.mjs +589 -546
- package/tests/audit-registration.mjs +78 -78
- package/tests/audit-spec-traceability.mjs +193 -193
- package/tests/audit-status-report-fields.mjs +172 -172
- package/tests/audit-v5-integrity.mjs +795 -795
- package/tests/audit-v5-sensitivity.mjs +433 -432
- package/tests/e2e-v5-round2.test.mjs +2453 -2426
- package/tests/formal-verify-v2.test.mjs +1806 -1800
- package/tests/formal-verify-v3.test.mjs +1757 -1750
- package/tests/formal-verify-v4.test.mjs +2114 -2106
- package/tests/formal-verify-v5.test.mjs +774 -767
- package/tests/math-computation-discovery.mutants.mjs +3 -3
- package/tests/math-computation-shared.test.mjs +122 -5
- package/tests/math-computation-v2.test.mjs +14 -2
- package/tests/math-computation-v3.test.mjs +14 -2
- package/tests/math-computation-v4.test.mjs +739 -739
- package/tests/prompt-v5-integrity.test.mjs +1291 -1291
- package/tests/release-check.mutants.mjs +78 -0
- package/tests/run-tests.mjs +393 -332
- package/tests/selfdrive-v5.mjs +560 -560
- package/tests/temp-hygiene.mutants.mjs +80 -0
- package/tests/v2-fix-probes.mutants.mjs +4 -0
- package/tests/v2-fix-probes.test.mjs +1034 -1033
- package/tests/v2v3-interrupt.mutants.mjs +111 -0
- package/tests/v3-fix-probes.mutants.mjs +99 -95
- package/tests/v3-fix-probes.test.mjs +891 -890
- package/tests/v4-final-paper.mutants.mjs +116 -0
- package/tests/v4-final-paper.test.mjs +628 -0
- package/tests/v5-institute-fixes.mutants.mjs +218 -190
- package/vibe-math-v2/agent.cordis.yml +376 -376
- package/vibe-math-v2/math-computation.js +17 -15
- package/vibe-math-v2/preset.yml +2 -2
- package/vibe-math-v2/v2/347/232/204/351/242/235/345/244/226/350/246/201/346/261/202.txt +21 -21
- package/vibe-math-v2/vibe-math-v2.js +5078 -5011
- package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +486 -486
- package/vibe-math-v3/agent.cordis.yml +420 -420
- package/vibe-math-v3/math-computation.js +17 -15
- package/vibe-math-v3/preset.yml +2 -2
- package/vibe-math-v3/vibe-math-v3.js +6215 -6149
- package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +649 -649
- package/vibe-math-v4/agent.cordis.yml +438 -438
- package/vibe-math-v4/math-computation.js +17 -15
- package/vibe-math-v4/preset.yml +2 -2
- package/vibe-math-v4/vibe-math-v4.js +4520 -4422
- package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +1015 -1015
- package/vibe-math-v5/math-computation.js +17 -15
- package/vibe-math-v5/vibe-math-v5.js +93 -11
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +1728 -1728
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +693 -693
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Falsifiability driver for scripts/release-check.mjs: a SINGLE-SITE edit must turn its own guard
|
|
2
|
+
// (`--self-test`) NAMED-red, while the unmutated control stays green. The mutated copy is written as a
|
|
3
|
+
// dot-sibling inside scripts/ so relative paths still resolve, and it is always removed in `finally`.
|
|
4
|
+
import { spawnSync } from 'node:child_process'
|
|
5
|
+
import { readFileSync, rmSync, writeFileSync } from 'node:fs'
|
|
6
|
+
import { dirname, join } from 'node:path'
|
|
7
|
+
import { fileURLToPath } from 'node:url'
|
|
8
|
+
|
|
9
|
+
const HERE = dirname(fileURLToPath(import.meta.url))
|
|
10
|
+
const REPO = join(HERE, '..')
|
|
11
|
+
const SRC = join(REPO, 'scripts', 'release-check.mjs')
|
|
12
|
+
|
|
13
|
+
const FAMILIES = [
|
|
14
|
+
{
|
|
15
|
+
// Without this, a lockfile that drifted away from package.json would ship and the market guard would
|
|
16
|
+
// be the only thing that notices.
|
|
17
|
+
name: 'the version-triple check is dropped (a drifted lockfile would ship)',
|
|
18
|
+
from: 'if (lockTop !== pkgVersion) out.push(',
|
|
19
|
+
to: 'if (false) out.push(',
|
|
20
|
+
expect: /drifted lock top-level version is caught/,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
// Without this, a release note missing half its sections would ship.
|
|
24
|
+
name: 'the section-count check is dropped (a truncated release note would ship)',
|
|
25
|
+
from: 'if (got.length !== want.length) out.push(',
|
|
26
|
+
to: 'if (false) out.push(',
|
|
27
|
+
expect: /truncated note is caught by its section count/,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
// Without this, a note whose sections are in the wrong order would ship.
|
|
31
|
+
name: 'the section-order check is dropped (a reordered release note would ship)',
|
|
32
|
+
from: 'if (got[i] !== want[i]) out.push(',
|
|
33
|
+
to: 'if (false) out.push(',
|
|
34
|
+
expect: /reordered note is caught/,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
// Without this, a package containing CRLF would ship - the exact defect this whole line of work fixed.
|
|
38
|
+
name: 'the CRLF scan is dropped (a CRLF package would ship)',
|
|
39
|
+
from: 'if (Number(crlf) > 0) out.push(',
|
|
40
|
+
to: 'if (false) out.push(',
|
|
41
|
+
expect: /CRLF inside the package is caught/,
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
function runSelftest(scriptPath) {
|
|
46
|
+
const r = spawnSync(process.execPath, [scriptPath, '--self-test'], { cwd: REPO, encoding: 'utf8', timeout: 60000 })
|
|
47
|
+
return { code: r.status, out: String(r.stdout || '') + String(r.stderr || '') }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const control = runSelftest(SRC)
|
|
51
|
+
console.log('control (unmutated release-check): exit=' + control.code + (control.code === 0 ? ' green, as required' : ' NOT GREEN'))
|
|
52
|
+
if (control.code !== 0) console.log(control.out.split(/\r?\n/).filter((l) => /FAIL/.test(l)).slice(0, 4).join('\n'))
|
|
53
|
+
|
|
54
|
+
let red = 0
|
|
55
|
+
for (const f of FAMILIES) {
|
|
56
|
+
const dest = join(REPO, 'scripts', '.tmp-release-check-' + Math.random().toString(36).slice(2, 10) + '.mjs')
|
|
57
|
+
let ok = false
|
|
58
|
+
try {
|
|
59
|
+
let text = readFileSync(SRC, 'utf8').replace(/\r\n?/g, '\n')
|
|
60
|
+
if (/\r/.test(text)) { console.error('SETUP-FAIL - the anchor source was not EOL-normalised (a lone CR leaked in)'); process.exit(1) }
|
|
61
|
+
const hits = text.split(f.from).length - 1
|
|
62
|
+
if (hits !== 1) { console.error('SETUP-FAIL - anchor ' + JSON.stringify(f.from) + ' matched ' + hits + ' time(s), expected exactly 1'); process.exit(1) }
|
|
63
|
+
writeFileSync(dest, text.replace(f.from, f.to), 'utf8')
|
|
64
|
+
const r = runSelftest(dest)
|
|
65
|
+
const named = r.out.split(/\r?\n/).filter((l) => /^\s*FAIL - /.test(l) && f.expect.test(l)).map((l) => l.trim())
|
|
66
|
+
ok = r.code !== 0 && named.length > 0
|
|
67
|
+
console.log((ok ? ' ok - ' : ' FAIL - ') + f.name + ' [exit=' + r.code + ']' + (named.length ? ' :: ' + named[0].slice(0, 140) : ' :: no named red (exit=' + r.code + ')'))
|
|
68
|
+
if (ok) red++
|
|
69
|
+
} finally {
|
|
70
|
+
try { rmSync(dest, { force: true }) } catch (e) { /* best effort */ }
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
console.log('')
|
|
75
|
+
console.log('mutant families reddening the release-check guard by name: ' + red + '/' + FAMILIES.length)
|
|
76
|
+
console.log('control green: ' + (control.code === 0))
|
|
77
|
+
if (red !== FAMILIES.length || control.code !== 0) process.exit(1)
|
|
78
|
+
console.log('ALL MUTANTS RED AS REQUIRED')
|