@linzumi/cli 1.0.188 → 1.0.189
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.md +1 -1
- package/dist/impl-res/index.js +1 -1
- package/dist/impl-ts/index.js +245 -245
- package/package.json +1 -1
- package/scripts/build-core-supervisor-parity-oracle.mjs +34 -2
package/package.json
CHANGED
|
@@ -164,10 +164,24 @@ async function runSupervisionCaseInner(caseInput) {
|
|
|
164
164
|
caseInput.ownEntryPath === null
|
|
165
165
|
? undefined
|
|
166
166
|
: (caseInput.ownEntryPath ?? initialEntryPath),
|
|
167
|
-
spawnChild: ({
|
|
167
|
+
spawnChild: ({
|
|
168
|
+
entryPath,
|
|
169
|
+
childArgs: spawnArgs,
|
|
170
|
+
onExit,
|
|
171
|
+
onSpawnError,
|
|
172
|
+
generation,
|
|
173
|
+
}) => {
|
|
168
174
|
const index = children.length;
|
|
169
175
|
const pid = 4200 + index;
|
|
170
|
-
const record = {
|
|
176
|
+
const record = {
|
|
177
|
+
index,
|
|
178
|
+
pid,
|
|
179
|
+
alive: true,
|
|
180
|
+
onExit,
|
|
181
|
+
onSpawnError,
|
|
182
|
+
generation,
|
|
183
|
+
sendOk: true,
|
|
184
|
+
};
|
|
171
185
|
children.push(record);
|
|
172
186
|
trace.push({
|
|
173
187
|
t: 'spawn',
|
|
@@ -284,6 +298,24 @@ async function runSupervisionCaseInner(caseInput) {
|
|
|
284
298
|
}
|
|
285
299
|
break;
|
|
286
300
|
}
|
|
301
|
+
case 'spawnErrorNewest': {
|
|
302
|
+
// Behavioral oracle for
|
|
303
|
+
// :machine-liveness/respawn-failures-stay-loud-and-retrying.
|
|
304
|
+
const alive = aliveChildren();
|
|
305
|
+
const target = alive[alive.length - 1];
|
|
306
|
+
if (target === undefined) {
|
|
307
|
+
trace.push({ t: 'no_child', op: op.op });
|
|
308
|
+
} else {
|
|
309
|
+
target.alive = false;
|
|
310
|
+
trace.push({
|
|
311
|
+
t: 'spawn_error',
|
|
312
|
+
child: target.index,
|
|
313
|
+
message: op.message,
|
|
314
|
+
});
|
|
315
|
+
target.onSpawnError(new Error(op.message));
|
|
316
|
+
}
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
287
319
|
case 'exitNewest':
|
|
288
320
|
case 'exitOldest': {
|
|
289
321
|
const alive = aliveChildren();
|