@sublang/slc 0.16.4 → 0.16.5
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/dist/verify-coverage.d.ts.map +1 -1
- package/dist/verify-coverage.js +29 -10
- package/dist/verify-coverage.js.map +1 -1
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +10 -6
- package/dist/verify.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-coverage.d.ts","sourceRoot":"","sources":["../src/verify-coverage.ts"],"names":[],"mappings":"AA8BA,OAAO,EAkBL,KAAK,iBAAiB,EACvB,MAAM,aAAa,CAAC;AAErB,sEAAsE;AACtE,eAAO,MAAM,aAAa,YAAY,CAAC;AAgBvC,iFAAiF;AACjF,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,cAGC;CACF;AAyDD,6DAA6D;AAC7D,UAAU,WAAW;IACnB,MAAM,EAAE,iBAAiB,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,OAAO,CAAC,eAAe,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,WAAW,CAAC;IAC3E,mEAAmE;IACnE,eAAe,CAAC,EAAE;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACjC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,CAAC;IACF,4EAA4E;IAC5E,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;AAyBD,UAAU,qBAAqB;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAA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ACtB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;CACxB,GAAG,MAAM,CA8BT;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAgCnD"}
|
package/dist/verify-coverage.js
CHANGED
|
@@ -1385,10 +1385,10 @@ function probeGuardAssignment(guard, fixedEvent, payloads, extraValues, options
|
|
|
1385
1385
|
const descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
|
|
1386
1386
|
if (tag === 'c:' && typeof prop === 'string')
|
|
1387
1387
|
contextRead(prop);
|
|
1388
|
-
if (
|
|
1389
|
-
tag !== 'c:' &&
|
|
1388
|
+
if (tag !== 'c:' &&
|
|
1390
1389
|
typeof prop === 'string' &&
|
|
1391
1390
|
descriptor === undefined) {
|
|
1391
|
+
// Ordinary descriptor reads guide values without inventing one.
|
|
1392
1392
|
reads.add(`${tag}${prop}`);
|
|
1393
1393
|
enumerated.add(tag);
|
|
1394
1394
|
noteShapeField(tag, prop);
|
|
@@ -2228,6 +2228,19 @@ function captainPredecessorPlan(machine, target, playbooks, refs, captains) {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
return undefined;
|
|
2230
2230
|
}
|
|
2231
|
+
/** The direct interrupt required by the retained one-child legacy driver. */
|
|
2232
|
+
function captainPredecessorDrive(machine, predecessor, refs, values) {
|
|
2233
|
+
const entryRef = predecessor.entry?.captain.ref ?? predecessor.playbook.ref;
|
|
2234
|
+
const entryId = predecessor.entry === undefined
|
|
2235
|
+
? interruptTargetForRef(predecessor.playbook.ref, predecessor.playbook.ref.stableId)
|
|
2236
|
+
: captainInterruptTarget(predecessor.entry.captain);
|
|
2237
|
+
return interruptDriveForRef(machine, refs, entryRef, entryId, values);
|
|
2238
|
+
}
|
|
2239
|
+
function unavailableCaptainPredecessorDrive(machine, captain, refs, captains, playbooks, values = []) {
|
|
2240
|
+
const predecessor = captainPredecessorPlan(machine, captain, playbooks, refs, captains);
|
|
2241
|
+
return (predecessor !== undefined &&
|
|
2242
|
+
!captainPredecessorDrive(machine, predecessor, refs, values).satisfiable);
|
|
2243
|
+
}
|
|
2231
2244
|
/**
|
|
2232
2245
|
* Finds a controller path from a hub event to an acting state. Controller-only
|
|
2233
2246
|
* intermediate states are entered through earlier Captain results rather than
|
|
@@ -2399,11 +2412,7 @@ function captainProbeActor(machine, captain, result, gate, refs, captains, playb
|
|
|
2399
2412
|
let childUsed = false;
|
|
2400
2413
|
const actorId = invocationActorId(machine, predecessor.playbook);
|
|
2401
2414
|
const dynamic = dynamicPlaybookFields(predecessor.playbook);
|
|
2402
|
-
const
|
|
2403
|
-
const entryId = predecessor.entry === undefined
|
|
2404
|
-
? interruptTargetForRef(predecessor.playbook.ref, predecessor.playbook.ref.stableId)
|
|
2405
|
-
: captainInterruptTarget(predecessor.entry.captain);
|
|
2406
|
-
const drive = interruptDriveForRef(machine, refs, entryRef, entryId, interruptValues);
|
|
2415
|
+
const drive = captainPredecessorDrive(machine, predecessor, refs, interruptValues);
|
|
2407
2416
|
if (!drive.satisfiable)
|
|
2408
2417
|
return undefined;
|
|
2409
2418
|
const actor = makeActor(machine, (input) => {
|
|
@@ -2812,7 +2821,15 @@ export function fsmCoverageTestTimeout(fsmModule) {
|
|
|
2812
2821
|
entryEvents.delete(INTERRUPT_EVENT);
|
|
2813
2822
|
const entrySettles = entryEvents.size * SETTLE_MS;
|
|
2814
2823
|
let captainSettles = 0;
|
|
2815
|
-
|
|
2824
|
+
// Each ordinary dispatch may inspect two child-output seeds per predecessor
|
|
2825
|
+
// arm, then the selected legacy predecessor's required interrupt drive.
|
|
2826
|
+
let guardProbeCalls = rootInterruptProbes +
|
|
2827
|
+
(controller
|
|
2828
|
+
? 0
|
|
2829
|
+
: captains.length *
|
|
2830
|
+
(1 +
|
|
2831
|
+
2 *
|
|
2832
|
+
playbooks.reduce((n, p) => n + transitionArms(p.invocation.onDone).length, 0)));
|
|
2816
2833
|
let pathSearches = controller
|
|
2817
2834
|
? 0
|
|
2818
2835
|
: playbooks.reduce((total, playbook) => total +
|
|
@@ -2838,7 +2855,8 @@ export function fsmCoverageTestTimeout(fsmModule) {
|
|
|
2838
2855
|
if (!controller &&
|
|
2839
2856
|
(rootInterruptProbes === 0 ||
|
|
2840
2857
|
(captain.binding.actor !== 'script' &&
|
|
2841
|
-
!interruptDriveForRef(machine, refs, captain.ref, captainInterruptTarget(captain)).satisfiable)
|
|
2858
|
+
!interruptDriveForRef(machine, refs, captain.ref, captainInterruptTarget(captain)).satisfiable) ||
|
|
2859
|
+
unavailableCaptainPredecessorDrive(machine, captain, refs, captains, playbooks))) {
|
|
2842
2860
|
pathSearches +=
|
|
2843
2861
|
resultKeys.length +
|
|
2844
2862
|
(resultKeys.includes(NEEDS_BOSS_REPLY) ? 1 : 0) +
|
|
@@ -3176,7 +3194,8 @@ async function runFsmCoverage(fsmModule, sourceText) {
|
|
|
3176
3194
|
if (!isController &&
|
|
3177
3195
|
(!canJump ||
|
|
3178
3196
|
(captain.binding.actor !== 'script' &&
|
|
3179
|
-
!interruptDriveForRef(machine, refs, captain.ref, captainInterruptTarget(captain), sourceCandidates).satisfiable)
|
|
3197
|
+
!interruptDriveForRef(machine, refs, captain.ref, captainInterruptTarget(captain), sourceCandidates).satisfiable) ||
|
|
3198
|
+
unavailableCaptainPredecessorDrive(machine, captain, refs, captains, playbooks, sourceCandidates))) {
|
|
3180
3199
|
findings.push(...(await probeNonPreemptiveActor(machine, captain, refs, captains, playbooks, [...stateCandidates, ...sourceCandidates])));
|
|
3181
3200
|
continue;
|
|
3182
3201
|
}
|