@nitra/cursor 1.35.2 → 1.35.4
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.35.4] - 2026-05-30
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- fix: відновити for-loop із body.length у computeLineOffsets (String.prototype.entries не існує)
|
|
8
|
+
|
|
9
|
+
## [1.35.3] - 2026-05-30
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- test: ізолювати listShellScriptPaths git-test через withTmpDir + git init (під Stryker sandbox-копія репо не git-дерево, через що тест блокував dry-run і не давав оновити mutation.json)
|
|
14
|
+
|
|
3
15
|
## [1.35.2] - 2026-05-30
|
|
4
16
|
|
|
5
17
|
### Fixed
|
package/package.json
CHANGED
|
@@ -128,14 +128,12 @@ export function renderMarkdown(rows, allowedGaps = []) {
|
|
|
128
128
|
gapsByFile.get(gap.file).push(gap)
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
lines.push('', '## Allowed gaps', '')
|
|
132
|
-
lines.push(`> LLM-класифікатор виключив ${allowedGaps.length} survived мутант(ів) зі знаменника mutation score.`)
|
|
133
|
-
lines.push('> Категорії: equivalent (поведінково еквівалентний), defensive (impossible state), glue/wrapper (integration test покриває).')
|
|
131
|
+
lines.push('', '## Allowed gaps', '', `> LLM-класифікатор виключив ${allowedGaps.length} survived мутант(ів) зі знаменника mutation score.`, '> Категорії: equivalent (поведінково еквівалентний), defensive (impossible state), glue/wrapper (integration test покриває).')
|
|
134
132
|
|
|
135
133
|
for (const [file, gaps] of gapsByFile) {
|
|
136
134
|
lines.push('', `### ${file}`, '', '| Line | Mutant | Verdict | Confidence | Reason |', '| --- | --- | --- | --- | --- |')
|
|
137
135
|
for (const { mutant, verdict } of gaps) {
|
|
138
|
-
const sanitizedReason = verdict.reason.replaceAll('|',
|
|
136
|
+
const sanitizedReason = verdict.reason.replaceAll('|', String.raw`\|`).replaceAll('\n', ' ')
|
|
139
137
|
lines.push(
|
|
140
138
|
`| ${mutant.line} | \`${mutant.original}\` → \`${mutant.replacement}\` | ${verdict.verdict} | ${verdict.confidence.toFixed(2)} | ${sanitizedReason} |`
|
|
141
139
|
)
|
|
@@ -114,10 +114,10 @@ async function classifyOne(client, group, mutant, cwd, retryDelayMs) {
|
|
|
114
114
|
})
|
|
115
115
|
const text = response?.content?.[0]?.text ?? ''
|
|
116
116
|
return parseVerdict(text)
|
|
117
|
-
} catch (
|
|
118
|
-
lastError =
|
|
117
|
+
} catch (error) {
|
|
118
|
+
lastError = error
|
|
119
119
|
if (attempt < MAX_RETRIES && retryDelayMs > 0) {
|
|
120
|
-
await setTimeout(retryDelayMs *
|
|
120
|
+
await setTimeout(retryDelayMs * 2 ** attempt)
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -27,7 +27,7 @@ export const VerdictSchema = z.object({
|
|
|
27
27
|
export function parseVerdict(rawText) {
|
|
28
28
|
const jsonStart = rawText.indexOf('{')
|
|
29
29
|
const jsonEnd = rawText.lastIndexOf('}')
|
|
30
|
-
if (jsonStart
|
|
30
|
+
if (jsonStart === -1 || jsonEnd === -1) {
|
|
31
31
|
throw new Error('No JSON object found in LLM response')
|
|
32
32
|
}
|
|
33
33
|
const json = JSON.parse(rawText.slice(jsonStart, jsonEnd + 1))
|