ttsc 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.
Files changed (43) hide show
  1. package/lib/compiler/internal/build/BuildExecution.d.ts +2 -1
  2. package/lib/compiler/internal/build/BuildExecution.js +33 -4
  3. package/lib/compiler/internal/build/BuildExecution.js.map +1 -1
  4. package/lib/compiler/internal/build/RunBuildOptions.d.ts +2 -1
  5. package/lib/compiler/internal/build/runExternalEmitProvenance.d.ts +15 -0
  6. package/lib/compiler/internal/build/runExternalEmitProvenance.js +67 -4
  7. package/lib/compiler/internal/build/runExternalEmitProvenance.js.map +1 -1
  8. package/lib/internal/probeLocalProcess.d.ts +27 -0
  9. package/lib/internal/probeLocalProcess.js +62 -0
  10. package/lib/internal/probeLocalProcess.js.map +1 -0
  11. package/lib/launcher/internal/runTtsc.js +2 -2
  12. package/lib/launcher/internal/runTtsc.js.map +1 -1
  13. package/lib/launcher/internal/runtime/isLocalProcessGone.d.ts +9 -9
  14. package/lib/launcher/internal/runtime/isLocalProcessGone.js +13 -20
  15. package/lib/launcher/internal/runtime/isLocalProcessGone.js.map +1 -1
  16. package/lib/launcher/internal/watch/WatchTopology.d.ts +20 -3
  17. package/lib/launcher/internal/watch/WatchTopology.js +31 -9
  18. package/lib/launcher/internal/watch/WatchTopology.js.map +1 -1
  19. package/lib/plugin/internal/load/loadProjectPlugins.d.ts +5 -2
  20. package/lib/plugin/internal/load/loadProjectPlugins.js +12 -5
  21. package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -1
  22. package/lib/plugin/internal/source/GoBuildCacheCoordination.js +4 -1
  23. package/lib/plugin/internal/source/GoBuildCacheCoordination.js.map +1 -1
  24. package/lib/plugin/internal/source/PluginBuildLockOwner.d.ts +8 -7
  25. package/lib/plugin/internal/source/PluginBuildLockOwner.js +10 -14
  26. package/lib/plugin/internal/source/PluginBuildLockOwner.js.map +1 -1
  27. package/lib/plugin/internal/source/SourcePluginWorkspace.d.ts +13 -5
  28. package/lib/plugin/internal/source/SourcePluginWorkspace.js +139 -5
  29. package/lib/plugin/internal/source/SourcePluginWorkspace.js.map +1 -1
  30. package/lib/structures/internal/TtscSingleFileEmitOptions.d.ts +5 -1
  31. package/package.json +8 -8
  32. package/src/compiler/internal/build/BuildExecution.ts +35 -7
  33. package/src/compiler/internal/build/RunBuildOptions.ts +2 -1
  34. package/src/compiler/internal/build/runExternalEmitProvenance.ts +84 -4
  35. package/src/internal/probeLocalProcess.ts +56 -0
  36. package/src/launcher/internal/runTtsc.ts +6 -2
  37. package/src/launcher/internal/runtime/isLocalProcessGone.ts +14 -19
  38. package/src/launcher/internal/watch/WatchTopology.ts +38 -9
  39. package/src/plugin/internal/load/loadProjectPlugins.ts +25 -14
  40. package/src/plugin/internal/source/GoBuildCacheCoordination.ts +4 -1
  41. package/src/plugin/internal/source/PluginBuildLockOwner.ts +10 -13
  42. package/src/plugin/internal/source/SourcePluginWorkspace.ts +175 -6
  43. package/src/structures/internal/TtscSingleFileEmitOptions.ts +8 -1
@@ -4,13 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SourcePluginWorkspace = void 0;
7
+ const node_crypto_1 = __importDefault(require("node:crypto"));
7
8
  const node_fs_1 = __importDefault(require("node:fs"));
8
9
  const node_os_1 = __importDefault(require("node:os"));
9
10
  const node_path_1 = __importDefault(require("node:path"));
10
11
  const OwnedSynchronousProcess_1 = require("../../../internal/OwnedSynchronousProcess");
12
+ const runtimeExecutableIdentity_1 = require("../../../internal/runtimeExecutableIdentity");
11
13
  const GoEnvironmentReading_1 = require("./GoEnvironmentReading");
12
14
  const GoSourceInputs_1 = require("./GoSourceInputs");
13
15
  const PluginBuildEnvironmentWitness_1 = require("./PluginBuildEnvironmentWitness");
16
+ const PluginContentIdentities_1 = require("./PluginContentIdentities");
17
+ const PluginLoadAnswers_1 = require("./PluginLoadAnswers");
14
18
  const SourcePluginAdmission_1 = require("./SourcePluginAdmission");
15
19
  const copiesPluginSourceEntry_1 = require("./copiesPluginSourceEntry");
16
20
  const formatGoWorkPath_1 = require("./formatGoWorkPath");
@@ -143,9 +147,17 @@ var SourcePluginWorkspace;
143
147
  * registry shares native reader state from the first watch query onward; its
144
148
  * owner must keep one fixed effective environment and discard it on retry.
145
149
  * Caller views share that native state and syntax, while each default
146
- * diagnostic label remains with its current caller. An optional record store
147
- * only carries the Go environment-file discovery hint across processes; it
148
- * never carries a parse.
150
+ * diagnostic label remains with its current caller.
151
+ *
152
+ * An optional record store carries the Go environment-file discovery hint
153
+ * across processes, and the parse of identical bytes by the same Go command
154
+ * (#1729): every launch otherwise ran `go mod edit -json` on an unchanged
155
+ * `go.mod`. A recorded parse is keyed by the manifest bytes, the content
156
+ * identities of the launcher and of the `GOROOT/bin/go` the live `go env
157
+ * -json GOROOT` reports, the `GOENV` file's bytes, and every `GO*`/`CGO_*`
158
+ * variable the command receives. It is consulted and written only under the
159
+ * same qualified tool witness that admits in-load sharing, so the live
160
+ * witness query still runs on every load.
149
161
  *
150
162
  * @evidence contracts/common.md#principled-implementation Actual go mod edit JSON determines module/replacement identities; current bytes, selected/dispatched-tool metadata and Go's environment-file witness qualify reuse under the existing metadata-distinguishability premise. Environment values are copied at reader creation. Missing go.mod returns the existing empty module observation, and moving tool/manifest inputs cannot publish a parsed record.
151
163
  * @evidence contracts/common.md#clear-and-simple-design One factory acquires load-owned native reader state by selected tool; a thin caller view forwards its diagnostic label without duplicating the byte-content map. Current reads and post-parse byte/tool comparisons qualify insertion.
@@ -153,7 +165,7 @@ var SourcePluginWorkspace;
153
165
  * @evidence contracts/common.md#meaningful-documentation Native prose states this operation's authority and delegated boundaries; fields retain separate native comments.
154
166
  * @evidence contracts/portability.md#os-neutral-implementation Native path resolution and temporary cwd avoid deep Windows working-directory limits; the selected tool handles manifest syntax.
155
167
  * @evidence contracts/performance.md#efficient-algorithms Reader acquisition performs a selected-tool registry lookup; every nonmissing read qualifies tool/environment metadata and reads current manifest bytes. A cold or stale witness first observes the selected launcher; an unavailable or nonfile launcher skips optional environment acquisition and permits only the actual uncached parse attempt. An observed file lends its same pre-read stat to the witness before acquiring current Go values and GOENV evidence through the common reader, without a GOROOT walk. Only complete native GOENV/GOROOT locations qualify syntax sharing; a dispatched tool is witnessed before parsing. Unavailable native environment acquisition disables syntax sharing while preserving actual parse success or failure. Each distinct byte string that earns stable successful syntax in that tool epoch runs Go mod edit and complete JSON parsing once, then rechecks bytes/tool metadata before caching; copied manifests share that parse. Failed queries remain uncached and report the current caller's diagnostic label.
156
- * @evidence contracts/performance.md#reuse-equivalent-work The caller may share this reader only within one load and the same pinned tool/effective environment; parsed syntax is not cross-load or native containment authority. Caller views share native state while preserving failure attribution; diagnostic labels are not syntax cache inputs.
168
+ * @evidence contracts/performance.md#reuse-equivalent-work The caller may share this reader only within one load and the same pinned tool/effective environment; parsed syntax is never native containment authority. Across loads only a parse recorded under the content identities of the bytes, both Go executables, the GOENV file and the Go variables is reused, and only under a qualified live tool witness. Caller views share native state while preserving failure attribution; diagnostic labels are not syntax cache inputs.
157
169
  * @evidence contracts/performance.md#bound-retention-and-release-resources The map retains distinct manifest bytes and parsed syntax for its caller's load/build lifetime; process/output capture cleanup remains delegated.
158
170
  */
159
171
  function createGoModReader(goBinary, pluginName, env, readers, identities) {
@@ -176,6 +188,9 @@ var SourcePluginWorkspace;
176
188
  const cache = new Map();
177
189
  const environment = { ...env };
178
190
  let toolWitness;
191
+ // The tool part of a recorded parse's identity, formed with each qualified
192
+ // witness; undefined without a store or a provable tool.
193
+ let toolIdentity;
179
194
  const reader = {
180
195
  read(dir, diagnosticPlugin = pluginName) {
181
196
  OwnedSynchronousProcess_1.OwnedSynchronousProcess.checkpoint();
@@ -222,6 +237,10 @@ var SourcePluginWorkspace;
222
237
  complete && PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.holds(witness)
223
238
  ? witness
224
239
  : undefined;
240
+ toolIdentity =
241
+ toolWitness === undefined || identities === undefined
242
+ ? undefined
243
+ : goModToolIdentity(goBinary, observed.GOROOT, observed.GOENV, environment, identities);
225
244
  }
226
245
  // UTF-8 decoding is lossy for malformed input. Only identical bytes
227
246
  // can share Go syntax, even when Go serializes two inputs identically.
@@ -230,6 +249,22 @@ var SourcePluginWorkspace;
230
249
  if (cached !== undefined) {
231
250
  return cached;
232
251
  }
252
+ // WARNING (#1729): a new process asks the record store before running
253
+ // Go on bytes this exact command already parsed. Never key this on a
254
+ // path or on the reader's metadata witness alone.
255
+ const answer = toolIdentity === undefined
256
+ ? undefined
257
+ : [
258
+ toolIdentity,
259
+ node_crypto_1.default.createHash("sha256").update(bytes).digest("hex"),
260
+ ];
261
+ const recalled = answer === undefined
262
+ ? undefined
263
+ : recallGoModInfo(PluginLoadAnswers_1.PluginLoadAnswers.read(identities, GO_MOD_SYNTAX, answer));
264
+ if (recalled !== undefined) {
265
+ cache.set(byteKey, recalled);
266
+ return recalled;
267
+ }
233
268
  const info = readGoModInfo(resolved, goBinary, diagnosticPlugin, environment);
234
269
  if (!node_fs_1.default.readFileSync(manifest).equals(bytes))
235
270
  throw new Error(`ttsc: go.mod changed while Go was reading ${manifest}`);
@@ -238,8 +273,14 @@ var SourcePluginWorkspace;
238
273
  throw new Error(`ttsc: Go tool or environment changed while reading ${manifest}`);
239
274
  // An unavailable environment observation can still execute a fresh Go
240
275
  // parse, but it cannot authorize sharing that result on another call.
241
- if (toolWitness !== undefined)
276
+ if (toolWitness !== undefined) {
242
277
  cache.set(byteKey, info);
278
+ if (answer !== undefined)
279
+ PluginLoadAnswers_1.PluginLoadAnswers.write(identities, GO_MOD_SYNTAX, answer, {
280
+ modulePath: info.modulePath,
281
+ directives: info.directives,
282
+ });
283
+ }
243
284
  return info;
244
285
  },
245
286
  };
@@ -292,6 +333,99 @@ var SourcePluginWorkspace;
292
333
  replacements: [],
293
334
  };
294
335
  }
336
+ /** Answer family of `go mod edit -json` parses (`PluginLoadAnswers`). */
337
+ const GO_MOD_SYNTAX = "go-mod-syntax";
338
+ /**
339
+ * Everything besides the manifest bytes that decides how `go mod edit -json`
340
+ * parses them, by content: the launcher, the `GOROOT/bin/go` the live query
341
+ * reported, the `GOENV` file that can select another toolchain, and the Go
342
+ * variables the command receives. `undefined` when an executable cannot be
343
+ * identified or the file cannot be read, so the parse runs.
344
+ */
345
+ function goModToolIdentity(goBinary, goRoot, goEnv, env, identities) {
346
+ const dispatchedPath = node_path_1.default.join(goRoot, "bin", process.platform === "win32" ? "go.exe" : "go");
347
+ // Only an executable the store can prove from metadata may key the record:
348
+ // streaming both executables on a device without a reference would cost
349
+ // more than the parse it replaces.
350
+ if (!provableFromMetadata(goBinary, identities) ||
351
+ !provableFromMetadata(dispatchedPath, identities))
352
+ return undefined;
353
+ const launcher = (0, runtimeExecutableIdentity_1.runtimeExecutableIdentity)(goBinary, identities);
354
+ const dispatched = (0, runtimeExecutableIdentity_1.runtimeExecutableIdentity)(dispatchedPath, identities);
355
+ if (launcher === undefined || dispatched === undefined)
356
+ return undefined;
357
+ let goEnvFile;
358
+ if (goEnv === "off")
359
+ goEnvFile = "off";
360
+ else
361
+ try {
362
+ goEnvFile = node_crypto_1.default
363
+ .createHash("sha256")
364
+ .update(node_fs_1.default.readFileSync(goEnv))
365
+ .digest("hex");
366
+ }
367
+ catch (error) {
368
+ if (error.code !== "ENOENT")
369
+ return undefined;
370
+ goEnvFile = null;
371
+ }
372
+ return [
373
+ 1,
374
+ launcher,
375
+ goRoot,
376
+ dispatched,
377
+ goEnv,
378
+ goEnvFile,
379
+ Object.entries(GoSourceInputs_1.GoSourceInputs.goBuildEnv(goBinary, undefined, env))
380
+ .filter((entry) => entry[1] !== undefined && /^(GO|CGO_)/i.test(entry[0]))
381
+ .sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)),
382
+ ];
383
+ }
384
+ /**
385
+ * Whether the file's stamp is separable from the store's reference on its
386
+ * device, the precondition for proving its bytes from a record.
387
+ */
388
+ function provableFromMetadata(file, identities) {
389
+ try {
390
+ return PluginContentIdentities_1.PluginContentIdentities.separable(identities.references, node_fs_1.default.statSync(file, { bigint: true }));
391
+ }
392
+ catch {
393
+ return false;
394
+ }
395
+ }
396
+ /**
397
+ * A recorded parse in the shape `readGoModInfo` returns, or `undefined` when
398
+ * the record does not have it.
399
+ */
400
+ function recallGoModInfo(value) {
401
+ if (typeof value !== "object" || value === null)
402
+ return undefined;
403
+ const record = value;
404
+ if ((record.modulePath !== null && typeof record.modulePath !== "string") ||
405
+ !Array.isArray(record.directives) ||
406
+ !record.directives.every(isReplaceDirective))
407
+ return undefined;
408
+ const directives = record.directives;
409
+ return {
410
+ modulePath: record.modulePath,
411
+ directives,
412
+ replacements: directives
413
+ .map(jsonReplacementToGoModReplacement)
414
+ .filter((replacement) => replacement !== null),
415
+ };
416
+ }
417
+ function isReplaceDirective(value) {
418
+ if (typeof value !== "object" || value === null)
419
+ return false;
420
+ const directive = value;
421
+ return [directive.Old, directive.New].every((side) => side === undefined ||
422
+ (typeof side === "object" &&
423
+ side !== null &&
424
+ ["Path", "Version"].every((key) => {
425
+ const field = side[key];
426
+ return field === undefined || typeof field === "string";
427
+ })));
428
+ }
295
429
  function jsonReplacementToGoModReplacement(replacement) {
296
430
  const modulePath = replacement.Old?.Path;
297
431
  if (modulePath === undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"SourcePluginWorkspace.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/SourcePluginWorkspace.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,sDAAyB;AACzB,0DAA6B;AAE7B,uFAAoF;AACpF,iEAA8D;AAC9D,qDAAkD;AAClD,mFAAgF;AAEhF,mEAAgE;AAChE,uEAAoE;AACpE,yDAAsD;AACtD,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,IAAiB,qBAAqB,CAmhBrC;AAnhBD,WAAiB,qBAAqB;IACpC;;;;;;;;;;;OAWG;IACH,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E,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO;QACT,CAAC;QACD,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,iDAAuB,CAAC,UAAU,EAAE,CAAC;YACrC,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC9C,QAAQ,GAAG,IAAI,CAAC;YAClB,CAAC;QACH,CAAC;QACD,IAAI,QAAQ,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,iDAAuB,CAAC,UAAU,EAAE,CAAC;YACrC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;gBAAE,SAAS;YACnC,IAAI,+BAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC9D,YAAY,CAAC,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AACtE,CAAC,EAnhBgB,qBAAqB,aAArB,qBAAqB,GAArB,qBAAqB,QAmhBrC"}
1
+ {"version":3,"file":"SourcePluginWorkspace.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/SourcePluginWorkspace.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,sDAAyB;AACzB,0DAA6B;AAE7B,uFAAoF;AACpF,2FAAwF;AACxF,iEAA8D;AAC9D,qDAAkD;AAClD,mFAAgF;AAChF,uEAAoE;AACpE,2DAAwD;AACxD,mEAAgE;AAChE,uEAAo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QACD,IAAI,QAAQ,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,iDAAuB,CAAC,UAAU,EAAE,CAAC;YACrC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;gBAAE,SAAS;YACnC,IAAI,+BAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC9D,YAAY,CAAC,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AACtE,CAAC,EAzrBgB,qBAAqB,aAArB,qBAAqB,GAArB,qBAAqB,QAyrBrC"}
@@ -1,3 +1,4 @@
1
+ import type { PluginContentIdentities } from "../../plugin/internal/source/PluginContentIdentities";
1
2
  import type { ITtscProjectInputSnapshot } from "./ITtscProjectInputSnapshot";
2
3
  import type { TtscCommonOptions } from "./TtscCommonOptions";
3
4
  /**
@@ -32,6 +33,9 @@ export interface TtscSingleFileEmitOptions extends TtscCommonOptions {
32
33
  * Executable modules, linked source roots, contributors and external local
33
34
  * module replacements can be reported. ttsc's own package sources are omitted;
34
35
  * this notification is not the complete compiler or project-rule input graph.
36
+ * The reporting load also hands over its record store, if it opened one, so the
37
+ * owner proves each root's state from the plugin cache's records instead of
38
+ * reading the sources the load is about to prove (#1728).
35
39
  *
36
40
  * @evidence contracts/common.md#principled-implementation Readonly roots describe the actual native-plugin sources whose later edits need observation.
37
41
  * @evidence contracts/common.md#clear-and-simple-design A void notification leaves watcher construction and lifetime with the invocation owner.
@@ -42,7 +46,7 @@ export interface TtscSingleFileEmitOptions extends TtscCommonOptions {
42
46
  * @evidenceExclude contracts/performance.md#efficient-algorithms A type declaration chooses no processing strategy.
43
47
  * @evidenceExclude contracts/performance.md#reuse-equivalent-work A type declaration computes nothing, so there is no work to share.
44
48
  */
45
- export type TtscPluginSourceInputsHandler = (inputs: readonly string[]) => void;
49
+ export type TtscPluginSourceInputsHandler = (inputs: readonly string[], identities?: PluginContentIdentities.Store) => void;
46
50
  /**
47
51
  * Receive the discovered project-rule filesystem topology for the watch owner.
48
52
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ttsc",
3
- "version": "0.31.2",
3
+ "version": "0.31.4",
4
4
  "description": "General-purpose TypeScript-Go compiler, runtime, plugin host, and LSP host.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -61,13 +61,13 @@
61
61
  },
62
62
  "optionalDependencies": {
63
63
  "fsevents": "^2.3.3",
64
- "@ttsc/linux-x64": "0.31.2",
65
- "@ttsc/darwin-x64": "0.31.2",
66
- "@ttsc/linux-arm64": "0.31.2",
67
- "@ttsc/win32-x64": "0.31.2",
68
- "@ttsc/win32-arm64": "0.31.2",
69
- "@ttsc/darwin-arm64": "0.31.2",
70
- "@ttsc/linux-arm": "0.31.2"
64
+ "@ttsc/linux-arm": "0.31.4",
65
+ "@ttsc/linux-arm64": "0.31.4",
66
+ "@ttsc/darwin-x64": "0.31.4",
67
+ "@ttsc/darwin-arm64": "0.31.4",
68
+ "@ttsc/linux-x64": "0.31.4",
69
+ "@ttsc/win32-x64": "0.31.4",
70
+ "@ttsc/win32-arm64": "0.31.4"
71
71
  },
72
72
  "sideEffects": [
73
73
  "./lib/register.js",
@@ -12,6 +12,7 @@ import type { ITtscProjectInputSnapshot } from "../../../structures/internal/ITt
12
12
  import type { TtscBuildOptions } from "../../../structures/internal/TtscBuildOptions";
13
13
  import type { TtscBuildResult } from "../../../structures/internal/TtscBuildResult";
14
14
  import type { TtscCommonOptions } from "../../../structures/internal/TtscCommonOptions";
15
+ import type { TtscPluginSourceInputsHandler } from "../../../structures/internal/TtscSingleFileEmitOptions";
15
16
  import { outputText } from "../outputText";
16
17
  import { readProjectConfig } from "../project/readProjectConfig";
17
18
  import { CompilerProjectSelection } from "../project/CompilerProjectSelection";
@@ -672,12 +673,39 @@ export namespace BuildExecution {
672
673
  TsgoArguments.createNativeBuildTsgoArgs(execution, options),
673
674
  );
674
675
  if (options.forceEmitProvenance !== true) return run();
675
- if (host.capabilities?.emitProvenance !== true) {
676
- throw new Error(
677
- `ttsc: selected native compiler host ${host.name ?? host.binary} does not support required emit provenance`,
678
- );
679
- }
680
- return captureNativeEmitProvenance(run);
676
+ if (host.capabilities?.emitProvenance === true)
677
+ return captureNativeEmitProvenance(run);
678
+ // WARNING: NEVER reject a compiler host for lacking `emitProvenance`.
679
+ //
680
+ // Plugin libraries such as typia ship their own Go executable host with its
681
+ // own argv parser, built against whatever ttsc release the user installed.
682
+ // They cannot accept `--emit-provenance-json`, and they will not declare a
683
+ // capability added after they were published. Throwing "does not support
684
+ // required emit provenance" here broke every such library under ttsx and
685
+ // every other provenance-requiring caller at once. A new ttsc requirement
686
+ // must never turn into a hard failure for a host that predates it.
687
+ //
688
+ // Run the host unchanged and observe its ownership from outside instead:
689
+ // the selected tsgo answers the read-only configuration and source-list
690
+ // probes for the same tsconfig, and the outputs whose metadata moved across
691
+ // the run are the host's writes. Layouts those probes cannot cover leave
692
+ // ownership unknown, which the caller reports, exactly as for plain tsgo.
693
+ return runExternalEmitProvenance({
694
+ args: TsgoArguments.createTsgoBuildArgs(execution, options, {
695
+ listEmittedFiles: false,
696
+ }),
697
+ binary: execution.tsgo.binary,
698
+ cwd: execution.compilerSelection.compilerArgsCwd,
699
+ env: compilerEnv(options.env),
700
+ run: () => {
701
+ const result = run();
702
+ return {
703
+ completedNormally: result.processCompletedNormally === true,
704
+ result,
705
+ };
706
+ },
707
+ writes: "observed",
708
+ });
681
709
  }
682
710
 
683
711
  /**
@@ -1190,7 +1218,7 @@ export namespace BuildExecution {
1190
1218
  export function resolveExecutionContext(
1191
1219
  options: TtscCommonOptions & {
1192
1220
  emit?: boolean;
1193
- onWatchInputs?: (inputs: readonly string[]) => void;
1221
+ onWatchInputs?: TtscPluginSourceInputsHandler;
1194
1222
  resolvedProject?: ITtscParsedProjectConfig;
1195
1223
  tsconfig?: string;
1196
1224
  },
@@ -1,6 +1,7 @@
1
1
  import type { ITtscParsedProjectConfig } from "../../../structures/internal/ITtscParsedProjectConfig";
2
2
  import type { ITtscProjectInputSnapshot } from "../../../structures/internal/ITtscProjectInputSnapshot";
3
3
  import type { TtscBuildOptions } from "../../../structures/internal/TtscBuildOptions";
4
+ import type { TtscPluginSourceInputsHandler } from "../../../structures/internal/TtscSingleFileEmitOptions";
4
5
 
5
6
  /**
6
7
  * Options of one {@link runBuild} call: the public build options plus the knobs
@@ -120,7 +121,7 @@ export type RunBuildOptions = TtscBuildOptions & {
120
121
  * The watch launcher uses these roots to invalidate a sidecar when its Go
121
122
  * implementation changes between rebuilds.
122
123
  */
123
- onWatchInputs?: (inputs: readonly string[]) => void;
124
+ onWatchInputs?: TtscPluginSourceInputsHandler;
124
125
 
125
126
  /**
126
127
  * Receives the reconciled project-rule filesystem dependency snapshot. Called
@@ -37,6 +37,12 @@ import { PassthroughFlags } from "./PassthroughFlags";
37
37
  * supported upstream naming subset; this adapter does not certify arbitrary
38
38
  * compiler behavior.
39
39
  *
40
+ * A foreign compiler host that cannot report its writes, a plugin library's own
41
+ * executable built before ttsc required provenance, is observed instead: the
42
+ * selected tsgo answers the same read-only probes, the host runs unchanged, and
43
+ * its writes are the predicted outputs whose metadata moved across the run.
44
+ * Requiring provenance must never reject such a host outright.
45
+ *
40
46
  * Normally reported ownerless outputs carry their actual failed proof boundary
41
47
  * in emittedSourceProofFailures. These explanations preserve compiler streams
42
48
  * and status; they do not replace missing ownership with a successful claim.
@@ -63,6 +69,16 @@ export function runExternalEmitProvenance(options: {
63
69
  /** Same child environment used by the emitting command. */
64
70
  env: NodeJS.ProcessEnv;
65
71
 
72
+ /**
73
+ * How the emitting command's writes are known. `reported` (the default) reads
74
+ * the producer's own `TSFILE:` rows. `observed` serves a foreign compiler
75
+ * host that cannot report them, a plugin library's own executable such as
76
+ * typia's: `binary` and `args` then only drive the read-only probes, the
77
+ * callback runs that host unchanged, and a write is a predicted output whose
78
+ * metadata moved across the run.
79
+ */
80
+ writes?: "reported" | "observed";
81
+
66
82
  /**
67
83
  * Execute the single emitting command, preserving raw output and whether the
68
84
  * child exited normally rather than being killed during reporting.
@@ -79,15 +95,22 @@ export function runExternalEmitProvenance(options: {
79
95
  const probe = prepareProbe(options, (reason) => {
80
96
  refusal = reason;
81
97
  });
98
+ const observed = options.writes === "observed";
99
+ const outputsBefore =
100
+ observed && probe !== undefined
101
+ ? observePredictedOutputs(probe)
102
+ : undefined;
82
103
  const { result, completedNormally } = options.run(
83
- probe === undefined
104
+ probe === undefined || observed
84
105
  ? options.args
85
106
  : [...options.args, "--listFiles", "true", "--listEmittedFiles", "true"],
86
107
  );
87
108
  const lines = result.stdout.split(/\r?\n/);
88
109
  const sourceLines = new Set(probe?.files);
89
110
  const stdout =
90
- probe === undefined || probe.config.compilerOptions.listFiles === true
111
+ probe === undefined ||
112
+ observed ||
113
+ probe.config.compilerOptions.listFiles === true
91
114
  ? result.stdout
92
115
  : result.stdout
93
116
  .split(/(?<=\n)/)
@@ -100,7 +123,12 @@ export function runExternalEmitProvenance(options: {
100
123
  emittedSourceProofFailures: undefined,
101
124
  stdout,
102
125
  };
103
- const written = writtenJavaScript(result.stdout, options.cwd);
126
+ const written =
127
+ outputsBefore !== undefined
128
+ ? movedOutputs(outputsBefore)
129
+ : observed
130
+ ? []
131
+ : writtenJavaScript(result.stdout, options.cwd);
104
132
  const emittedSources: Record<string, readonly string[]> = Object.create(null);
105
133
  const emittedSourceProofFailures: Record<string, string> =
106
134
  Object.create(null);
@@ -115,7 +143,11 @@ export function runExternalEmitProvenance(options: {
115
143
  };
116
144
  }
117
145
 
118
- const listed = compilerSourceList(lines, options.cwd);
146
+ // An observed host lists nothing; it compiles the same selected tsconfig, and
147
+ // the source observations below still prove that selection held still.
148
+ const listed = observed
149
+ ? probe.files
150
+ : compilerSourceList(lines, options.cwd);
119
151
  const sameSelection = JSON.stringify(listed) === JSON.stringify(probe.files);
120
152
 
121
153
  let stable = sameSelection;
@@ -554,6 +586,54 @@ function createOutputPrediction(
554
586
  };
555
587
  }
556
588
 
589
+ /**
590
+ * Every output the selected sources predict, with its metadata before an
591
+ * observed host runs.
592
+ */
593
+ function observePredictedOutputs(probe: {
594
+ base: string;
595
+ config: { compilerOptions: Record<string, unknown> };
596
+ files: readonly string[];
597
+ }): Map<string, string> {
598
+ const predict = createOutputPrediction(probe.config, probe.base);
599
+ const outputs = new Map<string, string>();
600
+ for (const source of probe.files)
601
+ for (const output of predict(source))
602
+ outputs.set(output, outputObservation(output));
603
+ return outputs;
604
+ }
605
+
606
+ /**
607
+ * The predicted outputs an observed host wrote: present now, with metadata
608
+ * other than before. A rewrite inside one clock tick at the same size and inode
609
+ * stays invisible, which is why a host that can report its writes must declare
610
+ * `emitProvenance` instead.
611
+ */
612
+ function movedOutputs(before: ReadonlyMap<string, string>): string[] {
613
+ const written: string[] = [];
614
+ for (const [output, observation] of before) {
615
+ const after = outputObservation(output);
616
+ if (after !== "missing" && after !== observation) written.push(output);
617
+ }
618
+ return written;
619
+ }
620
+
621
+ /** Device, inode, size and both clocks of one output, or `missing`. */
622
+ function outputObservation(file: string): string {
623
+ try {
624
+ const stats = fs.lstatSync(file, { bigint: true });
625
+ return [
626
+ stats.dev,
627
+ stats.ino,
628
+ stats.size,
629
+ stats.mtimeNs,
630
+ stats.ctimeNs,
631
+ ].join(":");
632
+ } catch {
633
+ return "missing";
634
+ }
635
+ }
636
+
557
637
  /** The writer's TSFILE report, rather than existing files, establishes writes. */
558
638
  function writtenJavaScript(stdout: string, cwd: string): string[] {
559
639
  const outputs = new Set<string>();
@@ -0,0 +1,56 @@
1
+ import fs from "node:fs";
2
+
3
+ /**
4
+ * Observe whether process `pid` on this host is still running.
5
+ *
6
+ * Signal zero answers whether the kernel still holds a process with that id.
7
+ * Only `ESRCH` proves absence; `EPERM` and other failures remain unknown. On
8
+ * Linux a successful probe can still name a zombie: a process that has exited
9
+ * and holds its id only until its parent collects its status. A parent that
10
+ * never collects, such as a container's PID 1 that is not an init or a
11
+ * subreaper that collects only when its own command ends, keeps the zombie
12
+ * indefinitely, so its `/proc` status reports it absent too. A leader whose own
13
+ * thread exited also reads as a zombie while its other threads run, so the
14
+ * zombie must be the process's last thread. Its id cannot be reused while the
15
+ * zombie holds it, so this never names a live process absent.
16
+ *
17
+ * @evidence contracts/common.md#principled-implementation ESRCH, or a Linux /proc status of zombie or dead with no other thread, proves the process exited; success with any other status is presence, and every other failure stays unknown.
18
+ * @evidence contracts/common.md#clear-and-simple-design One probe gives the ttsx run, dependency-lock and plugin-lock owners the same exit decision.
19
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The native signal-zero probe and the kernel's own process status decide; no PID list, timeout or error-to-absent fallback substitutes for them.
20
+ * @evidence contracts/common.md#meaningful-documentation The paragraph explains why a zombie answers signal zero, which parents leave one behind, why a zombie leader with running threads is not one, and why its id cannot name a live process.
21
+ * @evidence contracts/portability.md#os-neutral-implementation Node's signal-zero probe works on every platform; only Linux exposes zombies through /proc, and elsewhere the probe's answer stands.
22
+ * @evidence contracts/performance.md#efficient-algorithms One syscall, plus one small /proc read on Linux when the process exists.
23
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Process state is a current observation and is never cached as proof for a later decision.
24
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The probe retains no handle; the status text becomes reclaimable on return.
25
+ */
26
+ export function probeLocalProcess(pid: number): {
27
+ result: "present" | "absent" | "unknown";
28
+ errorCode?: string;
29
+ } {
30
+ try {
31
+ process.kill(pid, 0);
32
+ } catch (error) {
33
+ const code = (error as NodeJS.ErrnoException | null)?.code;
34
+ return { result: code === "ESRCH" ? "absent" : "unknown", errorCode: code };
35
+ }
36
+ if (process.platform !== "linux") return { result: "present" };
37
+ let status: string;
38
+ try {
39
+ status = fs.readFileSync(`/proc/${pid}/status`, "utf8");
40
+ } catch (error) {
41
+ const code = (error as NodeJS.ErrnoException | null)?.code;
42
+ // The process was collected between the probe and the read.
43
+ if (code === "ENOENT" || code === "ESRCH") return { result: "absent" };
44
+ return { result: "unknown", errorCode: code };
45
+ }
46
+ // A leader whose own thread exited reads as a zombie while its other threads
47
+ // still run; only a zombie that is the process's last thread has exited.
48
+ const state = /^State:\s*(\S)/m.exec(status)?.[1];
49
+ const threads = /^Threads:\s*(\d+)/m.exec(status)?.[1];
50
+ return {
51
+ result:
52
+ (state === "Z" || state === "X") && threads === "1"
53
+ ? "absent"
54
+ : "present",
55
+ };
56
+ }
@@ -19,6 +19,7 @@ import { createFilesystemPathIdentityContext } from "../../internal/pathIdentity
19
19
  import { isFilesystemPathIdentityWithin } from "../../internal/pathIdentity/isFilesystemPathIdentityWithin";
20
20
  import { resolvePhysicalPath } from "../../internal/pathIdentity/resolvePhysicalPath";
21
21
  import { resolveSafeCacheCleanupTargets } from "../../internal/resolveSafeCacheCleanupTargets";
22
+ import type { PluginContentIdentities } from "../../plugin/internal/source/PluginContentIdentities";
22
23
  import { SourceBuildCacheLayout } from "../../plugin/internal/source/SourceBuildCacheLayout";
23
24
  import { legacyGlobalCacheTargets } from "../../plugin/internal/source/legacyGlobalCacheTargets";
24
25
  import { resolveCleanTargets } from "../../plugin/internal/source/resolveCleanTargets";
@@ -634,8 +635,11 @@ function runWatch(
634
635
  const invocation = {
635
636
  ...(checkOnly ? { ...options, emit: false } : options),
636
637
  cwd,
637
- onWatchInputs: (inputs: readonly string[]) => {
638
- topology?.setExtraInputs(inputs);
638
+ onWatchInputs: (
639
+ inputs: readonly string[],
640
+ identities?: PluginContentIdentities.Store,
641
+ ) => {
642
+ topology?.setExtraInputs(inputs, identities);
639
643
  },
640
644
  onProjectInputs: (inputs: ITtscProjectInputSnapshot) => {
641
645
  topology?.setProjectInputs(inputs);