@ttsc/unplugin 0.31.0 → 0.31.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/lib/core/bridge/projectRecordMoved.js +1 -1
- package/lib/core/bridge/projectRecordMoved.js.map +1 -1
- package/lib/core/bridge/projectRecordMoved.mjs +1 -1
- package/lib/core/bridge/projectRecordMoved.mjs.map +1 -1
- package/lib/core/bun/bun.d.cts +3 -2
- package/lib/core/bun/bun.d.mts +3 -2
- package/lib/core/bun/bun.d.ts +3 -2
- package/lib/core/bun/bun.js +8 -4
- package/lib/core/bun/bun.js.map +1 -1
- package/lib/core/bun/bun.mjs +8 -4
- package/lib/core/bun/bun.mjs.map +1 -1
- package/lib/core/observer/createInputObserver.js +7 -6
- package/lib/core/observer/createInputObserver.js.map +1 -1
- package/lib/core/observer/createInputObserver.mjs +7 -6
- package/lib/core/observer/createInputObserver.mjs.map +1 -1
- package/lib/core/observer/openIsolatedRecursiveWatch.d.cts +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.d.mts +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.d.ts +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.js +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.js.map +1 -1
- package/lib/core/observer/openIsolatedRecursiveWatch.mjs +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.mjs.map +1 -1
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.cts +12 -3
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.mts +12 -3
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.ts +12 -3
- package/lib/core/transform/cache/selectCachedGenerationAction.d.cts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.d.mts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.d.ts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.js +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.js.map +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.mjs +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.mjs.map +1 -1
- package/lib/core/transform/deliverCachedTransform.d.cts +36 -0
- package/lib/core/transform/deliverCachedTransform.d.mts +36 -0
- package/lib/core/transform/deliverCachedTransform.d.ts +36 -0
- package/lib/core/transform/deliverCachedTransform.js +73 -0
- package/lib/core/transform/deliverCachedTransform.js.map +1 -0
- package/lib/core/transform/deliverCachedTransform.mjs +71 -0
- package/lib/core/transform/deliverCachedTransform.mjs.map +1 -0
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.cts +2 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.mts +2 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.ts +2 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.js +6 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.js.map +1 -1
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.mjs +6 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.mjs.map +1 -1
- package/lib/core/transform/envelope/selectExternalInputPaths.d.cts +3 -5
- package/lib/core/transform/envelope/selectExternalInputPaths.d.mts +3 -5
- package/lib/core/transform/envelope/selectExternalInputPaths.d.ts +3 -5
- package/lib/core/transform/envelope/selectExternalInputPaths.js +8 -7
- package/lib/core/transform/envelope/selectExternalInputPaths.js.map +1 -1
- package/lib/core/transform/envelope/selectExternalInputPaths.mjs +8 -7
- package/lib/core/transform/envelope/selectExternalInputPaths.mjs.map +1 -1
- package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.cts +15 -12
- package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.mts +15 -12
- package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.ts +15 -12
- package/lib/core/transform/generation/captureFailedGenerationInputStates.js +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.js.map +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.mjs +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.mjs.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.js +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js +2 -2
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js.map +1 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs +2 -2
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs.map +1 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.cts +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.mts +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.ts +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.js +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.js.map +1 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs.map +1 -1
- package/lib/core/transform/generation/transformProject.d.cts +9 -7
- package/lib/core/transform/generation/transformProject.d.mts +9 -7
- package/lib/core/transform/generation/transformProject.d.ts +9 -7
- package/lib/core/transform/generation/transformProject.js +14 -9
- package/lib/core/transform/generation/transformProject.js.map +1 -1
- package/lib/core/transform/generation/transformProject.mjs +14 -9
- package/lib/core/transform/generation/transformProject.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.cts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.mts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.ts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.js +10 -4
- package/lib/core/transform/inputs/pluginSourceFilesDigest.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceFilesDigest.mjs +11 -5
- package/lib/core/transform/inputs/pluginSourceFilesDigest.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceHolds.d.cts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.d.mts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.d.ts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.js +9 -4
- package/lib/core/transform/inputs/pluginSourceHolds.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceHolds.mjs +9 -4
- package/lib/core/transform/inputs/pluginSourceHolds.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceState.d.cts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.d.mts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.d.ts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.js +8 -3
- package/lib/core/transform/inputs/pluginSourceState.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceState.mjs +8 -3
- package/lib/core/transform/inputs/pluginSourceState.mjs.map +1 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.cts +18 -5
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.mts +18 -5
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.ts +18 -5
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.js +53 -12
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.js.map +1 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs +53 -12
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/WatchBroker.d.cts +14 -4
- package/lib/core/transform/tracker/broker/WatchBroker.d.mts +14 -4
- package/lib/core/transform/tracker/broker/WatchBroker.d.ts +14 -4
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.cts +63 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.mts +63 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.ts +63 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.js +89 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.js.map +1 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.mjs +89 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.mjs.map +1 -0
- package/lib/core/transform/tracker/broker/drainWatchBroker.d.cts +8 -8
- package/lib/core/transform/tracker/broker/drainWatchBroker.d.mts +8 -8
- package/lib/core/transform/tracker/broker/drainWatchBroker.d.ts +8 -8
- package/lib/core/transform/tracker/broker/drainWatchBroker.js +12 -13
- package/lib/core/transform/tracker/broker/drainWatchBroker.js.map +1 -1
- package/lib/core/transform/tracker/broker/drainWatchBroker.mjs +12 -13
- package/lib/core/transform/tracker/broker/drainWatchBroker.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/getWatchBroker.d.cts +18 -15
- package/lib/core/transform/tracker/broker/getWatchBroker.d.mts +18 -15
- package/lib/core/transform/tracker/broker/getWatchBroker.d.ts +18 -15
- package/lib/core/transform/tracker/broker/getWatchBroker.js +87 -17
- package/lib/core/transform/tracker/broker/getWatchBroker.js.map +1 -1
- package/lib/core/transform/tracker/broker/getWatchBroker.mjs +87 -17
- package/lib/core/transform/tracker/broker/getWatchBroker.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/openBrokeredWatch.d.cts +5 -5
- package/lib/core/transform/tracker/broker/openBrokeredWatch.d.mts +5 -5
- package/lib/core/transform/tracker/broker/openBrokeredWatch.d.ts +5 -5
- package/lib/core/transform/tracker/broker/openBrokeredWatch.js +11 -14
- package/lib/core/transform/tracker/broker/openBrokeredWatch.js.map +1 -1
- package/lib/core/transform/tracker/broker/openBrokeredWatch.mjs +11 -14
- package/lib/core/transform/tracker/broker/openBrokeredWatch.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/usesWatchBroker.d.cts +7 -7
- package/lib/core/transform/tracker/broker/usesWatchBroker.d.mts +7 -7
- package/lib/core/transform/tracker/broker/usesWatchBroker.d.ts +7 -7
- package/lib/core/transform/tracker/broker/usesWatchBroker.js +7 -7
- package/lib/core/transform/tracker/broker/usesWatchBroker.mjs +7 -7
- package/lib/core/transform/tracker/broker/watchBrokerSource.d.cts +9 -10
- package/lib/core/transform/tracker/broker/watchBrokerSource.d.mts +9 -10
- package/lib/core/transform/tracker/broker/watchBrokerSource.d.ts +9 -10
- package/lib/core/transform/tracker/broker/watchBrokerSource.js +10 -11
- package/lib/core/transform/tracker/broker/watchBrokerSource.js.map +1 -1
- package/lib/core/transform/tracker/broker/watchBrokerSource.mjs +10 -11
- package/lib/core/transform/tracker/broker/watchBrokerSource.mjs.map +1 -1
- package/lib/core/transform/transformTtsc.d.cts +7 -4
- package/lib/core/transform/transformTtsc.d.mts +7 -4
- package/lib/core/transform/transformTtsc.d.ts +7 -4
- package/lib/core/transform/transformTtsc.js +38 -93
- package/lib/core/transform/transformTtsc.js.map +1 -1
- package/lib/core/transform/transformTtsc.mjs +38 -93
- package/lib/core/transform/transformTtsc.mjs.map +1 -1
- package/lib/core/transform/validation/TtscGenerationProof.d.cts +105 -0
- package/lib/core/transform/validation/TtscGenerationProof.d.mts +105 -0
- package/lib/core/transform/validation/TtscGenerationProof.d.ts +105 -0
- package/lib/core/transform/validation/TtscGenerationProof.js +149 -0
- package/lib/core/transform/validation/TtscGenerationProof.js.map +1 -0
- package/lib/core/transform/validation/TtscGenerationProof.mjs +149 -0
- package/lib/core/transform/validation/TtscGenerationProof.mjs.map +1 -0
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js +2 -2
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs +2 -2
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCachedSource.d.cts +18 -15
- package/lib/core/transform/validation/matchesCachedSource.d.mts +18 -15
- package/lib/core/transform/validation/matchesCachedSource.d.ts +18 -15
- package/lib/core/transform/validation/matchesCachedSource.js +28 -22
- package/lib/core/transform/validation/matchesCachedSource.js.map +1 -1
- package/lib/core/transform/validation/matchesCachedSource.mjs +28 -22
- package/lib/core/transform/validation/matchesCachedSource.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.cts +3 -2
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.mts +3 -2
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.ts +3 -2
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.js +4 -4
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.js.map +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs +4 -4
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs.map +1 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.cts +2 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.mts +2 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.ts +2 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.js +2 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.js.map +1 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs +2 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.cts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.mts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.ts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.js +7 -5
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.js.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs +7 -5
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputs.d.cts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputs.d.mts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputs.d.ts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputs.js +5 -5
- package/lib/core/transform/validation/matchesUniversalHostInputs.js.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputs.mjs +5 -5
- package/lib/core/transform/validation/matchesUniversalHostInputs.mjs.map +1 -1
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.cts +5 -4
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.mts +5 -4
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.ts +5 -4
- package/lib/core/transform/validation/nativeInputPredicatesHold.js +31 -12
- package/lib/core/transform/validation/nativeInputPredicatesHold.js.map +1 -1
- package/lib/core/transform/validation/nativeInputPredicatesHold.mjs +31 -12
- package/lib/core/transform/validation/nativeInputPredicatesHold.mjs.map +1 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.cts +2 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.mts +2 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.ts +2 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.js +2 -2
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.js.map +1 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.mjs +2 -2
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.mjs.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaseline.d.cts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.d.mts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.d.ts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.js +3 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.js.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaseline.mjs +3 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.mjs.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.d.cts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.d.mts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.d.ts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.js +3 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.js.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.mjs +3 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.mjs.map +1 -1
- package/lib/core/transform/watch/notifyWatchInputs.js +3 -0
- package/lib/core/transform/watch/notifyWatchInputs.js.map +1 -1
- package/lib/core/transform/watch/notifyWatchInputs.mjs +3 -0
- package/lib/core/transform/watch/notifyWatchInputs.mjs.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.cts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.mts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.ts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js +6 -3
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs +6 -3
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs.map +1 -1
- package/lib/core/turbopack/turbopack.js +2 -1
- package/lib/core/turbopack/turbopack.js.map +1 -1
- package/lib/core/turbopack/turbopack.mjs +2 -1
- package/lib/core/turbopack/turbopack.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/bridge/projectRecordMoved.ts +3 -1
- package/src/core/bun/bun.ts +8 -4
- package/src/core/observer/createInputObserver.ts +8 -5
- package/src/core/observer/openIsolatedRecursiveWatch.ts +11 -12
- package/src/core/transform/cache/TtscCachedProjectTransform.ts +13 -3
- package/src/core/transform/cache/selectCachedGenerationAction.ts +9 -1
- package/src/core/transform/deliverCachedTransform.ts +97 -0
- package/src/core/transform/envelope/selectDeclaredProjectInputKeys.ts +5 -2
- package/src/core/transform/envelope/selectExternalInputPaths.ts +7 -7
- package/src/core/transform/filesystem/TtscTransformFilesystemOperations.ts +15 -12
- package/src/core/transform/generation/captureFailedGenerationInputStates.ts +1 -0
- package/src/core/transform/generation/captureTransformGeneration.ts +6 -1
- package/src/core/transform/generation/failedGenerationEnvironmentChanged.ts +12 -2
- package/src/core/transform/generation/selectTransformAttemptDisposition.ts +3 -1
- package/src/core/transform/generation/transformProject.ts +13 -9
- package/src/core/transform/inputs/pluginSourceFilesDigest.ts +11 -4
- package/src/core/transform/inputs/pluginSourceHolds.ts +13 -3
- package/src/core/transform/inputs/pluginSourceState.ts +8 -2
- package/src/core/transform/inputs/preparePluginBuildEnvironments.ts +64 -11
- package/src/core/transform/tracker/broker/WatchBroker.ts +15 -4
- package/src/core/transform/tracker/broker/WatchBrokerTransport.ts +82 -0
- package/src/core/transform/tracker/broker/drainWatchBroker.ts +12 -13
- package/src/core/transform/tracker/broker/getWatchBroker.ts +89 -18
- package/src/core/transform/tracker/broker/openBrokeredWatch.ts +11 -14
- package/src/core/transform/tracker/broker/usesWatchBroker.ts +7 -7
- package/src/core/transform/tracker/broker/watchBrokerSource.ts +10 -11
- package/src/core/transform/transformTtsc.ts +38 -92
- package/src/core/transform/validation/TtscGenerationProof.ts +201 -0
- package/src/core/transform/validation/captureUniversalHostInputValidation.ts +2 -1
- package/src/core/transform/validation/matchesCachedSource.ts +27 -21
- package/src/core/transform/validation/matchesCompleteInputSnapshot.ts +5 -3
- package/src/core/transform/validation/matchesNarrowPersistentInputs.ts +3 -1
- package/src/core/transform/validation/matchesUniversalHostInputTrees.ts +8 -3
- package/src/core/transform/validation/matchesUniversalHostInputs.ts +6 -4
- package/src/core/transform/validation/nativeInputPredicatesHold.ts +36 -14
- package/src/core/transform/validation/notificationsProveProgramUnchanged.ts +3 -1
- package/src/core/transform/watch/captureWatchInputBaseline.ts +4 -0
- package/src/core/transform/watch/captureWatchInputBaselines.ts +7 -1
- package/src/core/transform/watch/notifyWatchInputs.ts +3 -0
- package/src/core/transform/watch/watchInputEvidenceMatchesDisk.ts +12 -2
- package/src/core/turbopack/turbopack.ts +2 -1
|
@@ -10,6 +10,7 @@ import { pathIdentityKey } from "../filesystem/pathIdentityKey";
|
|
|
10
10
|
import { hostInputStateHash } from "../inputs/hostInputStateHash";
|
|
11
11
|
import { toProjectKey } from "../project/toProjectKey";
|
|
12
12
|
import { hashText } from "../utils/hashText";
|
|
13
|
+
import { TtscGenerationProof } from "./TtscGenerationProof";
|
|
13
14
|
import { matchesCompleteInputSnapshot } from "./matchesCompleteInputSnapshot";
|
|
14
15
|
import { matchesNarrowPersistentInputs } from "./matchesNarrowPersistentInputs";
|
|
15
16
|
import { nativeInputPredicatesHold } from "./nativeInputPredicatesHold";
|
|
@@ -24,17 +25,19 @@ import { notificationsProveProgramUnchanged } from "./notificationsProveProgramU
|
|
|
24
25
|
* no source comparison. A cache with a delivery epoch can use that comparison
|
|
25
26
|
* alone for a stable generation's first delivery of each module in the current
|
|
26
27
|
* pass, once the pass's own first delivery has proven the whole generation
|
|
27
|
-
* still matches the filesystem.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
28
|
+
* still matches the filesystem. Incomplete generations cannot claim complete
|
|
29
|
+
* proof. A coherent local success admitted only because its observer was
|
|
30
|
+
* unavailable may share first deliveries in its exact nonwatching pass through
|
|
31
|
+
* TtscGenerationProof; it cannot cross passes or earn persistent authority.
|
|
32
|
+
* Later graph-bearing requests validate the file's derived input set and
|
|
33
|
+
* project membership. A failed result is a diagnostic of the whole loaded
|
|
34
|
+
* program, so its repair cannot be proved by one delivered output's dependency
|
|
35
|
+
* closure. Failed and graph-free envelopes conservatively validate the complete
|
|
36
|
+
* project and out-of-walk snapshots, reusing qualified signatures. A mismatch
|
|
37
|
+
* rejects this generation for the delivery; its caller chooses replacement or
|
|
38
|
+
* capture. Delivered text that differs while the disk still holds the bytes the
|
|
39
|
+
* generation compiled is not one: it is reported and served, since the compile
|
|
40
|
+
* read the disk (samchon/ttsc#1394).
|
|
38
41
|
*
|
|
39
42
|
* Its place in the adapter's invalidation model, and the units beside it, are
|
|
40
43
|
* mapped in the maintainer page
|
|
@@ -42,7 +45,7 @@ import { notificationsProveProgramUnchanged } from "./notificationsProveProgramU
|
|
|
42
45
|
*
|
|
43
46
|
* @evidence contracts/common.md#principled-implementation Delivered source, generation completeness, pass identity and notification authority choose between first-delivery proof, derived-input validation and complete snapshots; divergent editor text never substitutes for compiler disk inputs.
|
|
44
47
|
* @evidence contracts/common.md#clear-and-simple-design This admission boundary chooses the required proof while dedicated validators own membership, universal inputs and content comparisons.
|
|
45
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts An incomplete generation cannot
|
|
48
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts An incomplete generation cannot claim complete snapshot authority; only separately admitted coherent local success can share first deliveries of its exact nonwatching pass; inherited object members cannot invent a project baseline, and losing watcher proof falls back to recorded-state validation.
|
|
46
49
|
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain disk-versus-delivered authority, epoch qualification, fallback and related maintainer guidance before tags.
|
|
47
50
|
* @evidence contracts/portability.md#os-neutral-implementation Project membership and path identity use recorded compiler case policy and injected native operations; OS names do not certify case sensitivity or watcher capabilities.
|
|
48
51
|
* @evidence contracts/performance.md#bound-retention-and-release-resources
|
|
@@ -52,13 +55,13 @@ import { notificationsProveProgramUnchanged } from "./notificationsProveProgramU
|
|
|
52
55
|
* while validators replace current signature/directory witnesses. No new
|
|
53
56
|
* independent handle or historical epoch collection is acquired here.
|
|
54
57
|
* @evidence contracts/performance.md#efficient-algorithms Every admission first replays all generation-owned typed config predicates; this mandatory cost includes native queries, file bytes or directory membership independently of watcher/epoch qualification.
|
|
55
|
-
*
|
|
58
|
+
* Unsupported fresh-only rejection precedes source baseline work. Baseline-bearing paths
|
|
56
59
|
* hash delivered text and divergent paths read/hash host bytes; unrelated
|
|
57
60
|
* absent outputs can return before that hash after an initial K-output index.
|
|
58
61
|
* Epoch-qualified first checkpoints share the complete proof. Other paths
|
|
59
62
|
* pay derived-input or complete project/external/universal proof costs,
|
|
60
63
|
* including path/byte populations, native observations and clock refresh.
|
|
61
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Typed config predicate replay
|
|
64
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Typed config predicate replay remains mandatory for every delivery and shares only the current synchronous transaction with nested validators; immutable membership is indexed separately. A complete generation earns one whole-snapshot proof per new delivery epoch; later first deliveries share it, while repeated or persistent deliveries revalidate their authoritative dependency scope.
|
|
62
65
|
*/
|
|
63
66
|
export function matchesCachedSource(
|
|
64
67
|
/** Generation retaining recorded baselines and distinct proof authority. */
|
|
@@ -69,9 +72,11 @@ export function matchesCachedSource(
|
|
|
69
72
|
source: string,
|
|
70
73
|
/** Current host pass, or undefined for persistent input validation. */
|
|
71
74
|
epoch: number | undefined,
|
|
75
|
+
proof?: TtscGenerationProof.Transaction,
|
|
72
76
|
): boolean {
|
|
73
|
-
if (!nativeInputPredicatesHold(cached)) return false;
|
|
74
|
-
|
|
77
|
+
if (!nativeInputPredicatesHold(cached, proof)) return false;
|
|
78
|
+
const pass = TtscGenerationProof.sharesPass(cached, file, epoch);
|
|
79
|
+
if (cached.freshDeliveryOnly === true && !pass) return false;
|
|
75
80
|
const identities = envelopeDerivation(cached).identityContext;
|
|
76
81
|
const currentKey = toProjectKey(cached.projectRoot, file, identities);
|
|
77
82
|
const identity = pathIdentityKey(file, identities);
|
|
@@ -102,7 +107,7 @@ export function matchesCachedSource(
|
|
|
102
107
|
if (!outputs.has(identity)) {
|
|
103
108
|
// While the watchers prove the program unchanged, the module is still
|
|
104
109
|
// outside it, and no walk is needed to say so (samchon/ttsc#1398).
|
|
105
|
-
if (notificationsProveProgramUnchanged(cached)) {
|
|
110
|
+
if (notificationsProveProgramUnchanged(cached, proof)) {
|
|
106
111
|
return true;
|
|
107
112
|
}
|
|
108
113
|
// Root discovery deliberately never hashed this unrelated module. Its
|
|
@@ -113,7 +118,7 @@ export function matchesCachedSource(
|
|
|
113
118
|
TRANSFORM_CLOCK_REFERENCE_DIRECTORIES.get(cached),
|
|
114
119
|
resultFilesystem(cached.result),
|
|
115
120
|
);
|
|
116
|
-
return matchesCompleteInputSnapshot(cached);
|
|
121
|
+
return matchesCompleteInputSnapshot(cached, proof);
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
if (expected !== hashText(source)) {
|
|
@@ -130,6 +135,7 @@ export function matchesCachedSource(
|
|
|
130
135
|
}
|
|
131
136
|
reportDivergentDelivery(cached, file);
|
|
132
137
|
}
|
|
138
|
+
if (pass) return true;
|
|
133
139
|
if (epoch !== undefined && cached.projectSnapshotComplete === true) {
|
|
134
140
|
if (cached.deliveryEpoch !== epoch) {
|
|
135
141
|
// The pass's first delivery. The generation was settled against an
|
|
@@ -142,7 +148,7 @@ export function matchesCachedSource(
|
|
|
142
148
|
TRANSFORM_CLOCK_REFERENCE_DIRECTORIES.get(cached),
|
|
143
149
|
resultFilesystem(cached.result),
|
|
144
150
|
);
|
|
145
|
-
if (!matchesCompleteInputSnapshot(cached)) {
|
|
151
|
+
if (!matchesCompleteInputSnapshot(cached, proof)) {
|
|
146
152
|
return false;
|
|
147
153
|
}
|
|
148
154
|
cached.deliveryEpoch = epoch;
|
|
@@ -165,7 +171,7 @@ export function matchesCachedSource(
|
|
|
165
171
|
cached.projectMutationTracker !== undefined &&
|
|
166
172
|
cached.hostInputMutationTracker !== undefined
|
|
167
173
|
) {
|
|
168
|
-
const narrow = matchesNarrowPersistentInputs(cached, file);
|
|
174
|
+
const narrow = matchesNarrowPersistentInputs(cached, file, proof);
|
|
169
175
|
if (narrow !== undefined) {
|
|
170
176
|
return narrow;
|
|
171
177
|
}
|
|
@@ -173,5 +179,5 @@ export function matchesCachedSource(
|
|
|
173
179
|
// produced. Losing the proof is not evidence of a change, so fall through
|
|
174
180
|
// to the snapshot the entry still carries.
|
|
175
181
|
}
|
|
176
|
-
return matchesCompleteInputSnapshot(cached);
|
|
182
|
+
return matchesCompleteInputSnapshot(cached, proof);
|
|
177
183
|
}
|
|
@@ -3,6 +3,7 @@ import { resultFilesystem } from "../cache/resultFilesystem";
|
|
|
3
3
|
import { declaredProjectInputKeys } from "../envelope/declaredProjectInputKeys";
|
|
4
4
|
import { envelopeDerivation } from "../envelope/envelopeDerivation";
|
|
5
5
|
import { collectProjectInputSnapshot } from "../project/collectProjectInputSnapshot";
|
|
6
|
+
import type { TtscGenerationProof } from "./TtscGenerationProof";
|
|
6
7
|
import { matchesCachedExternalInputs } from "./matchesCachedExternalInputs";
|
|
7
8
|
import { matchesExternalInputRealpaths } from "./matchesExternalInputRealpaths";
|
|
8
9
|
import { matchesUniversalHostInputEntries } from "./matchesUniversalHostInputEntries";
|
|
@@ -43,7 +44,7 @@ import { walkSnapshotComplete } from "./walkSnapshotComplete";
|
|
|
43
44
|
* target scans, signature entry materialization/adoption and native identity
|
|
44
45
|
* work add population/path/digit costs; unresolved content and predicate
|
|
45
46
|
* replay add bytes/listings. Early rejection skips subsequent domains.
|
|
46
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Typed config
|
|
47
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Typed config predicates remain mandatory on every delivery. An exact-generation synchronous transaction may share their current replay across nested validators, but no pass or notification shortcut authorizes a later delivery to skip them. Qualified separable signatures avoid repeated content reads under the caller's refreshed clock. Successful aggregate proof adopts earned project/external signatures and clears unverified flags; it neither clears recorded changes/failed flags nor makes later quiet notifications sufficient without their other admission conditions.
|
|
47
48
|
*/
|
|
48
49
|
export function matchesCompleteInputSnapshot(
|
|
49
50
|
/**
|
|
@@ -51,8 +52,9 @@ export function matchesCompleteInputSnapshot(
|
|
|
51
52
|
* proof.
|
|
52
53
|
*/
|
|
53
54
|
cached: TtscCachedProjectTransform,
|
|
55
|
+
proof?: TtscGenerationProof.Transaction,
|
|
54
56
|
): boolean {
|
|
55
|
-
if (!nativeInputPredicatesHold(cached)) return false;
|
|
57
|
+
if (!nativeInputPredicatesHold(cached, proof)) return false;
|
|
56
58
|
if (
|
|
57
59
|
cached.projectSnapshotComplete !== true ||
|
|
58
60
|
cached.projectDirectories === undefined
|
|
@@ -72,7 +74,7 @@ export function matchesCompleteInputSnapshot(
|
|
|
72
74
|
hostValidation === undefined ||
|
|
73
75
|
!matchesUniversalHostInputEntries(cached, hostValidation) ||
|
|
74
76
|
!matchesUniversalHostInputProbes(cached, hostValidation) ||
|
|
75
|
-
!matchesUniversalHostInputTrees(cached, hostValidation)
|
|
77
|
+
!matchesUniversalHostInputTrees(cached, hostValidation, proof)
|
|
76
78
|
) {
|
|
77
79
|
return false;
|
|
78
80
|
}
|
|
@@ -5,6 +5,7 @@ import { envelopeDerivation } from "../envelope/envelopeDerivation";
|
|
|
5
5
|
import { selectWatchInputs } from "../envelope/selectWatchInputs";
|
|
6
6
|
import { notificationsProveMembership } from "../tracker/notificationsProveMembership";
|
|
7
7
|
import { reportsMembershipChange } from "../tracker/reportsMembershipChange";
|
|
8
|
+
import type { TtscGenerationProof } from "./TtscGenerationProof";
|
|
8
9
|
import { matchesProvenInput } from "./matchesProvenInput";
|
|
9
10
|
import { matchesUniversalHostInputs } from "./matchesUniversalHostInputs";
|
|
10
11
|
|
|
@@ -49,6 +50,7 @@ export function matchesNarrowPersistentInputs(
|
|
|
49
50
|
cached: TtscCachedProjectTransform,
|
|
50
51
|
/** Delivered file spelling selecting this envelope's dependency closure. */
|
|
51
52
|
file: string,
|
|
53
|
+
proof?: TtscGenerationProof.Transaction,
|
|
52
54
|
): boolean | undefined {
|
|
53
55
|
if (reportsMembershipChange(cached)) {
|
|
54
56
|
return false;
|
|
@@ -61,7 +63,7 @@ export function matchesNarrowPersistentInputs(
|
|
|
61
63
|
if (hostValidation === undefined) {
|
|
62
64
|
return undefined;
|
|
63
65
|
}
|
|
64
|
-
if (!matchesUniversalHostInputs(cached, hostValidation)) {
|
|
66
|
+
if (!matchesUniversalHostInputs(cached, hostValidation, proof)) {
|
|
65
67
|
return false;
|
|
66
68
|
}
|
|
67
69
|
const inputs = selectWatchInputs({
|
|
@@ -7,6 +7,7 @@ import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTrans
|
|
|
7
7
|
import { resultFilesystem } from "../cache/resultFilesystem";
|
|
8
8
|
import { pluginSourceHolds } from "../inputs/pluginSourceHolds";
|
|
9
9
|
import { usesPreparedPluginBuildEnvironments } from "../inputs/preparePluginBuildEnvironments";
|
|
10
|
+
import type { TtscGenerationProof } from "./TtscGenerationProof";
|
|
10
11
|
import type { TtscHostInputValidation } from "./TtscHostInputValidation";
|
|
11
12
|
import { trackerProvesInputUnchanged } from "./trackerProvesInputUnchanged";
|
|
12
13
|
|
|
@@ -41,20 +42,23 @@ import { trackerProvesInputUnchanged } from "./trackerProvesInputUnchanged";
|
|
|
41
42
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs distinguish source notification, environment authority and metadata-qualified digest reuse before param tags.
|
|
42
43
|
* @evidence contracts/portability.md#os-neutral-implementation Supported plugin-source APIs and capability-qualified native trackers own source/toolchain observation without OS-wide watcher assumptions.
|
|
43
44
|
* @evidence contracts/performance.md#bound-retention-and-release-resources One environment witness per current manifest tree is replaced in place; no delivery history is retained.
|
|
44
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
45
|
+
* @evidence contracts/performance.md#efficient-algorithms An exact-generation synchronous transaction supplies one current batched environment qualification; otherwise each tree pays the shared environment reader's variable-key construction and native dependency qualification. Qualified silent sources avoid enumeration; other trees enumerate and sort the selected file population, inspect metadata and hash source bytes whenever population, metadata or clock evidence cannot qualify reuse. The synchronous owner can also refresh native environment authority after a mismatch.
|
|
45
46
|
* @evidence contracts/performance.md#reuse-equivalent-work Generation environment witnesses and the owning digest cache share prior proof only while source and toolchain identities remain valid.
|
|
46
47
|
*/
|
|
47
48
|
export function matchesUniversalHostInputTrees(
|
|
48
49
|
cached: TtscCachedProjectTransform,
|
|
49
50
|
validation: TtscHostInputValidation,
|
|
51
|
+
proof?: TtscGenerationProof.Transaction,
|
|
50
52
|
): boolean {
|
|
51
53
|
for (const [directory, digest] of validation.trees) {
|
|
52
54
|
// Read before any proof, so the environment recorded below is one the
|
|
53
55
|
// proof saw or older, never a newer one it did not prove.
|
|
54
56
|
const prepared = usesPreparedPluginBuildEnvironments(cached.result);
|
|
55
57
|
const environment = prepared
|
|
56
|
-
?
|
|
57
|
-
|
|
58
|
+
? proof?.cached === cached && proof.environments !== undefined
|
|
59
|
+
? proof.environments.get(directory)
|
|
60
|
+
: PluginBuildEnvironmentReadings.cached(directory)
|
|
61
|
+
: processPluginBuildEnvironment(directory, false, cached.projectRoot);
|
|
58
62
|
if (environment === undefined) return false;
|
|
59
63
|
if (
|
|
60
64
|
trackerProvesInputUnchanged(cached.hostInputMutationTracker, directory) &&
|
|
@@ -67,6 +71,7 @@ export function matchesUniversalHostInputTrees(
|
|
|
67
71
|
digest,
|
|
68
72
|
resultFilesystem(cached.result),
|
|
69
73
|
prepared ? { environment } : undefined,
|
|
74
|
+
cached.projectRoot,
|
|
70
75
|
)
|
|
71
76
|
)
|
|
72
77
|
return false;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform";
|
|
2
|
+
import type { TtscGenerationProof } from "./TtscGenerationProof";
|
|
2
3
|
import type { TtscHostInputValidation } from "./TtscHostInputValidation";
|
|
3
4
|
import { matchesUniversalHostInputEntries } from "./matchesUniversalHostInputEntries";
|
|
4
5
|
import { matchesUniversalHostInputProbes } from "./matchesUniversalHostInputProbes";
|
|
@@ -29,13 +30,14 @@ import { trackerProvesInputUnchanged } from "./trackerProvesInputUnchanged";
|
|
|
29
30
|
* @evidence contracts/portability.md#os-neutral-implementation Filesystem-aware validators use actual tracker delivery capability and exact lexical coverage rather than platform-wide assumptions.
|
|
30
31
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The coordinator borrows generation manifests and trackers without retaining a result or acquiring a handle.
|
|
31
32
|
* @evidence contracts/performance.md#efficient-algorithms Every admission first replays all generation-owned typed config predicates; this mandatory cost includes native queries, file bytes or directory membership independently of watcher/epoch qualification. The coverage scan stops at the first unproved input. Each coverage query checks overlapping unproven scopes and sampled events with native path comparisons; fallback adds unresolved bytes, native candidate probes and plugin tree enumeration. Mandatory environment qualification pays its owning dependency and environment-key costs on either route.
|
|
32
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Typed config
|
|
33
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Typed config predicates remain mandatory on every delivery. An exact-generation synchronous transaction may share their current replay across nested validators, but no pass or notification shortcut authorizes a later delivery to skip them. Shared manifests and qualified silent sources avoid repeated content reads only while the owning tree validator also proves unchanged build environment.
|
|
33
34
|
*/
|
|
34
35
|
export function matchesUniversalHostInputs(
|
|
35
36
|
cached: TtscCachedProjectTransform,
|
|
36
37
|
validation: TtscHostInputValidation,
|
|
38
|
+
proof?: TtscGenerationProof.Transaction,
|
|
37
39
|
): boolean {
|
|
38
|
-
if (!nativeInputPredicatesHold(cached)) return false;
|
|
40
|
+
if (!nativeInputPredicatesHold(cached, proof)) return false;
|
|
39
41
|
let notificationsProveAll = true;
|
|
40
42
|
for (const input of validation.covered) {
|
|
41
43
|
if (!trackerProvesInputUnchanged(cached.hostInputMutationTracker, input)) {
|
|
@@ -44,10 +46,10 @@ export function matchesUniversalHostInputs(
|
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
if (notificationsProveAll)
|
|
47
|
-
return matchesUniversalHostInputTrees(cached, validation);
|
|
49
|
+
return matchesUniversalHostInputTrees(cached, validation, proof);
|
|
48
50
|
return (
|
|
49
51
|
matchesUniversalHostInputEntries(cached, validation) &&
|
|
50
52
|
matchesUniversalHostInputProbes(cached, validation) &&
|
|
51
|
-
matchesUniversalHostInputTrees(cached, validation)
|
|
53
|
+
matchesUniversalHostInputTrees(cached, validation, proof)
|
|
52
54
|
);
|
|
53
55
|
}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
+
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
3
|
|
|
3
4
|
import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform";
|
|
4
5
|
import { resultFilesystem } from "../cache/resultFilesystem";
|
|
5
6
|
import { envelopeDerivation } from "../envelope/envelopeDerivation";
|
|
6
7
|
import { nativeInputPredicateMatches } from "../inputs/nativeInputPredicateMatches";
|
|
8
|
+
import type { TtscGenerationProof } from "./TtscGenerationProof";
|
|
9
|
+
|
|
10
|
+
// Weakly owned by immutable observation membership, never by current verdict.
|
|
11
|
+
// Keeping this separate from native path derivation also preserves the empty
|
|
12
|
+
// predicate gate's promise to perform no native identity observations.
|
|
13
|
+
const predicateInputs = new WeakMap<
|
|
14
|
+
object,
|
|
15
|
+
Array<[string, ITtscCompilerTransformation.IInputObservation]>
|
|
16
|
+
>();
|
|
7
17
|
|
|
8
18
|
/**
|
|
9
19
|
* Validate every generation-owned native config predicate before cache reuse.
|
|
@@ -16,25 +26,37 @@ import { nativeInputPredicateMatches } from "../inputs/nativeInputPredicateMatch
|
|
|
16
26
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Metadata and notification shortcuts cannot omit typed config predicates or repair an unstable producer witness.
|
|
17
27
|
* @evidence contracts/common.md#meaningful-documentation The comment identifies generation ownership and the admission shortcuts that must retain this gate.
|
|
18
28
|
* @evidence contracts/portability.md#os-neutral-implementation Relative names are resolved against the recorded project with the filesystem view's path dialect; native identity and encoding belong to the replay operation.
|
|
19
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
20
|
-
* @
|
|
21
|
-
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources
|
|
29
|
+
* @evidence contracts/performance.md#efficient-algorithms Immutable observation membership is indexed once, including an empty population. Each new synchronous admission replays only indexed native predicates and stops at the first refusal; nested validators share its verdict without another scan or native query. Empty populations require no native replay context.
|
|
30
|
+
* @evidence contracts/performance.md#reuse-equivalent-work A weak observation index shares immutable membership. Current verdicts belong only to an exact-owner synchronous transaction, never the next delivery or an await.
|
|
31
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The weak index follows immutable observation lifetime; synchronous verdicts and native queries acquire no handle or history.
|
|
22
32
|
*/
|
|
23
33
|
export function nativeInputPredicatesHold(
|
|
24
34
|
cached: TtscCachedProjectTransform,
|
|
35
|
+
proof?: TtscGenerationProof.Transaction,
|
|
25
36
|
): boolean {
|
|
26
37
|
if (cached.result.type === "exception") return false;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
)
|
|
33
|
-
|
|
38
|
+
if (proof?.cached === cached && proof.nativePredicates !== undefined)
|
|
39
|
+
return proof.nativePredicates;
|
|
40
|
+
// Membership is immutable generation data. A positive native verdict is
|
|
41
|
+
// current observation: share it only with nested synchronous validators,
|
|
42
|
+
// never the next delivery, pass or await (#1714).
|
|
43
|
+
const finish = (matches: boolean): boolean => {
|
|
44
|
+
if (proof?.cached === cached) proof.nativePredicates = matches;
|
|
45
|
+
return matches;
|
|
46
|
+
};
|
|
47
|
+
const observations = cached.result.graph?.inputObservations;
|
|
48
|
+
if (observations === undefined) return finish(true);
|
|
49
|
+
let inputs = predicateInputs.get(observations);
|
|
50
|
+
if (inputs === undefined) {
|
|
51
|
+
inputs = Object.entries(observations).filter(
|
|
52
|
+
([, observation]) => (observation.nativePredicates?.length ?? 0) !== 0,
|
|
53
|
+
);
|
|
54
|
+
predicateInputs.set(observations, inputs);
|
|
55
|
+
}
|
|
56
|
+
if (inputs.length === 0) return finish(true);
|
|
34
57
|
const filesystem = resultFilesystem(cached.result);
|
|
35
58
|
const identities = envelopeDerivation(cached).identityContext;
|
|
36
|
-
for (const [name, observation] of
|
|
37
|
-
if ((observation.nativePredicates?.length ?? 0) === 0) continue;
|
|
59
|
+
for (const [name, observation] of inputs) {
|
|
38
60
|
const file = (
|
|
39
61
|
(filesystem.platform ?? process.platform) === "win32"
|
|
40
62
|
? path.win32
|
|
@@ -42,7 +64,7 @@ export function nativeInputPredicatesHold(
|
|
|
42
64
|
).resolve(cached.projectRoot, name);
|
|
43
65
|
for (const predicate of observation.nativePredicates ?? [])
|
|
44
66
|
if (!nativeInputPredicateMatches(file, predicate, filesystem, identities))
|
|
45
|
-
return false;
|
|
67
|
+
return finish(false);
|
|
46
68
|
}
|
|
47
|
-
return true;
|
|
69
|
+
return finish(true);
|
|
48
70
|
}
|
|
@@ -4,6 +4,7 @@ import { TRANSFORM_CLOCK_REFERENCE_DIRECTORIES } from "../clock/TRANSFORM_CLOCK_
|
|
|
4
4
|
import { refreshFilesystemClockReference } from "../clock/refreshFilesystemClockReference";
|
|
5
5
|
import { isProjectWalkPath } from "../project/isProjectWalkPath";
|
|
6
6
|
import { notificationsProveMembership } from "../tracker/notificationsProveMembership";
|
|
7
|
+
import type { TtscGenerationProof } from "./TtscGenerationProof";
|
|
7
8
|
import { matchesUniversalHostInputs } from "./matchesUniversalHostInputs";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -42,6 +43,7 @@ export function notificationsProveProgramUnchanged(
|
|
|
42
43
|
* proof.
|
|
43
44
|
*/
|
|
44
45
|
cached: TtscCachedProjectTransform,
|
|
46
|
+
proof?: TtscGenerationProof.Transaction,
|
|
45
47
|
): boolean {
|
|
46
48
|
if (!notificationsProveMembership(cached)) return false;
|
|
47
49
|
for (const tracker of [
|
|
@@ -88,5 +90,5 @@ export function notificationsProveProgramUnchanged(
|
|
|
88
90
|
TRANSFORM_CLOCK_REFERENCE_DIRECTORIES.get(cached),
|
|
89
91
|
resultFilesystem(cached.result),
|
|
90
92
|
);
|
|
91
|
-
return matchesUniversalHostInputs(cached, cached.hostInputValidation);
|
|
93
|
+
return matchesUniversalHostInputs(cached, cached.hostInputValidation, proof);
|
|
92
94
|
}
|
|
@@ -15,6 +15,9 @@ import { captureWatchInputBaselines } from "./captureWatchInputBaselines";
|
|
|
15
15
|
* a recorded predicate. Unrequested listings are not enumerated.
|
|
16
16
|
* @param options.nativePredicates Native version-one codec kinds requested by
|
|
17
17
|
* recorded inputs. Raw native listings are independent of compiler listings.
|
|
18
|
+
* @param options.projectRoot Project whose plugin cache records prove a plugin
|
|
19
|
+
* tree, so a new process does not read its sources and SDK again
|
|
20
|
+
* (samchon/ttsc#1725).
|
|
18
21
|
* @evidence contracts/common.md#principled-implementation Two independently captured codec facts must agree before a baseline is returned; equality detects observed changes but cannot establish absence of intervening unobserved changes.
|
|
19
22
|
* @evidence contracts/common.md#clear-and-simple-design The singleton delegates to the batch owner, which assembles codec facts and owns independent observations and failure handling.
|
|
20
23
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unavailable reads retain their explicit codec markers and predicates; a mismatch or escaping exception declines capture without supplying expected state or retrying until a desired answer appears.
|
|
@@ -33,6 +36,7 @@ export function captureWatchInputBaseline(
|
|
|
33
36
|
nativePredicates?: readonly (keyof NonNullable<
|
|
34
37
|
TtscWatchInputBaseline["nativePredicates"]
|
|
35
38
|
>)[];
|
|
39
|
+
projectRoot?: string;
|
|
36
40
|
} = {},
|
|
37
41
|
): TtscWatchInputBaseline | undefined {
|
|
38
42
|
return captureWatchInputBaselines([file], filesystem, options).get(file);
|
|
@@ -48,6 +48,8 @@ export function captureWatchInputBaselines(
|
|
|
48
48
|
nativePredicates?: readonly (keyof NonNullable<
|
|
49
49
|
TtscWatchInputBaseline["nativePredicates"]
|
|
50
50
|
>)[];
|
|
51
|
+
/** Project whose plugin cache records prove a plugin tree (#1725). */
|
|
52
|
+
projectRoot?: string;
|
|
51
53
|
} = {},
|
|
52
54
|
): Map<string, TtscWatchInputBaseline | undefined> {
|
|
53
55
|
const selected = [...new Set(files)];
|
|
@@ -89,6 +91,8 @@ function capture(
|
|
|
89
91
|
nativePredicates?: readonly (keyof NonNullable<
|
|
90
92
|
TtscWatchInputBaseline["nativePredicates"]
|
|
91
93
|
>)[];
|
|
94
|
+
/** Project whose plugin cache records prove a plugin tree (#1725). */
|
|
95
|
+
projectRoot?: string;
|
|
92
96
|
},
|
|
93
97
|
): TtscWatchInputBaseline {
|
|
94
98
|
const stat = compilerStatKind(file, filesystem);
|
|
@@ -141,6 +145,8 @@ function capture(
|
|
|
141
145
|
identity: pathIdentityKey(file, identities),
|
|
142
146
|
realpath: compilerInputRealpathObservation(file, filesystem),
|
|
143
147
|
stat,
|
|
144
|
-
...(options.tree === true
|
|
148
|
+
...(options.tree === true
|
|
149
|
+
? { tree: pluginSourceState(file, undefined, options.projectRoot) }
|
|
150
|
+
: {}),
|
|
145
151
|
};
|
|
146
152
|
}
|
|
@@ -64,6 +64,9 @@ export function notifyWatchInputs(
|
|
|
64
64
|
// so no persistent cache may keep it.
|
|
65
65
|
if (
|
|
66
66
|
hooks.project !== undefined &&
|
|
67
|
+
// Common delivery already withdrew this host cache. Incomplete local
|
|
68
|
+
// output cannot write a record, so avoid a second withdrawal callback.
|
|
69
|
+
cached.freshDeliveryOnly !== true &&
|
|
67
70
|
!notifyProjectRecord(
|
|
68
71
|
hooks.project,
|
|
69
72
|
cached,
|
|
@@ -20,7 +20,10 @@ import type { TtscWatchInputEvidence } from "./TtscWatchInputEvidence";
|
|
|
20
20
|
* a graph input by its state hash and physical target; a host input by the host
|
|
21
21
|
* bytes' hash. The root-file membership is a walk over many paths and never
|
|
22
22
|
* stands for one, so its evidence matches nothing here; the record holds it
|
|
23
|
-
* apart. Evidence without a state proves nothing and does not match.
|
|
23
|
+
* apart. Evidence without a state proves nothing and does not match. A plugin
|
|
24
|
+
* tree is proven through the plugin cache records of the project the caller
|
|
25
|
+
* names, so a new process does not read its sources and SDK again
|
|
26
|
+
* (samchon/ttsc#1725).
|
|
24
27
|
*
|
|
25
28
|
* @evidence contracts/common.md#principled-implementation Each codec replays its recorded meaning: complete predicates, graph hash plus physical target, raw host hash or plugin-tree state; membership and absent state cannot establish one-path agreement.
|
|
26
29
|
* @evidence contracts/common.md#clear-and-simple-design Discriminant branches delegate each observation to the codec owner and expose one conservative boolean comparison.
|
|
@@ -35,12 +38,19 @@ export function watchInputEvidenceMatchesDisk(
|
|
|
35
38
|
file: string,
|
|
36
39
|
evidence: TtscWatchInputEvidence,
|
|
37
40
|
filesystem: TtscTransformFilesystemOperations = DEFAULT_FILESYSTEM_OPERATIONS,
|
|
41
|
+
projectRoot?: string,
|
|
38
42
|
): boolean {
|
|
39
43
|
const state = evidence.state;
|
|
40
44
|
if (state === undefined || state.codec === "membership") return false;
|
|
41
45
|
try {
|
|
42
46
|
if (state.codec === "tree") {
|
|
43
|
-
return pluginSourceHolds(
|
|
47
|
+
return pluginSourceHolds(
|
|
48
|
+
file,
|
|
49
|
+
state.digest,
|
|
50
|
+
filesystem,
|
|
51
|
+
undefined,
|
|
52
|
+
projectRoot,
|
|
53
|
+
);
|
|
44
54
|
}
|
|
45
55
|
if (state.codec === "predicates") {
|
|
46
56
|
return matchesGraphInputObservation(
|
|
@@ -171,6 +171,7 @@ export function turbopack(
|
|
|
171
171
|
}
|
|
172
172
|
const hooks: TtscTransformHooks = {
|
|
173
173
|
exactPath: true,
|
|
174
|
+
watching,
|
|
174
175
|
...(addDependency === undefined
|
|
175
176
|
? {}
|
|
176
177
|
: {
|
|
@@ -186,7 +187,7 @@ export function turbopack(
|
|
|
186
187
|
toolDirectory,
|
|
187
188
|
// Turbopack takes no record outside its root, so a watching worker
|
|
188
189
|
// refuses a module it could hand none (samchon/ttsc#1480).
|
|
189
|
-
watching
|
|
190
|
+
watching,
|
|
190
191
|
},
|
|
191
192
|
}),
|
|
192
193
|
...(bindings.markVolatile === undefined
|