@ttsc/unplugin 0.35.0 → 0.36.1
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/core/transform/cache/TtscCachedProjectTransform.d.cts +22 -0
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.mts +22 -0
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.ts +22 -0
- package/lib/core/transform/deliverCachedTransform.js +4 -1
- package/lib/core/transform/deliverCachedTransform.js.map +1 -1
- package/lib/core/transform/deliverCachedTransform.mjs +4 -1
- package/lib/core/transform/deliverCachedTransform.mjs.map +1 -1
- package/lib/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.d.cts +16 -0
- package/lib/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.d.mts +16 -0
- package/lib/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.d.ts +16 -0
- package/lib/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.js +28 -0
- package/lib/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.js.map +1 -0
- package/lib/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.mjs +26 -0
- package/lib/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.mjs.map +1 -0
- package/lib/core/transform/generation/TtscGenerationProofFailures.d.cts +19 -0
- package/lib/core/transform/generation/TtscGenerationProofFailures.d.mts +19 -0
- package/lib/core/transform/generation/TtscGenerationProofFailures.d.ts +19 -0
- package/lib/core/transform/generation/canDeliverCompilerSnapshot.d.cts +25 -0
- package/lib/core/transform/generation/canDeliverCompilerSnapshot.d.mts +25 -0
- package/lib/core/transform/generation/canDeliverCompilerSnapshot.d.ts +25 -0
- package/lib/core/transform/generation/canDeliverCompilerSnapshot.js +42 -0
- package/lib/core/transform/generation/canDeliverCompilerSnapshot.js.map +1 -0
- package/lib/core/transform/generation/canDeliverCompilerSnapshot.mjs +40 -0
- package/lib/core/transform/generation/canDeliverCompilerSnapshot.mjs.map +1 -0
- package/lib/core/transform/generation/captureTransformGeneration.js +35 -11
- package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs +35 -11
- package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
- package/lib/core/transform/generation/captureTransformSourceHashes.d.cts +8 -6
- package/lib/core/transform/generation/captureTransformSourceHashes.d.mts +8 -6
- package/lib/core/transform/generation/captureTransformSourceHashes.d.ts +8 -6
- package/lib/core/transform/generation/captureTransformSourceHashes.js +16 -8
- package/lib/core/transform/generation/captureTransformSourceHashes.js.map +1 -1
- package/lib/core/transform/generation/captureTransformSourceHashes.mjs +16 -8
- package/lib/core/transform/generation/captureTransformSourceHashes.mjs.map +1 -1
- package/lib/core/transform/generation/compilerSnapshotFailureClassifier.d.cts +18 -0
- package/lib/core/transform/generation/compilerSnapshotFailureClassifier.d.mts +18 -0
- package/lib/core/transform/generation/compilerSnapshotFailureClassifier.d.ts +18 -0
- package/lib/core/transform/generation/compilerSnapshotFailureClassifier.js +75 -0
- package/lib/core/transform/generation/compilerSnapshotFailureClassifier.js.map +1 -0
- package/lib/core/transform/generation/compilerSnapshotFailureClassifier.mjs +73 -0
- package/lib/core/transform/generation/compilerSnapshotFailureClassifier.mjs.map +1 -0
- package/lib/core/transform/generation/createGenerationProofFailures.d.cts +3 -3
- package/lib/core/transform/generation/createGenerationProofFailures.d.mts +3 -3
- package/lib/core/transform/generation/createGenerationProofFailures.d.ts +3 -3
- package/lib/core/transform/generation/createGenerationProofFailures.js +11 -4
- package/lib/core/transform/generation/createGenerationProofFailures.js.map +1 -1
- package/lib/core/transform/generation/createGenerationProofFailures.mjs +11 -4
- package/lib/core/transform/generation/createGenerationProofFailures.mjs.map +1 -1
- package/lib/core/transform/generation/mergeGenerationProofFailures.d.cts +4 -4
- package/lib/core/transform/generation/mergeGenerationProofFailures.d.mts +4 -4
- package/lib/core/transform/generation/mergeGenerationProofFailures.d.ts +4 -4
- package/lib/core/transform/generation/mergeGenerationProofFailures.js +11 -4
- package/lib/core/transform/generation/mergeGenerationProofFailures.js.map +1 -1
- package/lib/core/transform/generation/mergeGenerationProofFailures.mjs +11 -4
- package/lib/core/transform/generation/mergeGenerationProofFailures.mjs.map +1 -1
- package/lib/core/transform/generation/recordGenerationProofFailure.d.cts +4 -4
- package/lib/core/transform/generation/recordGenerationProofFailure.d.mts +4 -4
- package/lib/core/transform/generation/recordGenerationProofFailure.d.ts +4 -4
- package/lib/core/transform/generation/recordGenerationProofFailure.js +8 -4
- package/lib/core/transform/generation/recordGenerationProofFailure.js.map +1 -1
- package/lib/core/transform/generation/recordGenerationProofFailure.mjs +8 -4
- package/lib/core/transform/generation/recordGenerationProofFailure.mjs.map +1 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.cts +11 -7
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.mts +11 -7
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.ts +11 -7
- package/lib/core/transform/generation/selectTransformAttemptDisposition.js +11 -7
- package/lib/core/transform/generation/selectTransformAttemptDisposition.js.map +1 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs +11 -7
- package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs.map +1 -1
- package/lib/core/transform/generation/transformProject.js +1 -0
- package/lib/core/transform/generation/transformProject.js.map +1 -1
- package/lib/core/transform/generation/transformProject.mjs +1 -0
- package/lib/core/transform/generation/transformProject.mjs.map +1 -1
- package/lib/core/transform/validation/TtscGenerationProof.d.cts +4 -1
- package/lib/core/transform/validation/TtscGenerationProof.d.mts +4 -1
- package/lib/core/transform/validation/TtscGenerationProof.d.ts +4 -1
- package/lib/core/transform/validation/TtscGenerationProof.js +4 -1
- package/lib/core/transform/validation/TtscGenerationProof.js.map +1 -1
- package/lib/core/transform/validation/TtscGenerationProof.mjs +4 -1
- package/lib/core/transform/validation/TtscGenerationProof.mjs.map +1 -1
- package/lib/core/transform/validation/captureExternalInputSnapshot.js +1 -1
- package/lib/core/transform/validation/captureExternalInputSnapshot.js.map +1 -1
- package/lib/core/transform/validation/captureExternalInputSnapshot.mjs +1 -1
- package/lib/core/transform/validation/captureExternalInputSnapshot.mjs.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs.map +1 -1
- package/lib/core/transform/validation/compilerGraphInputProofFailures.js +1 -1
- package/lib/core/transform/validation/compilerGraphInputProofFailures.js.map +1 -1
- package/lib/core/transform/validation/compilerGraphInputProofFailures.mjs +1 -1
- package/lib/core/transform/validation/compilerGraphInputProofFailures.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCachedSource.d.cts +4 -2
- package/lib/core/transform/validation/matchesCachedSource.d.mts +4 -2
- package/lib/core/transform/validation/matchesCachedSource.d.ts +4 -2
- package/lib/core/transform/validation/matchesCachedSource.js +6 -2
- package/lib/core/transform/validation/matchesCachedSource.js.map +1 -1
- package/lib/core/transform/validation/matchesCachedSource.mjs +6 -2
- package/lib/core/transform/validation/matchesCachedSource.mjs.map +1 -1
- package/lib/core/transform/watch/evidencedWatchInput.d.cts +1 -1
- package/lib/core/transform/watch/evidencedWatchInput.d.mts +1 -1
- package/lib/core/transform/watch/evidencedWatchInput.d.ts +1 -1
- package/lib/core/transform/watch/evidencedWatchInput.js +6 -2
- package/lib/core/transform/watch/evidencedWatchInput.js.map +1 -1
- package/lib/core/transform/watch/evidencedWatchInput.mjs +6 -2
- package/lib/core/transform/watch/evidencedWatchInput.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/transform/cache/TtscCachedProjectTransform.ts +24 -0
- package/src/core/transform/deliverCachedTransform.ts +5 -1
- package/src/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.ts +31 -0
- package/src/core/transform/generation/TtscGenerationProofFailures.ts +21 -0
- package/src/core/transform/generation/canDeliverCompilerSnapshot.ts +50 -0
- package/src/core/transform/generation/captureTransformGeneration.ts +50 -13
- package/src/core/transform/generation/captureTransformSourceHashes.ts +19 -8
- package/src/core/transform/generation/compilerSnapshotFailureClassifier.ts +80 -0
- package/src/core/transform/generation/createGenerationProofFailures.ts +13 -4
- package/src/core/transform/generation/mergeGenerationProofFailures.ts +13 -4
- package/src/core/transform/generation/recordGenerationProofFailure.ts +8 -4
- package/src/core/transform/generation/selectTransformAttemptDisposition.ts +14 -7
- package/src/core/transform/generation/transformProject.ts +1 -0
- package/src/core/transform/validation/TtscGenerationProof.ts +4 -1
- package/src/core/transform/validation/captureExternalInputSnapshot.ts +3 -1
- package/src/core/transform/validation/captureUniversalHostInputValidation.ts +3 -1
- package/src/core/transform/validation/compilerGraphInputProofFailures.ts +3 -1
- package/src/core/transform/validation/matchesCachedSource.ts +7 -2
- package/src/core/transform/watch/evidencedWatchInput.ts +7 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
2
|
import type { ITtscProjectMembershipPolicy } from "../../tsconfig/ITtscProjectMembershipPolicy.cjs";
|
|
3
3
|
import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint.cjs";
|
|
4
|
+
import type { TtscGenerationProofFailure } from "../generation/TtscGenerationProofFailure.cjs";
|
|
4
5
|
import type { TtscProjectDirectorySnapshot } from "../project/TtscProjectDirectorySnapshot.cjs";
|
|
5
6
|
import type { TtscProjectMutationTracker } from "../tracker/TtscProjectMutationTracker.cjs";
|
|
6
7
|
import type { TtscCompilerArgumentsWitness } from "../tsconfig/TtscCompilerArgumentsWitness.cjs";
|
|
@@ -17,6 +18,8 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
|
|
|
17
18
|
* generation before later first deliveries may share that proof. Deliveries
|
|
18
19
|
* reaching source-baseline comparison still cost a text hash and may require
|
|
19
20
|
* disk comparison when they diverge; unrelated modules can return before it.
|
|
21
|
+
* Captured native snapshots may instead retain original-pass delivery only,
|
|
22
|
+
* without claiming the edited disk still matches or granting future reuse.
|
|
20
23
|
* Persistent graph-bearing requests may use derived-input validation only with
|
|
21
24
|
* qualified membership and universal authority; unavailable narrow proof uses
|
|
22
25
|
* the complete recorded snapshot.
|
|
@@ -42,6 +45,25 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
|
|
|
42
45
|
* retained state at runtime.
|
|
43
46
|
*/
|
|
44
47
|
export interface TtscCachedProjectTransform {
|
|
48
|
+
/**
|
|
49
|
+
* Coherent captured output whose disk freshness was lost; never shared or
|
|
50
|
+
* persisted.
|
|
51
|
+
*/
|
|
52
|
+
snapshotDeliveryOnly?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Borrowed generation-owned classifier, absent without a captured native
|
|
55
|
+
* view.
|
|
56
|
+
*
|
|
57
|
+
* @evidence contracts/common.md#principled-implementation The sticky compatibility verdict accounts for every occurrence before diagnostic truncation; after its first refusal no later occurrence can restore delivery authority.
|
|
58
|
+
* @evidence contracts/common.md#clear-and-simple-design Collectors borrow one generation classifier rather than rebuilding its recorded-input index.
|
|
59
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The callback records compatibility only; callers still require complete producer proof and never infer cache freshness from it.
|
|
60
|
+
* @evidence contracts/common.md#meaningful-documentation The member states optionality and ownership, while the generation classifier documents actual path and kind admission.
|
|
61
|
+
* @evidence contracts/portability.md#os-neutral-implementation The callback receives native lexical witness paths and delegates their interpretation to the generation's classifier.
|
|
62
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms This signature declares no runtime computation; the classifier implementation owns its index and lookup costs.
|
|
63
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This signature declares no memo; generation capture owns sharing the callback.
|
|
64
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This signature acquires no resource; generation capture owns the borrowed closure's lifetime.
|
|
65
|
+
*/
|
|
66
|
+
snapshotFailureClassifier?: (failure: TtscGenerationProofFailure) => boolean;
|
|
45
67
|
/** Native settings learned under this capture's validated config-policy basis. */
|
|
46
68
|
compilerMembership?: TtscCompilerMembershipHint;
|
|
47
69
|
/** Actual captured invocation, retained for persisted host-cache proofs. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
2
|
import type { ITtscProjectMembershipPolicy } from "../../tsconfig/ITtscProjectMembershipPolicy.mjs";
|
|
3
3
|
import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint.mjs";
|
|
4
|
+
import type { TtscGenerationProofFailure } from "../generation/TtscGenerationProofFailure.mjs";
|
|
4
5
|
import type { TtscProjectDirectorySnapshot } from "../project/TtscProjectDirectorySnapshot.mjs";
|
|
5
6
|
import type { TtscProjectMutationTracker } from "../tracker/TtscProjectMutationTracker.mjs";
|
|
6
7
|
import type { TtscCompilerArgumentsWitness } from "../tsconfig/TtscCompilerArgumentsWitness.mjs";
|
|
@@ -17,6 +18,8 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
|
|
|
17
18
|
* generation before later first deliveries may share that proof. Deliveries
|
|
18
19
|
* reaching source-baseline comparison still cost a text hash and may require
|
|
19
20
|
* disk comparison when they diverge; unrelated modules can return before it.
|
|
21
|
+
* Captured native snapshots may instead retain original-pass delivery only,
|
|
22
|
+
* without claiming the edited disk still matches or granting future reuse.
|
|
20
23
|
* Persistent graph-bearing requests may use derived-input validation only with
|
|
21
24
|
* qualified membership and universal authority; unavailable narrow proof uses
|
|
22
25
|
* the complete recorded snapshot.
|
|
@@ -42,6 +45,25 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
|
|
|
42
45
|
* retained state at runtime.
|
|
43
46
|
*/
|
|
44
47
|
export interface TtscCachedProjectTransform {
|
|
48
|
+
/**
|
|
49
|
+
* Coherent captured output whose disk freshness was lost; never shared or
|
|
50
|
+
* persisted.
|
|
51
|
+
*/
|
|
52
|
+
snapshotDeliveryOnly?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Borrowed generation-owned classifier, absent without a captured native
|
|
55
|
+
* view.
|
|
56
|
+
*
|
|
57
|
+
* @evidence contracts/common.md#principled-implementation The sticky compatibility verdict accounts for every occurrence before diagnostic truncation; after its first refusal no later occurrence can restore delivery authority.
|
|
58
|
+
* @evidence contracts/common.md#clear-and-simple-design Collectors borrow one generation classifier rather than rebuilding its recorded-input index.
|
|
59
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The callback records compatibility only; callers still require complete producer proof and never infer cache freshness from it.
|
|
60
|
+
* @evidence contracts/common.md#meaningful-documentation The member states optionality and ownership, while the generation classifier documents actual path and kind admission.
|
|
61
|
+
* @evidence contracts/portability.md#os-neutral-implementation The callback receives native lexical witness paths and delegates their interpretation to the generation's classifier.
|
|
62
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms This signature declares no runtime computation; the classifier implementation owns its index and lookup costs.
|
|
63
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This signature declares no memo; generation capture owns sharing the callback.
|
|
64
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This signature acquires no resource; generation capture owns the borrowed closure's lifetime.
|
|
65
|
+
*/
|
|
66
|
+
snapshotFailureClassifier?: (failure: TtscGenerationProofFailure) => boolean;
|
|
45
67
|
/** Native settings learned under this capture's validated config-policy basis. */
|
|
46
68
|
compilerMembership?: TtscCompilerMembershipHint;
|
|
47
69
|
/** Actual captured invocation, retained for persisted host-cache proofs. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
2
|
import type { ITtscProjectMembershipPolicy } from "../../tsconfig/ITtscProjectMembershipPolicy";
|
|
3
3
|
import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint";
|
|
4
|
+
import type { TtscGenerationProofFailure } from "../generation/TtscGenerationProofFailure";
|
|
4
5
|
import type { TtscProjectDirectorySnapshot } from "../project/TtscProjectDirectorySnapshot";
|
|
5
6
|
import type { TtscProjectMutationTracker } from "../tracker/TtscProjectMutationTracker";
|
|
6
7
|
import type { TtscCompilerArgumentsWitness } from "../tsconfig/TtscCompilerArgumentsWitness";
|
|
@@ -17,6 +18,8 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
|
|
|
17
18
|
* generation before later first deliveries may share that proof. Deliveries
|
|
18
19
|
* reaching source-baseline comparison still cost a text hash and may require
|
|
19
20
|
* disk comparison when they diverge; unrelated modules can return before it.
|
|
21
|
+
* Captured native snapshots may instead retain original-pass delivery only,
|
|
22
|
+
* without claiming the edited disk still matches or granting future reuse.
|
|
20
23
|
* Persistent graph-bearing requests may use derived-input validation only with
|
|
21
24
|
* qualified membership and universal authority; unavailable narrow proof uses
|
|
22
25
|
* the complete recorded snapshot.
|
|
@@ -42,6 +45,25 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
|
|
|
42
45
|
* retained state at runtime.
|
|
43
46
|
*/
|
|
44
47
|
export interface TtscCachedProjectTransform {
|
|
48
|
+
/**
|
|
49
|
+
* Coherent captured output whose disk freshness was lost; never shared or
|
|
50
|
+
* persisted.
|
|
51
|
+
*/
|
|
52
|
+
snapshotDeliveryOnly?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Borrowed generation-owned classifier, absent without a captured native
|
|
55
|
+
* view.
|
|
56
|
+
*
|
|
57
|
+
* @evidence contracts/common.md#principled-implementation The sticky compatibility verdict accounts for every occurrence before diagnostic truncation; after its first refusal no later occurrence can restore delivery authority.
|
|
58
|
+
* @evidence contracts/common.md#clear-and-simple-design Collectors borrow one generation classifier rather than rebuilding its recorded-input index.
|
|
59
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The callback records compatibility only; callers still require complete producer proof and never infer cache freshness from it.
|
|
60
|
+
* @evidence contracts/common.md#meaningful-documentation The member states optionality and ownership, while the generation classifier documents actual path and kind admission.
|
|
61
|
+
* @evidence contracts/portability.md#os-neutral-implementation The callback receives native lexical witness paths and delegates their interpretation to the generation's classifier.
|
|
62
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms This signature declares no runtime computation; the classifier implementation owns its index and lookup costs.
|
|
63
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This signature declares no memo; generation capture owns sharing the callback.
|
|
64
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This signature acquires no resource; generation capture owns the borrowed closure's lifetime.
|
|
65
|
+
*/
|
|
66
|
+
snapshotFailureClassifier?: (failure: TtscGenerationProofFailure) => boolean;
|
|
45
67
|
/** Native settings learned under this capture's validated config-policy basis. */
|
|
46
68
|
compilerMembership?: TtscCompilerMembershipHint;
|
|
47
69
|
/** Actual captured invocation, retained for persisted host-cache proofs. */
|
|
@@ -37,6 +37,8 @@ function deliverCachedTransform(props) {
|
|
|
37
37
|
const { cache, cached, generation, key, epoch, file, source, hooks, selection, } = props;
|
|
38
38
|
try {
|
|
39
39
|
TtscGenerationProof.TtscGenerationProof.admitFreshOnly(cached, cache, key, generation, epoch, hooks);
|
|
40
|
+
if (cached.snapshotDeliveryOnly === true)
|
|
41
|
+
hooks?.markVolatile?.();
|
|
40
42
|
reportSuccessDiagnostics.reportSuccessDiagnostics(cached, epoch);
|
|
41
43
|
let output;
|
|
42
44
|
try {
|
|
@@ -63,7 +65,8 @@ function deliverCachedTransform(props) {
|
|
|
63
65
|
return createTransformResult.createTransformResult(file, source, output);
|
|
64
66
|
}
|
|
65
67
|
catch (error) {
|
|
66
|
-
if (cached.freshDeliveryOnly === true
|
|
68
|
+
if (cached.freshDeliveryOnly === true ||
|
|
69
|
+
cached.snapshotDeliveryOnly === true)
|
|
67
70
|
evictGeneration.evictGeneration(cache, key, generation);
|
|
68
71
|
throw error;
|
|
69
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliverCachedTransform.js","sources":["../../../src/core/transform/deliverCachedTransform.ts"],"sourcesContent":[null],"names":["TtscGenerationProof","reportSuccessDiagnostics","selectOrEvict","TtscMissingProgramOutputError","notifyFailedGenerationInputs","reportMissingProgramOutput","notifyWatchInputs","markCachedSourceServed","notifyVolatileDelivery","createTransformResult","evictGeneration"],"mappings":";;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,sBAAsB,CAAC,KAUtC,EAAA;IACC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,GAAG,EACH,KAAK,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,GACV,GAAG,KAAK;AACT,IAAA,IAAI;AACF,QAAAA,uCAAmB,CAAC,cAAc,CAChC,MAAM,EACN,KAAK,EACL,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,CACN;AACD,QAAAC,iDAAwB,CAAC,MAAM,EAAE,KAAK,CAAC;AACvC,QAAA,IAAI,MAAM;AACV,QAAA,IAAI;YACF,MAAM,GAAGC,2BAAa,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE;gBACpD,IAAI;gBACJ,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC1B,aAAA,CAAC;QACJ;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,IAAI,EAAE,KAAK,YAAYC,2DAA6B,CAAC,EAAE;gBACrDC,yDAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AAC5D,gBAAA,MAAM,KAAK;YACb;AACA,YAAAC,qDAA0B,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;YAChDC,mCAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AACjD,YAAAC,6CAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;AACpC,YAAA,OAAO,SAAS;QAClB;QACAD,mCAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AACjD,QAAAC,6CAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;AACpC,QAAAC,6CAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC;QAC3C,OAAOC,2CAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;IACpD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,
|
|
1
|
+
{"version":3,"file":"deliverCachedTransform.js","sources":["../../../src/core/transform/deliverCachedTransform.ts"],"sourcesContent":[null],"names":["TtscGenerationProof","reportSuccessDiagnostics","selectOrEvict","TtscMissingProgramOutputError","notifyFailedGenerationInputs","reportMissingProgramOutput","notifyWatchInputs","markCachedSourceServed","notifyVolatileDelivery","createTransformResult","evictGeneration"],"mappings":";;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,sBAAsB,CAAC,KAUtC,EAAA;IACC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,GAAG,EACH,KAAK,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,GACV,GAAG,KAAK;AACT,IAAA,IAAI;AACF,QAAAA,uCAAmB,CAAC,cAAc,CAChC,MAAM,EACN,KAAK,EACL,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,CACN;AACD,QAAA,IAAI,MAAM,CAAC,oBAAoB,KAAK,IAAI;AAAE,YAAA,KAAK,EAAE,YAAY,IAAI;AACjE,QAAAC,iDAAwB,CAAC,MAAM,EAAE,KAAK,CAAC;AACvC,QAAA,IAAI,MAAM;AACV,QAAA,IAAI;YACF,MAAM,GAAGC,2BAAa,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE;gBACpD,IAAI;gBACJ,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC1B,aAAA,CAAC;QACJ;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,IAAI,EAAE,KAAK,YAAYC,2DAA6B,CAAC,EAAE;gBACrDC,yDAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AAC5D,gBAAA,MAAM,KAAK;YACb;AACA,YAAAC,qDAA0B,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;YAChDC,mCAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AACjD,YAAAC,6CAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;AACpC,YAAA,OAAO,SAAS;QAClB;QACAD,mCAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AACjD,QAAAC,6CAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;AACpC,QAAAC,6CAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC;QAC3C,OAAOC,2CAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;IACpD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,IACE,MAAM,CAAC,iBAAiB,KAAK,IAAI;YACjC,MAAM,CAAC,oBAAoB,KAAK,IAAI;AAEpC,YAAAC,+BAAe,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,CAAC;AACzC,QAAA,MAAM,KAAK;IACb;AACF;;;;"}
|
|
@@ -35,6 +35,8 @@ function deliverCachedTransform(props) {
|
|
|
35
35
|
const { cache, cached, generation, key, epoch, file, source, hooks, selection, } = props;
|
|
36
36
|
try {
|
|
37
37
|
TtscGenerationProof.admitFreshOnly(cached, cache, key, generation, epoch, hooks);
|
|
38
|
+
if (cached.snapshotDeliveryOnly === true)
|
|
39
|
+
hooks?.markVolatile?.();
|
|
38
40
|
reportSuccessDiagnostics(cached, epoch);
|
|
39
41
|
let output;
|
|
40
42
|
try {
|
|
@@ -61,7 +63,8 @@ function deliverCachedTransform(props) {
|
|
|
61
63
|
return createTransformResult(file, source, output);
|
|
62
64
|
}
|
|
63
65
|
catch (error) {
|
|
64
|
-
if (cached.freshDeliveryOnly === true
|
|
66
|
+
if (cached.freshDeliveryOnly === true ||
|
|
67
|
+
cached.snapshotDeliveryOnly === true)
|
|
65
68
|
evictGeneration(cache, key, generation);
|
|
66
69
|
throw error;
|
|
67
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliverCachedTransform.mjs","sources":["../../../src/core/transform/deliverCachedTransform.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,sBAAsB,CAAC,KAUtC,EAAA;IACC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,GAAG,EACH,KAAK,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,GACV,GAAG,KAAK;AACT,IAAA,IAAI;AACF,QAAA,mBAAmB,CAAC,cAAc,CAChC,MAAM,EACN,KAAK,EACL,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,CACN;AACD,QAAA,wBAAwB,CAAC,MAAM,EAAE,KAAK,CAAC;AACvC,QAAA,IAAI,MAAM;AACV,QAAA,IAAI;YACF,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE;gBACpD,IAAI;gBACJ,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC1B,aAAA,CAAC;QACJ;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,IAAI,EAAE,KAAK,YAAY,6BAA6B,CAAC,EAAE;gBACrD,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AAC5D,gBAAA,MAAM,KAAK;YACb;AACA,YAAA,0BAA0B,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;YAChD,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AACjD,YAAA,sBAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;AACpC,YAAA,OAAO,SAAS;QAClB;QACA,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AACjD,QAAA,sBAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;AACpC,QAAA,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC;QAC3C,OAAO,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;IACpD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,
|
|
1
|
+
{"version":3,"file":"deliverCachedTransform.mjs","sources":["../../../src/core/transform/deliverCachedTransform.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,sBAAsB,CAAC,KAUtC,EAAA;IACC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,GAAG,EACH,KAAK,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,GACV,GAAG,KAAK;AACT,IAAA,IAAI;AACF,QAAA,mBAAmB,CAAC,cAAc,CAChC,MAAM,EACN,KAAK,EACL,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,CACN;AACD,QAAA,IAAI,MAAM,CAAC,oBAAoB,KAAK,IAAI;AAAE,YAAA,KAAK,EAAE,YAAY,IAAI;AACjE,QAAA,wBAAwB,CAAC,MAAM,EAAE,KAAK,CAAC;AACvC,QAAA,IAAI,MAAM;AACV,QAAA,IAAI;YACF,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE;gBACpD,IAAI;gBACJ,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC1B,aAAA,CAAC;QACJ;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,IAAI,EAAE,KAAK,YAAY,6BAA6B,CAAC,EAAE;gBACrD,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AAC5D,gBAAA,MAAM,KAAK;YACb;AACA,YAAA,0BAA0B,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;YAChD,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AACjD,YAAA,sBAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;AACpC,YAAA,OAAO,SAAS;QAClB;QACA,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;AACjD,QAAA,sBAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;AACpC,QAAA,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC;QAC3C,OAAO,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;IACpD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,IACE,MAAM,CAAC,iBAAiB,KAAK,IAAI;YACjC,MAAM,CAAC,oBAAoB,KAAK,IAAI;AAEpC,YAAA,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,CAAC;AACzC,QAAA,MAAM,KAAK;IACb;AACF;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TtscTransformFilesystemOperations } from "./TtscTransformFilesystemOperations.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Establish that a consumer observes the native input view its compiler used. A
|
|
4
|
+
* copied default table preserves that authority; substituted input operations
|
|
5
|
+
* have no equivalent-view certificate. Watch callbacks do not replace inputs.
|
|
6
|
+
*
|
|
7
|
+
* @evidence contracts/common.md#principled-implementation Every frozen native input capability must retain its reference and native path/case policy must remain selected; this connects the consumer view to native compiler reads before freshness-only delivery.
|
|
8
|
+
* @evidence contracts/common.md#clear-and-simple-design One predicate checks the existing operation table without adding a claimed-equivalence option or probing filesystem contents.
|
|
9
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown wrappers and unavailable capabilities retain ordinary proof rather than borrowing native authority; no plugin, path or test identity determines admission.
|
|
10
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes copied tables, substituted input operations and independent watch callbacks.
|
|
11
|
+
* @evidence contracts/portability.md#os-neutral-implementation Actual native operation references establish input semantics; an explicit path dialect must match the current process and a supplied case-policy implementation remains uncertified. No OS name establishes a volume's case behavior.
|
|
12
|
+
* @evidence contracts/performance.md#efficient-algorithms One fixed native-operation table is enumerated and references are compared; no input paths, source bytes or capabilities are queried.
|
|
13
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The frozen default capabilities are borrowed across calls, while the supplied view is checked afresh without retaining a verdict across possible changes.
|
|
14
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources A fixed call-local entry array follows the synchronous comparison; no input history, callback ownership or native handle is retained.
|
|
15
|
+
*/
|
|
16
|
+
export declare function matchesNativeCompilerSnapshotFilesystem(filesystem: TtscTransformFilesystemOperations): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TtscTransformFilesystemOperations } from "./TtscTransformFilesystemOperations.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Establish that a consumer observes the native input view its compiler used. A
|
|
4
|
+
* copied default table preserves that authority; substituted input operations
|
|
5
|
+
* have no equivalent-view certificate. Watch callbacks do not replace inputs.
|
|
6
|
+
*
|
|
7
|
+
* @evidence contracts/common.md#principled-implementation Every frozen native input capability must retain its reference and native path/case policy must remain selected; this connects the consumer view to native compiler reads before freshness-only delivery.
|
|
8
|
+
* @evidence contracts/common.md#clear-and-simple-design One predicate checks the existing operation table without adding a claimed-equivalence option or probing filesystem contents.
|
|
9
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown wrappers and unavailable capabilities retain ordinary proof rather than borrowing native authority; no plugin, path or test identity determines admission.
|
|
10
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes copied tables, substituted input operations and independent watch callbacks.
|
|
11
|
+
* @evidence contracts/portability.md#os-neutral-implementation Actual native operation references establish input semantics; an explicit path dialect must match the current process and a supplied case-policy implementation remains uncertified. No OS name establishes a volume's case behavior.
|
|
12
|
+
* @evidence contracts/performance.md#efficient-algorithms One fixed native-operation table is enumerated and references are compared; no input paths, source bytes or capabilities are queried.
|
|
13
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The frozen default capabilities are borrowed across calls, while the supplied view is checked afresh without retaining a verdict across possible changes.
|
|
14
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources A fixed call-local entry array follows the synchronous comparison; no input history, callback ownership or native handle is retained.
|
|
15
|
+
*/
|
|
16
|
+
export declare function matchesNativeCompilerSnapshotFilesystem(filesystem: TtscTransformFilesystemOperations): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TtscTransformFilesystemOperations } from "./TtscTransformFilesystemOperations";
|
|
2
|
+
/**
|
|
3
|
+
* Establish that a consumer observes the native input view its compiler used. A
|
|
4
|
+
* copied default table preserves that authority; substituted input operations
|
|
5
|
+
* have no equivalent-view certificate. Watch callbacks do not replace inputs.
|
|
6
|
+
*
|
|
7
|
+
* @evidence contracts/common.md#principled-implementation Every frozen native input capability must retain its reference and native path/case policy must remain selected; this connects the consumer view to native compiler reads before freshness-only delivery.
|
|
8
|
+
* @evidence contracts/common.md#clear-and-simple-design One predicate checks the existing operation table without adding a claimed-equivalence option or probing filesystem contents.
|
|
9
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown wrappers and unavailable capabilities retain ordinary proof rather than borrowing native authority; no plugin, path or test identity determines admission.
|
|
10
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes copied tables, substituted input operations and independent watch callbacks.
|
|
11
|
+
* @evidence contracts/portability.md#os-neutral-implementation Actual native operation references establish input semantics; an explicit path dialect must match the current process and a supplied case-policy implementation remains uncertified. No OS name establishes a volume's case behavior.
|
|
12
|
+
* @evidence contracts/performance.md#efficient-algorithms One fixed native-operation table is enumerated and references are compared; no input paths, source bytes or capabilities are queried.
|
|
13
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The frozen default capabilities are borrowed across calls, while the supplied view is checked afresh without retaining a verdict across possible changes.
|
|
14
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources A fixed call-local entry array follows the synchronous comparison; no input history, callback ownership or native handle is retained.
|
|
15
|
+
*/
|
|
16
|
+
export declare function matchesNativeCompilerSnapshotFilesystem(filesystem: TtscTransformFilesystemOperations): boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var DEFAULT_FILESYSTEM_OPERATIONS = require('./DEFAULT_FILESYSTEM_OPERATIONS.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Establish that a consumer observes the native input view its compiler used. A
|
|
7
|
+
* copied default table preserves that authority; substituted input operations
|
|
8
|
+
* have no equivalent-view certificate. Watch callbacks do not replace inputs.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation Every frozen native input capability must retain its reference and native path/case policy must remain selected; this connects the consumer view to native compiler reads before freshness-only delivery.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design One predicate checks the existing operation table without adding a claimed-equivalence option or probing filesystem contents.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown wrappers and unavailable capabilities retain ordinary proof rather than borrowing native authority; no plugin, path or test identity determines admission.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes copied tables, substituted input operations and independent watch callbacks.
|
|
14
|
+
* @evidence contracts/portability.md#os-neutral-implementation Actual native operation references establish input semantics; an explicit path dialect must match the current process and a supplied case-policy implementation remains uncertified. No OS name establishes a volume's case behavior.
|
|
15
|
+
* @evidence contracts/performance.md#efficient-algorithms One fixed native-operation table is enumerated and references are compared; no input paths, source bytes or capabilities are queried.
|
|
16
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The frozen default capabilities are borrowed across calls, while the supplied view is checked afresh without retaining a verdict across possible changes.
|
|
17
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources A fixed call-local entry array follows the synchronous comparison; no input history, callback ownership or native handle is retained.
|
|
18
|
+
*/
|
|
19
|
+
function matchesNativeCompilerSnapshotFilesystem(filesystem) {
|
|
20
|
+
if (filesystem.caseSensitive !== undefined ||
|
|
21
|
+
(filesystem.platform !== undefined &&
|
|
22
|
+
filesystem.platform !== process.platform))
|
|
23
|
+
return false;
|
|
24
|
+
return Object.entries(DEFAULT_FILESYSTEM_OPERATIONS.DEFAULT_FILESYSTEM_OPERATIONS).every(([name, operation]) => filesystem[name] === operation);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
exports.matchesNativeCompilerSnapshotFilesystem = matchesNativeCompilerSnapshotFilesystem;
|
|
28
|
+
//# sourceMappingURL=matchesNativeCompilerSnapshotFilesystem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchesNativeCompilerSnapshotFilesystem.js","sources":["../../../../src/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.ts"],"sourcesContent":[null],"names":["DEFAULT_FILESYSTEM_OPERATIONS"],"mappings":";;;;AAGA;;;;;;;;;;;;;AAaG;AACG,SAAU,uCAAuC,CACrD,UAA6C,EAAA;AAE7C,IAAA,IACE,UAAU,CAAC,aAAa,KAAK,SAAS;AACtC,SAAC,UAAU,CAAC,QAAQ,KAAK,SAAS;AAChC,YAAA,UAAU,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ,CAAC;AAE3C,QAAA,OAAO,KAAK;IACd,OAAO,MAAM,CAAC,OAAO,CAACA,2DAA6B,CAAC,CAAC,KAAK,CACxD,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,KAChB,UAAU,CAAC,IAA+C,CAAC,KAAK,SAAS,CAC5E;AACH;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DEFAULT_FILESYSTEM_OPERATIONS } from './DEFAULT_FILESYSTEM_OPERATIONS.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Establish that a consumer observes the native input view its compiler used. A
|
|
5
|
+
* copied default table preserves that authority; substituted input operations
|
|
6
|
+
* have no equivalent-view certificate. Watch callbacks do not replace inputs.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation Every frozen native input capability must retain its reference and native path/case policy must remain selected; this connects the consumer view to native compiler reads before freshness-only delivery.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One predicate checks the existing operation table without adding a claimed-equivalence option or probing filesystem contents.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown wrappers and unavailable capabilities retain ordinary proof rather than borrowing native authority; no plugin, path or test identity determines admission.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes copied tables, substituted input operations and independent watch callbacks.
|
|
12
|
+
* @evidence contracts/portability.md#os-neutral-implementation Actual native operation references establish input semantics; an explicit path dialect must match the current process and a supplied case-policy implementation remains uncertified. No OS name establishes a volume's case behavior.
|
|
13
|
+
* @evidence contracts/performance.md#efficient-algorithms One fixed native-operation table is enumerated and references are compared; no input paths, source bytes or capabilities are queried.
|
|
14
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The frozen default capabilities are borrowed across calls, while the supplied view is checked afresh without retaining a verdict across possible changes.
|
|
15
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources A fixed call-local entry array follows the synchronous comparison; no input history, callback ownership or native handle is retained.
|
|
16
|
+
*/
|
|
17
|
+
function matchesNativeCompilerSnapshotFilesystem(filesystem) {
|
|
18
|
+
if (filesystem.caseSensitive !== undefined ||
|
|
19
|
+
(filesystem.platform !== undefined &&
|
|
20
|
+
filesystem.platform !== process.platform))
|
|
21
|
+
return false;
|
|
22
|
+
return Object.entries(DEFAULT_FILESYSTEM_OPERATIONS).every(([name, operation]) => filesystem[name] === operation);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { matchesNativeCompilerSnapshotFilesystem };
|
|
26
|
+
//# sourceMappingURL=matchesNativeCompilerSnapshotFilesystem.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchesNativeCompilerSnapshotFilesystem.mjs","sources":["../../../../src/core/transform/filesystem/matchesNativeCompilerSnapshotFilesystem.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;AAaG;AACG,SAAU,uCAAuC,CACrD,UAA6C,EAAA;AAE7C,IAAA,IACE,UAAU,CAAC,aAAa,KAAK,SAAS;AACtC,SAAC,UAAU,CAAC,QAAQ,KAAK,SAAS;AAChC,YAAA,UAAU,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ,CAAC;AAE3C,QAAA,OAAO,KAAK;IACd,OAAO,MAAM,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC,KAAK,CACxD,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,KAChB,UAAU,CAAC,IAA+C,CAAC,KAAK,SAAS,CAC5E;AACH;;;;"}
|
|
@@ -22,6 +22,25 @@ import type { TtscGenerationProofFailure } from "./TtscGenerationProofFailure.cj
|
|
|
22
22
|
export interface TtscGenerationProofFailures {
|
|
23
23
|
/** Unique witnesses kept, at most `MAX_GENERATION_PROOF_FAILURES`. */
|
|
24
24
|
entries: TtscGenerationProofFailure[];
|
|
25
|
+
/**
|
|
26
|
+
* Complete streaming classification, including witnesses omitted from
|
|
27
|
+
* diagnostics.
|
|
28
|
+
*/
|
|
29
|
+
snapshotCompatible?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Borrowed generation-owned classifier, absent without a captured native
|
|
32
|
+
* view.
|
|
33
|
+
*
|
|
34
|
+
* @evidence contracts/common.md#principled-implementation The sticky compatibility verdict accounts for every occurrence before diagnostic truncation; after its first refusal no later occurrence can restore delivery authority.
|
|
35
|
+
* @evidence contracts/common.md#clear-and-simple-design Collectors borrow one generation classifier rather than rebuilding its recorded-input index.
|
|
36
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The callback records compatibility only; callers still require complete producer proof and never infer cache freshness from it.
|
|
37
|
+
* @evidence contracts/common.md#meaningful-documentation The member states optionality and ownership, while the generation classifier documents actual path and kind admission.
|
|
38
|
+
* @evidence contracts/portability.md#os-neutral-implementation The callback receives native lexical witness paths and delegates their interpretation to the generation's classifier.
|
|
39
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms This signature declares no runtime computation; the classifier implementation owns its index and lookup costs.
|
|
40
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This signature declares no memo; generation capture owns sharing the callback.
|
|
41
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This signature acquires no resource; generation capture owns the borrowed closure's lifetime.
|
|
42
|
+
*/
|
|
43
|
+
snapshotFailureClassifier?: (failure: TtscGenerationProofFailure) => boolean;
|
|
25
44
|
/** Saturated count of further witness occurrences dropped after the bound. */
|
|
26
45
|
omitted: number;
|
|
27
46
|
/**
|
|
@@ -22,6 +22,25 @@ import type { TtscGenerationProofFailure } from "./TtscGenerationProofFailure.mj
|
|
|
22
22
|
export interface TtscGenerationProofFailures {
|
|
23
23
|
/** Unique witnesses kept, at most `MAX_GENERATION_PROOF_FAILURES`. */
|
|
24
24
|
entries: TtscGenerationProofFailure[];
|
|
25
|
+
/**
|
|
26
|
+
* Complete streaming classification, including witnesses omitted from
|
|
27
|
+
* diagnostics.
|
|
28
|
+
*/
|
|
29
|
+
snapshotCompatible?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Borrowed generation-owned classifier, absent without a captured native
|
|
32
|
+
* view.
|
|
33
|
+
*
|
|
34
|
+
* @evidence contracts/common.md#principled-implementation The sticky compatibility verdict accounts for every occurrence before diagnostic truncation; after its first refusal no later occurrence can restore delivery authority.
|
|
35
|
+
* @evidence contracts/common.md#clear-and-simple-design Collectors borrow one generation classifier rather than rebuilding its recorded-input index.
|
|
36
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The callback records compatibility only; callers still require complete producer proof and never infer cache freshness from it.
|
|
37
|
+
* @evidence contracts/common.md#meaningful-documentation The member states optionality and ownership, while the generation classifier documents actual path and kind admission.
|
|
38
|
+
* @evidence contracts/portability.md#os-neutral-implementation The callback receives native lexical witness paths and delegates their interpretation to the generation's classifier.
|
|
39
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms This signature declares no runtime computation; the classifier implementation owns its index and lookup costs.
|
|
40
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This signature declares no memo; generation capture owns sharing the callback.
|
|
41
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This signature acquires no resource; generation capture owns the borrowed closure's lifetime.
|
|
42
|
+
*/
|
|
43
|
+
snapshotFailureClassifier?: (failure: TtscGenerationProofFailure) => boolean;
|
|
25
44
|
/** Saturated count of further witness occurrences dropped after the bound. */
|
|
26
45
|
omitted: number;
|
|
27
46
|
/**
|
|
@@ -22,6 +22,25 @@ import type { TtscGenerationProofFailure } from "./TtscGenerationProofFailure";
|
|
|
22
22
|
export interface TtscGenerationProofFailures {
|
|
23
23
|
/** Unique witnesses kept, at most `MAX_GENERATION_PROOF_FAILURES`. */
|
|
24
24
|
entries: TtscGenerationProofFailure[];
|
|
25
|
+
/**
|
|
26
|
+
* Complete streaming classification, including witnesses omitted from
|
|
27
|
+
* diagnostics.
|
|
28
|
+
*/
|
|
29
|
+
snapshotCompatible?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Borrowed generation-owned classifier, absent without a captured native
|
|
32
|
+
* view.
|
|
33
|
+
*
|
|
34
|
+
* @evidence contracts/common.md#principled-implementation The sticky compatibility verdict accounts for every occurrence before diagnostic truncation; after its first refusal no later occurrence can restore delivery authority.
|
|
35
|
+
* @evidence contracts/common.md#clear-and-simple-design Collectors borrow one generation classifier rather than rebuilding its recorded-input index.
|
|
36
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The callback records compatibility only; callers still require complete producer proof and never infer cache freshness from it.
|
|
37
|
+
* @evidence contracts/common.md#meaningful-documentation The member states optionality and ownership, while the generation classifier documents actual path and kind admission.
|
|
38
|
+
* @evidence contracts/portability.md#os-neutral-implementation The callback receives native lexical witness paths and delegates their interpretation to the generation's classifier.
|
|
39
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms This signature declares no runtime computation; the classifier implementation owns its index and lookup costs.
|
|
40
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This signature declares no memo; generation capture owns sharing the callback.
|
|
41
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This signature acquires no resource; generation capture owns the borrowed closure's lifetime.
|
|
42
|
+
*/
|
|
43
|
+
snapshotFailureClassifier?: (failure: TtscGenerationProofFailure) => boolean;
|
|
25
44
|
/** Saturated count of further witness occurrences dropped after the bound. */
|
|
26
45
|
omitted: number;
|
|
27
46
|
/**
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
|
+
import type { TtscGenerationProofFailures } from "./TtscGenerationProofFailures.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* Separate a coherent local compiler result from proof that disk still matches
|
|
5
|
+
* it. Only recorded compiler inputs and project changes may lose freshness;
|
|
6
|
+
* missing, contradictory or unobserved producer inputs remain refusals. Adopted
|
|
7
|
+
* results must be current on this worker before they can be delivered. The
|
|
8
|
+
* consumer must retain the native input view; a substituted filesystem cannot
|
|
9
|
+
* classify its disagreement with the compiler as a physical source edit.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/common.md#principled-implementation A native shared snapshot ID, matching native consumer input capabilities, internally consistent graph and complete host observation establish current-generation authority; only explicit freshness changes covered by that graph can bypass stabilization.
|
|
12
|
+
* @evidence contracts/common.md#clear-and-simple-design One admission predicate separates delivery from existing cache/publication validation without weakening those validators.
|
|
13
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown failure kinds, incomplete reports, foreign adoptions and producer conflicts cannot become a successful snapshot delivery.
|
|
14
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes local authority, disk freshness and adopted-worker requirements.
|
|
15
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path.resolve maps compiler-relative proof keys to their project anchor; the consumer gate compares actual native input capabilities and explicit path grammar; this predicate infers no case or physical identity from OS names.
|
|
16
|
+
* @evidence contracts/performance.md#efficient-algorithms A fixed native capability comparison establishes the observing view before any summary is trusted. A captured streaming summary then answers without another scan; legacy caller aggregates with no omissions use one recorded-input classifier and a bounded witness scan. Native disk inputs are not reread.
|
|
17
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Delivery permission does not grant cache or publication reuse and is recomputed for each captured result.
|
|
18
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Call-local indexes retain no handle or generation history.
|
|
19
|
+
*/
|
|
20
|
+
export declare function canDeliverCompilerSnapshot(props: {
|
|
21
|
+
result: ITtscCompilerTransformation;
|
|
22
|
+
projectRoot: string;
|
|
23
|
+
failures: TtscGenerationProofFailures;
|
|
24
|
+
adopted: boolean;
|
|
25
|
+
}): boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
|
+
import type { TtscGenerationProofFailures } from "./TtscGenerationProofFailures.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Separate a coherent local compiler result from proof that disk still matches
|
|
5
|
+
* it. Only recorded compiler inputs and project changes may lose freshness;
|
|
6
|
+
* missing, contradictory or unobserved producer inputs remain refusals. Adopted
|
|
7
|
+
* results must be current on this worker before they can be delivered. The
|
|
8
|
+
* consumer must retain the native input view; a substituted filesystem cannot
|
|
9
|
+
* classify its disagreement with the compiler as a physical source edit.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/common.md#principled-implementation A native shared snapshot ID, matching native consumer input capabilities, internally consistent graph and complete host observation establish current-generation authority; only explicit freshness changes covered by that graph can bypass stabilization.
|
|
12
|
+
* @evidence contracts/common.md#clear-and-simple-design One admission predicate separates delivery from existing cache/publication validation without weakening those validators.
|
|
13
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown failure kinds, incomplete reports, foreign adoptions and producer conflicts cannot become a successful snapshot delivery.
|
|
14
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes local authority, disk freshness and adopted-worker requirements.
|
|
15
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path.resolve maps compiler-relative proof keys to their project anchor; the consumer gate compares actual native input capabilities and explicit path grammar; this predicate infers no case or physical identity from OS names.
|
|
16
|
+
* @evidence contracts/performance.md#efficient-algorithms A fixed native capability comparison establishes the observing view before any summary is trusted. A captured streaming summary then answers without another scan; legacy caller aggregates with no omissions use one recorded-input classifier and a bounded witness scan. Native disk inputs are not reread.
|
|
17
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Delivery permission does not grant cache or publication reuse and is recomputed for each captured result.
|
|
18
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Call-local indexes retain no handle or generation history.
|
|
19
|
+
*/
|
|
20
|
+
export declare function canDeliverCompilerSnapshot(props: {
|
|
21
|
+
result: ITtscCompilerTransformation;
|
|
22
|
+
projectRoot: string;
|
|
23
|
+
failures: TtscGenerationProofFailures;
|
|
24
|
+
adopted: boolean;
|
|
25
|
+
}): boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
|
+
import type { TtscGenerationProofFailures } from "./TtscGenerationProofFailures";
|
|
3
|
+
/**
|
|
4
|
+
* Separate a coherent local compiler result from proof that disk still matches
|
|
5
|
+
* it. Only recorded compiler inputs and project changes may lose freshness;
|
|
6
|
+
* missing, contradictory or unobserved producer inputs remain refusals. Adopted
|
|
7
|
+
* results must be current on this worker before they can be delivered. The
|
|
8
|
+
* consumer must retain the native input view; a substituted filesystem cannot
|
|
9
|
+
* classify its disagreement with the compiler as a physical source edit.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/common.md#principled-implementation A native shared snapshot ID, matching native consumer input capabilities, internally consistent graph and complete host observation establish current-generation authority; only explicit freshness changes covered by that graph can bypass stabilization.
|
|
12
|
+
* @evidence contracts/common.md#clear-and-simple-design One admission predicate separates delivery from existing cache/publication validation without weakening those validators.
|
|
13
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown failure kinds, incomplete reports, foreign adoptions and producer conflicts cannot become a successful snapshot delivery.
|
|
14
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes local authority, disk freshness and adopted-worker requirements.
|
|
15
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path.resolve maps compiler-relative proof keys to their project anchor; the consumer gate compares actual native input capabilities and explicit path grammar; this predicate infers no case or physical identity from OS names.
|
|
16
|
+
* @evidence contracts/performance.md#efficient-algorithms A fixed native capability comparison establishes the observing view before any summary is trusted. A captured streaming summary then answers without another scan; legacy caller aggregates with no omissions use one recorded-input classifier and a bounded witness scan. Native disk inputs are not reread.
|
|
17
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Delivery permission does not grant cache or publication reuse and is recomputed for each captured result.
|
|
18
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Call-local indexes retain no handle or generation history.
|
|
19
|
+
*/
|
|
20
|
+
export declare function canDeliverCompilerSnapshot(props: {
|
|
21
|
+
result: ITtscCompilerTransformation;
|
|
22
|
+
projectRoot: string;
|
|
23
|
+
failures: TtscGenerationProofFailures;
|
|
24
|
+
adopted: boolean;
|
|
25
|
+
}): boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var resultFilesystem = require('../cache/resultFilesystem.js');
|
|
4
|
+
var matchesNativeCompilerSnapshotFilesystem = require('../filesystem/matchesNativeCompilerSnapshotFilesystem.js');
|
|
5
|
+
var compilerSnapshotFailureClassifier = require('./compilerSnapshotFailureClassifier.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Separate a coherent local compiler result from proof that disk still matches
|
|
9
|
+
* it. Only recorded compiler inputs and project changes may lose freshness;
|
|
10
|
+
* missing, contradictory or unobserved producer inputs remain refusals. Adopted
|
|
11
|
+
* results must be current on this worker before they can be delivered. The
|
|
12
|
+
* consumer must retain the native input view; a substituted filesystem cannot
|
|
13
|
+
* classify its disagreement with the compiler as a physical source edit.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/common.md#principled-implementation A native shared snapshot ID, matching native consumer input capabilities, internally consistent graph and complete host observation establish current-generation authority; only explicit freshness changes covered by that graph can bypass stabilization.
|
|
16
|
+
* @evidence contracts/common.md#clear-and-simple-design One admission predicate separates delivery from existing cache/publication validation without weakening those validators.
|
|
17
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown failure kinds, incomplete reports, foreign adoptions and producer conflicts cannot become a successful snapshot delivery.
|
|
18
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes local authority, disk freshness and adopted-worker requirements.
|
|
19
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path.resolve maps compiler-relative proof keys to their project anchor; the consumer gate compares actual native input capabilities and explicit path grammar; this predicate infers no case or physical identity from OS names.
|
|
20
|
+
* @evidence contracts/performance.md#efficient-algorithms A fixed native capability comparison establishes the observing view before any summary is trusted. A captured streaming summary then answers without another scan; legacy caller aggregates with no omissions use one recorded-input classifier and a bounded witness scan. Native disk inputs are not reread.
|
|
21
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Delivery permission does not grant cache or publication reuse and is recomputed for each captured result.
|
|
22
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Call-local indexes retain no handle or generation history.
|
|
23
|
+
*/
|
|
24
|
+
function canDeliverCompilerSnapshot(props) {
|
|
25
|
+
const { result, failures } = props;
|
|
26
|
+
if (props.adopted ||
|
|
27
|
+
result.type !== "success" ||
|
|
28
|
+
!result.graph?.compilationSnapshot ||
|
|
29
|
+
!matchesNativeCompilerSnapshotFilesystem.matchesNativeCompilerSnapshotFilesystem(resultFilesystem.resultFilesystem(result)) ||
|
|
30
|
+
result.observationsComplete === false ||
|
|
31
|
+
Object.keys(result.hostInputProofFailures ?? {}).length !== 0 ||
|
|
32
|
+
Object.keys(result.graph.inputProofFailures ?? {}).length !== 0 ||
|
|
33
|
+
failures.entries.length === 0)
|
|
34
|
+
return false;
|
|
35
|
+
if (failures.snapshotCompatible !== undefined)
|
|
36
|
+
return failures.snapshotCompatible;
|
|
37
|
+
const classify = compilerSnapshotFailureClassifier.compilerSnapshotFailureClassifier(result, props.projectRoot);
|
|
38
|
+
return failures.omitted === 0 && failures.entries.every(classify);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
exports.canDeliverCompilerSnapshot = canDeliverCompilerSnapshot;
|
|
42
|
+
//# sourceMappingURL=canDeliverCompilerSnapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canDeliverCompilerSnapshot.js","sources":["../../../../src/core/transform/generation/canDeliverCompilerSnapshot.ts"],"sourcesContent":[null],"names":["matchesNativeCompilerSnapshotFilesystem","resultFilesystem","compilerSnapshotFailureClassifier"],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,0BAA0B,CAAC,KAK1C,EAAA;AACC,IAAA,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK;IAClC,IACE,KAAK,CAAC,OAAO;QACb,MAAM,CAAC,IAAI,KAAK,SAAS;AACzB,QAAA,CAAC,MAAM,CAAC,KAAK,EAAE,mBAAmB;AAClC,QAAA,CAACA,+EAAuC,CAACC,iCAAgB,CAAC,MAAM,CAAC,CAAC;QAClE,MAAM,CAAC,oBAAoB,KAAK,KAAK;AACrC,QAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC;AAC7D,QAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC;AAC/D,QAAA,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;AAE7B,QAAA,OAAO,KAAK;AACd,IAAA,IAAI,QAAQ,CAAC,kBAAkB,KAAK,SAAS;QAC3C,OAAO,QAAQ,CAAC,kBAAkB;IACpC,MAAM,QAAQ,GAAGC,mEAAiC,CAChD,MAAM,EACN,KAAK,CAAC,WAAW,CACjB;AACF,IAAA,OAAO,QAAQ,CAAC,OAAO,KAAK,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;AACnE;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { resultFilesystem } from '../cache/resultFilesystem.mjs';
|
|
2
|
+
import { matchesNativeCompilerSnapshotFilesystem } from '../filesystem/matchesNativeCompilerSnapshotFilesystem.mjs';
|
|
3
|
+
import { compilerSnapshotFailureClassifier } from './compilerSnapshotFailureClassifier.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Separate a coherent local compiler result from proof that disk still matches
|
|
7
|
+
* it. Only recorded compiler inputs and project changes may lose freshness;
|
|
8
|
+
* missing, contradictory or unobserved producer inputs remain refusals. Adopted
|
|
9
|
+
* results must be current on this worker before they can be delivered. The
|
|
10
|
+
* consumer must retain the native input view; a substituted filesystem cannot
|
|
11
|
+
* classify its disagreement with the compiler as a physical source edit.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/common.md#principled-implementation A native shared snapshot ID, matching native consumer input capabilities, internally consistent graph and complete host observation establish current-generation authority; only explicit freshness changes covered by that graph can bypass stabilization.
|
|
14
|
+
* @evidence contracts/common.md#clear-and-simple-design One admission predicate separates delivery from existing cache/publication validation without weakening those validators.
|
|
15
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown failure kinds, incomplete reports, foreign adoptions and producer conflicts cannot become a successful snapshot delivery.
|
|
16
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes local authority, disk freshness and adopted-worker requirements.
|
|
17
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path.resolve maps compiler-relative proof keys to their project anchor; the consumer gate compares actual native input capabilities and explicit path grammar; this predicate infers no case or physical identity from OS names.
|
|
18
|
+
* @evidence contracts/performance.md#efficient-algorithms A fixed native capability comparison establishes the observing view before any summary is trusted. A captured streaming summary then answers without another scan; legacy caller aggregates with no omissions use one recorded-input classifier and a bounded witness scan. Native disk inputs are not reread.
|
|
19
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Delivery permission does not grant cache or publication reuse and is recomputed for each captured result.
|
|
20
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Call-local indexes retain no handle or generation history.
|
|
21
|
+
*/
|
|
22
|
+
function canDeliverCompilerSnapshot(props) {
|
|
23
|
+
const { result, failures } = props;
|
|
24
|
+
if (props.adopted ||
|
|
25
|
+
result.type !== "success" ||
|
|
26
|
+
!result.graph?.compilationSnapshot ||
|
|
27
|
+
!matchesNativeCompilerSnapshotFilesystem(resultFilesystem(result)) ||
|
|
28
|
+
result.observationsComplete === false ||
|
|
29
|
+
Object.keys(result.hostInputProofFailures ?? {}).length !== 0 ||
|
|
30
|
+
Object.keys(result.graph.inputProofFailures ?? {}).length !== 0 ||
|
|
31
|
+
failures.entries.length === 0)
|
|
32
|
+
return false;
|
|
33
|
+
if (failures.snapshotCompatible !== undefined)
|
|
34
|
+
return failures.snapshotCompatible;
|
|
35
|
+
const classify = compilerSnapshotFailureClassifier(result, props.projectRoot);
|
|
36
|
+
return failures.omitted === 0 && failures.entries.every(classify);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { canDeliverCompilerSnapshot };
|
|
40
|
+
//# sourceMappingURL=canDeliverCompilerSnapshot.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canDeliverCompilerSnapshot.mjs","sources":["../../../../src/core/transform/generation/canDeliverCompilerSnapshot.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAOA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,0BAA0B,CAAC,KAK1C,EAAA;AACC,IAAA,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK;IAClC,IACE,KAAK,CAAC,OAAO;QACb,MAAM,CAAC,IAAI,KAAK,SAAS;AACzB,QAAA,CAAC,MAAM,CAAC,KAAK,EAAE,mBAAmB;AAClC,QAAA,CAAC,uCAAuC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAClE,MAAM,CAAC,oBAAoB,KAAK,KAAK;AACrC,QAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC;AAC7D,QAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC;AAC/D,QAAA,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;AAE7B,QAAA,OAAO,KAAK;AACd,IAAA,IAAI,QAAQ,CAAC,kBAAkB,KAAK,SAAS;QAC3C,OAAO,QAAQ,CAAC,kBAAkB;IACpC,MAAM,QAAQ,GAAG,iCAAiC,CAChD,MAAM,EACN,KAAK,CAAC,WAAW,CACjB;AACF,IAAA,OAAO,QAAQ,CAAC,OAAO,KAAK,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;AACnE;;;;"}
|