dsh-plain-talk 0.1.13 → 0.1.15

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/package.json CHANGED
@@ -1,60 +1,59 @@
1
1
  {
2
- "name": "dsh-plain-talk",
3
- "version": "0.1.13",
4
- "description": "Composer toggle that shapes replies: conclusion first, inline quotes, no cross-turn references",
5
- "scripts": {
6
- "test": "node test/selftest.mjs"
7
- },
8
- "type": "module",
9
- "license": "MIT",
10
- "keywords": [
11
- "dsh",
12
- "dsh-plugin",
13
- "deepseek-harness",
14
- "reply",
15
- "readability",
16
- "concision",
17
- "composer"
18
- ],
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/lizilong1993/dsh-plain-talk.git"
22
- },
23
- "homepage": "https://github.com/lizilong1993/dsh-plain-talk",
24
- "bugs": {
25
- "url": "https://github.com/lizilong1993/dsh-plain-talk/issues"
26
- },
27
- "files": [
28
- "dsh",
29
- "lib",
30
- "cordis.patch.yml",
31
- "locale/*.json",
32
- "icon.png",
33
- "README.md",
34
- "README.en.md",
35
- "CHANGELOG.md",
36
- "LICENSE",
37
- "test"
38
- ],
39
- "exports": {
40
- ".": "./dsh/index.js",
41
- "./client": "./lib/client.js",
42
- "./rules": "./dsh/rules.js",
43
- "./check": "./dsh/check.js",
44
- "./locale/*.json": "./locale/*.json",
45
- "./icon": "./icon.png",
46
- "./package.json": "./package.json"
47
- },
48
- "engines": {
49
- "node": ">=20"
50
- },
51
- "dsh": {
52
- "bundle": {
53
- "patch": "./cordis.patch.yml"
2
+ "name": "dsh-plain-talk",
3
+ "version": "0.1.15",
4
+ "description": "Composer toggle that shapes replies: conclusion first, inline quotes, no cross-turn references",
5
+ "scripts": {
6
+ "test": "node test/run-all.mjs"
54
7
  },
55
- "client": {
56
- "platform": "web",
57
- "immediately": true
8
+ "type": "module",
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "dsh",
12
+ "dsh-plugin",
13
+ "deepseek-harness",
14
+ "reply",
15
+ "readability",
16
+ "concision",
17
+ "composer"
18
+ ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/lizilong1993/dsh-plain-talk.git"
22
+ },
23
+ "homepage": "https://github.com/lizilong1993/dsh-plain-talk",
24
+ "bugs": {
25
+ "url": "https://github.com/lizilong1993/dsh-plain-talk/issues"
26
+ },
27
+ "files": [
28
+ "dsh",
29
+ "lib",
30
+ "cordis.patch.yml",
31
+ "locale/*.json",
32
+ "icon.png",
33
+ "README.md",
34
+ "README.en.md",
35
+ "CHANGELOG.md",
36
+ "LICENSE"
37
+ ],
38
+ "exports": {
39
+ ".": "./dsh/index.js",
40
+ "./client": "./lib/client.js",
41
+ "./rules": "./dsh/rules.js",
42
+ "./check": "./dsh/check.js",
43
+ "./locale/*.json": "./locale/*.json",
44
+ "./icon": "./icon.png",
45
+ "./package.json": "./package.json"
46
+ },
47
+ "engines": {
48
+ "node": ">=20"
49
+ },
50
+ "dsh": {
51
+ "bundle": {
52
+ "patch": "./cordis.patch.yml"
53
+ },
54
+ "client": {
55
+ "platform": "web",
56
+ "immediately": true
57
+ }
58
58
  }
59
- }
60
59
  }
package/dsh/vocab.js DELETED
@@ -1,229 +0,0 @@
1
- // The user vocabulary file.
2
- //
3
- // One file for the whole profile, not per Session: "the user already knows this
4
- // word" is a property of the reader, not of one conversation. Sessions only add
5
- // observations; the checker reads the result.
6
- //
7
- // Categories, from broadest to most specific:
8
- // common 常识词汇 — built in, never needs an explanation
9
- // domain 专业词汇 — field terms the user has already met
10
- // project 项目 / 产品名 — repositories, products, workspace names
11
- // unclassified 待归类 — recorded but not yet classified
12
- //
13
- // Codes (EXP-7, DEV-1K, run-3, commit hashes) are never stored: the plugin's
14
- // job is to make the model explain them, so remembering one would hide the
15
- // next unexplainable use.
16
- // Two-phase learning for research requests: when the user says "调研 X", X is
17
- // marked pending for that Session, so the first reply must still explain it;
18
- // the next turn end promotes it into the vocabulary.
19
-
20
- import { mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs'
21
- import { dirname } from 'node:path'
22
-
23
- export const CATEGORIES = {
24
- common: '常识词汇',
25
- domain: '专业词汇',
26
- project: '项目 / 产品名',
27
- unclassified: '待归类',
28
- }
29
-
30
- const MAX_TERMS = 2000
31
- const MAX_PENDING_PER_SESSION = 20
32
-
33
- const cjkCount = (s) => (s.match(/[\u4e00-\u9fff]/g) ?? []).length
34
-
35
- // Codes never enter the vocabulary: explaining them is the plugin's job, so
36
- // remembering one would silence the next warning.
37
- const CODE_LIKE = /^[A-Za-z]{1,10}[-_.]?\d{1,6}[A-Za-z]?$|^\d{1,4}[A-Za-z]{1,6}$|^[0-9a-f]{7,40}$/i
38
-
39
- export function isCodeLike(term) {
40
- return CODE_LIKE.test(String(term ?? '').trim())
41
- }
42
-
43
- /** Classify one learned term from its shape alone. */
44
- export function classify(term, cwdName) {
45
- const text = String(term ?? '').trim()
46
- if (!text) return 'unclassified'
47
- if (isCodeLike(text)) return null
48
- if (cwdName && text === cwdName) return 'project'
49
- if (/^[A-Za-z0-9]+(?:_[A-Za-z0-9]+)+$/.test(text) && (text.match(/[A-Z]/g) ?? []).length >= 2) return 'project'
50
- if (/^[A-Z][A-Za-z0-9]+$/.test(text) && /[A-Z]/.test(text.slice(1))) return 'project'
51
- if (cjkCount(text) >= 2) return 'domain'
52
- if (/^[A-Z]{2,8}$/.test(text)) return 'domain'
53
- return 'unclassified'
54
- }
55
-
56
- export function emptyVocab() {
57
- return { version: 1, updatedAt: new Date(0).toISOString(), terms: {}, pending: {} }
58
- }
59
-
60
- export function loadVocab(file) {
61
- try {
62
- const parsed = JSON.parse(readFileSync(file, 'utf8'))
63
- const terms = {}
64
- const raw = parsed && typeof parsed === 'object' && parsed.terms && typeof parsed.terms === 'object' ? parsed.terms : {}
65
- for (const [key, value] of Object.entries(raw)) {
66
- if (!key || key.length > 80) continue
67
- if (isCodeLike(key)) continue
68
- if (!value || typeof value !== 'object') continue
69
- if (value.category === 'internal') continue
70
- const category = Object.prototype.hasOwnProperty.call(CATEGORIES, value.category) ? value.category : 'unclassified'
71
- terms[key] = {
72
- category,
73
- firstSeen: typeof value.firstSeen === 'string' ? value.firstSeen : new Date(0).toISOString(),
74
- lastSeen: typeof value.lastSeen === 'string' ? value.lastSeen : new Date(0).toISOString(),
75
- count: Number.isFinite(value.count) ? value.count : 1,
76
- sessions: Array.isArray(value.sessions) ? value.sessions.filter((s) => typeof s === 'string').slice(-5) : [],
77
- source: typeof value.source === 'string' ? value.source : 'user',
78
- }
79
- }
80
- const pending = {}
81
- const rawPending = parsed && typeof parsed === 'object' && parsed.pending && typeof parsed.pending === 'object' ? parsed.pending : {}
82
- for (const [sessionId, list] of Object.entries(rawPending)) {
83
- if (!Array.isArray(list)) continue
84
- pending[sessionId] = list
85
- .filter((item) => item && typeof item.term === 'string' && item.term.length > 0 && item.term.length <= 80)
86
- .slice(-MAX_PENDING_PER_SESSION)
87
- .map((item) => ({ term: item.term, at: typeof item.at === 'string' ? item.at : new Date(0).toISOString() }))
88
- }
89
- return { version: 1, updatedAt: typeof parsed.updatedAt === 'string' ? parsed.updatedAt : new Date(0).toISOString(), terms, pending }
90
- } catch {
91
- return emptyVocab()
92
- }
93
- }
94
-
95
- export function saveVocab(file, vocab) {
96
- const next = { ...vocab, version: 1, updatedAt: new Date().toISOString() }
97
- mkdirSync(dirname(file), { recursive: true })
98
- const tmp = `${file}.${process.pid}.${Date.now()}.tmp`
99
- writeFileSync(tmp, `${JSON.stringify(next, null, 2)}\n`, 'utf8')
100
- renameSync(tmp, file)
101
- return next
102
- }
103
-
104
- function evict(vocab) {
105
- const keys = Object.keys(vocab.terms)
106
- if (keys.length <= MAX_TERMS) return
107
- keys
108
- .sort((a, b) => String(vocab.terms[a].lastSeen).localeCompare(String(vocab.terms[b].lastSeen)))
109
- .slice(0, keys.length - MAX_TERMS)
110
- .forEach((key) => delete vocab.terms[key])
111
- }
112
-
113
- /** Record one term as known. Existing terms keep their category. */
114
- export function addTerm(vocab, term, options = {}) {
115
- const key = String(term ?? '').trim()
116
- if (!key || key.length > 80) return vocab
117
- if (isCodeLike(key)) return vocab
118
- const category = options.category && CATEGORIES[options.category] ? options.category : classify(key, options.cwdName)
119
- if (category === null) return vocab
120
- const now = options.now ?? new Date().toISOString()
121
- const session = typeof options.session === 'string' ? options.session : undefined
122
- const existing = vocab.terms[key]
123
- if (existing) {
124
- existing.lastSeen = now
125
- existing.count += 1
126
- if (session && !existing.sessions.includes(session)) existing.sessions = [...existing.sessions.slice(-4), session]
127
- if (options.category && CATEGORIES[options.category]) existing.category = options.category
128
- } else {
129
- vocab.terms[key] = {
130
- category,
131
- firstSeen: now,
132
- lastSeen: now,
133
- count: 1,
134
- sessions: session ? [session] : [],
135
- source: options.source ?? 'user',
136
- }
137
- }
138
- evict(vocab)
139
- return vocab
140
- }
141
-
142
- export function removeTerm(vocab, term) {
143
- delete vocab.terms[String(term ?? '').trim()]
144
- return vocab
145
- }
146
-
147
- export function setCategory(vocab, term, category) {
148
- const key = String(term ?? '').trim()
149
- if (!vocab.terms[key] || !CATEGORIES[category] || isCodeLike(key)) return vocab
150
- vocab.terms[key].category = category
151
- return vocab
152
- }
153
-
154
- /** Mark a research subject as not-yet-known for this Session. */
155
- export function markPending(vocab, sessionId, term, now = new Date().toISOString()) {
156
- const key = String(term ?? '').trim()
157
- if (!sessionId || !key || key.length > 80) return vocab
158
- const list = vocab.pending[sessionId] ?? []
159
- if (!list.some((item) => item.term === key)) list.push({ term: key, at: now })
160
- vocab.pending[sessionId] = list.slice(-MAX_PENDING_PER_SESSION)
161
- return vocab
162
- }
163
-
164
- export function pendingFor(vocab, sessionId) {
165
- return (vocab.pending?.[sessionId] ?? []).map((item) => item.term)
166
- }
167
-
168
- /** Turn end: the reply has been delivered, so the research subject is now known. */
169
- export function promotePending(vocab, sessionId, options = {}) {
170
- const list = vocab.pending?.[sessionId] ?? []
171
- if (list.length === 0) return []
172
- for (const item of list) addTerm(vocab, item.term, { ...options, session: sessionId, category: options.category ?? 'domain', source: 'research' })
173
- delete vocab.pending[sessionId]
174
- return list.map((item) => item.term)
175
- }
176
-
177
- /**
178
- * Terms the checker may treat as known for one Session.
179
- * Pending research subjects are excluded even when the profile learned them
180
- * earlier: the user asked to research them, so the first reply must not assume.
181
- */
182
- export function knownSet(vocab, sessionId) {
183
- const suspended = new Set(pendingFor(vocab, sessionId))
184
- const known = new Set()
185
- for (const key of Object.keys(vocab.terms)) {
186
- if (!suspended.has(key)) known.add(key)
187
- }
188
- return known
189
- }
190
-
191
- export function listByCategory(vocab) {
192
- const groups = {}
193
- for (const key of Object.keys(CATEGORIES)) groups[key] = []
194
- for (const [term, value] of Object.entries(vocab.terms)) {
195
- const category = CATEGORIES[value.category] ? value.category : 'unclassified'
196
- groups[category].push({ term, count: value.count, lastSeen: value.lastSeen })
197
- }
198
- for (const key of Object.keys(groups)) groups[key].sort((a, b) => b.count - a.count || a.term.localeCompare(b.term))
199
- return groups
200
- }
201
-
202
- /** Extract "research X" subjects from one user message. */
203
- export function researchTargets(text) {
204
- const found = []
205
- const input = String(text ?? '')
206
- // A captured phrase may carry a code inside it ("调研 XR-77 这个实验"):
207
- // the code is the subject, not the surrounding words.
208
- const codePattern = /\b[A-Za-z]{1,10}[-_.]?\d{1,6}[A-Za-z]?\b/g
209
- const push = (phrase) => {
210
- const codes = phrase.match(codePattern) ?? []
211
- if (codes.length > 0) {
212
- for (const code of codes) if (code.length >= 2) found.push(code)
213
- return
214
- }
215
- if (phrase.length >= 2) found.push(phrase)
216
- }
217
- const zh = /(?:调研|研究|调查|了解一下|了解下|查一下|查查|梳理一下|分析一下)\s*([^\n。!?;;]{1,40})/g
218
- let m
219
- while ((m = zh.exec(input))) {
220
- const term = m[1].trim().replace(/^(?:一下|下)\s*/, '').replace(/[,,、\s]+$/, '')
221
- push(term)
222
- }
223
- const en = /\b(?:research|investigate|look into|study)\s+([A-Za-z0-9][A-Za-z0-9 ._/-]{1,40})/gi
224
- while ((m = en.exec(input))) {
225
- const term = m[1].trim().replace(/[.,;:\s]+$/, '')
226
- push(term)
227
- }
228
- return [...new Set(found)]
229
- }
package/test/REPORT.md DELETED
@@ -1,64 +0,0 @@
1
- # 0.1.11 效果实测
2
-
3
- ## 结论先说
4
-
5
- 1. 0.1.11 的改写方向没有被证据支持:同一模型下,0.1.11 在 4/4 个问题上中位字数都更长;但这个网关的采样噪声远大于版本差异,样本量不足以声称显著变差。
6
- 2. 我之前的说法有过头的地方:0.1.11 不是"新旧条款并列矛盾",它只是把那三句替换了。真正的问题是替换后带数字的硬上限(12 行/300 字、列表最多 5 条)变成了"按需展开""按需保留"这类软约束。
7
- 3. 本次发布回退到 0.1.10 的规则正文,并补了离线自检 npm test,防止同类软化再被发布。
8
-
9
- ## 先量噪声(这一步之前漏了)
10
-
11
- 同一份规则、同一个问题,连跑 4 次,输出字数:
12
-
13
- | 问题 | 0.1.10 四次采样 | 极差 |
14
- | --- | --- | --- |
15
- | Nginx 502/504 | 345 / 176 / 326 / 243 | 169 |
16
- | git push non-fast-forward | 352 / 258 / 319 / 274 | 94 |
17
- | WebAssembly 调研 | 50 / 364 / 385 / 382 | 335 |
18
- | CPU 打满排查 | 478 / 508 / 410 / 496 | 98 |
19
-
20
- 同一版本内部极差最大 335 字,跨题最大 1402 字(WebAssembly 那题 0.1.11 采样为 741/962/862/2143)。tempterature=0 在这个网关上并不保证可复现。
21
-
22
- ## 版本对比(中位数)
23
-
24
- | 问题 | 0.1.10 中位 | 0.1.11 中位 | 差值 |
25
- | --- | --- | --- | --- |
26
- | Nginx 502/504 | 285 | 361 | +76 |
27
- | git push | 297 | 515 | +218 |
28
- | WebAssembly | 373 | 912 | +539 |
29
- | CPU 打满 | 487 | 677 | +190 |
30
-
31
- 4/4 同向偏长,平均 +256 字。噪声底(单版本内极差)达 1402 字,所以只能说"方向一致地变长",不能据此宣称统计显著。
32
-
33
- ## 规则正文的实际差异
34
-
35
- 逐行对比 npm 0.1.10 与 0.1.11 的 dsh/rules.js,只有三行不同:
36
-
37
- | 项 | 0.1.10 | 0.1.11 |
38
- | --- | --- | --- |
39
- | 结论 | 先给结论,再给必要细节 | 第一句直接回答最关心的事…直接给成品 |
40
- | 长度 | 默认不超过 12 行、300 字 | 普通回复以 12 行、300 字以内为参考;需要完整步骤…按任务需要展开 |
41
- | 列表 | 列表最多 5 条;只给一个下一步 | 用列表呈现并列项,按需保留完整条目…答完就停 |
42
-
43
- 后两行把唯一的数字上限换成软表述,这是可验证的规则退化,不依赖采样。
44
-
45
- ## 处理
46
-
47
- - dsh/rules.js 回退到 0.1.10 正文(与 npm 0.1.10 逐字节一致,1596 字节)
48
- - npm test:17 项离线断言,其中包含"长度上限与列表上限各只有一种说法且带数字"
49
- - 新版发布此回退
50
-
51
- ## 怎么复现
52
-
53
- ```bash
54
- npm test # 离线契约检查,不需要模型
55
- node test/noise.mjs # 采样噪声(约 32 次生成)
56
- node test/bench.mjs --versions 0.1.10,0.1.11 # 版本对照
57
- node test/determinism.mjs # 同输入多次调用是否一致
58
- ```
59
-
60
- test/bench.mjs 直接从 npm 拉指定版本的规则正文,不依赖本地仓库状态。
61
-
62
- ## 遗留问题
63
-
64
- 噪声这么大,单靠这个本地网关做不了可靠的效果判定。要真正评估提示词改动,需要:固定随机种子或可复现的推理后端、每臂 20+ 采样、并用配对统计而不是均值比较。
@@ -1,281 +0,0 @@
1
- {
2
- "summary": {
3
- "versions": [
4
- "0.1.10",
5
- "0.1.11"
6
- ],
7
- "reps": 1,
8
- "questions": 12,
9
- "runs": 24,
10
- "model": "group/free",
11
- "arms": {
12
- "0.1.10": {
13
- "n": 12,
14
- "avgChars": 345,
15
- "avgLines": 5.9,
16
- "errors": 0,
17
- "warns": 10
18
- },
19
- "0.1.11": {
20
- "n": 12,
21
- "avgChars": 381,
22
- "avgLines": 7.7,
23
- "errors": 2,
24
- "warns": 15
25
- }
26
- },
27
- "pairs": {
28
- "0.1.10/0.1.11": {
29
- "n": 12,
30
- "charsDelta": 434,
31
- "warnsDelta": 5,
32
- "shorter": 4,
33
- "longer": 7,
34
- "avgCharsDelta": 36,
35
- "avgWarnsDelta": 0.42
36
- }
37
- }
38
- },
39
- "rows": [
40
- {
41
- "q": 1,
42
- "rep": 1,
43
- "version": "0.1.10",
44
- "chars": 666,
45
- "lines": 10,
46
- "errors": 0,
47
- "warns": 2,
48
- "firstLine": "**Liveness Probe(存活探针)**:判断容器是否**还活着**。失败 → kubelet **杀掉并重启*"
49
- },
50
- {
51
- "q": 1,
52
- "rep": 1,
53
- "version": "0.1.11",
54
- "chars": 963,
55
- "lines": 30,
56
- "errors": 0,
57
- "warns": 2,
58
- "firstLine": "一句话:liveness 探针决定\"要不要重启容器\",readiness 探针决定\"要不要把流量发给这个 Pod\"。"
59
- },
60
- {
61
- "q": 2,
62
- "rep": 1,
63
- "version": "0.1.10",
64
- "chars": 346,
65
- "lines": 9,
66
- "errors": 0,
67
- "warns": 0,
68
- "firstLine": "被拒绝是因为远程分支有本地没有的提交,直接推送会覆盖远程提交,Git 拒绝以防丢数据。"
69
- },
70
- {
71
- "q": 2,
72
- "rep": 1,
73
- "version": "0.1.11",
74
- "chars": 143,
75
- "lines": 1,
76
- "errors": 0,
77
- "warns": 0,
78
- "firstLine": "因为远端分支上有你本地没有的提交,导致推送会使历史出现非快进(non‑fast‑forward),git 为防止意外覆盖"
79
- },
80
- {
81
- "q": 3,
82
- "rep": 1,
83
- "version": "0.1.10",
84
- "chars": 28,
85
- "lines": 1,
86
- "errors": 0,
87
- "warns": 0,
88
- "firstLine": "它只在组件首次渲染时运行一次。后续的重新渲染不会触发它。"
89
- },
90
- {
91
- "q": 3,
92
- "rep": 1,
93
- "version": "0.1.11",
94
- "chars": 339,
95
- "lines": 4,
96
- "errors": 0,
97
- "warns": 1,
98
- "firstLine": "在 React 的 `useEffect` 中,如果你把第二个参数(依赖数组)留空,或者写成 `undefined`,它"
99
- },
100
- {
101
- "q": 4,
102
- "rep": 1,
103
- "version": "0.1.10",
104
- "chars": 214,
105
- "lines": 6,
106
- "errors": 0,
107
- "warns": 1,
108
- "firstLine": "MySQL 索引失效的常见原因有以下几类。 "
109
- },
110
- {
111
- "q": 4,
112
- "rep": 1,
113
- "version": "0.1.11",
114
- "chars": 408,
115
- "lines": 9,
116
- "errors": 0,
117
- "warns": 2,
118
- "firstLine": "MySQL 索引失效的常见原因:"
119
- },
120
- {
121
- "q": 5,
122
- "rep": 1,
123
- "version": "0.1.10",
124
- "chars": 201,
125
- "lines": 3,
126
- "errors": 0,
127
- "warns": 1,
128
- "firstLine": "**结论**:这行日志说明进程因为内存耗尽而被操作系统强制杀掉(OOMKilled),对应的退出码是 137,即 SIG"
129
- },
130
- {
131
- "q": 5,
132
- "rep": 1,
133
- "version": "0.1.11",
134
- "chars": 556,
135
- "lines": 9,
136
- "errors": 0,
137
- "warns": 2,
138
- "firstLine": "OOMKilled exit code 137 means the process was killed by the "
139
- },
140
- {
141
- "q": 6,
142
- "rep": 1,
143
- "version": "0.1.10",
144
- "chars": 71,
145
- "lines": 1,
146
- "errors": 0,
147
- "warns": 0,
148
- "firstLine": "第一步:运行 `vue-upgrade` 命令扫描你的 Vue 2 项目,它会生成一份报告,列出需要手动修复的兼容性问题"
149
- },
150
- {
151
- "q": 6,
152
- "rep": 1,
153
- "version": "0.1.11",
154
- "chars": 524,
155
- "lines": 11,
156
- "errors": 0,
157
- "warns": 1,
158
- "firstLine": "**第一步:跑通 `vue-migration-build`(迁移构建版),把所有兼容模式警告清零。**"
159
- },
160
- {
161
- "q": 7,
162
- "rep": 1,
163
- "version": "0.1.10",
164
- "chars": 420,
165
- "lines": 9,
166
- "errors": 0,
167
- "warns": 1,
168
- "firstLine": "结论:WebAssembly 目前最适合浏览器内的计算密集型任务,以及服务器端的轻量级沙箱与插件扩展;不适合替代 Jav"
169
- },
170
- {
171
- "q": 7,
172
- "rep": 1,
173
- "version": "0.1.11",
174
- "chars": 420,
175
- "lines": 7,
176
- "errors": 0,
177
- "warns": 2,
178
- "firstLine": "WebAssembly(Wasm)当前最适合以下场景:"
179
- },
180
- {
181
- "q": 8,
182
- "rep": 1,
183
- "version": "0.1.10",
184
- "chars": 803,
185
- "lines": 7,
186
- "errors": 0,
187
- "warns": 1,
188
- "firstLine": "按可能性从高到低排查:"
189
- },
190
- {
191
- "q": 8,
192
- "rep": 1,
193
- "version": "0.1.11",
194
- "chars": 98,
195
- "lines": 1,
196
- "errors": 0,
197
- "warns": 1,
198
- "firstLine": "CPU 100%可能性从高到低排序:1.后台进程/服务异常 2.恶意软件/病毒 3.驱动程序冲突/过时 4.应用程序死循"
199
- },
200
- {
201
- "q": 9,
202
- "rep": 1,
203
- "version": "0.1.10",
204
- "chars": 394,
205
- "lines": 8,
206
- "errors": 0,
207
- "warns": 1,
208
- "firstLine": "Postgres VACUUM 必须定期运行,因为它会回收已删除的行(dead tuple)、更新统计信息、防止表膨胀并"
209
- },
210
- {
211
- "q": 9,
212
- "rep": 1,
213
- "version": "0.1.11",
214
- "chars": 434,
215
- "lines": 6,
216
- "errors": 0,
217
- "warns": 2,
218
- "firstLine": "PostgreSQL 的 **VACUUM**(或自动化的 `autovacuum`)每隔一段时间运行,是为了清理死数据"
219
- },
220
- {
221
- "q": 10,
222
- "rep": 1,
223
- "version": "0.1.10",
224
- "chars": 61,
225
- "lines": 2,
226
- "errors": 0,
227
- "warns": 0,
228
- "firstLine": "没收到要修改的 SQL,所以没法给出改后的索引版本。"
229
- },
230
- {
231
- "q": 10,
232
- "rep": 1,
233
- "version": "0.1.11",
234
- "chars": 22,
235
- "lines": 1,
236
- "errors": 0,
237
- "warns": 0,
238
- "firstLine": "请把 SQL 贴过来,我直接给你改好的版本。"
239
- },
240
- {
241
- "q": 11,
242
- "rep": 1,
243
- "version": "0.1.10",
244
- "chars": 232,
245
- "lines": 3,
246
- "errors": 0,
247
- "warns": 1,
248
- "firstLine": "**502 Bad Gateway**:Nginx 作为代理,从上游服务器(比如后端应用、PHP-FPM)收到了一个它认"
249
- },
250
- {
251
- "q": 11,
252
- "rep": 1,
253
- "version": "0.1.11",
254
- "chars": 619,
255
- "lines": 9,
256
- "errors": 1,
257
- "warns": 1,
258
- "firstLine": "**502 Bad Gateway**:Nginx 作为反向代理,成功连上了上游,但上游返回的响应**不合法或无法解析*"
259
- },
260
- {
261
- "q": 12,
262
- "rep": 1,
263
- "version": "0.1.10",
264
- "chars": 707,
265
- "lines": 12,
266
- "errors": 0,
267
- "warns": 2,
268
- "firstLine": "**结论**:OpenTelemetry 通过统一标准和生态,能将埋点接入成本从“每个项目自建”降低到“统一接入”,适合"
269
- },
270
- {
271
- "q": 12,
272
- "rep": 1,
273
- "version": "0.1.11",
274
- "chars": 51,
275
- "lines": 4,
276
- "errors": 1,
277
- "warns": 1,
278
- "firstLine": "{"
279
- }
280
- ]
281
- }