dsh-ptc-plus 0.3.2 → 0.4.2
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.en.md +63 -80
- package/README.md +63 -80
- package/assets/ptc-plus-bindings-en.png +0 -0
- package/assets/ptc-plus-bindings-zh.png +0 -0
- package/assets/ptc-plus-repair-en.png +0 -0
- package/assets/ptc-plus-repair-zh.png +0 -0
- package/assets/ptc-plus-repl-workspace-en.png +0 -0
- package/assets/ptc-plus-repl-workspace-zh.png +0 -0
- package/assets/ptc-plus-settings-en.png +0 -0
- package/assets/ptc-plus-settings-zh.png +0 -0
- package/client.js +30827 -742
- package/compiler-amaro.cjs +5 -0
- package/compiler-amaro.cjs.map +6 -0
- package/compiler-asset-124f80c1bba92ff5fe79cfec6e8ad518f476de4a42514cae3919538887f510e8.txt +1 -0
- package/compiler-assets.json +3 -0
- package/compiler-core.cjs +556 -0
- package/compiler-core.cjs.map +6 -0
- package/compiler-platform.cjs +2 -0
- package/compiler-platform.cjs.map +6 -0
- package/compiler-typescript.cjs +388 -0
- package/compiler-typescript.cjs.map +6 -0
- package/docs/README.md +7 -0
- package/docs/adr/0004-declare-program-bindings-at-the-host.md +1 -1
- package/docs/adr/0006-rewrite-module-syntax-with-an-ast.md +5 -3
- package/docs/adr/0007-separate-worker-transport-from-session-semantics.md +1 -1
- package/docs/adr/0009-bound-expensive-acceptance-default.md +2 -0
- package/docs/adr/0010-session-log-derived-recovery-tips.md +59 -5
- package/docs/adr/0011-isolate-the-local-recovery-tip-provider.md +1 -1
- package/docs/adr/0012-preserve-mixed-destructuring-initialization.md +3 -1
- package/docs/adr/0013-isolate-repl-redeclaration-convenience.md +3 -1
- package/docs/adr/0014-persist-cell-rewrite-policy.md +6 -2
- package/docs/adr/0015-preserve-source-positions-through-rewrites.md +1 -1
- package/docs/adr/0016-archive-resolved-review-findings.md +1 -1
- package/docs/adr/0017-track-the-latest-dsh-public-surface.md +49 -0
- package/docs/adr/0018-use-versioned-fixture-for-ab-benchmark.md +3 -3
- package/docs/adr/0019-plugin-settings-and-kill-switch.md +5 -3
- package/docs/adr/0020-optional-cordis-tools-in-ptc-mode.md +2 -2
- package/docs/adr/0021-separate-host-bootstrap-from-session-runtime.md +12 -0
- package/docs/adr/0023-global-user-bindings.md +104 -0
- package/docs/adr/0024-repl-console-observation.md +33 -0
- package/docs/adr/0025-use-versioned-logical-binding-identities.md +119 -0
- package/docs/adr/0026-persist-the-delivery-verdict-against-the-verified-candidate.md +21 -0
- package/docs/adr/0027-run-the-session-kernel-in-a-killable-helper-process.md +37 -0
- package/docs/adr/0028-attach-to-the-host-ptc-execution-seam.md +103 -0
- package/docs/adr/0029-keep-plugin-unavailability-out-of-the-host-agent-lifecycle.md +27 -0
- package/docs/adr/0030-serve-both-typert-codec-generations-from-one-codec.md +27 -0
- package/docs/architecture.md +77 -21
- package/docs/binding-review-placement-design.md +200 -0
- package/docs/capability-projection.md +1 -1
- package/docs/client-ui.md +95 -19
- package/docs/durability-design.md +28 -10
- package/docs/evaluation.md +78 -6
- package/docs/installation.md +41 -6
- package/docs/publishing.md +5 -3
- package/docs/runtime-reference.md +76 -25
- package/docs/semantic-validation.md +29 -0
- package/docs/stateful-binding-updates-proposal.md +759 -0
- package/docs/user-bindings.en.md +66 -0
- package/docs/user-bindings.md +66 -0
- package/docs/value-wire.md +3 -3
- package/docs/verification-optimization-work.md +41 -0
- package/docs/verification.md +71 -0
- package/index.js +369 -92
- package/internal/ast-traversal.js +5 -2
- package/internal/async-local-storage-intrinsics.js +38 -0
- package/internal/binding-declaration-contract.js +8 -0
- package/internal/binding-descriptors.js +1 -0
- package/internal/binding-pattern-traversal.js +25 -0
- package/internal/binding-pattern.js +26 -29
- package/internal/binding-source-analysis.js +708 -0
- package/internal/binding-update-policy.js +72 -0
- package/internal/bounded-worker-round.js +56 -0
- package/internal/callable-definition-environment.js +42 -0
- package/internal/callable-source-catalog.js +129 -0
- package/internal/callable-source-encoding.js +47 -0
- package/internal/callable-source-facts.js +459 -0
- package/internal/callable-source-format.js +2 -0
- package/internal/callable-source-lowering.js +123 -0
- package/internal/cell-analysis-contract.js +25 -0
- package/internal/cell-analysis.js +253 -290
- package/internal/cell-completion.js +15 -0
- package/internal/cell-error.js +7 -0
- package/internal/cell-parser.js +66 -0
- package/internal/cell-rewriter.js +3 -677
- package/internal/commonjs-export-evidence.js +63 -0
- package/internal/commonjs-source-evidence.js +72 -0
- package/internal/compiler-amaro.cjs +2 -0
- package/internal/compiler-compression.js +12 -0
- package/internal/compiler-data.js +58 -0
- package/internal/compiler-descriptors.js +54 -0
- package/internal/compiler-dynamic-cache.js +48 -0
- package/internal/compiler-entry.js +35 -0
- package/internal/compiler-generated-names.js +17 -0
- package/internal/compiler-intrinsics.js +50 -0
- package/internal/compiler-module-links.js +37 -0
- package/internal/compiler-operations.js +61 -0
- package/internal/compiler-platform-factory.js +84 -0
- package/internal/compiler-platform.js +136 -0
- package/internal/compiler-record-roles.js +53 -0
- package/internal/compiler-region-output.js +259 -0
- package/internal/compiler-resource-lowering.js +103 -0
- package/internal/compiler-scope-facts.js +115 -0
- package/internal/compiler-service.js +109 -0
- package/internal/compiler-source-cache.js +32 -0
- package/internal/compiler-source-pieces.js +93 -0
- package/internal/compiler-source-regions.js +132 -0
- package/internal/compiler-storage-source.js +54 -0
- package/internal/compiler-text.js +15 -0
- package/internal/compiler-typescript.cjs +2 -0
- package/internal/config-spec.js +83 -27
- package/internal/cordis-tools-owner.js +130 -21
- package/internal/diagnostic.js +27 -1
- package/internal/direct-surface-owner.js +76 -23
- package/internal/dynamic-binding-evidence.js +16 -0
- package/internal/dynamic-environment-compiler.js +779 -0
- package/internal/dynamic-environment-integration.js +91 -0
- package/internal/dynamic-environment-runtime.js +383 -0
- package/internal/dynamic-native-calls.js +153 -0
- package/internal/dynamic-native-runtime.js +262 -0
- package/internal/dynamic-scope-analysis.js +90 -0
- package/internal/edit-transport-owner.js +27 -2
- package/internal/execution-seam-compat.js +193 -0
- package/internal/failure-reporting.js +136 -28
- package/internal/host-rpc.js +66 -0
- package/internal/isolated-worker.js +555 -0
- package/internal/kernel-child.js +139 -0
- package/internal/kernel-worker.js +1179 -233
- package/internal/language-semantics.js +14 -0
- package/internal/legacy-binding-catalog.js +48 -0
- package/internal/legacy-cell-analysis.js +600 -0
- package/internal/legacy-cell-parser.js +50 -0
- package/internal/legacy-cell-rewriter.js +631 -0
- package/internal/legacy-repl-convenience.js +291 -0
- package/internal/managed-module-operations.js +170 -0
- package/internal/module-compilation.js +322 -0
- package/internal/module-runtime-platform.js +19 -0
- package/internal/module-transform-contract.js +42 -0
- package/internal/native-await-declarations.js +68 -0
- package/internal/native-root-compilation.js +54 -0
- package/internal/native-root-dynamic.js +67 -0
- package/internal/record-utils.js +24 -15
- package/internal/recovery-tips.js +27 -15
- package/internal/rejected-cell-editor.js +13 -8
- package/internal/repl-convenience.js +2 -289
- package/internal/repl-memory-projection.js +81 -12
- package/internal/repl-observation-interest.js +70 -0
- package/internal/repl-rewrite-contract.js +6 -0
- package/internal/repl-scope-normalizer.js +2091 -0
- package/internal/repl-value-observer.js +117 -0
- package/internal/rpc-contract.js +52 -0
- package/internal/runtime-bridge-owner.js +172 -28
- package/internal/runtime-config.js +48 -52
- package/internal/runtime-contexts.js +82 -10
- package/internal/runtime-intrinsics.js +101 -0
- package/internal/runtime-messages.js +111 -0
- package/internal/session-cell-executor.js +402 -87
- package/internal/session-journal-recovery.js +684 -0
- package/internal/session-journal-schema.js +123 -0
- package/internal/session-journal.js +199 -654
- package/internal/session-log-view.js +42 -9
- package/internal/session-runtime.js +257 -95
- package/internal/session-state.js +247 -71
- package/internal/source-position-map.js +230 -71
- package/internal/stateful-module-compiler.js +154 -0
- package/internal/stateful-module-runtime.js +303 -0
- package/internal/stateful-root-compiler.js +600 -0
- package/internal/stateful-root-runtime.js +340 -0
- package/internal/typert-codec-compat.js +28 -0
- package/internal/typescript-transform.js +31 -0
- package/internal/user-binding-authoring.js +70 -0
- package/internal/user-binding-console-worker.js +244 -0
- package/internal/user-binding-console.js +148 -0
- package/internal/user-binding-draft-projection.js +335 -0
- package/internal/user-binding-model-context.js +31 -0
- package/internal/user-binding-runner.js +56 -0
- package/internal/user-bindings-owner.js +1065 -0
- package/internal/user-bindings-store.js +293 -0
- package/internal/user-bindings.js +361 -0
- package/internal/value-wire-schema.js +28 -0
- package/internal/value-wire.js +130 -91
- package/internal/worker-client.js +57 -67
- package/internal/worker-cwd-virtualization.js +80 -53
- package/internal/worker-environment.js +65 -0
- package/internal/worker-output-relay.js +29 -0
- package/internal/worker-repl-realm.js +134 -0
- package/internal/worker-shutdown.js +14 -0
- package/package.json +76 -7
- package/src/client-activity.js +95 -53
- package/src/client-authoring-view.js +580 -0
- package/src/client-binding-review.js +230 -0
- package/src/client-bindings-data.js +29 -0
- package/src/client-catalog.js +127 -0
- package/src/client-code-editor.js +84 -0
- package/src/client-console.js +112 -0
- package/src/client-copy.js +370 -0
- package/src/client-feature-gates.js +62 -0
- package/src/client-host-compat.js +150 -0
- package/src/client-indicator-view.js +267 -0
- package/src/client-repl-view.js +292 -0
- package/src/client-rpc.js +20 -0
- package/src/client-settings-view.js +221 -0
- package/src/client-styles.js +106 -0
- package/src/client-tool-view.js +108 -0
- package/src/client-transport.js +159 -0
- package/src/client-workbench.js +521 -0
- package/src/client.js +233 -615
package/src/client-activity.js
CHANGED
|
@@ -1,27 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import {
|
|
2
|
+
JOURNAL_VERSIONS,
|
|
3
|
+
STATUSES as JOURNAL_STATUSES,
|
|
4
|
+
BINDING_MODES,
|
|
5
|
+
JOURNAL_FIELDS,
|
|
6
|
+
LANGUAGE_SEMANTICS_JOURNAL_FIELDS,
|
|
7
|
+
PER_NAME_JOURNAL_FIELDS,
|
|
8
|
+
LANGUAGE_SEMANTICS_JOURNAL_VERSION,
|
|
9
|
+
WHOLE_ENTRY_JOURNAL_FIELDS,
|
|
10
|
+
PER_NAME_USER_BINDINGS_JOURNAL_VERSION,
|
|
11
|
+
normalizeJournalUserBindingNames,
|
|
12
|
+
FINGERPRINT_REUSE_JOURNAL_FIELDS,
|
|
13
|
+
RELATIONLESS_JOURNAL_FIELDS,
|
|
14
|
+
PREDECESSOR_JOURNAL_FIELDS,
|
|
15
|
+
LEGACY_JOURNAL_FIELDS,
|
|
16
|
+
BINDING_POLICY_FIELDS,
|
|
17
|
+
REWRITE_POLICY_FIELDS,
|
|
18
|
+
MODULE_SEMANTICS_FIELDS,
|
|
19
|
+
LEGACY_MODULE_SEMANTICS_FIELDS,
|
|
20
|
+
VERSIONED_BINDING_REUSE_JOURNAL_VERSION,
|
|
21
|
+
IMPORT_EXPRESSION_BOUNDARIES,
|
|
22
|
+
DEFAULT_EXPORT_BINDINGS,
|
|
23
|
+
CALL_SUCCESS_FIELDS,
|
|
24
|
+
CALL_ERROR_FIELDS,
|
|
25
|
+
OPERATION_FIELDS,
|
|
26
|
+
RETURN_FIELDS,
|
|
27
|
+
THROW_FIELDS,
|
|
28
|
+
ERROR_FIELDS,
|
|
29
|
+
EDIT_TARGET_FIELDS,
|
|
30
|
+
DERIVED_RUN_FIELDS,
|
|
31
|
+
RECOVERY_BOUNDARY_FIELDS,
|
|
32
|
+
REWRITE_FIELDS,
|
|
33
|
+
REWRITE_KINDS,
|
|
34
|
+
USER_BINDINGS_REUSE_POLICIES,
|
|
35
|
+
} from '../internal/session-journal-schema.js'
|
|
36
|
+
import { normalizeLanguageSemantics } from '../internal/language-semantics.js'
|
|
37
|
+
import { normalizeModuleTransform } from '../internal/module-transform-contract.js'
|
|
38
|
+
import {
|
|
39
|
+
VALUE_CODEC,
|
|
40
|
+
DEFAULT_VALUE_LIMITS,
|
|
41
|
+
VALUE_ENVELOPE_FIELDS,
|
|
42
|
+
VALUE_OBJECT_FIELDS,
|
|
43
|
+
VALUE_ARRAY_FIELDS,
|
|
44
|
+
VALUE_UNDEFINED_FIELDS,
|
|
45
|
+
VALUE_NUMBER_FIELDS,
|
|
46
|
+
VALUE_BIGINT_FIELDS,
|
|
47
|
+
VALUE_REFERENCE_FIELDS,
|
|
48
|
+
} from '../internal/value-wire-schema.js'
|
|
49
|
+
|
|
25
50
|
const DIAGNOSTIC_FIELDS = new Set([
|
|
26
51
|
'code', 'severity', 'phase', 'message', 'stateEffect', 'dispatchState',
|
|
27
52
|
'source', 'cause', 'help',
|
|
@@ -33,8 +58,6 @@ const SEVERITIES = new Set(['error', 'warning', 'note'])
|
|
|
33
58
|
const PHASES = new Set(['parse', 'preflight', 'execute', 'tool-dispatch', 'replay', 'recover'])
|
|
34
59
|
const STATE_EFFECTS = new Set(['unchanged', 'partially-applied', 'rolled-back', 'unknown'])
|
|
35
60
|
const DISPATCH_STATES = new Set(['not-dispatched', 'dispatched', 'completed', 'unknown'])
|
|
36
|
-
const REWRITE_FIELDS = new Set(['kind', 'description', 'source'])
|
|
37
|
-
const REWRITE_KINDS = new Set(['import', 'redeclaration', 'export'])
|
|
38
61
|
const REWRITE_POLICY_BY_KIND = Object.freeze({
|
|
39
62
|
import: 'autoRewriteImports',
|
|
40
63
|
export: 'autoStripExports',
|
|
@@ -42,21 +65,14 @@ const REWRITE_POLICY_BY_KIND = Object.freeze({
|
|
|
42
65
|
const MIXED_REDECLARATION = 'split a mixed top-level declaration while preserving native pattern initialization'
|
|
43
66
|
const FUNCTION_REDECLARATION = 'reassigned an existing top-level function declaration for REPL continuity'
|
|
44
67
|
const CLASS_REDECLARATION = 'reassigned an existing top-level class declaration for REPL continuity'
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const VALUE_BIGINT_FIELDS = new Set(['tag', 'value'])
|
|
54
|
-
const VALUE_REFERENCE_FIELDS = new Set(['tag', 'index'])
|
|
55
|
-
const MAX_VALUE_NODES = 100_000
|
|
56
|
-
const MAX_VALUE_EDGES = 1_000_000
|
|
57
|
-
const MAX_ARRAY_LENGTH = 1_000_000
|
|
58
|
-
const MAX_BIGINT_DIGITS = 100_000
|
|
59
|
-
const MAX_STRING_BYTES = 64 * 1024 * 1024
|
|
68
|
+
// Presentation validation stays bounded independently of configured runtime budgets.
|
|
69
|
+
const {
|
|
70
|
+
maxNodes: MAX_VALUE_NODES,
|
|
71
|
+
maxEdges: MAX_VALUE_EDGES,
|
|
72
|
+
maxArrayLength: MAX_ARRAY_LENGTH,
|
|
73
|
+
maxBigIntDigits: MAX_BIGINT_DIGITS,
|
|
74
|
+
maxStringBytes: MAX_STRING_BYTES,
|
|
75
|
+
} = DEFAULT_VALUE_LIMITS
|
|
60
76
|
const textEncoder = new TextEncoder()
|
|
61
77
|
|
|
62
78
|
function isRecord(value) {
|
|
@@ -165,7 +181,7 @@ function isValidValueAtom(value, state) {
|
|
|
165
181
|
}
|
|
166
182
|
|
|
167
183
|
function isValidValueWire(value) {
|
|
168
|
-
if (!hasExactOrderedFields(value, VALUE_ENVELOPE_FIELDS) || value.codec !==
|
|
184
|
+
if (!hasExactOrderedFields(value, VALUE_ENVELOPE_FIELDS) || value.codec !== VALUE_CODEC
|
|
169
185
|
|| !Array.isArray(value.nodes) || value.nodes.length > MAX_VALUE_NODES) return false
|
|
170
186
|
const state = {
|
|
171
187
|
nodeCount: value.nodes.length,
|
|
@@ -223,9 +239,11 @@ function isValidBindingPolicy(value) {
|
|
|
223
239
|
&& [...BINDING_POLICY_FIELDS].every(key => typeof value[key] === 'boolean')
|
|
224
240
|
}
|
|
225
241
|
|
|
226
|
-
function isValidModuleSemantics(value) {
|
|
227
|
-
|
|
242
|
+
function isValidModuleSemantics(value, version) {
|
|
243
|
+
const legacy = version <= VERSIONED_BINDING_REUSE_JOURNAL_VERSION
|
|
244
|
+
return hasExactFields(value, legacy ? LEGACY_MODULE_SEMANTICS_FIELDS : MODULE_SEMANTICS_FIELDS)
|
|
228
245
|
&& DEFAULT_EXPORT_BINDINGS.has(value.defaultExportBinding)
|
|
246
|
+
&& (legacy || IMPORT_EXPRESSION_BOUNDARIES.has(value.importExpressionBoundary))
|
|
229
247
|
}
|
|
230
248
|
|
|
231
249
|
function isValidCall(value) {
|
|
@@ -268,16 +286,42 @@ function isReadableJournalUnchecked(value) {
|
|
|
268
286
|
if (!isRecord(value) || !JOURNAL_VERSIONS.has(value.version) || !JOURNAL_STATUSES.has(value.status)) {
|
|
269
287
|
return false
|
|
270
288
|
}
|
|
271
|
-
const predecessor = value.version
|
|
272
|
-
const fields = value.version === 1
|
|
289
|
+
const predecessor = value.version < 4
|
|
290
|
+
const fields = value.version === 1
|
|
291
|
+
? LEGACY_JOURNAL_FIELDS
|
|
292
|
+
: predecessor
|
|
293
|
+
? PREDECESSOR_JOURNAL_FIELDS
|
|
294
|
+
: value.version === 4 ? RELATIONLESS_JOURNAL_FIELDS
|
|
295
|
+
: value.version === 5 ? FINGERPRINT_REUSE_JOURNAL_FIELDS
|
|
296
|
+
: value.version < PER_NAME_USER_BINDINGS_JOURNAL_VERSION ? WHOLE_ENTRY_JOURNAL_FIELDS
|
|
297
|
+
: value.version < LANGUAGE_SEMANTICS_JOURNAL_VERSION ? PER_NAME_JOURNAL_FIELDS
|
|
298
|
+
: value.version === LANGUAGE_SEMANTICS_JOURNAL_VERSION ? LANGUAGE_SEMANTICS_JOURNAL_FIELDS : JOURNAL_FIELDS
|
|
273
299
|
const required = predecessor
|
|
274
300
|
? ['version', 'bindingMode', 'status', 'calls', 'operations', 'diagnostics']
|
|
275
301
|
: ['version', 'bindingPolicy', 'rewritePolicy', 'moduleSemantics', 'status', 'calls', 'operations', 'diagnostics']
|
|
276
|
-
if (value.version !== 1 && value.version
|
|
302
|
+
if (value.version !== 1 && value.version < 4) required.push('rewritePolicy')
|
|
303
|
+
if (value.version >= 5) required.push('userBindingsFingerprint')
|
|
304
|
+
if (value.version >= VERSIONED_BINDING_REUSE_JOURNAL_VERSION) required.push('userBindingsReusePolicy')
|
|
305
|
+
if (value.version >= PER_NAME_USER_BINDINGS_JOURNAL_VERSION) {
|
|
306
|
+
required.push('userBindingsShadowPolicy', 'userBindingNames')
|
|
307
|
+
normalizeJournalUserBindingNames(value)
|
|
308
|
+
}
|
|
309
|
+
if (value.version >= LANGUAGE_SEMANTICS_JOURNAL_VERSION) {
|
|
310
|
+
required.push('languageSemantics')
|
|
311
|
+
normalizeLanguageSemantics(value.languageSemantics)
|
|
312
|
+
}
|
|
313
|
+
if (value.version > LANGUAGE_SEMANTICS_JOURNAL_VERSION) {
|
|
314
|
+
required.push('moduleTransform')
|
|
315
|
+
normalizeModuleTransform(value.moduleTransform, value.languageSemantics)
|
|
316
|
+
}
|
|
277
317
|
if (!hasClosedFields(value, fields, required)
|
|
278
318
|
|| (predecessor && !BINDING_MODES.has(value.bindingMode))
|
|
279
|
-
|| (value.version
|
|
280
|
-
|| (value.version
|
|
319
|
+
|| (value.version >= 4 && !isValidBindingPolicy(value.bindingPolicy))
|
|
320
|
+
|| (value.version >= 4 && !isValidModuleSemantics(value.moduleSemantics, value.version))
|
|
321
|
+
|| (value.version >= VERSIONED_BINDING_REUSE_JOURNAL_VERSION && !USER_BINDINGS_REUSE_POLICIES.has(value.userBindingsReusePolicy))
|
|
322
|
+
|| (value.version >= 5 && value.userBindingsFingerprint !== null
|
|
323
|
+
&& (typeof value.userBindingsFingerprint !== 'string'
|
|
324
|
+
|| !/^[a-f0-9]{64}$/.test(value.userBindingsFingerprint)))
|
|
281
325
|
|| (value.version !== 1 && !isValidRewritePolicy(value.rewritePolicy))
|
|
282
326
|
|| !Array.isArray(value.calls) || !value.calls.every(isValidCall)
|
|
283
327
|
|| !Array.isArray(value.operations) || !value.operations.every(isValidOperation)
|
|
@@ -303,9 +347,7 @@ function isReadableJournal(value) {
|
|
|
303
347
|
}
|
|
304
348
|
}
|
|
305
349
|
|
|
306
|
-
//
|
|
307
|
-
// intentionally separate from the schema reader so future counters cannot
|
|
308
|
-
// accidentally treat an unknown status or partial arrays as activity.
|
|
350
|
+
// Unknown statuses and incomplete journal arrays cannot establish feature evidence.
|
|
309
351
|
function isCountableJournal(value) {
|
|
310
352
|
return isReadableJournal(value)
|
|
311
353
|
&& JOURNAL_STATUSES.has(value.status)
|
|
@@ -322,7 +364,7 @@ function isValidRewrites(value, journal) {
|
|
|
322
364
|
&& REWRITE_KINDS.has(rewrite.kind)
|
|
323
365
|
&& (rewrite.kind === 'redeclaration'
|
|
324
366
|
? (rewrite.description === FUNCTION_REDECLARATION || rewrite.description === CLASS_REDECLARATION)
|
|
325
|
-
? journal.version
|
|
367
|
+
? journal.version >= 4 && isValidBindingPolicy(journal.bindingPolicy)
|
|
326
368
|
&& journal.bindingPolicy.functionClassRedeclarations === true
|
|
327
369
|
: journal.rewritePolicy.autoSplitRedeclarations === true
|
|
328
370
|
: journal.rewritePolicy[REWRITE_POLICY_BY_KIND[rewrite.kind]] === true)
|