@ttsc/unplugin 0.31.3 → 0.31.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/lib/core/transform/session/claimSharedCompile.js +6 -4
  2. package/lib/core/transform/session/claimSharedCompile.js.map +1 -1
  3. package/lib/core/transform/session/claimSharedCompile.mjs +6 -4
  4. package/lib/core/transform/session/claimSharedCompile.mjs.map +1 -1
  5. package/lib/core/transform/session/openTtscTransformSession.d.cts +1 -1
  6. package/lib/core/transform/session/openTtscTransformSession.d.mts +1 -1
  7. package/lib/core/transform/session/openTtscTransformSession.d.ts +1 -1
  8. package/lib/core/transform/session/openTtscTransformSession.js +7 -3
  9. package/lib/core/transform/session/openTtscTransformSession.js.map +1 -1
  10. package/lib/core/transform/session/openTtscTransformSession.mjs +7 -3
  11. package/lib/core/transform/session/openTtscTransformSession.mjs.map +1 -1
  12. package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.d.cts +6 -6
  13. package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.d.mts +6 -6
  14. package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.d.ts +6 -6
  15. package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.js +9 -7
  16. package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.js.map +1 -1
  17. package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.mjs +9 -7
  18. package/lib/core/transform/tracker/broker/sweepAbandonedWatchProbes.mjs.map +1 -1
  19. package/lib/core/transform/tracker/broker/watchBrokerSource.js +14 -0
  20. package/lib/core/transform/tracker/broker/watchBrokerSource.js.map +1 -1
  21. package/lib/core/transform/tracker/broker/watchBrokerSource.mjs +14 -0
  22. package/lib/core/transform/tracker/broker/watchBrokerSource.mjs.map +1 -1
  23. package/lib/core/transform/tracker/createHostInputMutationTracker.js +20 -0
  24. package/lib/core/transform/tracker/createHostInputMutationTracker.js.map +1 -1
  25. package/lib/core/transform/tracker/createHostInputMutationTracker.mjs +20 -0
  26. package/lib/core/transform/tracker/createHostInputMutationTracker.mjs.map +1 -1
  27. package/lib/core/transform/tracker/createProjectMutationTracker.d.cts +6 -5
  28. package/lib/core/transform/tracker/createProjectMutationTracker.d.mts +6 -5
  29. package/lib/core/transform/tracker/createProjectMutationTracker.d.ts +6 -5
  30. package/lib/core/transform/tracker/createProjectMutationTracker.js +57 -36
  31. package/lib/core/transform/tracker/createProjectMutationTracker.js.map +1 -1
  32. package/lib/core/transform/tracker/createProjectMutationTracker.mjs +57 -36
  33. package/lib/core/transform/tracker/createProjectMutationTracker.mjs.map +1 -1
  34. package/lib/core/transform/tracker/settleProjectMutationEvents.d.cts +23 -29
  35. package/lib/core/transform/tracker/settleProjectMutationEvents.d.mts +23 -29
  36. package/lib/core/transform/tracker/settleProjectMutationEvents.d.ts +23 -29
  37. package/lib/core/transform/tracker/settleProjectMutationEvents.js +25 -37
  38. package/lib/core/transform/tracker/settleProjectMutationEvents.js.map +1 -1
  39. package/lib/core/transform/tracker/settleProjectMutationEvents.mjs +25 -37
  40. package/lib/core/transform/tracker/settleProjectMutationEvents.mjs.map +1 -1
  41. package/lib/core/transform/tracker/verifyGenerationLocations.d.cts +41 -0
  42. package/lib/core/transform/tracker/verifyGenerationLocations.d.mts +41 -0
  43. package/lib/core/transform/tracker/verifyGenerationLocations.d.ts +41 -0
  44. package/lib/core/transform/tracker/verifyGenerationLocations.js +54 -0
  45. package/lib/core/transform/tracker/verifyGenerationLocations.js.map +1 -0
  46. package/lib/core/transform/tracker/verifyGenerationLocations.mjs +52 -0
  47. package/lib/core/transform/tracker/verifyGenerationLocations.mjs.map +1 -0
  48. package/lib/core/transform/utils/isZombieProcess.d.cts +26 -0
  49. package/lib/core/transform/utils/isZombieProcess.d.mts +26 -0
  50. package/lib/core/transform/utils/isZombieProcess.d.ts +26 -0
  51. package/lib/core/transform/utils/isZombieProcess.js +46 -0
  52. package/lib/core/transform/utils/isZombieProcess.js.map +1 -0
  53. package/lib/core/transform/utils/isZombieProcess.mjs +44 -0
  54. package/lib/core/transform/utils/isZombieProcess.mjs.map +1 -0
  55. package/lib/core/transform/validation/TtscGenerationProof.d.cts +12 -4
  56. package/lib/core/transform/validation/TtscGenerationProof.d.mts +12 -4
  57. package/lib/core/transform/validation/TtscGenerationProof.d.ts +12 -4
  58. package/lib/core/transform/validation/TtscGenerationProof.js +13 -4
  59. package/lib/core/transform/validation/TtscGenerationProof.js.map +1 -1
  60. package/lib/core/transform/validation/TtscGenerationProof.mjs +13 -4
  61. package/lib/core/transform/validation/TtscGenerationProof.mjs.map +1 -1
  62. package/lib/core/transform/validation/matchesCachedExternalInputs.d.cts +2 -2
  63. package/lib/core/transform/validation/matchesCachedExternalInputs.d.mts +2 -2
  64. package/lib/core/transform/validation/matchesCachedExternalInputs.d.ts +2 -2
  65. package/lib/core/transform/validation/matchesCachedExternalInputs.js +26 -5
  66. package/lib/core/transform/validation/matchesCachedExternalInputs.js.map +1 -1
  67. package/lib/core/transform/validation/matchesCachedExternalInputs.mjs +26 -5
  68. package/lib/core/transform/validation/matchesCachedExternalInputs.mjs.map +1 -1
  69. package/lib/core/transform/validation/matchesCompleteInputSnapshot.js +1 -1
  70. package/lib/core/transform/validation/matchesCompleteInputSnapshot.js.map +1 -1
  71. package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs +1 -1
  72. package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs.map +1 -1
  73. package/lib/core/transform/validation/matchesUniversalHostInputProbes.d.cts +15 -8
  74. package/lib/core/transform/validation/matchesUniversalHostInputProbes.d.mts +15 -8
  75. package/lib/core/transform/validation/matchesUniversalHostInputProbes.d.ts +15 -8
  76. package/lib/core/transform/validation/matchesUniversalHostInputProbes.js +29 -20
  77. package/lib/core/transform/validation/matchesUniversalHostInputProbes.js.map +1 -1
  78. package/lib/core/transform/validation/matchesUniversalHostInputProbes.mjs +29 -20
  79. package/lib/core/transform/validation/matchesUniversalHostInputProbes.mjs.map +1 -1
  80. package/lib/core/transform/validation/matchesUniversalHostInputs.js +1 -1
  81. package/lib/core/transform/validation/matchesUniversalHostInputs.js.map +1 -1
  82. package/lib/core/transform/validation/matchesUniversalHostInputs.mjs +1 -1
  83. package/lib/core/transform/validation/matchesUniversalHostInputs.mjs.map +1 -1
  84. package/package.json +3 -3
  85. package/src/core/transform/session/claimSharedCompile.ts +6 -4
  86. package/src/core/transform/session/openTtscTransformSession.ts +7 -3
  87. package/src/core/transform/tracker/broker/sweepAbandonedWatchProbes.ts +8 -7
  88. package/src/core/transform/tracker/broker/watchBrokerSource.ts +14 -0
  89. package/src/core/transform/tracker/createHostInputMutationTracker.ts +18 -0
  90. package/src/core/transform/tracker/createProjectMutationTracker.ts +61 -40
  91. package/src/core/transform/tracker/settleProjectMutationEvents.ts +25 -36
  92. package/src/core/transform/tracker/verifyGenerationLocations.ts +53 -0
  93. package/src/core/transform/utils/isZombieProcess.ts +39 -0
  94. package/src/core/transform/validation/TtscGenerationProof.ts +20 -4
  95. package/src/core/transform/validation/matchesCachedExternalInputs.ts +28 -5
  96. package/src/core/transform/validation/matchesCompleteInputSnapshot.ts +1 -1
  97. package/src/core/transform/validation/matchesUniversalHostInputProbes.ts +27 -16
  98. package/src/core/transform/validation/matchesUniversalHostInputs.ts +1 -1
@@ -1,48 +1,42 @@
1
1
  import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform.cjs";
2
2
  /**
3
- * Await the cached trackers' drain operations, then recheck their watched
4
- * directory identities before persistent validation reads their verdicts.
3
+ * Await the cached trackers' drain operations before persistent validation
4
+ * reads their verdicts.
5
5
  *
6
6
  * A synchronous edit returns before its watch event is applied, so without this
7
7
  * a delivery could validate against a tracker that has not been told yet. Each
8
8
  * tracker uses its supplied native drain or the local two-immediate fallback;
9
9
  * that fallback is a scheduling opportunity, not independent native delivery
10
- * proof. Concurrent sibling deliveries share an in-flight tracker drain. Each
11
- * tracker with a verifier then checks its watched directories against those it
12
- * opened on, so a replaced directory withdraws the tracker instead of leaving
13
- * its silence to stand as proof. The trackers share what they read, so a
14
- * directory they all watch, the project root above all, costs one metadata call
15
- * per invocation rather than one per tracker. This map assumes those callbacks
16
- * share a coherent filesystem view; it is not an atomic snapshot. Drain
17
- * rejection aborts this verification phase and does not cancel sibling drains.
10
+ * proof. Concurrent sibling deliveries share an in-flight tracker drain. Drain
11
+ * rejection aborts the delivery's settlement and does not cancel sibling
12
+ * drains.
13
+ *
14
+ * The watched directories' identities are not checked here but by the
15
+ * delivery's synchronous admission (`verifyGenerationLocations`), after its
16
+ * last await, so a directory replaced while the delivery prepared is still
17
+ * caught and its reading is current when a validator reuses it.
18
18
  *
19
19
  * @evidence contracts/common.md#principled-implementation
20
- * Successful aggregate completion precedes the available directory verifiers.
21
- * Missing optional verifiers and backend delivery premises are not supplied
22
- * by this adapter; the caller still decides whether silence has authority.
20
+ * Successful aggregate completion precedes admission. Missing backend
21
+ * delivery premises are not supplied by this adapter; the caller still
22
+ * decides whether silence has authority.
23
23
  * @evidence contracts/common.md#clear-and-simple-design
24
- * One three-tracker list drives both phases; a delivery-local identity map
25
- * shares metadata without adding persistent validity state.
24
+ * One three-tracker list drives drainage; directory identity belongs to the
25
+ * synchronous admission that reads it.
26
26
  * @evidence contracts/common.md#prohibited-implementation-shortcuts
27
- * A replaced watched directory withdraws authority; the operation does not
28
- * patch watcher paths or certify a generation from a timeout alone.
27
+ * The operation does not patch watcher paths or certify a generation from a
28
+ * timeout alone.
29
29
  * @evidence contracts/common.md#meaningful-documentation
30
- * Native paragraphs explain event ordering, directory replacement and shared
31
- * verification under the documentation skill.
30
+ * Native paragraphs explain event ordering and where location verification
31
+ * moved, under the documentation skill.
32
32
  * @evidence contracts/portability.md#os-neutral-implementation
33
- * OS-neutral delivery uses backend-owned drains and filesystem-owned physical
34
- * identities; lexical aliases cannot prove a replaced directory unchanged.
33
+ * OS-neutral delivery uses backend-owned drains.
35
34
  * @evidence contracts/performance.md#efficient-algorithms
36
- * Three tracker slots are visited after concurrent drainage. Existing
37
- * verifiers scan their retained watched locations, sharing one metadata read
38
- * per exact directory spelling; native path traversal, key bytes and bigint
39
- * identity formatting plus delegated drain work remain variable costs.
35
+ * Three tracker slots are drained concurrently; delegated drain work remains
36
+ * a variable cost.
40
37
  * @evidence contracts/performance.md#reuse-equivalent-work
41
- * In-flight drainage is shared by tracker and identity observations by this
42
- * delivery's map; the map is recreated for every delivery, not cached forever.
38
+ * In-flight drainage is shared by concurrent sibling deliveries.
43
39
  * @evidence contracts/performance.md#bound-retention-and-release-resources
44
- * The identity map is local to the post-drain verification call, retaining
45
- * queried directory/identity text with no independent population/byte cap.
46
40
  * Pending drains retain the cached tracker references until they settle;
47
41
  * rejection does not cancel siblings and no aggregate deadline is supplied.
48
42
  * Tracker owners still control backend task and watcher closure.
@@ -1,48 +1,42 @@
1
1
  import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform.mjs";
2
2
  /**
3
- * Await the cached trackers' drain operations, then recheck their watched
4
- * directory identities before persistent validation reads their verdicts.
3
+ * Await the cached trackers' drain operations before persistent validation
4
+ * reads their verdicts.
5
5
  *
6
6
  * A synchronous edit returns before its watch event is applied, so without this
7
7
  * a delivery could validate against a tracker that has not been told yet. Each
8
8
  * tracker uses its supplied native drain or the local two-immediate fallback;
9
9
  * that fallback is a scheduling opportunity, not independent native delivery
10
- * proof. Concurrent sibling deliveries share an in-flight tracker drain. Each
11
- * tracker with a verifier then checks its watched directories against those it
12
- * opened on, so a replaced directory withdraws the tracker instead of leaving
13
- * its silence to stand as proof. The trackers share what they read, so a
14
- * directory they all watch, the project root above all, costs one metadata call
15
- * per invocation rather than one per tracker. This map assumes those callbacks
16
- * share a coherent filesystem view; it is not an atomic snapshot. Drain
17
- * rejection aborts this verification phase and does not cancel sibling drains.
10
+ * proof. Concurrent sibling deliveries share an in-flight tracker drain. Drain
11
+ * rejection aborts the delivery's settlement and does not cancel sibling
12
+ * drains.
13
+ *
14
+ * The watched directories' identities are not checked here but by the
15
+ * delivery's synchronous admission (`verifyGenerationLocations`), after its
16
+ * last await, so a directory replaced while the delivery prepared is still
17
+ * caught and its reading is current when a validator reuses it.
18
18
  *
19
19
  * @evidence contracts/common.md#principled-implementation
20
- * Successful aggregate completion precedes the available directory verifiers.
21
- * Missing optional verifiers and backend delivery premises are not supplied
22
- * by this adapter; the caller still decides whether silence has authority.
20
+ * Successful aggregate completion precedes admission. Missing backend
21
+ * delivery premises are not supplied by this adapter; the caller still
22
+ * decides whether silence has authority.
23
23
  * @evidence contracts/common.md#clear-and-simple-design
24
- * One three-tracker list drives both phases; a delivery-local identity map
25
- * shares metadata without adding persistent validity state.
24
+ * One three-tracker list drives drainage; directory identity belongs to the
25
+ * synchronous admission that reads it.
26
26
  * @evidence contracts/common.md#prohibited-implementation-shortcuts
27
- * A replaced watched directory withdraws authority; the operation does not
28
- * patch watcher paths or certify a generation from a timeout alone.
27
+ * The operation does not patch watcher paths or certify a generation from a
28
+ * timeout alone.
29
29
  * @evidence contracts/common.md#meaningful-documentation
30
- * Native paragraphs explain event ordering, directory replacement and shared
31
- * verification under the documentation skill.
30
+ * Native paragraphs explain event ordering and where location verification
31
+ * moved, under the documentation skill.
32
32
  * @evidence contracts/portability.md#os-neutral-implementation
33
- * OS-neutral delivery uses backend-owned drains and filesystem-owned physical
34
- * identities; lexical aliases cannot prove a replaced directory unchanged.
33
+ * OS-neutral delivery uses backend-owned drains.
35
34
  * @evidence contracts/performance.md#efficient-algorithms
36
- * Three tracker slots are visited after concurrent drainage. Existing
37
- * verifiers scan their retained watched locations, sharing one metadata read
38
- * per exact directory spelling; native path traversal, key bytes and bigint
39
- * identity formatting plus delegated drain work remain variable costs.
35
+ * Three tracker slots are drained concurrently; delegated drain work remains
36
+ * a variable cost.
40
37
  * @evidence contracts/performance.md#reuse-equivalent-work
41
- * In-flight drainage is shared by tracker and identity observations by this
42
- * delivery's map; the map is recreated for every delivery, not cached forever.
38
+ * In-flight drainage is shared by concurrent sibling deliveries.
43
39
  * @evidence contracts/performance.md#bound-retention-and-release-resources
44
- * The identity map is local to the post-drain verification call, retaining
45
- * queried directory/identity text with no independent population/byte cap.
46
40
  * Pending drains retain the cached tracker references until they settle;
47
41
  * rejection does not cancel siblings and no aggregate deadline is supplied.
48
42
  * Tracker owners still control backend task and watcher closure.
@@ -1,48 +1,42 @@
1
1
  import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform";
2
2
  /**
3
- * Await the cached trackers' drain operations, then recheck their watched
4
- * directory identities before persistent validation reads their verdicts.
3
+ * Await the cached trackers' drain operations before persistent validation
4
+ * reads their verdicts.
5
5
  *
6
6
  * A synchronous edit returns before its watch event is applied, so without this
7
7
  * a delivery could validate against a tracker that has not been told yet. Each
8
8
  * tracker uses its supplied native drain or the local two-immediate fallback;
9
9
  * that fallback is a scheduling opportunity, not independent native delivery
10
- * proof. Concurrent sibling deliveries share an in-flight tracker drain. Each
11
- * tracker with a verifier then checks its watched directories against those it
12
- * opened on, so a replaced directory withdraws the tracker instead of leaving
13
- * its silence to stand as proof. The trackers share what they read, so a
14
- * directory they all watch, the project root above all, costs one metadata call
15
- * per invocation rather than one per tracker. This map assumes those callbacks
16
- * share a coherent filesystem view; it is not an atomic snapshot. Drain
17
- * rejection aborts this verification phase and does not cancel sibling drains.
10
+ * proof. Concurrent sibling deliveries share an in-flight tracker drain. Drain
11
+ * rejection aborts the delivery's settlement and does not cancel sibling
12
+ * drains.
13
+ *
14
+ * The watched directories' identities are not checked here but by the
15
+ * delivery's synchronous admission (`verifyGenerationLocations`), after its
16
+ * last await, so a directory replaced while the delivery prepared is still
17
+ * caught and its reading is current when a validator reuses it.
18
18
  *
19
19
  * @evidence contracts/common.md#principled-implementation
20
- * Successful aggregate completion precedes the available directory verifiers.
21
- * Missing optional verifiers and backend delivery premises are not supplied
22
- * by this adapter; the caller still decides whether silence has authority.
20
+ * Successful aggregate completion precedes admission. Missing backend
21
+ * delivery premises are not supplied by this adapter; the caller still
22
+ * decides whether silence has authority.
23
23
  * @evidence contracts/common.md#clear-and-simple-design
24
- * One three-tracker list drives both phases; a delivery-local identity map
25
- * shares metadata without adding persistent validity state.
24
+ * One three-tracker list drives drainage; directory identity belongs to the
25
+ * synchronous admission that reads it.
26
26
  * @evidence contracts/common.md#prohibited-implementation-shortcuts
27
- * A replaced watched directory withdraws authority; the operation does not
28
- * patch watcher paths or certify a generation from a timeout alone.
27
+ * The operation does not patch watcher paths or certify a generation from a
28
+ * timeout alone.
29
29
  * @evidence contracts/common.md#meaningful-documentation
30
- * Native paragraphs explain event ordering, directory replacement and shared
31
- * verification under the documentation skill.
30
+ * Native paragraphs explain event ordering and where location verification
31
+ * moved, under the documentation skill.
32
32
  * @evidence contracts/portability.md#os-neutral-implementation
33
- * OS-neutral delivery uses backend-owned drains and filesystem-owned physical
34
- * identities; lexical aliases cannot prove a replaced directory unchanged.
33
+ * OS-neutral delivery uses backend-owned drains.
35
34
  * @evidence contracts/performance.md#efficient-algorithms
36
- * Three tracker slots are visited after concurrent drainage. Existing
37
- * verifiers scan their retained watched locations, sharing one metadata read
38
- * per exact directory spelling; native path traversal, key bytes and bigint
39
- * identity formatting plus delegated drain work remain variable costs.
35
+ * Three tracker slots are drained concurrently; delegated drain work remains
36
+ * a variable cost.
40
37
  * @evidence contracts/performance.md#reuse-equivalent-work
41
- * In-flight drainage is shared by tracker and identity observations by this
42
- * delivery's map; the map is recreated for every delivery, not cached forever.
38
+ * In-flight drainage is shared by concurrent sibling deliveries.
43
39
  * @evidence contracts/performance.md#bound-retention-and-release-resources
44
- * The identity map is local to the post-drain verification call, retaining
45
- * queried directory/identity text with no independent population/byte cap.
46
40
  * Pending drains retain the cached tracker references until they settle;
47
41
  * rejection does not cancel siblings and no aggregate deadline is supplied.
48
42
  * Tracker owners still control backend task and watcher closure.
@@ -3,65 +3,53 @@
3
3
  var settleMutationTrackers = require('./settleMutationTrackers.js');
4
4
 
5
5
  /**
6
- * Await the cached trackers' drain operations, then recheck their watched
7
- * directory identities before persistent validation reads their verdicts.
6
+ * Await the cached trackers' drain operations before persistent validation
7
+ * reads their verdicts.
8
8
  *
9
9
  * A synchronous edit returns before its watch event is applied, so without this
10
10
  * a delivery could validate against a tracker that has not been told yet. Each
11
11
  * tracker uses its supplied native drain or the local two-immediate fallback;
12
12
  * that fallback is a scheduling opportunity, not independent native delivery
13
- * proof. Concurrent sibling deliveries share an in-flight tracker drain. Each
14
- * tracker with a verifier then checks its watched directories against those it
15
- * opened on, so a replaced directory withdraws the tracker instead of leaving
16
- * its silence to stand as proof. The trackers share what they read, so a
17
- * directory they all watch, the project root above all, costs one metadata call
18
- * per invocation rather than one per tracker. This map assumes those callbacks
19
- * share a coherent filesystem view; it is not an atomic snapshot. Drain
20
- * rejection aborts this verification phase and does not cancel sibling drains.
13
+ * proof. Concurrent sibling deliveries share an in-flight tracker drain. Drain
14
+ * rejection aborts the delivery's settlement and does not cancel sibling
15
+ * drains.
16
+ *
17
+ * The watched directories' identities are not checked here but by the
18
+ * delivery's synchronous admission (`verifyGenerationLocations`), after its
19
+ * last await, so a directory replaced while the delivery prepared is still
20
+ * caught and its reading is current when a validator reuses it.
21
21
  *
22
22
  * @evidence contracts/common.md#principled-implementation
23
- * Successful aggregate completion precedes the available directory verifiers.
24
- * Missing optional verifiers and backend delivery premises are not supplied
25
- * by this adapter; the caller still decides whether silence has authority.
23
+ * Successful aggregate completion precedes admission. Missing backend
24
+ * delivery premises are not supplied by this adapter; the caller still
25
+ * decides whether silence has authority.
26
26
  * @evidence contracts/common.md#clear-and-simple-design
27
- * One three-tracker list drives both phases; a delivery-local identity map
28
- * shares metadata without adding persistent validity state.
27
+ * One three-tracker list drives drainage; directory identity belongs to the
28
+ * synchronous admission that reads it.
29
29
  * @evidence contracts/common.md#prohibited-implementation-shortcuts
30
- * A replaced watched directory withdraws authority; the operation does not
31
- * patch watcher paths or certify a generation from a timeout alone.
30
+ * The operation does not patch watcher paths or certify a generation from a
31
+ * timeout alone.
32
32
  * @evidence contracts/common.md#meaningful-documentation
33
- * Native paragraphs explain event ordering, directory replacement and shared
34
- * verification under the documentation skill.
33
+ * Native paragraphs explain event ordering and where location verification
34
+ * moved, under the documentation skill.
35
35
  * @evidence contracts/portability.md#os-neutral-implementation
36
- * OS-neutral delivery uses backend-owned drains and filesystem-owned physical
37
- * identities; lexical aliases cannot prove a replaced directory unchanged.
36
+ * OS-neutral delivery uses backend-owned drains.
38
37
  * @evidence contracts/performance.md#efficient-algorithms
39
- * Three tracker slots are visited after concurrent drainage. Existing
40
- * verifiers scan their retained watched locations, sharing one metadata read
41
- * per exact directory spelling; native path traversal, key bytes and bigint
42
- * identity formatting plus delegated drain work remain variable costs.
38
+ * Three tracker slots are drained concurrently; delegated drain work remains
39
+ * a variable cost.
43
40
  * @evidence contracts/performance.md#reuse-equivalent-work
44
- * In-flight drainage is shared by tracker and identity observations by this
45
- * delivery's map; the map is recreated for every delivery, not cached forever.
41
+ * In-flight drainage is shared by concurrent sibling deliveries.
46
42
  * @evidence contracts/performance.md#bound-retention-and-release-resources
47
- * The identity map is local to the post-drain verification call, retaining
48
- * queried directory/identity text with no independent population/byte cap.
49
43
  * Pending drains retain the cached tracker references until they settle;
50
44
  * rejection does not cancel siblings and no aggregate deadline is supplied.
51
45
  * Tracker owners still control backend task and watcher closure.
52
46
  */
53
47
  async function settleProjectMutationEvents(cached) {
54
- const trackers = [
48
+ await settleMutationTrackers.settleMutationTrackers([
55
49
  cached.projectMutationTracker,
56
50
  cached.hostInputMutationTracker,
57
51
  cached.candidateMutationTracker,
58
- ];
59
- await settleMutationTrackers.settleMutationTrackers(trackers);
60
- // A watch that now observes a replaced directory has nothing left to say
61
- // about the new one, so it gives up its authority before anything reads it.
62
- const seen = new Map();
63
- for (const tracker of trackers)
64
- tracker?.verifyLocations?.(seen);
52
+ ]);
65
53
  }
66
54
 
67
55
  exports.settleProjectMutationEvents = settleProjectMutationEvents;
@@ -1 +1 @@
1
- {"version":3,"file":"settleProjectMutationEvents.js","sources":["../../../../src/core/transform/tracker/settleProjectMutationEvents.ts"],"sourcesContent":[null],"names":["settleMutationTrackers"],"mappings":";;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CG;AACI,eAAe,2BAA2B,CAC/C,MAAkC,EAAA;AAElC,IAAA,MAAM,QAAQ,GAAG;AACf,QAAA,MAAM,CAAC,sBAAsB;AAC7B,QAAA,MAAM,CAAC,wBAAwB;AAC/B,QAAA,MAAM,CAAC,wBAAwB;KAChC;AACD,IAAA,MAAMA,6CAAsB,CAAC,QAAQ,CAAC;;;AAGtC,IAAA,MAAM,IAAI,GAAG,IAAI,GAAG,EAA8B;IAClD,KAAK,MAAM,OAAO,IAAI,QAAQ;AAAE,QAAA,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;AAClE;;;;"}
1
+ {"version":3,"file":"settleProjectMutationEvents.js","sources":["../../../../src/core/transform/tracker/settleProjectMutationEvents.ts"],"sourcesContent":[null],"names":["settleMutationTrackers"],"mappings":";;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCG;AACI,eAAe,2BAA2B,CAC/C,MAAkC,EAAA;AAElC,IAAA,MAAMA,6CAAsB,CAAC;AAC3B,QAAA,MAAM,CAAC,sBAAsB;AAC7B,QAAA,MAAM,CAAC,wBAAwB;AAC/B,QAAA,MAAM,CAAC,wBAAwB;AAChC,KAAA,CAAC;AACJ;;;;"}
@@ -1,65 +1,53 @@
1
1
  import { settleMutationTrackers } from './settleMutationTrackers.mjs';
2
2
 
3
3
  /**
4
- * Await the cached trackers' drain operations, then recheck their watched
5
- * directory identities before persistent validation reads their verdicts.
4
+ * Await the cached trackers' drain operations before persistent validation
5
+ * reads their verdicts.
6
6
  *
7
7
  * A synchronous edit returns before its watch event is applied, so without this
8
8
  * a delivery could validate against a tracker that has not been told yet. Each
9
9
  * tracker uses its supplied native drain or the local two-immediate fallback;
10
10
  * that fallback is a scheduling opportunity, not independent native delivery
11
- * proof. Concurrent sibling deliveries share an in-flight tracker drain. Each
12
- * tracker with a verifier then checks its watched directories against those it
13
- * opened on, so a replaced directory withdraws the tracker instead of leaving
14
- * its silence to stand as proof. The trackers share what they read, so a
15
- * directory they all watch, the project root above all, costs one metadata call
16
- * per invocation rather than one per tracker. This map assumes those callbacks
17
- * share a coherent filesystem view; it is not an atomic snapshot. Drain
18
- * rejection aborts this verification phase and does not cancel sibling drains.
11
+ * proof. Concurrent sibling deliveries share an in-flight tracker drain. Drain
12
+ * rejection aborts the delivery's settlement and does not cancel sibling
13
+ * drains.
14
+ *
15
+ * The watched directories' identities are not checked here but by the
16
+ * delivery's synchronous admission (`verifyGenerationLocations`), after its
17
+ * last await, so a directory replaced while the delivery prepared is still
18
+ * caught and its reading is current when a validator reuses it.
19
19
  *
20
20
  * @evidence contracts/common.md#principled-implementation
21
- * Successful aggregate completion precedes the available directory verifiers.
22
- * Missing optional verifiers and backend delivery premises are not supplied
23
- * by this adapter; the caller still decides whether silence has authority.
21
+ * Successful aggregate completion precedes admission. Missing backend
22
+ * delivery premises are not supplied by this adapter; the caller still
23
+ * decides whether silence has authority.
24
24
  * @evidence contracts/common.md#clear-and-simple-design
25
- * One three-tracker list drives both phases; a delivery-local identity map
26
- * shares metadata without adding persistent validity state.
25
+ * One three-tracker list drives drainage; directory identity belongs to the
26
+ * synchronous admission that reads it.
27
27
  * @evidence contracts/common.md#prohibited-implementation-shortcuts
28
- * A replaced watched directory withdraws authority; the operation does not
29
- * patch watcher paths or certify a generation from a timeout alone.
28
+ * The operation does not patch watcher paths or certify a generation from a
29
+ * timeout alone.
30
30
  * @evidence contracts/common.md#meaningful-documentation
31
- * Native paragraphs explain event ordering, directory replacement and shared
32
- * verification under the documentation skill.
31
+ * Native paragraphs explain event ordering and where location verification
32
+ * moved, under the documentation skill.
33
33
  * @evidence contracts/portability.md#os-neutral-implementation
34
- * OS-neutral delivery uses backend-owned drains and filesystem-owned physical
35
- * identities; lexical aliases cannot prove a replaced directory unchanged.
34
+ * OS-neutral delivery uses backend-owned drains.
36
35
  * @evidence contracts/performance.md#efficient-algorithms
37
- * Three tracker slots are visited after concurrent drainage. Existing
38
- * verifiers scan their retained watched locations, sharing one metadata read
39
- * per exact directory spelling; native path traversal, key bytes and bigint
40
- * identity formatting plus delegated drain work remain variable costs.
36
+ * Three tracker slots are drained concurrently; delegated drain work remains
37
+ * a variable cost.
41
38
  * @evidence contracts/performance.md#reuse-equivalent-work
42
- * In-flight drainage is shared by tracker and identity observations by this
43
- * delivery's map; the map is recreated for every delivery, not cached forever.
39
+ * In-flight drainage is shared by concurrent sibling deliveries.
44
40
  * @evidence contracts/performance.md#bound-retention-and-release-resources
45
- * The identity map is local to the post-drain verification call, retaining
46
- * queried directory/identity text with no independent population/byte cap.
47
41
  * Pending drains retain the cached tracker references until they settle;
48
42
  * rejection does not cancel siblings and no aggregate deadline is supplied.
49
43
  * Tracker owners still control backend task and watcher closure.
50
44
  */
51
45
  async function settleProjectMutationEvents(cached) {
52
- const trackers = [
46
+ await settleMutationTrackers([
53
47
  cached.projectMutationTracker,
54
48
  cached.hostInputMutationTracker,
55
49
  cached.candidateMutationTracker,
56
- ];
57
- await settleMutationTrackers(trackers);
58
- // A watch that now observes a replaced directory has nothing left to say
59
- // about the new one, so it gives up its authority before anything reads it.
60
- const seen = new Map();
61
- for (const tracker of trackers)
62
- tracker?.verifyLocations?.(seen);
50
+ ]);
63
51
  }
64
52
 
65
53
  export { settleProjectMutationEvents };
@@ -1 +1 @@
1
- {"version":3,"file":"settleProjectMutationEvents.mjs","sources":["../../../../src/core/transform/tracker/settleProjectMutationEvents.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CG;AACI,eAAe,2BAA2B,CAC/C,MAAkC,EAAA;AAElC,IAAA,MAAM,QAAQ,GAAG;AACf,QAAA,MAAM,CAAC,sBAAsB;AAC7B,QAAA,MAAM,CAAC,wBAAwB;AAC/B,QAAA,MAAM,CAAC,wBAAwB;KAChC;AACD,IAAA,MAAM,sBAAsB,CAAC,QAAQ,CAAC;;;AAGtC,IAAA,MAAM,IAAI,GAAG,IAAI,GAAG,EAA8B;IAClD,KAAK,MAAM,OAAO,IAAI,QAAQ;AAAE,QAAA,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;AAClE;;;;"}
1
+ {"version":3,"file":"settleProjectMutationEvents.mjs","sources":["../../../../src/core/transform/tracker/settleProjectMutationEvents.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCG;AACI,eAAe,2BAA2B,CAC/C,MAAkC,EAAA;AAElC,IAAA,MAAM,sBAAsB,CAAC;AAC3B,QAAA,MAAM,CAAC,sBAAsB;AAC7B,QAAA,MAAM,CAAC,wBAAwB;AAC/B,QAAA,MAAM,CAAC,wBAAwB;AAChC,KAAA,CAAC;AACJ;;;;"}
@@ -0,0 +1,41 @@
1
+ import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform.cjs";
2
+ /**
3
+ * Recheck every watched directory's identity against the one its tracker opened
4
+ * on, returning what the check read.
5
+ *
6
+ * A watch that now observes a replaced directory has nothing left to say about
7
+ * the new one, so its tracker gives up its authority before anything reads it.
8
+ * The trackers share what they read, so a directory they all watch, the project
9
+ * root above all, costs one metadata call per delivery rather than one per
10
+ * tracker. The returned readings belong to the synchronous admission that ran
11
+ * the check: a validator in it that must know whether one of these directories
12
+ * is still a directory reads the answer here instead of stating it again
13
+ * (samchon/ttsc#1735). The map assumes the callbacks share a coherent
14
+ * filesystem view; it is not an atomic snapshot.
15
+ *
16
+ * @evidence contracts/common.md#principled-implementation
17
+ * Each verifier compares followed device and file ids with the opened ones,
18
+ * and a mismatch or unreadable location withdraws its tracker.
19
+ * @evidence contracts/common.md#clear-and-simple-design
20
+ * One three-tracker list drives every verifier through one delivery-local
21
+ * identity map, which is also the result.
22
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts
23
+ * A replaced watched directory withdraws authority; lexical spelling never
24
+ * proves a directory unchanged.
25
+ * @evidence contracts/common.md#meaningful-documentation
26
+ * Native prose explains withdrawal, sharing and the result's synchronous
27
+ * lifetime under the documentation skill.
28
+ * @evidence contracts/portability.md#os-neutral-implementation
29
+ * Identities are the filesystem's own physical identities, followed through
30
+ * links, with no platform case rule.
31
+ * @evidence contracts/performance.md#efficient-algorithms
32
+ * Three tracker slots are visited; existing verifiers scan their retained
33
+ * watched locations, sharing one metadata read per exact directory spelling.
34
+ * @evidence contracts/performance.md#reuse-equivalent-work
35
+ * The map is created for each admission and handed to that admission's
36
+ * validators, never retained across deliveries.
37
+ * @evidence contracts/performance.md#bound-retention-and-release-resources
38
+ * The caller's synchronous transaction owns the map, which retains queried
39
+ * directory and identity text only until that transaction ends.
40
+ */
41
+ export declare function verifyGenerationLocations(cached: TtscCachedProjectTransform): Map<string, string | undefined>;
@@ -0,0 +1,41 @@
1
+ import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform.mjs";
2
+ /**
3
+ * Recheck every watched directory's identity against the one its tracker opened
4
+ * on, returning what the check read.
5
+ *
6
+ * A watch that now observes a replaced directory has nothing left to say about
7
+ * the new one, so its tracker gives up its authority before anything reads it.
8
+ * The trackers share what they read, so a directory they all watch, the project
9
+ * root above all, costs one metadata call per delivery rather than one per
10
+ * tracker. The returned readings belong to the synchronous admission that ran
11
+ * the check: a validator in it that must know whether one of these directories
12
+ * is still a directory reads the answer here instead of stating it again
13
+ * (samchon/ttsc#1735). The map assumes the callbacks share a coherent
14
+ * filesystem view; it is not an atomic snapshot.
15
+ *
16
+ * @evidence contracts/common.md#principled-implementation
17
+ * Each verifier compares followed device and file ids with the opened ones,
18
+ * and a mismatch or unreadable location withdraws its tracker.
19
+ * @evidence contracts/common.md#clear-and-simple-design
20
+ * One three-tracker list drives every verifier through one delivery-local
21
+ * identity map, which is also the result.
22
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts
23
+ * A replaced watched directory withdraws authority; lexical spelling never
24
+ * proves a directory unchanged.
25
+ * @evidence contracts/common.md#meaningful-documentation
26
+ * Native prose explains withdrawal, sharing and the result's synchronous
27
+ * lifetime under the documentation skill.
28
+ * @evidence contracts/portability.md#os-neutral-implementation
29
+ * Identities are the filesystem's own physical identities, followed through
30
+ * links, with no platform case rule.
31
+ * @evidence contracts/performance.md#efficient-algorithms
32
+ * Three tracker slots are visited; existing verifiers scan their retained
33
+ * watched locations, sharing one metadata read per exact directory spelling.
34
+ * @evidence contracts/performance.md#reuse-equivalent-work
35
+ * The map is created for each admission and handed to that admission's
36
+ * validators, never retained across deliveries.
37
+ * @evidence contracts/performance.md#bound-retention-and-release-resources
38
+ * The caller's synchronous transaction owns the map, which retains queried
39
+ * directory and identity text only until that transaction ends.
40
+ */
41
+ export declare function verifyGenerationLocations(cached: TtscCachedProjectTransform): Map<string, string | undefined>;
@@ -0,0 +1,41 @@
1
+ import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform";
2
+ /**
3
+ * Recheck every watched directory's identity against the one its tracker opened
4
+ * on, returning what the check read.
5
+ *
6
+ * A watch that now observes a replaced directory has nothing left to say about
7
+ * the new one, so its tracker gives up its authority before anything reads it.
8
+ * The trackers share what they read, so a directory they all watch, the project
9
+ * root above all, costs one metadata call per delivery rather than one per
10
+ * tracker. The returned readings belong to the synchronous admission that ran
11
+ * the check: a validator in it that must know whether one of these directories
12
+ * is still a directory reads the answer here instead of stating it again
13
+ * (samchon/ttsc#1735). The map assumes the callbacks share a coherent
14
+ * filesystem view; it is not an atomic snapshot.
15
+ *
16
+ * @evidence contracts/common.md#principled-implementation
17
+ * Each verifier compares followed device and file ids with the opened ones,
18
+ * and a mismatch or unreadable location withdraws its tracker.
19
+ * @evidence contracts/common.md#clear-and-simple-design
20
+ * One three-tracker list drives every verifier through one delivery-local
21
+ * identity map, which is also the result.
22
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts
23
+ * A replaced watched directory withdraws authority; lexical spelling never
24
+ * proves a directory unchanged.
25
+ * @evidence contracts/common.md#meaningful-documentation
26
+ * Native prose explains withdrawal, sharing and the result's synchronous
27
+ * lifetime under the documentation skill.
28
+ * @evidence contracts/portability.md#os-neutral-implementation
29
+ * Identities are the filesystem's own physical identities, followed through
30
+ * links, with no platform case rule.
31
+ * @evidence contracts/performance.md#efficient-algorithms
32
+ * Three tracker slots are visited; existing verifiers scan their retained
33
+ * watched locations, sharing one metadata read per exact directory spelling.
34
+ * @evidence contracts/performance.md#reuse-equivalent-work
35
+ * The map is created for each admission and handed to that admission's
36
+ * validators, never retained across deliveries.
37
+ * @evidence contracts/performance.md#bound-retention-and-release-resources
38
+ * The caller's synchronous transaction owns the map, which retains queried
39
+ * directory and identity text only until that transaction ends.
40
+ */
41
+ export declare function verifyGenerationLocations(cached: TtscCachedProjectTransform): Map<string, string | undefined>;
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Recheck every watched directory's identity against the one its tracker opened
5
+ * on, returning what the check read.
6
+ *
7
+ * A watch that now observes a replaced directory has nothing left to say about
8
+ * the new one, so its tracker gives up its authority before anything reads it.
9
+ * The trackers share what they read, so a directory they all watch, the project
10
+ * root above all, costs one metadata call per delivery rather than one per
11
+ * tracker. The returned readings belong to the synchronous admission that ran
12
+ * the check: a validator in it that must know whether one of these directories
13
+ * is still a directory reads the answer here instead of stating it again
14
+ * (samchon/ttsc#1735). The map assumes the callbacks share a coherent
15
+ * filesystem view; it is not an atomic snapshot.
16
+ *
17
+ * @evidence contracts/common.md#principled-implementation
18
+ * Each verifier compares followed device and file ids with the opened ones,
19
+ * and a mismatch or unreadable location withdraws its tracker.
20
+ * @evidence contracts/common.md#clear-and-simple-design
21
+ * One three-tracker list drives every verifier through one delivery-local
22
+ * identity map, which is also the result.
23
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts
24
+ * A replaced watched directory withdraws authority; lexical spelling never
25
+ * proves a directory unchanged.
26
+ * @evidence contracts/common.md#meaningful-documentation
27
+ * Native prose explains withdrawal, sharing and the result's synchronous
28
+ * lifetime under the documentation skill.
29
+ * @evidence contracts/portability.md#os-neutral-implementation
30
+ * Identities are the filesystem's own physical identities, followed through
31
+ * links, with no platform case rule.
32
+ * @evidence contracts/performance.md#efficient-algorithms
33
+ * Three tracker slots are visited; existing verifiers scan their retained
34
+ * watched locations, sharing one metadata read per exact directory spelling.
35
+ * @evidence contracts/performance.md#reuse-equivalent-work
36
+ * The map is created for each admission and handed to that admission's
37
+ * validators, never retained across deliveries.
38
+ * @evidence contracts/performance.md#bound-retention-and-release-resources
39
+ * The caller's synchronous transaction owns the map, which retains queried
40
+ * directory and identity text only until that transaction ends.
41
+ */
42
+ function verifyGenerationLocations(cached) {
43
+ const seen = new Map();
44
+ for (const tracker of [
45
+ cached.projectMutationTracker,
46
+ cached.hostInputMutationTracker,
47
+ cached.candidateMutationTracker,
48
+ ])
49
+ tracker?.verifyLocations?.(seen);
50
+ return seen;
51
+ }
52
+
53
+ exports.verifyGenerationLocations = verifyGenerationLocations;
54
+ //# sourceMappingURL=verifyGenerationLocations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifyGenerationLocations.js","sources":["../../../../src/core/transform/tracker/verifyGenerationLocations.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;AACG,SAAU,yBAAyB,CACvC,MAAkC,EAAA;AAElC,IAAA,MAAM,IAAI,GAAG,IAAI,GAAG,EAA8B;IAClD,KAAK,MAAM,OAAO,IAAI;AACpB,QAAA,MAAM,CAAC,sBAAsB;AAC7B,QAAA,MAAM,CAAC,wBAAwB;AAC/B,QAAA,MAAM,CAAC,wBAAwB;AAChC,KAAA;AACC,QAAA,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;AAClC,IAAA,OAAO,IAAI;AACb;;;;"}