@ttsc/unplugin 0.31.2 → 0.31.4
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/session/claimSharedCompile.js +6 -4
- package/lib/core/transform/session/claimSharedCompile.js.map +1 -1
- package/lib/core/transform/session/claimSharedCompile.mjs +6 -4
- package/lib/core/transform/session/claimSharedCompile.mjs.map +1 -1
- package/lib/core/transform/session/openTtscTransformSession.d.cts +1 -1
- package/lib/core/transform/session/openTtscTransformSession.d.mts +1 -1
- package/lib/core/transform/session/openTtscTransformSession.d.ts +1 -1
- package/lib/core/transform/session/openTtscTransformSession.js +7 -3
- package/lib/core/transform/session/openTtscTransformSession.js.map +1 -1
- package/lib/core/transform/session/openTtscTransformSession.mjs +7 -3
- package/lib/core/transform/session/openTtscTransformSession.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.d.cts +6 -6
- package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.d.mts +6 -6
- package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.d.ts +6 -6
- package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.js +9 -7
- package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.js.map +1 -1
- package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.mjs +9 -7
- package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.mjs.map +1 -1
- package/lib/core/transform/tracker/settleProjectMutationEvents.d.cts +23 -29
- package/lib/core/transform/tracker/settleProjectMutationEvents.d.mts +23 -29
- package/lib/core/transform/tracker/settleProjectMutationEvents.d.ts +23 -29
- package/lib/core/transform/tracker/settleProjectMutationEvents.js +25 -37
- package/lib/core/transform/tracker/settleProjectMutationEvents.js.map +1 -1
- package/lib/core/transform/tracker/settleProjectMutationEvents.mjs +25 -37
- package/lib/core/transform/tracker/settleProjectMutationEvents.mjs.map +1 -1
- package/lib/core/transform/tracker/verifyGenerationLocations.d.cts +41 -0
- package/lib/core/transform/tracker/verifyGenerationLocations.d.mts +41 -0
- package/lib/core/transform/tracker/verifyGenerationLocations.d.ts +41 -0
- package/lib/core/transform/tracker/verifyGenerationLocations.js +54 -0
- package/lib/core/transform/tracker/verifyGenerationLocations.js.map +1 -0
- package/lib/core/transform/tracker/verifyGenerationLocations.mjs +52 -0
- package/lib/core/transform/tracker/verifyGenerationLocations.mjs.map +1 -0
- package/lib/core/transform/utils/isZombieProcess.d.cts +26 -0
- package/lib/core/transform/utils/isZombieProcess.d.mts +26 -0
- package/lib/core/transform/utils/isZombieProcess.d.ts +26 -0
- package/lib/core/transform/utils/isZombieProcess.js +46 -0
- package/lib/core/transform/utils/isZombieProcess.js.map +1 -0
- package/lib/core/transform/utils/isZombieProcess.mjs +44 -0
- package/lib/core/transform/utils/isZombieProcess.mjs.map +1 -0
- package/lib/core/transform/validation/TtscGenerationProof.d.cts +12 -4
- package/lib/core/transform/validation/TtscGenerationProof.d.mts +12 -4
- package/lib/core/transform/validation/TtscGenerationProof.d.ts +12 -4
- package/lib/core/transform/validation/TtscGenerationProof.js +13 -4
- package/lib/core/transform/validation/TtscGenerationProof.js.map +1 -1
- package/lib/core/transform/validation/TtscGenerationProof.mjs +13 -4
- package/lib/core/transform/validation/TtscGenerationProof.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCachedExternalInputs.d.cts +2 -2
- package/lib/core/transform/validation/matchesCachedExternalInputs.d.mts +2 -2
- package/lib/core/transform/validation/matchesCachedExternalInputs.d.ts +2 -2
- package/lib/core/transform/validation/matchesCachedExternalInputs.js +26 -5
- package/lib/core/transform/validation/matchesCachedExternalInputs.js.map +1 -1
- package/lib/core/transform/validation/matchesCachedExternalInputs.mjs +26 -5
- package/lib/core/transform/validation/matchesCachedExternalInputs.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.js +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.js.map +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputProbes.d.cts +15 -8
- package/lib/core/transform/validation/matchesUniversalHostInputProbes.d.mts +15 -8
- package/lib/core/transform/validation/matchesUniversalHostInputProbes.d.ts +15 -8
- package/lib/core/transform/validation/matchesUniversalHostInputProbes.js +29 -20
- package/lib/core/transform/validation/matchesUniversalHostInputProbes.js.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputProbes.mjs +29 -20
- package/lib/core/transform/validation/matchesUniversalHostInputProbes.mjs.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputs.js +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputs.js.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputs.mjs +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputs.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/transform/session/claimSharedCompile.ts +6 -4
- package/src/core/transform/session/openTtscTransformSession.ts +7 -3
- package/src/core/transform/tracker/broker/sweepAbandonedWatchProbes.ts +8 -7
- package/src/core/transform/tracker/settleProjectMutationEvents.ts +25 -36
- package/src/core/transform/tracker/verifyGenerationLocations.ts +53 -0
- package/src/core/transform/utils/isZombieProcess.ts +39 -0
- package/src/core/transform/validation/TtscGenerationProof.ts +20 -4
- package/src/core/transform/validation/matchesCachedExternalInputs.ts +28 -5
- package/src/core/transform/validation/matchesCompleteInputSnapshot.ts +1 -1
- package/src/core/transform/validation/matchesUniversalHostInputProbes.ts +27 -16
- package/src/core/transform/validation/matchesUniversalHostInputs.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesCachedExternalInputs.mjs","sources":["../../../../src/core/transform/validation/matchesCachedExternalInputs.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"matchesCachedExternalInputs.mjs","sources":["../../../../src/core/transform/validation/matchesCachedExternal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AC,IAAI,EAAE,UAAU;AACtC,kBAAE,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC;YACxC,IAAI,MAAM,KAAK,SAAS;AAAE,gBAAA,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;QACzD;QACA,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,EAAE,UAAU,CAAC;AACtD,QAAA,IACE,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC;YAC/D,cAAc,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI,mBAAmB,CAAC,EAC1D;YACA,OAAO,GAAG,KAAK;QACjB;QACA,IACE,IAAI,KAAK,IAAI;AACb,YAAA,KAAK,KAAK,SAAS;YACnB,MAAM,EAAE,SAAS,KAAK,KAAK;YAC3B,MAAM,CAAC,SAAS,EAChB;AACA,YAAA,UAAU,CAAC,QAAQ,CAAC,GAAG,KAAK;QAC9B;IACF;AACA,IAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE;AAChC;;;;"}
|
|
@@ -69,7 +69,7 @@ cached, proof) {
|
|
|
69
69
|
const hostValidation = cached.hostInputValidation;
|
|
70
70
|
if (hostValidation === undefined ||
|
|
71
71
|
!matchesUniversalHostInputEntries.matchesUniversalHostInputEntries(cached, hostValidation) ||
|
|
72
|
-
!matchesUniversalHostInputProbes.matchesUniversalHostInputProbes(cached, hostValidation) ||
|
|
72
|
+
!matchesUniversalHostInputProbes.matchesUniversalHostInputProbes(cached, hostValidation, proof) ||
|
|
73
73
|
!matchesUniversalHostInputTrees.matchesUniversalHostInputTrees(cached, hostValidation, proof)) {
|
|
74
74
|
return false;
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesCompleteInputSnapshot.js","sources":["../../../../src/core/transform/validation/matchesCompleteInputSnapshot.ts"],"sourcesContent":[null],"names":["nativeInputPredicatesHold","envelopeDerivation","matchesUniversalHostInputEntries","matchesUniversalHostInputProbes","matchesUniversalHostInputTrees","declaredProjectInputKeys","collectProjectInputSnapshot","resultFilesystem","walkSnapshotComplete","sameProjectDirectories","sameHashes","matchesCachedExternalInputs","matchesExternalInputRealpaths"],"mappings":";;;;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;SACa,4BAA4B;AAC1C;;;AAGG;AACH,MAAkC,EAClC,KAAuC,EAAA;AAEvC,IAAA,IAAI,CAACA,mDAAyB,CAAC,MAAM,EAAE,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;AAC3D,IAAA,IACE,MAAM,CAAC,uBAAuB,KAAK,IAAI;AACvC,QAAA,MAAM,CAAC,kBAAkB,KAAK,SAAS,EACvC;AACA,QAAA,OAAO,KAAK;IACd;;;;;;;;AAQA,IAAA,MAAM,KAAK,GAAGC,qCAAkB,CAAC,MAAM,CAAC;AACxC,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,mBAAmB;IACjD,IACE,cAAc,KAAK,SAAS;AAC5B,QAAA,CAACC,iEAAgC,CAAC,MAAM,EAAE,cAAc,CAAC;AACzD,QAAA,CAACC,+DAA+B,CAAC,MAAM,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"matchesCompleteInputSnapshot.js","sources":["../../../../src/core/transform/validation/matchesCompleteInputSnapshot.ts"],"sourcesContent":[null],"names":["nativeInputPredicatesHold","envelopeDerivation","matchesUniversalHostInputEntries","matchesUniversalHostInputProbes","matchesUniversalHostInputTrees","declaredProjectInputKeys","collectProjectInputSnapshot","resultFilesystem","walkSnapshotComplete","sameProjectDirectories","sameHashes","matchesCachedExternalInputs","matchesExternalInputRealpaths"],"mappings":";;;;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;SACa,4BAA4B;AAC1C;;;AAGG;AACH,MAAkC,EAClC,KAAuC,EAAA;AAEvC,IAAA,IAAI,CAACA,mDAAyB,CAAC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,GAAG,SAAS;IAC1C;AACF;;;;"}
|
|
@@ -67,7 +67,7 @@ cached, proof) {
|
|
|
67
67
|
const hostValidation = cached.hostInputValidation;
|
|
68
68
|
if (hostValidation === undefined ||
|
|
69
69
|
!matchesUniversalHostInputEntries(cached, hostValidation) ||
|
|
70
|
-
!matchesUniversalHostInputProbes(cached, hostValidation) ||
|
|
70
|
+
!matchesUniversalHostInputProbes(cached, hostValidation, proof) ||
|
|
71
71
|
!matchesUniversalHostInputTrees(cached, hostValidation, proof)) {
|
|
72
72
|
return false;
|
|
73
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesCompleteInputSnapshot.mjs","sources":["../../../../src/core/transform/validation/matchesCompleteInputSnapshot.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;SACa,4BAA4B;AAC1C;;;AAGG;AACH,MAAkC,EAClC,KAAuC,EAAA;AAEvC,IAAA,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;AAC3D,IAAA,IACE,MAAM,CAAC,uBAAuB,KAAK,IAAI;AACvC,QAAA,MAAM,CAAC,kBAAkB,KAAK,SAAS,EACvC;AACA,QAAA,OAAO,KAAK;IACd;;;;;;;;AAQA,IAAA,MAAM,KAAK,GAAG,kBAAkB,CAAC,MAAM,CAAC;AACxC,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,mBAAmB;IACjD,IACE,cAAc,KAAK,SAAS;AAC5B,QAAA,CAAC,gCAAgC,CAAC,MAAM,EAAE,cAAc,CAAC;AACzD,QAAA,CAAC,+BAA+B,CAAC,MAAM,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"matchesCompleteInputSnapshot.mjs","sources":["../../../../src/core/transform/validation/matchesCompleteInputSnapshot.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;AA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K,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;AACnE,QAAA,kBAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS;IAC1C;AACF;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform.cjs";
|
|
2
|
+
import type { TtscGenerationProof } from "./TtscGenerationProof.cjs";
|
|
2
3
|
import type { TtscHostInputValidation } from "./TtscHostInputValidation.cjs";
|
|
3
4
|
/**
|
|
4
5
|
* Prove the universal inputs that were absent are still absent, through one
|
|
@@ -13,13 +14,19 @@ import type { TtscHostInputValidation } from "./TtscHostInputValidation.cjs";
|
|
|
13
14
|
* Complete validation still compares its recorded byte and membership
|
|
14
15
|
* populations after this independent native absence predicate holds.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
+
* A group also needs its directory to still be one, which a candidate's own
|
|
18
|
+
* stat cannot say: Windows answers ENOENT below a file just as below nothing.
|
|
19
|
+
* The admission's location verification has already read that of every watched
|
|
20
|
+
* directory, so a group under one reuses it instead of stating the directory a
|
|
21
|
+
* second time in the same delivery (samchon/ttsc#1735).
|
|
22
|
+
*
|
|
23
|
+
* @evidence contracts/common.md#principled-implementation Exact native ENOENT or ENOTDIR observations prove candidate absence, including native Unicode and short-name aliases. A vanished ancestor leaves descendants unreachable; replacement by a file rejects the grouped directory proof, whether this pass or the admission's location verification observed the directory.
|
|
17
24
|
* @evidence contracts/common.md#clear-and-simple-design Missing-name validation has its own native absence boundary shared by narrow and complete proof; byte hashes and project membership remain separate predicates.
|
|
18
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations.
|
|
19
|
-
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity
|
|
20
|
-
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution.
|
|
21
|
-
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
22
|
-
* @evidence contracts/performance.md#efficient-algorithms Each
|
|
23
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
25
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations, and only an identity read by the same synchronous admission stands for a directory stat.
|
|
26
|
+
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity, both caller routes and the shared directory reading before tags.
|
|
27
|
+
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution, and the directory check does not rely on ENOTDIR, which Windows does not report.
|
|
28
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and the admission's identities, and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
29
|
+
* @evidence contracts/performance.md#efficient-algorithms Each candidate requires one native stat, and each group one directory stat unless its admission already read the directory's identity. Work follows candidate count and native path resolution, without enumerating unrelated directory entries; exact probes are necessary because listing names cannot establish all native aliases.
|
|
30
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers, and one synchronous admission shares its watched directories' identities; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
24
31
|
*/
|
|
25
|
-
export declare function matchesUniversalHostInputProbes(cached: TtscCachedProjectTransform, validation: TtscHostInputValidation): boolean;
|
|
32
|
+
export declare function matchesUniversalHostInputProbes(cached: TtscCachedProjectTransform, validation: TtscHostInputValidation, proof?: TtscGenerationProof.Transaction): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform.mjs";
|
|
2
|
+
import type { TtscGenerationProof } from "./TtscGenerationProof.mjs";
|
|
2
3
|
import type { TtscHostInputValidation } from "./TtscHostInputValidation.mjs";
|
|
3
4
|
/**
|
|
4
5
|
* Prove the universal inputs that were absent are still absent, through one
|
|
@@ -13,13 +14,19 @@ import type { TtscHostInputValidation } from "./TtscHostInputValidation.mjs";
|
|
|
13
14
|
* Complete validation still compares its recorded byte and membership
|
|
14
15
|
* populations after this independent native absence predicate holds.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
+
* A group also needs its directory to still be one, which a candidate's own
|
|
18
|
+
* stat cannot say: Windows answers ENOENT below a file just as below nothing.
|
|
19
|
+
* The admission's location verification has already read that of every watched
|
|
20
|
+
* directory, so a group under one reuses it instead of stating the directory a
|
|
21
|
+
* second time in the same delivery (samchon/ttsc#1735).
|
|
22
|
+
*
|
|
23
|
+
* @evidence contracts/common.md#principled-implementation Exact native ENOENT or ENOTDIR observations prove candidate absence, including native Unicode and short-name aliases. A vanished ancestor leaves descendants unreachable; replacement by a file rejects the grouped directory proof, whether this pass or the admission's location verification observed the directory.
|
|
17
24
|
* @evidence contracts/common.md#clear-and-simple-design Missing-name validation has its own native absence boundary shared by narrow and complete proof; byte hashes and project membership remain separate predicates.
|
|
18
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations.
|
|
19
|
-
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity
|
|
20
|
-
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution.
|
|
21
|
-
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
22
|
-
* @evidence contracts/performance.md#efficient-algorithms Each
|
|
23
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
25
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations, and only an identity read by the same synchronous admission stands for a directory stat.
|
|
26
|
+
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity, both caller routes and the shared directory reading before tags.
|
|
27
|
+
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution, and the directory check does not rely on ENOTDIR, which Windows does not report.
|
|
28
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and the admission's identities, and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
29
|
+
* @evidence contracts/performance.md#efficient-algorithms Each candidate requires one native stat, and each group one directory stat unless its admission already read the directory's identity. Work follows candidate count and native path resolution, without enumerating unrelated directory entries; exact probes are necessary because listing names cannot establish all native aliases.
|
|
30
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers, and one synchronous admission shares its watched directories' identities; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
24
31
|
*/
|
|
25
|
-
export declare function matchesUniversalHostInputProbes(cached: TtscCachedProjectTransform, validation: TtscHostInputValidation): boolean;
|
|
32
|
+
export declare function matchesUniversalHostInputProbes(cached: TtscCachedProjectTransform, validation: TtscHostInputValidation, proof?: TtscGenerationProof.Transaction): boolean;
|
|
@@ -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
|
/**
|
|
4
5
|
* Prove the universal inputs that were absent are still absent, through one
|
|
@@ -13,13 +14,19 @@ import type { TtscHostInputValidation } from "./TtscHostInputValidation";
|
|
|
13
14
|
* Complete validation still compares its recorded byte and membership
|
|
14
15
|
* populations after this independent native absence predicate holds.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
+
* A group also needs its directory to still be one, which a candidate's own
|
|
18
|
+
* stat cannot say: Windows answers ENOENT below a file just as below nothing.
|
|
19
|
+
* The admission's location verification has already read that of every watched
|
|
20
|
+
* directory, so a group under one reuses it instead of stating the directory a
|
|
21
|
+
* second time in the same delivery (samchon/ttsc#1735).
|
|
22
|
+
*
|
|
23
|
+
* @evidence contracts/common.md#principled-implementation Exact native ENOENT or ENOTDIR observations prove candidate absence, including native Unicode and short-name aliases. A vanished ancestor leaves descendants unreachable; replacement by a file rejects the grouped directory proof, whether this pass or the admission's location verification observed the directory.
|
|
17
24
|
* @evidence contracts/common.md#clear-and-simple-design Missing-name validation has its own native absence boundary shared by narrow and complete proof; byte hashes and project membership remain separate predicates.
|
|
18
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations.
|
|
19
|
-
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity
|
|
20
|
-
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution.
|
|
21
|
-
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
22
|
-
* @evidence contracts/performance.md#efficient-algorithms Each
|
|
23
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
25
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations, and only an identity read by the same synchronous admission stands for a directory stat.
|
|
26
|
+
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity, both caller routes and the shared directory reading before tags.
|
|
27
|
+
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution, and the directory check does not rely on ENOTDIR, which Windows does not report.
|
|
28
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and the admission's identities, and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
29
|
+
* @evidence contracts/performance.md#efficient-algorithms Each candidate requires one native stat, and each group one directory stat unless its admission already read the directory's identity. Work follows candidate count and native path resolution, without enumerating unrelated directory entries; exact probes are necessary because listing names cannot establish all native aliases.
|
|
30
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers, and one synchronous admission shares its watched directories' identities; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
24
31
|
*/
|
|
25
|
-
export declare function matchesUniversalHostInputProbes(cached: TtscCachedProjectTransform, validation: TtscHostInputValidation): boolean;
|
|
32
|
+
export declare function matchesUniversalHostInputProbes(cached: TtscCachedProjectTransform, validation: TtscHostInputValidation, proof?: TtscGenerationProof.Transaction): boolean;
|
|
@@ -16,16 +16,22 @@ var resultFilesystem = require('../cache/resultFilesystem.js');
|
|
|
16
16
|
* Complete validation still compares its recorded byte and membership
|
|
17
17
|
* populations after this independent native absence predicate holds.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* A group also needs its directory to still be one, which a candidate's own
|
|
20
|
+
* stat cannot say: Windows answers ENOENT below a file just as below nothing.
|
|
21
|
+
* The admission's location verification has already read that of every watched
|
|
22
|
+
* directory, so a group under one reuses it instead of stating the directory a
|
|
23
|
+
* second time in the same delivery (samchon/ttsc#1735).
|
|
24
|
+
*
|
|
25
|
+
* @evidence contracts/common.md#principled-implementation Exact native ENOENT or ENOTDIR observations prove candidate absence, including native Unicode and short-name aliases. A vanished ancestor leaves descendants unreachable; replacement by a file rejects the grouped directory proof, whether this pass or the admission's location verification observed the directory.
|
|
20
26
|
* @evidence contracts/common.md#clear-and-simple-design Missing-name validation has its own native absence boundary shared by narrow and complete proof; byte hashes and project membership remain separate predicates.
|
|
21
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations.
|
|
22
|
-
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity
|
|
23
|
-
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution.
|
|
24
|
-
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
25
|
-
* @evidence contracts/performance.md#efficient-algorithms Each
|
|
26
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
27
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations, and only an identity read by the same synchronous admission stands for a directory stat.
|
|
28
|
+
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity, both caller routes and the shared directory reading before tags.
|
|
29
|
+
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution, and the directory check does not rely on ENOTDIR, which Windows does not report.
|
|
30
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and the admission's identities, and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
31
|
+
* @evidence contracts/performance.md#efficient-algorithms Each candidate requires one native stat, and each group one directory stat unless its admission already read the directory's identity. Work follows candidate count and native path resolution, without enumerating unrelated directory entries; exact probes are necessary because listing names cannot establish all native aliases.
|
|
32
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers, and one synchronous admission shares its watched directories' identities; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
27
33
|
*/
|
|
28
|
-
function matchesUniversalHostInputProbes(cached, validation) {
|
|
34
|
+
function matchesUniversalHostInputProbes(cached, validation, proof) {
|
|
29
35
|
const filesystem = resultFilesystem.resultFilesystem(cached.result);
|
|
30
36
|
const paths = (filesystem.platform ?? process.platform) === "win32"
|
|
31
37
|
? path.win32
|
|
@@ -41,18 +47,21 @@ function matchesUniversalHostInputProbes(cached, validation) {
|
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
for (const [directory, names] of validation.missing) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
// An identity the admission read proves the directory is one now.
|
|
51
|
+
if (proof?.locations?.get(directory) === undefined) {
|
|
52
|
+
try {
|
|
53
|
+
if (!filesystem.stat(directory).isDirectory())
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
// Only a provably absent/non-directory ancestor keeps every descendant
|
|
58
|
+
// unreachable. Permission and transient I/O failures cannot prove that
|
|
59
|
+
// a candidate is still missing, while replacing the proving directory
|
|
60
|
+
// with an exact file can itself redirect module resolution.
|
|
61
|
+
if (!isMissingPathError(error))
|
|
62
|
+
return false;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
56
65
|
}
|
|
57
66
|
for (const name of names) {
|
|
58
67
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesUniversalHostInputProbes.js","sources":["../../../../src/core/transform/validation/matchesUniversalHostInputProbes.ts"],"sourcesContent":[null],"names":["resultFilesystem"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"matchesUniversalHostInputProbes.js","sources":["../../../../src/core/transform/validation/matchesUniversalHostInputProbes.ts"],"sourcesContent":[null],"names":["resultFilesystem"],"mappings":";;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;SACa,+BAA+B,CAC7C,MAAkC,EAClC,UAAmC,EACnC,KAAuC,EAAA;IAEvC,MAAM,UAAU,GAAGA,iCAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;AAClD,IAAA,MAAM,KAAK,GACT,CAAC,UAAU,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,MAAM;UAC1C,IAAI,CAAC;AACP,UAAE,IAAI,CAAC,KAAK;IAChB,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,aAAa,IAAI,EAAE,EAAE;AAClD,QAAA,IAAI;AACF,YAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;AACtB,YAAA,OAAO,KAAK;QACd;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;AAAE,gBAAA,OAAO,KAAK;QAC9C;IACF;IACA,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE;;QAEnD,IAAI,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE;AAClD,YAAA,IAAI;gBACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;AAAE,oBAAA,OAAO,KAAK;YAC7D;YAAE,OAAO,KAAK,EAAE;;;;;AAKd,gBAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;AAAE,oBAAA,OAAO,KAAK;gBAC5C;YACF;QACF;AACA,QAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AACxB,YAAA,IAAI;AACF,gBAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5C,gBAAA,OAAO,KAAK;YACd;YAAE,OAAO,KAAK,EAAE;AACd,gBAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;AAAE,oBAAA,OAAO,KAAK;YAC9C;QACF;IACF;AACA,IAAA,OAAO,IAAI;AACb;AAEA;AACA,SAAS,kBAAkB,CAAC,KAAc,EAAA;AACxC,IAAA,MAAM,IAAI,GAAI,KAA2C,EAAE,IAAI;AAC/D,IAAA,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS;AAChD;;;;"}
|
|
@@ -14,16 +14,22 @@ import { resultFilesystem } from '../cache/resultFilesystem.mjs';
|
|
|
14
14
|
* Complete validation still compares its recorded byte and membership
|
|
15
15
|
* populations after this independent native absence predicate holds.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* A group also needs its directory to still be one, which a candidate's own
|
|
18
|
+
* stat cannot say: Windows answers ENOENT below a file just as below nothing.
|
|
19
|
+
* The admission's location verification has already read that of every watched
|
|
20
|
+
* directory, so a group under one reuses it instead of stating the directory a
|
|
21
|
+
* second time in the same delivery (samchon/ttsc#1735).
|
|
22
|
+
*
|
|
23
|
+
* @evidence contracts/common.md#principled-implementation Exact native ENOENT or ENOTDIR observations prove candidate absence, including native Unicode and short-name aliases. A vanished ancestor leaves descendants unreachable; replacement by a file rejects the grouped directory proof, whether this pass or the admission's location verification observed the directory.
|
|
18
24
|
* @evidence contracts/common.md#clear-and-simple-design Missing-name validation has its own native absence boundary shared by narrow and complete proof; byte hashes and project membership remain separate predicates.
|
|
19
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations.
|
|
20
|
-
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity
|
|
21
|
-
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution.
|
|
22
|
-
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
23
|
-
* @evidence contracts/performance.md#efficient-algorithms Each
|
|
24
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
25
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Listing inequality is not native name inequality; permission and transient failures are not fabricated absence. Only ENOENT and ENOTDIR qualify missing-path observations, and only an identity read by the same synchronous admission stands for a directory stat.
|
|
26
|
+
* @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain inability-to-prove rejection, unreadable-content ambiguity, both caller routes and the shared directory reading before tags.
|
|
27
|
+
* @evidence contracts/portability.md#os-neutral-implementation The injected native stat resolves original candidate spelling, and its platform selects the same win32 or posix joining grammar as capture's ancestor probe. Case flags and JavaScript Unicode folding do not replace native alias resolution, and the directory check does not rely on ENOTDIR, which Windows does not report.
|
|
28
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The pass borrows generation-owned groups and the admission's identities, and retains only each current native probe result; no directory listing, historical state or handle is acquired.
|
|
29
|
+
* @evidence contracts/performance.md#efficient-algorithms Each candidate requires one native stat, and each group one directory stat unless its admission already read the directory's identity. Work follows candidate count and native path resolution, without enumerating unrelated directory entries; exact probes are necessary because listing names cannot establish all native aliases.
|
|
30
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Capture shares nearest-ancestor selection and raw candidate groups across consumers, and one synchronous admission shares its watched directories' identities; each current absence proof must observe native candidates again unless the owning notification validator establishes unchanged inputs.
|
|
25
31
|
*/
|
|
26
|
-
function matchesUniversalHostInputProbes(cached, validation) {
|
|
32
|
+
function matchesUniversalHostInputProbes(cached, validation, proof) {
|
|
27
33
|
const filesystem = resultFilesystem(cached.result);
|
|
28
34
|
const paths = (filesystem.platform ?? process.platform) === "win32"
|
|
29
35
|
? path.win32
|
|
@@ -39,18 +45,21 @@ function matchesUniversalHostInputProbes(cached, validation) {
|
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
for (const [directory, names] of validation.missing) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
// An identity the admission read proves the directory is one now.
|
|
49
|
+
if (proof?.locations?.get(directory) === undefined) {
|
|
50
|
+
try {
|
|
51
|
+
if (!filesystem.stat(directory).isDirectory())
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
// Only a provably absent/non-directory ancestor keeps every descendant
|
|
56
|
+
// unreachable. Permission and transient I/O failures cannot prove that
|
|
57
|
+
// a candidate is still missing, while replacing the proving directory
|
|
58
|
+
// with an exact file can itself redirect module resolution.
|
|
59
|
+
if (!isMissingPathError(error))
|
|
60
|
+
return false;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
54
63
|
}
|
|
55
64
|
for (const name of names) {
|
|
56
65
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesUniversalHostInputProbes.mjs","sources":["../../../../src/core/transform/validation/matchesUniversalHostInputProbes.ts"],"sourcesContent":[null],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"matchesUniversalHostInputProbes.mjs","sources":["../../../../src/core/transform/validation/matchesUniversalHostInputProbes.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;SACa,+BAA+B,CAC7C,MAAkC,EAClC,UAAmC,EACnC,KAAuC,EAAA;IAEvC,MAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;AAClD,IAAA,MAAM,KAAK,GACT,CAAC,UAAU,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,MAAM;UAC1C,IAAI,CAAC;AACP,UAAE,IAAI,CAAC,KAAK;IAChB,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,aAAa,IAAI,EAAE,EAAE;AAClD,QAAA,IAAI;AACF,YAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;AACtB,YAAA,OAAO,KAAK;QACd;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;AAAE,gBAAA,OAAO,KAAK;QAC9C;IACF;IACA,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE;;QAEnD,IAAI,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE;AAClD,YAAA,IAAI;gBACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;AAAE,oBAAA,OAAO,KAAK;YAC7D;YAAE,OAAO,KAAK,EAAE;;;;;AAKd,gBAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;AAAE,oBAAA,OAAO,KAAK;gBAC5C;YACF;QACF;AACA,QAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AACxB,YAAA,IAAI;AACF,gBAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5C,gBAAA,OAAO,KAAK;YACd;YAAE,OAAO,KAAK,EAAE;AACd,gBAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;AAAE,oBAAA,OAAO,KAAK;YAC9C;QACF;IACF;AACA,IAAA,OAAO,IAAI;AACb;AAEA;AACA,SAAS,kBAAkB,CAAC,KAAc,EAAA;AACxC,IAAA,MAAM,IAAI,GAAI,KAA2C,EAAE,IAAI;AAC/D,IAAA,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS;AAChD;;;;"}
|
|
@@ -44,7 +44,7 @@ function matchesUniversalHostInputs(cached, validation, proof) {
|
|
|
44
44
|
if (notificationsProveAll)
|
|
45
45
|
return matchesUniversalHostInputTrees.matchesUniversalHostInputTrees(cached, validation, proof);
|
|
46
46
|
return (matchesUniversalHostInputEntries.matchesUniversalHostInputEntries(cached, validation) &&
|
|
47
|
-
matchesUniversalHostInputProbes.matchesUniversalHostInputProbes(cached, validation) &&
|
|
47
|
+
matchesUniversalHostInputProbes.matchesUniversalHostInputProbes(cached, validation, proof) &&
|
|
48
48
|
matchesUniversalHostInputTrees.matchesUniversalHostInputTrees(cached, validation, proof));
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesUniversalHostInputs.js","sources":["../../../../src/core/transform/validation/matchesUniversalHostInputs.ts"],"sourcesContent":[null],"names":["nativeInputPredicatesHold","trackerProvesInputUnchanged","matchesUniversalHostInputTrees","matchesUniversalHostInputEntries","matchesUniversalHostInputProbes"],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;SACa,0BAA0B,CACxC,MAAkC,EAClC,UAAmC,EACnC,KAAuC,EAAA;AAEvC,IAAA,IAAI,CAACA,mDAAyB,CAAC,MAAM,EAAE,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;IAC3D,IAAI,qBAAqB,GAAG,IAAI;AAChC,IAAA,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,OAAO,EAAE;QACtC,IAAI,CAACC,uDAA2B,CAAC,MAAM,CAAC,wBAAwB,EAAE,KAAK,CAAC,EAAE;YACxE,qBAAqB,GAAG,KAAK;YAC7B;QACF;IACF;AACA,IAAA,IAAI,qBAAqB;QACvB,OAAOC,6DAA8B,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC;AAClE,IAAA,QACEC,iEAAgC,CAAC,MAAM,EAAE,UAAU,CAAC;AACpD,QAAAC,+DAA+B,CAAC,MAAM,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"matchesUniversalHostInputs.js","sources":["../../../../src/core/transform/validation/matchesUniversalHostInputs.ts"],"sourcesContent":[null],"names":["nativeInputPredicatesHold","trackerProvesInputUnchanged","matchesUniversalHostInputTrees","matchesUniversalHostInputEntries","matchesUniversalHostInputProbes"],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;SACa,0BAA0B,CACxC,MAAkC,EAClC,UAAmC,EACnC,KAAuC,EAAA;AAEvC,IAAA,IAAI,CAACA,mDAAyB,CAAC,MAAM,EAAE,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;IAC3D,IAAI,qBAAqB,GAAG,IAAI;AAChC,IAAA,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,OAAO,EAAE;QACtC,IAAI,CAACC,uDAA2B,CAAC,MAAM,CAAC,wBAAwB,EAAE,KAAK,CAAC,EAAE;YACxE,qBAAqB,GAAG,KAAK;YAC7B;QACF;IACF;AACA,IAAA,IAAI,qBAAqB;QACvB,OAAOC,6DAA8B,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC;AAClE,IAAA,QACEC,iEAAgC,CAAC,MAAM,EAAE,UAAU,CAAC;AACpD,QAAAC,+DAA+B,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC;QAC1DF,6DAA8B,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC;AAE7D;;;;"}
|
|
@@ -42,7 +42,7 @@ function matchesUniversalHostInputs(cached, validation, proof) {
|
|
|
42
42
|
if (notificationsProveAll)
|
|
43
43
|
return matchesUniversalHostInputTrees(cached, validation, proof);
|
|
44
44
|
return (matchesUniversalHostInputEntries(cached, validation) &&
|
|
45
|
-
matchesUniversalHostInputProbes(cached, validation) &&
|
|
45
|
+
matchesUniversalHostInputProbes(cached, validation, proof) &&
|
|
46
46
|
matchesUniversalHostInputTrees(cached, validation, proof));
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesUniversalHostInputs.mjs","sources":["../../../../src/core/transform/validation/matchesUniversalHostInputs.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;SACa,0BAA0B,CACxC,MAAkC,EAClC,UAAmC,EACnC,KAAuC,EAAA;AAEvC,IAAA,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;IAC3D,IAAI,qBAAqB,GAAG,IAAI;AAChC,IAAA,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,OAAO,EAAE;QACtC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,wBAAwB,EAAE,KAAK,CAAC,EAAE;YACxE,qBAAqB,GAAG,KAAK;YAC7B;QACF;IACF;AACA,IAAA,IAAI,qBAAqB;QACvB,OAAO,8BAA8B,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC;AAClE,IAAA,QACE,gCAAgC,CAAC,MAAM,EAAE,UAAU,CAAC;AACpD,QAAA,+BAA+B,CAAC,MAAM,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"matchesUniversalHostInputs.mjs","sources":["../../../../src/core/transform/validation/matchesUniversalHostInputs.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;SACa,0BAA0B,CACxC,MAAkC,EAClC,UAAmC,EACnC,KAAuC,EAAA;AAEvC,IAAA,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;IAC3D,IAAI,qBAAqB,GAAG,IAAI;AAChC,IAAA,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,OAAO,EAAE;QACtC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,wBAAwB,EAAE,KAAK,CAAC,EAAE;YACxE,qBAAqB,GAAG,KAAK;YAC7B;QACF;IACF;AACA,IAAA,IAAI,qBAAqB;QACvB,OAAO,8BAA8B,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC;AAClE,IAAA,QACE,gCAAgC,CAAC,MAAM,EAAE,UAAU,CAAC;AACpD,QAAA,+BAA+B,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC;QAC1D,8BAA8B,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC;AAE7D;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttsc/unplugin",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.4",
|
|
4
4
|
"description": "Bundler adapters for ttsc plugins.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"fsevents": "^2.3.3"
|
|
203
203
|
},
|
|
204
204
|
"peerDependencies": {
|
|
205
|
-
"ttsc": "^0.31.
|
|
205
|
+
"ttsc": "^0.31.4"
|
|
206
206
|
},
|
|
207
207
|
"devDependencies": {
|
|
208
208
|
"@wrtnlabs/evidence": "^0.3.1",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"tslib": "^2.8.1",
|
|
218
218
|
"typescript": "^7.0.2",
|
|
219
219
|
"vite": "^7.3.5",
|
|
220
|
-
"ttsc": "0.31.
|
|
220
|
+
"ttsc": "0.31.4"
|
|
221
221
|
},
|
|
222
222
|
"repository": {
|
|
223
223
|
"type": "git",
|
|
@@ -2,6 +2,7 @@ import crypto from "node:crypto";
|
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
|
+
import { isZombieProcess } from "../utils/isZombieProcess";
|
|
5
6
|
import type { TtscSharedCompileClaim } from "./TtscSharedCompileClaim";
|
|
6
7
|
import type { TtscSharedCompilePublication } from "./TtscSharedCompilePublication";
|
|
7
8
|
|
|
@@ -294,15 +295,16 @@ function owns(lock: string, token: string): boolean {
|
|
|
294
295
|
}
|
|
295
296
|
|
|
296
297
|
/**
|
|
297
|
-
* Whether no process with this id
|
|
298
|
-
*
|
|
299
|
-
*
|
|
298
|
+
* Whether no process with this id runs on this machine, which the store's locks
|
|
299
|
+
* and partial writes name their writer by. An id that is not a positive integer
|
|
300
|
+
* names nothing this can tell, and counts as alive. An exited process its
|
|
301
|
+
* parent never collected is gone too.
|
|
300
302
|
*/
|
|
301
303
|
function processGone(pid: number): boolean {
|
|
302
304
|
if (!Number.isInteger(pid) || pid <= 0) return false;
|
|
303
305
|
try {
|
|
304
306
|
process.kill(pid, 0);
|
|
305
|
-
return
|
|
307
|
+
return isZombieProcess(pid);
|
|
306
308
|
} catch (error) {
|
|
307
309
|
return (error as NodeJS.ErrnoException).code === "ESRCH";
|
|
308
310
|
}
|
|
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
4
|
import { userStateDirectory } from "../filesystem/userStateDirectory";
|
|
5
|
+
import { isZombieProcess } from "../utils/isZombieProcess";
|
|
5
6
|
import { TTSC_TRANSFORM_SESSION_ENV } from "./TTSC_TRANSFORM_SESSION_ENV";
|
|
6
7
|
import { readTtscTransformSession } from "./readTtscTransformSession";
|
|
7
8
|
|
|
@@ -48,7 +49,7 @@ import { readTtscTransformSession } from "./readTtscTransformSession";
|
|
|
48
49
|
* @evidence contracts/common.md#clear-and-simple-design New directory ownership stays in userStateDirectory, claiming in claimSharedCompile and adoption proof in generation capture; this operation declares the address and reclaims recognized legacy children.
|
|
49
50
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Optional store failure leaves real local compilation in place, rather than reusing unproven output or suppressing compiler failure.
|
|
50
51
|
* @evidence contracts/common.md#meaningful-documentation The prose explains worker inheritance, persistent versus obsolete process storage, and why sharing failures return undefined.
|
|
51
|
-
* @evidence contracts/portability.md#os-neutral-implementation Native joins and user-state capability checks provide new storage; inherited addresses receive only current directory checks. process.kill(pid, 0) treats success and EPERM as live, other failures as not live; this classification is not a general proof of death under every process-probe failure.
|
|
52
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native joins and user-state capability checks provide new storage; inherited addresses receive only current directory checks. process.kill(pid, 0) treats success and EPERM as live, other failures as not live, and a success naming a Linux zombie as not live; this classification is not a general proof of death under every process-probe failure.
|
|
52
53
|
* @evidence contracts/performance.md#efficient-algorithms An inherited path performs native path/stat work and avoids the root scan. Cold opening materializes N child names, matches their text and probes recognized PIDs, with provider realpath/create/stat work and recursive deletion of selected subtrees. Cost depends on name bytes, removed descendants and native operations, not just N; persistent shared-store contents are not scanned here.
|
|
53
54
|
* @evidence contracts/performance.md#reuse-equivalent-work Parent and worker processes retain the inherited store capability, while compile identity, state proof and publication reuse remain with the claim/adoption owners.
|
|
54
55
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Recognized clock and legacy children classified not live are recursively reclaimed. Inherited, live and unrecognized children bypass reclamation; a failed removal aborts opening, so no count or byte bound is enforced here. The environment retains the current address; claimSharedCompile owns best-effort publication pruning. Synchronous operations leave no open handle.
|
|
@@ -84,11 +85,14 @@ export function openTtscTransformSession(): string | undefined {
|
|
|
84
85
|
/** The store's name below the per-user root, which names no process. */
|
|
85
86
|
const SHARED_STORE = "shared";
|
|
86
87
|
|
|
87
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Whether a process with this id runs, as far as this process can tell. An
|
|
90
|
+
* exited process its parent never collected does not.
|
|
91
|
+
*/
|
|
88
92
|
function processAlive(pid: number): boolean {
|
|
89
93
|
try {
|
|
90
94
|
process.kill(pid, 0);
|
|
91
|
-
return
|
|
95
|
+
return !isZombieProcess(pid);
|
|
92
96
|
} catch (error) {
|
|
93
97
|
// EPERM: it exists and belongs to another user.
|
|
94
98
|
return (error as NodeJS.ErrnoException).code === "EPERM";
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
|
+
import { isZombieProcess } from "../../utils/isZombieProcess";
|
|
4
5
|
import { WATCH_PROBE_DIRECTORY_PREFIX } from "./WATCH_PROBE_DIRECTORY_PREFIX";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Attempt removal of recognized probe-name entries below `parent` when their
|
|
8
|
-
* named process reports ESRCH.
|
|
9
|
+
* named process reports ESRCH or has exited uncollected.
|
|
9
10
|
*
|
|
10
11
|
* A process removes its own probe directory when it exits, but a killed process
|
|
11
12
|
* may not. Only a namespace entry named with a process id that the operating
|
|
12
|
-
* system reports as gone (`ESRCH`)
|
|
13
|
-
* may not signal, and a name without
|
|
14
|
-
* adapter's probe convention; this scan
|
|
15
|
-
* prove filesystem ownership, and
|
|
16
|
-
* operation.
|
|
13
|
+
* system reports as gone (`ESRCH`), or as a zombie its parent never collected,
|
|
14
|
+
* is removed: a live owner, one this process may not signal, and a name without
|
|
15
|
+
* an id are left alone. Names follow the adapter's probe convention; this scan
|
|
16
|
+
* does not separately stat entry kind or prove filesystem ownership, and
|
|
17
|
+
* liveness/deletion are not one atomic operation.
|
|
17
18
|
*
|
|
18
19
|
* @param parent The tool cache the broker is about to name its own probe
|
|
19
20
|
* directory in.
|
|
@@ -64,7 +65,7 @@ export function sweepAbandonedWatchProbes(parent: string): void {
|
|
|
64
65
|
}
|
|
65
66
|
try {
|
|
66
67
|
process.kill(owner, 0);
|
|
67
|
-
continue;
|
|
68
|
+
if (!isZombieProcess(owner)) continue;
|
|
68
69
|
} catch (error) {
|
|
69
70
|
if ((error as NodeJS.ErrnoException).code !== "ESRCH") continue;
|
|
70
71
|
}
|