@lmzhen/dsh-evolution-merge 0.30.16 → 0.30.17
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/lib/index.js +4 -1
- package/lib/types/scan-run.js +2 -0
- package/lib/types/state.js +2 -0
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -345,7 +345,9 @@ async function loadMergeState(io, home) {
|
|
|
345
345
|
async function mutateMergeState(io, home, now, fn) {
|
|
346
346
|
let result;
|
|
347
347
|
await transactIo(io, mergeStatePath(home), (current) => {
|
|
348
|
-
const
|
|
348
|
+
const parsed = parseState(current);
|
|
349
|
+
if (!parsed.ok || parsed.note === "merge-state-forward-only") throw new Error(parsed.note ?? "merge-state-invalid");
|
|
350
|
+
const out = fn(parsed.rows);
|
|
349
351
|
result = out.result;
|
|
350
352
|
return JSON.stringify({
|
|
351
353
|
schemaVersion: 2,
|
|
@@ -1761,6 +1763,7 @@ async function runScan(options) {
|
|
|
1761
1763
|
const stage = options.stage ?? (async () => {});
|
|
1762
1764
|
const candidates = await options.ports.screening(options.signal);
|
|
1763
1765
|
const before = await loadMergeState(options.io, options.home);
|
|
1766
|
+
if (!before.ok) throw new Error(before.note ?? "merge-state-invalid");
|
|
1764
1767
|
const queueBefore = {
|
|
1765
1768
|
verify: 0,
|
|
1766
1769
|
pending: 0,
|
package/lib/types/scan-run.js
CHANGED
|
@@ -37,6 +37,8 @@ export async function runScan(options) {
|
|
|
37
37
|
const stage = options.stage ?? (async () => { });
|
|
38
38
|
const candidates = await options.ports.screening(options.signal);
|
|
39
39
|
const before = await loadMergeState(options.io, options.home);
|
|
40
|
+
if (!before.ok)
|
|
41
|
+
throw new Error(before.note ?? 'merge-state-invalid');
|
|
40
42
|
const queueBefore = { verify: 0, pending: 0, fuse: 0, skipped: 0 };
|
|
41
43
|
for (const row of before.state.rows)
|
|
42
44
|
queueBefore[row.queue] += 1;
|
package/lib/types/state.js
CHANGED
|
@@ -46,6 +46,8 @@ export async function mutateMergeState(io, home, now, fn) {
|
|
|
46
46
|
await transactIo(io, mergeStatePath(home), (current) => {
|
|
47
47
|
ran = true;
|
|
48
48
|
const parsed = parseState(current);
|
|
49
|
+
if (!parsed.ok || parsed.note === 'merge-state-forward-only')
|
|
50
|
+
throw new Error(parsed.note ?? 'merge-state-invalid');
|
|
49
51
|
const out = fn(parsed.rows);
|
|
50
52
|
result = out.result;
|
|
51
53
|
return JSON.stringify({ schemaVersion: MERGE_STATE_VERSION, rows: out.rows }, null, 2);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-merge",
|
|
3
3
|
"description": "Skill auto-merge domain: screening, two-round authoring, queues and commit orchestration (community build)",
|
|
4
|
-
"version": "0.30.
|
|
4
|
+
"version": "0.30.17",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-core": "^0.30.
|
|
31
|
-
"@lmzhen/dsh-evolution-merge-engine": "^0.30.
|
|
30
|
+
"@lmzhen/dsh-evolution-core": "^0.30.17",
|
|
31
|
+
"@lmzhen/dsh-evolution-merge-engine": "^0.30.17"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@deepseek-ai/cordis": "^4.0.5"
|