dsh-vibe-math 2.7.2 → 2.8.0
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 -681
- package/README.md +683 -682
- package/cordis.patch.yml +112 -16
- package/docs/AUDIT-CHECKLIST.md +755 -518
- package/docs/COMPAT-AUDIT-ROUND2.md +354 -328
- 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 -187
- package/docs/parameter-schema.md +37 -0
- 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.7.2.en.md +2 -2
- package/docs/release-notes/RELEASE-NOTES-2.7.2.md +3 -3
- package/docs/release-notes/RELEASE-NOTES-2.7.3.en.md +67 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.3.md +67 -0
- 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/TEMPLATE.md +6 -0
- package/docs/release-playbook.md +103 -0
- package/docs/slv-playbook.md +117 -0
- package/docs/status-report-fields.md +167 -0
- package/docs/test-timing.md +158 -154
- package/docs//346/236/266/346/236/204/345/233/276.md +77 -77
- package/installer.js +793 -783
- package/package.json +260 -203
- package/prompt-corpus-persona/persona-corpus.json +9 -9
- package/prompt-corpus-persona/persona-corpus.md +225 -33
- package/prompt-corpus-v2/formal-verify-v2.json +295 -115
- package/prompt-corpus-v2/formal-verify-v2.md +2290 -282
- package/prompt-corpus-v3/formal-verify-v3.json +112 -112
- package/prompt-corpus-v3/formal-verify-v3.md +227 -143
- package/prompt-corpus-v4/formal-verify-v4.json +18 -18
- package/prompt-corpus-v4/formal-verify-v4.md +49 -44
- package/prompt-corpus-v5/prompt-corpus-v5.json +82 -82
- package/prompt-corpus-v5/prompt-corpus-v5.md +573 -207
- package/scripts/clean-temp.mjs +234 -0
- package/scripts/update-doc-counts.mjs +71 -0
- package/tests/audit-artifact-docs.mjs +72 -0
- package/tests/audit-artifact-docs.mutants.mjs +58 -0
- package/tests/audit-engine-faces.mjs +298 -0
- package/tests/audit-formal-sensitivity.mjs +345 -342
- package/tests/audit-installer-assertions.mutants.mjs +63 -0
- package/tests/audit-installer-compat.test.mjs +256 -208
- package/tests/audit-installer-policy.test.mjs +41 -8
- package/tests/audit-math-computation-contract.mjs +64 -8
- package/tests/audit-math-computation-contract.mutants.mjs +106 -0
- package/tests/audit-math-computation-parity.mjs +164 -3
- package/tests/audit-math-computation-sensitivity.mjs +5 -3
- package/tests/audit-package-membership.mjs +57 -0
- package/tests/audit-package-membership.mutants.mjs +28 -0
- package/tests/audit-participant-set-parity.mjs +160 -0
- package/tests/audit-path-discipline.mjs +83 -0
- package/tests/audit-path-discipline.mutants.mjs +51 -0
- package/tests/audit-persona-sensitivity.mjs +323 -309
- package/tests/audit-persona-surface.mutants.mjs +69 -0
- package/tests/audit-persona-surface.test.mjs +431 -390
- package/tests/audit-prompt-duplication.mjs +143 -0
- package/tests/audit-prompt-duplication.mutants.mjs +51 -0
- package/tests/audit-prompt-invariants.mjs +589 -508
- package/tests/audit-readme-bilingual.test.mjs +152 -0
- package/tests/audit-readme-counts.mjs +95 -0
- package/tests/audit-readme-counts.mutants.mjs +52 -0
- package/tests/audit-registration.mjs +78 -0
- package/tests/audit-spec-traceability.mjs +193 -193
- package/tests/audit-status-report-fields.mjs +172 -0
- package/tests/audit-status-report-fields.mutants.mjs +64 -0
- package/tests/audit-v3-registration-parity.mjs +156 -0
- package/tests/audit-v5-integrity.mjs +795 -508
- package/tests/audit-v5-lean-abstention.mjs +392 -0
- package/tests/audit-v5-lean-abstention.mutants.mjs +106 -0
- package/tests/audit-v5-prompt-duplication.mjs +88 -0
- package/tests/audit-v5-prompt-duplication.mutants.mjs +34 -0
- package/tests/audit-v5-sensitivity.mjs +433 -427
- package/tests/e2e-identity-a6.mutants.mjs +65 -0
- package/tests/e2e-v5-round2.test.mjs +2453 -1981
- package/tests/formal-verify-v2.test.mjs +1778 -1724
- package/tests/formal-verify-v3.mutants.mjs +117 -0
- package/tests/formal-verify-v3.test.mjs +1724 -1671
- package/tests/formal-verify-v4.mutants.mjs +152 -0
- package/tests/formal-verify-v4.test.mjs +2114 -1574
- package/tests/formal-verify-v5.test.mjs +790 -724
- package/tests/helpers/doc-counts-format.mjs +41 -0
- package/tests/helpers/math-computation-fake-seam.mjs +4 -0
- package/tests/math-computation-a1.mutants.mjs +72 -0
- package/tests/math-computation-archive-rerun.mutants.mjs +65 -0
- package/tests/math-computation-discovery.mutants.mjs +76 -0
- package/tests/math-computation-shared.test.mjs +392 -6
- package/tests/math-computation-v2.test.mjs +779 -0
- package/tests/math-computation-v3.test.mjs +771 -0
- package/tests/math-computation-v4.mutants.mjs +133 -0
- package/tests/math-computation-v4.test.mjs +739 -0
- package/tests/prompt-v5-integrity.test.mjs +1291 -1280
- package/tests/run-tests.mjs +393 -202
- package/tests/run-tests.mutants.mjs +70 -0
- package/tests/selfdrive-v5.mjs +560 -508
- package/tests/selfdrive-v5.mutants.mjs +132 -0
- package/tests/temp-hygiene.mutants.mjs +80 -0
- package/tests/v2-fix-probes.mutants.mjs +104 -0
- package/tests/v2-fix-probes.test.mjs +1040 -0
- package/tests/v2-list-agents-and-next-step.mutants.mjs +106 -0
- package/tests/v2v3-interrupt.mutants.mjs +111 -0
- package/tests/v3-fix-probes.mutants.mjs +99 -0
- package/tests/v3-fix-probes.test.mjs +892 -0
- package/tests/v4-final-paper.mutants.mjs +108 -0
- package/tests/v5-institute-fixes.mutants.mjs +218 -0
- package/vibe-math-v2/agent.cordis.yml +378 -322
- package/vibe-math-v2/math-computation.js +144 -53
- package/vibe-math-v2/math-engines.js +12 -12
- 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 +5097 -4755
- package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +491 -487
- package/vibe-math-v3/agent.cordis.yml +422 -356
- package/vibe-math-v3/math-computation.js +144 -53
- package/vibe-math-v3/math-engines.js +12 -12
- package/vibe-math-v3/preset.yml +2 -2
- package/vibe-math-v3/vibe-math-v3.js +6235 -5873
- 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 -402
- package/vibe-math-v4/math-computation.js +144 -53
- package/vibe-math-v4/math-engines.js +12 -12
- package/vibe-math-v4/preset.yml +2 -2
- package/vibe-math-v4/vibe-math-v4.js +4490 -4269
- package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +1015 -1013
- package/vibe-math-v5/agent.cordis.yml +46 -12
- package/vibe-math-v5/math-computation.js +144 -53
- package/vibe-math-v5/math-engines.js +12 -12
- package/vibe-math-v5/vibe-math-v5.js +1266 -229
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +1728 -1660
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +693 -693
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// In-repo mutant harness for the runner-diagnostics guard (ships: `tests/*.mutants.mjs`).
|
|
2
|
+
// It proves the `--self-check` guard can REDDEN: strip the named-failure detail from a COPY of
|
|
3
|
+
// run-tests.mjs, then run that copy's own `--self-check` and require it to fail.
|
|
4
|
+
// Usage: node tests/run-tests.mutants.mjs
|
|
5
|
+
import { mkdtempSync, copyFileSync, readFileSync, writeFileSync, rmSync } from 'node:fs'
|
|
6
|
+
import { tmpdir } from 'node:os'
|
|
7
|
+
import { join } from 'node:path'
|
|
8
|
+
import { spawnSync } from 'node:child_process'
|
|
9
|
+
import { fileURLToPath } from 'node:url'
|
|
10
|
+
|
|
11
|
+
const HERE = fileURLToPath(new URL('./', import.meta.url))
|
|
12
|
+
const REPO = join(HERE, '..')
|
|
13
|
+
const RUNNER = join(HERE, 'run-tests.mjs')
|
|
14
|
+
|
|
15
|
+
let passed = 0, failed = 0
|
|
16
|
+
const ok = (cond, label, detail) => {
|
|
17
|
+
if (cond) { passed++; console.log(' ok ' + label); return true }
|
|
18
|
+
failed++; console.log(' FAIL ' + label + (detail ? ' — ' + detail : '')); return false
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// baseline: the real runner's self-check must pass
|
|
22
|
+
const base = spawnSync(process.execPath, [RUNNER, '--self-check'], { cwd: REPO, encoding: 'utf8' })
|
|
23
|
+
ok(base.status === 0 && /SELF-CHECK PASS/.test(base.stdout || ''),
|
|
24
|
+
'baseline: the runner self-check passes (a failing child yields a named assertion)',
|
|
25
|
+
JSON.stringify(String(base.stdout || '').trim().slice(0, 80)))
|
|
26
|
+
|
|
27
|
+
// mutant: strip the named-failure extraction (fall back to a constant) -> the self-check must REDDEN
|
|
28
|
+
const dir = mkdtempSync(join(tmpdir(), 'runner-mut-'))
|
|
29
|
+
// Normalise CRLF so the anchor is line-ending agnostic (the runner is checked out with CRLF on Windows).
|
|
30
|
+
const src = readFileSync(RUNNER, 'utf8').replace(/\r\n/g, '\n')
|
|
31
|
+
const from = " const chosen = (named.length ? named : lines).slice(-40)\n return chosen.length ? chosen : ['(no captured output)']"
|
|
32
|
+
if (src.indexOf(from) === -1) {
|
|
33
|
+
ok(false, 'mutant anchor applies (the named-failure extraction is present)', 'ANCHOR MISS')
|
|
34
|
+
} else {
|
|
35
|
+
writeFileSync(join(dir, 'run-tests.mjs'), src.replace(from, " return ['(no captured output)']"))
|
|
36
|
+
const mut = spawnSync(process.execPath, [join(dir, 'run-tests.mjs'), '--self-check'], { cwd: REPO, encoding: 'utf8' })
|
|
37
|
+
ok(mut.status !== 0 && /SELF-CHECK FAIL/.test(String(mut.stdout || '')),
|
|
38
|
+
'★ mutant (named-failure detail stripped) makes the self-check RED',
|
|
39
|
+
'exit=' + mut.status + ' out=' + JSON.stringify(String(mut.stdout || '').trim().slice(0, 80)))
|
|
40
|
+
}
|
|
41
|
+
rmSync(dir, { recursive: true, force: true })
|
|
42
|
+
// TIMEOUT path, BOTH directions (a criterion must be validated against a known-positive AND a
|
|
43
|
+
// known-negative before it gates anything): the same real suite under a 1 s limit must be killed
|
|
44
|
+
// and NAMED in the failure list; under the default limit it must not be reported as a timeout.
|
|
45
|
+
const slowRun = spawnSync(process.execPath, [RUNNER, '--only', 'audit-prompt-invariants'], { cwd: REPO, encoding: 'utf8', env: Object.assign({}, process.env, { GATE_SUITE_TIMEOUT_MS: '1000' }) })
|
|
46
|
+
const slowOut = String(slowRun.stdout || '') + String(slowRun.stderr || '')
|
|
47
|
+
const failList = slowOut.split('\n').filter((l) => /^\s*FAILED:/.test(l))
|
|
48
|
+
const timedOutLine = failList.find((l) => /\[probe\] \(TIMEOUT after 1s\)/.test(l)) || ''
|
|
49
|
+
ok(slowRun.status !== 0 && !!timedOutLine,
|
|
50
|
+
'★ POSITIVE: a 1 s limit makes the runner kill the suite and NAME the timeout in the failure list',
|
|
51
|
+
'exit=' + slowRun.status + ' line=' + timedOutLine.trim())
|
|
52
|
+
// NEGATIVE (two readings, so the criterion cannot be always-red):
|
|
53
|
+
// (a) ANY suite under the DEFAULT limit produces no TIMEOUT marker, whatever its own verdict;
|
|
54
|
+
// (b) a known-green fast suite exits 0 (no false timeout).
|
|
55
|
+
// (a) is deliberately verdict-agnostic: at the time of writing audit-prompt-invariants is red for an
|
|
56
|
+
// unrelated in-flight reason (v2/v3 I13/I14: the parameter schema parses to 0 keys), and a proof tool
|
|
57
|
+
// must not inherit someone else's red.
|
|
58
|
+
const fastRun = spawnSync(process.execPath, [RUNNER, '--only', 'audit-prompt-invariants'], { cwd: REPO, encoding: 'utf8' })
|
|
59
|
+
const fastOut = String(fastRun.stdout || '') + String(fastRun.stderr || '')
|
|
60
|
+
ok(!/TIMEOUT after/.test(fastOut),
|
|
61
|
+
'NEGATIVE (a): with the default limit no TIMEOUT marker is produced (the criterion is not always-red)',
|
|
62
|
+
'exit=' + fastRun.status + ' (its own verdict is another owner\'s concern)')
|
|
63
|
+
const greenRun = spawnSync(process.execPath, [RUNNER, '--only', 'audit-package-membership'], { cwd: REPO, encoding: 'utf8' })
|
|
64
|
+
const greenOut = String(greenRun.stdout || '') + String(greenRun.stderr || '')
|
|
65
|
+
ok(greenRun.status === 0 && !/TIMEOUT after/.test(greenOut),
|
|
66
|
+
'NEGATIVE (b): a known-green suite exits 0 under the default limit (no false timeout)',
|
|
67
|
+
'exit=' + greenRun.status)
|
|
68
|
+
console.log('')
|
|
69
|
+
console.log('=== RUNNER DIAGNOSTICS MUTANTS: ' + passed + ' passed, ' + failed + ' failed ===')
|
|
70
|
+
process.exit(failed === 0 ? 0 : 1)
|