dsh-vibe-math 2.7.1 → 2.7.3
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/README.en.md +682 -690
- package/README.md +19 -27
- package/cordis.patch.yml +112 -16
- package/docs/AUDIT-CHECKLIST.md +744 -518
- package/docs/COMPAT-AUDIT-ROUND2.md +35 -9
- package/docs/COMPAT-AUDIT-ROUND3.md +154 -154
- package/docs/final-paper.md +172 -172
- package/docs/formal-verification.md +588 -588
- package/docs/math-computation.md +194 -163
- package/docs/parameter-schema.md +37 -0
- package/docs/release-notes/README.en.md +49 -0
- package/docs/release-notes/README.md +48 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.2.en.md +72 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.2.md +72 -0
- 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/TEMPLATE.md +126 -0
- package/docs/status-report-fields.md +167 -0
- package/docs/test-timing.md +157 -154
- package/installer.js +27 -17
- package/package.json +55 -3
- 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 +305 -113
- package/prompt-corpus-v2/formal-verify-v2.md +2399 -279
- package/prompt-corpus-v3/formal-verify-v3.json +134 -110
- package/prompt-corpus-v3/formal-verify-v3.md +409 -141
- 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 +513 -259
- 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-installer-assertions.mutants.mjs +63 -0
- package/tests/audit-installer-compat.test.mjs +52 -4
- package/tests/audit-installer-policy.test.mjs +41 -8
- package/tests/audit-math-computation-contract.mjs +107 -9
- 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 +6 -4
- 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 +14 -0
- package/tests/audit-persona-surface.mutants.mjs +69 -0
- package/tests/audit-persona-surface.test.mjs +63 -22
- package/tests/audit-prompt-duplication.mjs +143 -0
- package/tests/audit-prompt-duplication.mutants.mjs +50 -0
- package/tests/audit-prompt-invariants.mjs +43 -5
- 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-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 +300 -13
- 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 +15 -8
- package/tests/e2e-identity-a6.mutants.mjs +65 -0
- package/tests/e2e-v5-round2.test.mjs +566 -12
- package/tests/formal-verify-v2.test.mjs +91 -5
- package/tests/formal-verify-v3.mutants.mjs +117 -0
- package/tests/formal-verify-v3.test.mjs +85 -6
- package/tests/formal-verify-v4.mutants.mjs +152 -0
- package/tests/formal-verify-v4.test.mjs +628 -9
- package/tests/formal-verify-v5.test.mjs +68 -9
- 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 +396 -2
- package/tests/math-computation-v2.test.mjs +767 -0
- package/tests/math-computation-v3.test.mjs +759 -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 +13 -2
- package/tests/run-tests.mjs +139 -9
- package/tests/run-tests.mutants.mjs +70 -0
- package/tests/selfdrive-v5.mjs +53 -1
- package/tests/selfdrive-v5.mutants.mjs +132 -0
- package/tests/v2-fix-probes.mutants.mjs +100 -0
- package/tests/v2-fix-probes.test.mjs +1039 -0
- package/tests/v2-list-agents-and-next-step.mutants.mjs +106 -0
- package/tests/v3-fix-probes.mutants.mjs +95 -0
- package/tests/v3-fix-probes.test.mjs +891 -0
- package/tests/v5-institute-fixes.mutants.mjs +190 -0
- package/vibe-math-v2/agent.cordis.yml +62 -6
- package/vibe-math-v2/math-computation.js +229 -29
- package/vibe-math-v2/math-engines.js +12 -12
- package/vibe-math-v2/vibe-math-v2.js +458 -119
- package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +5 -1
- package/vibe-math-v3/agent.cordis.yml +72 -6
- package/vibe-math-v3/math-computation.js +229 -29
- package/vibe-math-v3/math-engines.js +12 -12
- package/vibe-math-v3/vibe-math-v3.js +482 -139
- package/vibe-math-v4/agent.cordis.yml +44 -8
- package/vibe-math-v4/math-computation.js +229 -29
- package/vibe-math-v4/math-engines.js +12 -12
- package/vibe-math-v4/vibe-math-v4.js +245 -52
- package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +2 -0
- package/vibe-math-v5/agent.cordis.yml +46 -12
- package/vibe-math-v5/math-computation.js +229 -29
- package/vibe-math-v5/math-engines.js +12 -12
- package/vibe-math-v5/vibe-math-v5.js +1307 -243
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +1728 -1655
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +693 -693
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// Registered mutant harness for the v5 institute fixes — the suite carries its own proof.
|
|
2
|
+
// Each family is a SINGLE content-anchored mutation of the v5 preset (no line numbers); the suite runs
|
|
3
|
+
// through the V5_PLUGIN seam. Child runs are bounded (a timeout is a HANG); skipped families are printed
|
|
4
|
+
// and counted. Exit criterion: every family reddens BY NAME; ALL MUTANTS RED AS REQUIRED + exit 0 only then.
|
|
5
|
+
// Run: node tests/v5-institute-fixes.mutants.mjs
|
|
6
|
+
import { readFileSync, writeFileSync, mkdirSync, copyFileSync, rmSync, readdirSync } from 'node:fs'
|
|
7
|
+
import { execFileSync } from 'node:child_process'
|
|
8
|
+
import { dirname, join } from 'node:path'
|
|
9
|
+
import { tmpdir } from 'node:os'
|
|
10
|
+
import { fileURLToPath } from 'node:url'
|
|
11
|
+
const HERE = dirname(fileURLToPath(import.meta.url))
|
|
12
|
+
const REPO = join(HERE, '..')
|
|
13
|
+
const PRESET = 'vibe-math-v5'
|
|
14
|
+
const MAIN = PRESET + '.js'
|
|
15
|
+
const SUITE = 'tests/e2e-v5-round2.test.mjs'
|
|
16
|
+
const ENV = 'V5_PLUGIN'
|
|
17
|
+
// This suite is long, so the default child budget is generous; MUTANT_CHILD_TIMEOUT_MS overrides it.
|
|
18
|
+
const CHILD_TIMEOUT_MS = Number(process.env.MUTANT_CHILD_TIMEOUT_MS || 300000)
|
|
19
|
+
const TIMES = []
|
|
20
|
+
const hangs = []
|
|
21
|
+
const skipped = []
|
|
22
|
+
function copyGraph(file, dest) {
|
|
23
|
+
const src = join(REPO, PRESET, file)
|
|
24
|
+
copyFileSync(src, join(dest, file))
|
|
25
|
+
for (const m of readFileSync(src, 'utf8').matchAll(/from\s+'(\.\/[A-Za-z0-9_.-]+\.js)'/g)) {
|
|
26
|
+
const dep = m[1].slice(2)
|
|
27
|
+
if (!readdirSync(dest).includes(dep)) copyGraph(dep, dest)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function runFamily(f) {
|
|
31
|
+
const dest = join(tmpdir(), 'v5fix-mut-' + Math.random().toString(36).slice(2, 10))
|
|
32
|
+
mkdirSync(dest, { recursive: true })
|
|
33
|
+
copyGraph(MAIN, dest)
|
|
34
|
+
const target = join(dest, f.editFile || MAIN)
|
|
35
|
+
const before = readFileSync(target, 'utf8')
|
|
36
|
+
const n = before.split(f.from).length - 1
|
|
37
|
+
const okCount = f.lastOnly || f.all ? n >= 1 : n === 1
|
|
38
|
+
if (!okCount) {
|
|
39
|
+
skipped.push(f.name + ' (anchor x' + n + ')')
|
|
40
|
+
console.error(' SKIP - ' + f.name + ' (anchor x' + n + ')')
|
|
41
|
+
rmSync(dest, { recursive: true, force: true })
|
|
42
|
+
return false
|
|
43
|
+
}
|
|
44
|
+
const mutated = f.lastOnly
|
|
45
|
+
? (() => { const i = before.lastIndexOf(f.from); return before.slice(0, i) + f.to + before.slice(i + f.from.length) })()
|
|
46
|
+
: before.split(f.from).join(f.to)
|
|
47
|
+
writeFileSync(target, mutated, 'utf8')
|
|
48
|
+
try { execFileSync(process.execPath, ['--check', target], { stdio: 'pipe' }) }
|
|
49
|
+
catch (e) {
|
|
50
|
+
writeFileSync(target, before, 'utf8')
|
|
51
|
+
skipped.push(f.name + ' (mutation did not compile)')
|
|
52
|
+
console.error(' SKIP - ' + f.name + ' (mutation did not compile; restored)')
|
|
53
|
+
rmSync(dest, { recursive: true, force: true })
|
|
54
|
+
return false
|
|
55
|
+
}
|
|
56
|
+
const t0 = Date.now()
|
|
57
|
+
let out = ''
|
|
58
|
+
let code = 0
|
|
59
|
+
let hang = false
|
|
60
|
+
try {
|
|
61
|
+
out = execFileSync(process.execPath, [SUITE], {
|
|
62
|
+
cwd: REPO, encoding: 'utf8', timeout: CHILD_TIMEOUT_MS, killSignal: 'SIGKILL',
|
|
63
|
+
env: Object.assign({}, process.env, { [ENV]: join(dest, MAIN) }),
|
|
64
|
+
})
|
|
65
|
+
} catch (e) {
|
|
66
|
+
if (e && (e.killed || e.signal === 'SIGKILL')) hang = true
|
|
67
|
+
code = (e && e.status) || 1
|
|
68
|
+
out = String((e && e.stdout) || '') + String((e && e.stderr) || '')
|
|
69
|
+
}
|
|
70
|
+
const ms = Date.now() - t0
|
|
71
|
+
TIMES.push([f.name, ms])
|
|
72
|
+
if (hang) hangs.push(f.name + '(' + Math.round(ms / 1000) + 's)')
|
|
73
|
+
const named = out.split(/\r?\n/).filter((l) => /^\s*(FAIL - | {2}- )/.test(l) && f.expect.test(l)).map((l) => l.trim())
|
|
74
|
+
const ok = !hang && code !== 0 && named.length > 0
|
|
75
|
+
console.log((hang ? ' HANG - ' : (ok ? ' ok - ' : ' FAIL - ')) + f.name + ' [' + ms + 'ms]' + (named.length ? ' :: ' + named[0].slice(0, 150) : ' :: no named red (exit=' + code + ')'))
|
|
76
|
+
rmSync(dest, { recursive: true, force: true })
|
|
77
|
+
return ok
|
|
78
|
+
}
|
|
79
|
+
const FAMILIES = [
|
|
80
|
+
{
|
|
81
|
+
// G1: acking at prompt-build time again — a failed wake then consumes the message.
|
|
82
|
+
name: 'G1: the mailbox is acked BEFORE the wake again',
|
|
83
|
+
from: 'if (ok && prompt.pending.length) await ackPending(prompt.pending)',
|
|
84
|
+
to: 'if (prompt.pending.length) await ackPending(prompt.pending)',
|
|
85
|
+
expect: /\[G1\] a message whose wake FAILED is still pending/,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
// G2: counting the round BEFORE a send that can fail (the historical shape v4 fixed as F10).
|
|
89
|
+
name: 'G2: the round counter is applied BEFORE the send again',
|
|
90
|
+
from: 'const nextRound = (rounds.get(member.id) || 0) + 1',
|
|
91
|
+
to: 'rounds.set(member.id, (rounds.get(member.id) || 0) + 1); const nextRound = (rounds.get(member.id) || 0) + 1',
|
|
92
|
+
expect: /\[G2\] a failed send must not consume a round/,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
// G4: restoring the second, unprotected whole-object write after the CAS (the lost-update window).
|
|
96
|
+
name: 'G4: a second task write after the CAS is restored',
|
|
97
|
+
from: "const r = await taskUpdate(memberId, { task_id: taskId, expected_revision: (cur ? cur.revision : 1), action: 'reassign', owner: to },\n { assignedBy: isOffice(memberId) ? 'office' : memberId, why, acceptance })",
|
|
98
|
+
to: "const r = await taskUpdate(memberId, { task_id: taskId, expected_revision: (cur ? cur.revision : 1), action: 'reassign', owner: to })\n if (r.ok) await putTask(Object.assign({}, inst().tasks.find((t) => t.id === taskId), { assignedBy: isOffice(memberId) ? 'office' : memberId, why, acceptance }))",
|
|
99
|
+
expect: /\[G4\] the assign path issues NO second, unprotected task write/,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
// A5: a permanent researcher founded with the academician KIND - the count stays 3 but the id
|
|
103
|
+
// set and the kind multiset both break (the allocator also repeats the academician id).
|
|
104
|
+
name: 'A5: a permanent researcher is founded with the academician kind',
|
|
105
|
+
from: "const m = await newMember('researcher', { direction: dir })",
|
|
106
|
+
to: "const m = await newMember('academician', { direction: dir })",
|
|
107
|
+
expect: /A5 the founded (ID SET|KIND MULTISET)/,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
// A5-ids: the COUNT stays 3 and the kinds stay right, but the researcher id PREFIX changes, so the
|
|
111
|
+
// MEASURED (R14): the count assertions stay GREEN and the ID-SET assertion reddens; the run's other
|
|
112
|
+
// reds (82) are the cascade of the same mutation - not a claim that only the new assertion reddens.
|
|
113
|
+
// founded ID SET is no longer {acad, r-1, r-2}. This is the discriminator the count cannot catch.
|
|
114
|
+
name: 'A5-ids: the researcher id prefix is renamed (count still 3)',
|
|
115
|
+
from: "researcher: 'r-',",
|
|
116
|
+
to: "researcher: 'rX-',",
|
|
117
|
+
expect: /A5 the founded ID SET is exactly/,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
// A5-kinds: the COUNT stays 3 and the ids stay right, but a founded researcher's KIND is rewritten,
|
|
121
|
+
// MEASURED (R14): the count and ID-SET assertions stay GREEN and the KIND assertion reddens; the run's
|
|
122
|
+
// other reds (21) are the cascade of the same mutation - not a claim that only the new assertion reddens.
|
|
123
|
+
// so the kind MULTISET is no longer {academician:1, researcher:2}.
|
|
124
|
+
name: 'A5-kinds: a founded researcher kind is rewritten (count still 3)',
|
|
125
|
+
from: "id: '', kind,",
|
|
126
|
+
to: "id: '', kind: kind === 'researcher' ? 'temp' : kind,",
|
|
127
|
+
expect: /A5 the founded KIND MULTISET is exactly/,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
// spawnMember (G2-class): counting the founding round BEFORE `startContinuable`, so a host-cap
|
|
131
|
+
// failure consumes a round and the retried founder is told 轮次 2.
|
|
132
|
+
name: 'spawnMember: the founding round is counted BEFORE the start again',
|
|
133
|
+
from: 'const startRound = (rounds.get(member.id) || 0) + 1',
|
|
134
|
+
to: 'rounds.set(member.id, (rounds.get(member.id) || 0) + 1); const startRound = (rounds.get(member.id) || 0) + 1',
|
|
135
|
+
expect: /\[spawnMember\] a FAILED start must not consume a round/,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
// spawnMember: restoring the destructive rollback — `rounds.delete`/`roundsSinceCompact.delete` in the
|
|
139
|
+
// catch, which ERASES the count of a member being RESUMED (its numbering then restarts at 1).
|
|
140
|
+
name: 'spawnMember: the failed-start rollback DELETES the existing round count again',
|
|
141
|
+
from: " busy.delete(member.id)\n wakeKind.delete(member.id)",
|
|
142
|
+
to: " busy.delete(member.id)\n wakeKind.delete(member.id)\n rounds.delete(member.id)\n roundsSinceCompact.delete(member.id)",
|
|
143
|
+
expect: /\[spawnMember\] a FAILED resume must not move the round number backwards/,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
// spawnMember: dropping the explicit next-round argument, so the founding prompt's status block
|
|
147
|
+
// falls back to the stored counter (still 0 at that point) and announces 轮次 0.
|
|
148
|
+
name: 'spawnMember: the founding prompt is built without the explicit round',
|
|
149
|
+
from: 'const prompt = initialPrompt(member, initialTask, mode, startRound)',
|
|
150
|
+
to: 'const prompt = initialPrompt(member, initialTask, mode)',
|
|
151
|
+
expect: /\[spawnMember\]|the founding prompt never displays 轮次 0|the FOUNDING prompt announces the round/,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
// F6: quietly dropping a failed REQUIRED artifact write again (the v4-G3 shape): the meta write is
|
|
155
|
+
// still checked for `files`, but the failure is no longer NAMED in `warnings`.
|
|
156
|
+
name: 'F6: a failed paper.meta.json write is silently dropped from warnings again',
|
|
157
|
+
from: " else warnings.push(paperWriteFailureWarning(['paper.meta.json']))",
|
|
158
|
+
to: " else { /* F6 mutant: the failure is silent again */ }",
|
|
159
|
+
expect: /\[F6\] a failed REQUIRED write is named EXACTLY once/,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
// F6 (log half): discarding the FINALIZE-time log write result again — the log artifact can then go
|
|
163
|
+
// missing with no warning at all, and the durable meta is not re-written to name it.
|
|
164
|
+
name: 'F6: the finalize-time paper.log.md write result is discarded again',
|
|
165
|
+
from: ' if (!logRes.ok) {',
|
|
166
|
+
to: ' if (false) {',
|
|
167
|
+
expect: /\[F6\] a failed FINALIZE-time log write is named exactly once/,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
// v5 L1 (`leanPathContractOk`): the tools' short form resolves to a DIFFERENT file, so the load-time
|
|
171
|
+
// contract check fails and queues 'Lean path contract broken …'; report() must then surface it.
|
|
172
|
+
name: 'v5 L1: the Lean tools short form resolves to the WRONG file (path contract broken)',
|
|
173
|
+
from: 'const viaShort = leanAbsPath(probe)',
|
|
174
|
+
to: "const viaShort = leanAbsPath(probe + 'x')",
|
|
175
|
+
expect: /\[v5 L1\] a HEALTHY composition surfaces no Lean path contract note/,
|
|
176
|
+
},
|
|
177
|
+
]
|
|
178
|
+
let red = 0
|
|
179
|
+
for (const f of FAMILIES) { const ok = runFamily(f); if (ok) red++ }
|
|
180
|
+
const totalMs = TIMES.reduce((a, t) => a + t[1], 0)
|
|
181
|
+
console.log('')
|
|
182
|
+
console.log('mutant families reddening the v5 institute fixes by name: ' + red + '/' + FAMILIES.length)
|
|
183
|
+
console.log('timings: ' + TIMES.map((t) => String(t[0]).split(':')[0] + '=' + t[1] + 'ms').join(' '))
|
|
184
|
+
// R15: the audit-checklist row says EVERY family prints this line, and override decisions must quote it
|
|
185
|
+
// rather than an external estimate. Same shape as tests/formal-verify-v3.mutants.mjs.
|
|
186
|
+
console.log('TOTAL WALL TIME (all families + setup): ' + totalMs + 'ms (' + Math.round(totalMs / 1000) + 's)')
|
|
187
|
+
console.log('hangs=[' + hangs.join(' | ') + ']')
|
|
188
|
+
console.log('skipped=[' + skipped.join(' | ') + ']')
|
|
189
|
+
if (red !== FAMILIES.length || skipped.length || hangs.length) process.exit(1)
|
|
190
|
+
console.log('ALL MUTANTS RED AS REQUIRED')
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
44
44
|
- 替代必须声明(诚实性):当替代方案改变了**精确性或结论强度**时(精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类),结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
45
|
-
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext
|
|
45
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>,**相对项目根**);**成员的文件工具是按会话 cwd 解析的**,所以读它要用**绝对路径** `receipt.scriptAbs`,或把 `receipt.cwd` 与 `receipt.scriptPath` 拼起来(回执两个字段都有)。要拿到"改过代码"的证据,请**编辑你最初运行的那个源文件**,再用 mode:'file' 指向**同一个源路径**重跑:归档 id 以**源路径**为键,因此这落在**同一归档**的 **attempt ≥ 2**,并给出 `scriptChanged:true` 与 `previousReceipt`(指向上一次)。**指向归档副本本身**(`receipt.scriptAbs` 那个路径)按设计是**另一份新归档**:新 id、attempt 1、没有 `previousReceipt`、`scriptChanged:false`;旧 attempt 绝不会被覆盖,但它**不是**"同一归档的新 attempt"——工具会用 `fileIsArchivedScript` 与 `ARCHIVED_SCRIPT_RERUN` 警告明确说明。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
46
46
|
|
|
47
47
|
Final paper: strict termination writes Paper/<project>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}
|
|
48
48
|
automatically — a dedicated paper-writing child assembles the solved material (finalPaper=false disables only that
|
|
@@ -61,6 +61,27 @@
|
|
|
61
61
|
Verified/ is written by that same scheduler path — an agent's own self-reported 1 is never a conclusion.
|
|
62
62
|
When the user asks about progress, call vibe_math_report and summarize in plain language.
|
|
63
63
|
|
|
64
|
+
DISCLOSURES (existing behaviour, not rules to follow):
|
|
65
|
+
- DISCLOSURE (existing behaviour): the FINAL PAPER flow can finish without you — when it hits
|
|
66
|
+
its round/token cap the framework force-finalises the paper (`forcedAfterCap`) and reaps an
|
|
67
|
+
in-flight writer that never came back; the activity log says so. You do not lose the paper,
|
|
68
|
+
you lose the chance to keep iterating on it.
|
|
69
|
+
- DISCLOSURE (existing behaviour): switching the mode to `auto` immediately resolves EVERY
|
|
70
|
+
pending decision as auto-decided (the activity log records "auto-resolved N pending
|
|
71
|
+
decision(s)"). Anything you leave pending will not wait for you.
|
|
72
|
+
- DISCLOSURE (existing behaviour): the framework itself pushes a progress update to the office
|
|
73
|
+
(reportMode / reportIntervalMs) — a summary you did not ask for can arrive at a round
|
|
74
|
+
boundary; it is a report, not a new instruction.
|
|
75
|
+
- DISCLOSURE (existing behaviour): the framework can adjust problem/proposition priorities
|
|
76
|
+
itself (priorityAdjust / proposPriorityAdjust) — the activity log records "priorities
|
|
77
|
+
auto-adjusted (…)"; a problem you deprioritised can come back on its own.
|
|
78
|
+
- DISCLOSURE (existing behaviour): when mathMode is `typed`, the shell fallback is refused
|
|
79
|
+
(the math tool returns REFUSED with reason=policy) instead of silently falling back.
|
|
80
|
+
- math_computation policy: mathComputation = off | auto | on (off = the math surface is
|
|
81
|
+
not mentioned in prompts at all); mathMode = typed | typed+shell (typed refuses the shell
|
|
82
|
+
fallback); mathEngines (cli / python / …); mathTimeoutMs; mathPackages + mathInstallScope
|
|
83
|
+
for preflight package installs (missing packages are reported with an install plan only).
|
|
84
|
+
|
|
64
85
|
Configuration highlights (all tunable via vibe_math_set_params / the settings file):
|
|
65
86
|
`knowledgeContext` overrides the shared data-model explanation injected into every child prompt
|
|
66
87
|
(empty = built-in full version); `explorerPersona` / `solverPersona` / `verifierPersona` prepend
|
|
@@ -79,8 +100,15 @@
|
|
|
79
100
|
match the proposition as stated) | 'require' (same, plus a gate: a true/false verdict is
|
|
80
101
|
recorded as 未定论 with reason formal-required until the object is Lean-passed or carries an
|
|
81
102
|
explicit, reasoned blocker record; the scheduler is never wedged by it).
|
|
82
|
-
- Paths
|
|
83
|
-
|
|
103
|
+
- Paths (every path here is resolved against the SESSION WORKING DIRECTORY, i.e. the cwd
|
|
104
|
+
printed at the end of this prompt; the project root is the `Data lives under …`
|
|
105
|
+
directory above):
|
|
106
|
+
institute work file `<project root>/Formal/<id>.lean`;
|
|
107
|
+
archived proof `<project root>/Verified/Lean/<id>.lean`;
|
|
108
|
+
reusable definitions `VibeMath/Formal/Lib/` (workspace-root relative);
|
|
109
|
+
proved lemmas `VibeMath/Formal/Proved/` (workspace-root relative);
|
|
110
|
+
short form `Formal/<id>.lean` (project-root relative) names the SAME file as
|
|
111
|
+
`<project root>/Formal/<id>.lean`.
|
|
84
112
|
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs / leanAsync / leanInitiative / leanSearchPaths / leanJobsMaxParallel are tunable as well
|
|
85
113
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
86
114
|
reported as LEAN_NOT_FOUND and still lets the code be written and archived.
|
|
@@ -120,7 +148,7 @@
|
|
|
120
148
|
|
|
121
149
|
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
122
150
|
- 替代必须声明(诚实性):当替代方案改变了**精确性或结论强度**时(精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类),结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
123
|
-
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext
|
|
151
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>,**相对项目根**);**成员的文件工具是按会话 cwd 解析的**,所以读它要用**绝对路径** `receipt.scriptAbs`,或把 `receipt.cwd` 与 `receipt.scriptPath` 拼起来(回执两个字段都有)。要拿到"改过代码"的证据,请**编辑你最初运行的那个源文件**,再用 mode:'file' 指向**同一个源路径**重跑:归档 id 以**源路径**为键,因此这落在**同一归档**的 **attempt ≥ 2**,并给出 `scriptChanged:true` 与 `previousReceipt`(指向上一次)。**指向归档副本本身**(`receipt.scriptAbs` 那个路径)按设计是**另一份新归档**:新 id、attempt 1、没有 `previousReceipt`、`scriptChanged:false`;旧 attempt 绝不会被覆盖,但它**不是**"同一归档的新 attempt"——工具会用 `fileIsArchivedScript` 与 `ARCHIVED_SCRIPT_RERUN` 警告明确说明。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
124
152
|
|
|
125
153
|
Final paper: strict termination writes Paper/<project>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}
|
|
126
154
|
automatically — a dedicated paper-writing child assembles the solved material (finalPaper=false disables only that
|
|
@@ -139,6 +167,27 @@
|
|
|
139
167
|
Verified/ is written by that same scheduler path — an agent's own self-reported 1 is never a conclusion.
|
|
140
168
|
When the user asks about progress, call vibe_math_report and summarize in plain language.
|
|
141
169
|
|
|
170
|
+
DISCLOSURES (existing behaviour, not rules to follow):
|
|
171
|
+
- DISCLOSURE (existing behaviour): the FINAL PAPER flow can finish without you — when it hits
|
|
172
|
+
its round/token cap the framework force-finalises the paper (`forcedAfterCap`) and reaps an
|
|
173
|
+
in-flight writer that never came back; the activity log says so. You do not lose the paper,
|
|
174
|
+
you lose the chance to keep iterating on it.
|
|
175
|
+
- DISCLOSURE (existing behaviour): switching the mode to `auto` immediately resolves EVERY
|
|
176
|
+
pending decision as auto-decided (the activity log records "auto-resolved N pending
|
|
177
|
+
decision(s)"). Anything you leave pending will not wait for you.
|
|
178
|
+
- DISCLOSURE (existing behaviour): the framework itself pushes a progress update to the office
|
|
179
|
+
(reportMode / reportIntervalMs) — a summary you did not ask for can arrive at a round
|
|
180
|
+
boundary; it is a report, not a new instruction.
|
|
181
|
+
- DISCLOSURE (existing behaviour): the framework can adjust problem/proposition priorities
|
|
182
|
+
itself (priorityAdjust / proposPriorityAdjust) — the activity log records "priorities
|
|
183
|
+
auto-adjusted (…)"; a problem you deprioritised can come back on its own.
|
|
184
|
+
- DISCLOSURE (existing behaviour): when mathMode is `typed`, the shell fallback is refused
|
|
185
|
+
(the math tool returns REFUSED with reason=policy) instead of silently falling back.
|
|
186
|
+
- math_computation policy: mathComputation = off | auto | on (off = the math surface is
|
|
187
|
+
not mentioned in prompts at all); mathMode = typed | typed+shell (typed refuses the shell
|
|
188
|
+
fallback); mathEngines (cli / python / …); mathTimeoutMs; mathPackages + mathInstallScope
|
|
189
|
+
for preflight package installs (missing packages are reported with an install plan only).
|
|
190
|
+
|
|
142
191
|
Configuration highlights (all tunable via vibe_math_set_params / the settings file):
|
|
143
192
|
`knowledgeContext` overrides the shared data-model explanation injected into every child prompt
|
|
144
193
|
(empty = built-in full version); `explorerPersona` / `solverPersona` / `verifierPersona` prepend
|
|
@@ -157,8 +206,15 @@
|
|
|
157
206
|
match the proposition as stated) | 'require' (same, plus a gate: a true/false verdict is
|
|
158
207
|
recorded as 未定论 with reason formal-required until the object is Lean-passed or carries an
|
|
159
208
|
explicit, reasoned blocker record; the scheduler is never wedged by it).
|
|
160
|
-
- Paths
|
|
161
|
-
|
|
209
|
+
- Paths (every path here is resolved against the SESSION WORKING DIRECTORY, i.e. the cwd
|
|
210
|
+
printed at the end of this prompt; the project root is the `Data lives under …`
|
|
211
|
+
directory above):
|
|
212
|
+
institute work file `<project root>/Formal/<id>.lean`;
|
|
213
|
+
archived proof `<project root>/Verified/Lean/<id>.lean`;
|
|
214
|
+
reusable definitions `VibeMath/Formal/Lib/` (workspace-root relative);
|
|
215
|
+
proved lemmas `VibeMath/Formal/Proved/` (workspace-root relative);
|
|
216
|
+
short form `Formal/<id>.lean` (project-root relative) names the SAME file as
|
|
217
|
+
`<project root>/Formal/<id>.lean`.
|
|
162
218
|
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs / leanAsync / leanInitiative / leanSearchPaths / leanJobsMaxParallel are tunable as well
|
|
163
219
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
164
220
|
reported as LEAN_NOT_FOUND and still lets the code be written and archived.
|