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,80 @@
|
|
|
1
|
+
// Falsifiability driver for scripts/clean-temp.mjs (task-12): a SINGLE-SITE edit in the sweeper must
|
|
2
|
+
// turn its own guard (`--self-test`) NAMED-red, while the unmutated control stays green. The mutated
|
|
3
|
+
// copy is written as a DOT-SIBLING inside scripts/ so the module still resolves REPO/tests correctly
|
|
4
|
+
// (a copy in %TEMP% would fail the prefix-extraction check for the wrong reason), and it is always
|
|
5
|
+
// removed in `finally`.
|
|
6
|
+
import { spawnSync } from 'node:child_process'
|
|
7
|
+
import { readFileSync, rmSync, writeFileSync } from 'node:fs'
|
|
8
|
+
import { dirname, join } from 'node:path'
|
|
9
|
+
import { fileURLToPath } from 'node:url'
|
|
10
|
+
|
|
11
|
+
const HERE = dirname(fileURLToPath(import.meta.url))
|
|
12
|
+
const REPO = join(HERE, '..')
|
|
13
|
+
const SRC = join(REPO, 'scripts', 'clean-temp.mjs')
|
|
14
|
+
|
|
15
|
+
const FAMILIES = [
|
|
16
|
+
{
|
|
17
|
+
// The age threshold is the whole safety property: without it every suite dir looks deletable.
|
|
18
|
+
name: 'the age threshold is dropped (a FRESH suite dir starts looking stale)',
|
|
19
|
+
from: '.filter((e) => Number(e.mtimeMs) < cut)',
|
|
20
|
+
to: '.filter(() => true)',
|
|
21
|
+
expect: /a FRESH suite dir is never swept/,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
// The prefix test keeps the sweeper from touching ANY top-level directory of the temp root.
|
|
25
|
+
name: 'the suite-prefix test is dropped (any top-level dir starts looking like ours)',
|
|
26
|
+
from: 'prefixes.some((p) => String(e.name).startsWith(p))',
|
|
27
|
+
to: 'true',
|
|
28
|
+
expect: /only exact suite prefixes are swept/,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
// task-15: "parent is gone" is the safety property - dropping it makes OUR OWN running gate look like
|
|
32
|
+
// a leftover, which is exactly the false positive that would make this tool dangerous to auto-run.
|
|
33
|
+
name: 'the parent-gone test is dropped (a live-parented gate looks like a leftover)',
|
|
34
|
+
from: 'return e.parentGone === true',
|
|
35
|
+
to: 'return true',
|
|
36
|
+
expect: /a process with a LIVE parent .* is never called a leftover/,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
// task-15: the command-line gate is what keeps unrelated programs (editors, other stacks) out.
|
|
40
|
+
name: 'the command-line gate is dropped (any orphaned program looks like ours)',
|
|
41
|
+
from: "if (!patterns.some((re) => re.test(String(e.cmd || '')))) return false",
|
|
42
|
+
to: 'if (false) return false',
|
|
43
|
+
expect: /an unrelated program is never reported/,
|
|
44
|
+
},
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
function runSelftest(scriptPath) {
|
|
48
|
+
const r = spawnSync(process.execPath, [scriptPath, '--self-test'], { encoding: 'utf8', timeout: 60000, cwd: REPO })
|
|
49
|
+
return { code: r.status, out: String(r.stdout || '') + String(r.stderr || '') }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const control = runSelftest(SRC)
|
|
53
|
+
console.log('control (unmutated sweeper): exit=' + control.code + (control.code === 0 ? ' green, as required' : ' NOT GREEN'))
|
|
54
|
+
if (control.code !== 0) console.log(control.out.split(/\r?\n/).filter((l) => /FAIL/.test(l)).slice(0, 3).join('\n'))
|
|
55
|
+
|
|
56
|
+
let red = 0
|
|
57
|
+
for (const f of FAMILIES) {
|
|
58
|
+
const dest = join(REPO, 'scripts', '.tmp-hygiene-' + Math.random().toString(36).slice(2, 10) + '.mjs')
|
|
59
|
+
let ok = false
|
|
60
|
+
try {
|
|
61
|
+
let text = readFileSync(SRC, 'utf8').replace(/\r\n?/g, '\n')
|
|
62
|
+
if (/\r/.test(text)) { console.error('SETUP-FAIL - the anchor source was not EOL-normalised (CR leaked into anchor matching)'); process.exit(1) }
|
|
63
|
+
const hits = text.split(f.from).length - 1
|
|
64
|
+
if (hits !== 1) { console.error('SETUP-FAIL - anchor ' + JSON.stringify(f.from) + ' matched ' + hits + ' time(s), expected exactly 1'); process.exit(1) }
|
|
65
|
+
writeFileSync(dest, text.replace(f.from, f.to), 'utf8')
|
|
66
|
+
const r = runSelftest(dest)
|
|
67
|
+
const named = r.out.split(/\r?\n/).filter((l) => /^\s*FAIL - /.test(l) && f.expect.test(l)).map((l) => l.trim())
|
|
68
|
+
ok = r.code !== 0 && named.length > 0
|
|
69
|
+
console.log((ok ? ' ok - ' : ' FAIL - ') + f.name + ' [exit=' + r.code + ']' + (named.length ? ' :: ' + named[0].slice(0, 140) : ' :: no named red (exit=' + r.code + ')'))
|
|
70
|
+
if (ok) red++
|
|
71
|
+
} finally {
|
|
72
|
+
try { rmSync(dest, { force: true }) } catch (e) { /* best effort */ }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
console.log('')
|
|
77
|
+
console.log('mutant families reddening the temp-hygiene guard by name: ' + red + '/' + FAMILIES.length)
|
|
78
|
+
console.log('control green: ' + (control.code === 0))
|
|
79
|
+
if (red !== FAMILIES.length || control.code !== 0) process.exit(1)
|
|
80
|
+
console.log('ALL MUTANTS RED AS REQUIRED')
|
|
@@ -89,6 +89,10 @@ FAMILIES.push(
|
|
|
89
89
|
{ name: 'F-B: one registration site reverted to a literal', expect: /\[F-B\/v2\] 两处注册点都由 paramProps\(\)/,
|
|
90
90
|
from: "objParams(paramProps()), 'vibe_math_set_params')", to: "objParams({ mode: { type: 'string', enum: ['manual', 'auto'] } }), 'vibe_math_set_params')" },
|
|
91
91
|
)
|
|
92
|
+
FAMILIES.push(
|
|
93
|
+
{ name: 'task-9/v2: the not-detected log drops the actionable sentence', expect: /\[task-9\/v2\]/,
|
|
94
|
+
from: '已探测 PATH 与文档化的常见 TeX 根;可用 paperLatexCommand 指定绝对路径。', to: '' },
|
|
95
|
+
)
|
|
92
96
|
for (const f of FAMILIES) { const t0 = Date.now(); lastHang = false; const ok = runFamily(f); const ms = Date.now() - t0; TIMES.push([f.name, ms]); if (lastHang) hangs.push(f.name + "(" + Math.round(ms / 1000) + "s)"); if (ok) red++ }
|
|
93
97
|
console.log('')
|
|
94
98
|
console.log('mutant families reddening the v2 probe by name: ' + red + '/' + FAMILIES.length)
|