@tracecode/harness 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,91 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
|
|
5
5
|
This repo uses Git tags as release boundaries. Version notes below summarize what shipped in each tagged release.
|
|
6
6
|
|
|
7
|
+
## [0.9.1] - 2026-06-05
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Fixed Java browser trace rewriting to emit typed `(String) null` index-source placeholders for generated indexed-write hooks, removing `javac` varargs warnings from instrumented user-code compiler diagnostics.
|
|
12
|
+
- Rebuilt the Java browser helper and rewriter JARs with the warning-free indexed-write instrumentation.
|
|
13
|
+
|
|
14
|
+
## [0.9.0] - 2026-06-04
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Added project-mode TraceKernel workspaces for browser and native execution, including virtual filesystem roots, `/proc` and `/dev` surfaces, command events, live and final file mutations, stdin/stdout/stderr routing, terminal sessions, readonly files, protected skills roots, and project examples.
|
|
19
|
+
- Added `@tracecode/harness-project` and project exports from the umbrella, browser, and native package surfaces.
|
|
20
|
+
- Added TraceKernel HTTP simulation for project workspaces, including in-kernel listeners, request dispatch, fetch/curl support, body helpers, request/listener diagnostics, Java project HTTP support, Python HTTP shims, and packaged HTTP smoke coverage.
|
|
21
|
+
- Added `@tracecode/harness-native` and `@tracecode/harness/native` for trusted host-native batch inference across Python, JavaScript, TypeScript, Java, C#, and C++.
|
|
22
|
+
- Added native queue APIs for multi-worker mixed-language job batches, plus compile-once/batch execution paths for high-volume corpus mining.
|
|
23
|
+
- Added C++ conformance fixture import tooling and expanded runtime parity/conformance coverage across JavaScript/TypeScript, Python, Java, C#, and C++.
|
|
24
|
+
- Added configurable V4 trace path depth and expanded fixtures for keyed/indexed provenance, recursive access, nested mutation, heap/queue/set/map behavior, stdout frames, and post-line state behavior.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Standardized V4 call, frame, stdout, provenance, keyed-removal, collection-mutation, and trace-budget behavior across supported runtimes.
|
|
29
|
+
- Improved browser JavaScript/TypeScript runtime support with a larger Node-like filesystem, stream, descriptor, stdio, watch, metadata, and TypeScript project-library surface.
|
|
30
|
+
- Routed Java, C#, C++, Python, and JavaScript/TypeScript project runners through shared TraceKernel policy for workspace roots, virtual devices, manifests, diagnostics, and file mutation handling.
|
|
31
|
+
- Split and trimmed CI stages for runtime trace, C# browser, C++ smoke, and package-surface validation.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Fixed V4 trace correctness gaps across collection mutation, indexed reads/writes, nested mutations, iteration bindings, recursive calls, stdout frames, lambda/call activations, map/set/key provenance, and post-line state behavior.
|
|
36
|
+
- Fixed Java trace rewriting around nested/indexed mutations, enhanced-for receivers, dangling else handling, compact control blocks, `PriorityQueue`, `List.remove`, object-key map reads, array writes, and side-effecting expression replay.
|
|
37
|
+
- Fixed C# tracing around tuple/index provenance, from-end ranges, nested set mutations, constructor/input hydration bounds, partial stdout, private-field snapshots, and side-effecting collection keys.
|
|
38
|
+
- Fixed C++ tracing around aliasing, pointer reads, map/set keyed collections, `priority_queue`, nested vectors, scalar writes, lambda/script tracing, numeric literal inference, and compiler worker lifecycle.
|
|
39
|
+
- Fixed Python tracing around assignment writes, `heapq`, helper shadowing, cyclic input literals, project snapshots, invalid nested mutation paths, and set-name shadowing.
|
|
40
|
+
- Fixed JavaScript/TypeScript tracing around async conditions, destructuring, private fields, nested write evaluation order, property reads, set/map provenance, and trace serialization limits.
|
|
41
|
+
|
|
42
|
+
### Security
|
|
43
|
+
|
|
44
|
+
- Hardened browser/project runtime boundaries, worker isolation, compiler/runtime asset loading, virtual path mapping, workspace traversal, final-diff application, project event streams, and public TraceKernel proc identity.
|
|
45
|
+
- Added encrypted browser IndexedDB kernel storage and trusted IndexedDB options for examples.
|
|
46
|
+
- Gated browser JavaScript trusted execution modes and documented isolation boundaries.
|
|
47
|
+
- Pruned the C# browser network runtime surface and locked down compiler/runtime assets.
|
|
48
|
+
- Removed JavaScript input materializer type evaluation and bounded resource use across JavaScript input hydration, Java diagnostics/trace expansion, C# hydration, async contexts, and bulk trace budgets.
|
|
49
|
+
- Updated vulnerable npm dependencies, including `lodash` to `4.18.1` and a `postcss` override to `8.5.10`.
|
|
50
|
+
|
|
51
|
+
### Notes
|
|
52
|
+
|
|
53
|
+
- Native harness is not a sandbox and should only run trusted code. The browser runner remains the default path for normal product usage.
|
|
54
|
+
- Java and C# native code clients support host-native run/batch execution, but native host-side trace instrumentation is still reported as unsupported.
|
|
55
|
+
|
|
56
|
+
## [0.8.0] - 2026-05-21
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- Added the V4 harness execution contract as the public runtime trace contract for browser harness consumers.
|
|
61
|
+
- Added native V4 runtime trace emission across JavaScript/TypeScript, Python, Java, C#, and C++.
|
|
62
|
+
- Added browser-local C# and C++ runtime support.
|
|
63
|
+
- Added language-split packages for core, browser, Python, JavaScript/TypeScript, Java, C#, and C++ harness consumers.
|
|
64
|
+
- Added generated runtime language metadata covering language versions, compiler/runtime details, standards, default imports, and bundled libraries.
|
|
65
|
+
- Added default runtime library support across supported runtimes, including JavaScript/TypeScript bundled libraries.
|
|
66
|
+
- Added explicit browser warmup APIs for heavyweight runtimes.
|
|
67
|
+
- Added language-filtered asset syncing through `tracecode-harness sync-assets --languages ...`.
|
|
68
|
+
- Added third-party runtime notices for bundled browser runtimes and toolchains.
|
|
69
|
+
- Added expanded runtime parity fixtures and contract gates for cross-language V4 trace behavior.
|
|
70
|
+
|
|
71
|
+
### Changed
|
|
72
|
+
|
|
73
|
+
- Changed the public trace result surface to V4 runtime traces.
|
|
74
|
+
- Reframed harness traces as low-level runtime facts rather than visualizer-specific payloads.
|
|
75
|
+
- Standardized runtime traces on post-line state, where line events describe facts visible after the source line executes.
|
|
76
|
+
- Standardized trace events around calls, lines, returns, snapshots, reads, writes, mutations, stdout, exceptions, timeouts, and trace-budget behavior.
|
|
77
|
+
- Standardized collection mutation and access provenance reporting across supported runtimes.
|
|
78
|
+
- Updated Java runtime tracing to emit native V4 traces by default.
|
|
79
|
+
- Updated browser runtime initialization so C#, C++, Java, Python, and TypeScript can be warmed intentionally before first execution.
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
|
|
83
|
+
- Improved Java rewrite-failure handling so parser failures surface as user-facing syntax or compiler diagnostics.
|
|
84
|
+
- Improved JavaScript/TypeScript non-trace execution so plain JavaScript runs no longer load the TypeScript compiler just to recover argument order.
|
|
85
|
+
- Improved Python serialization for script results and callable values.
|
|
86
|
+
|
|
87
|
+
### Notes
|
|
88
|
+
|
|
89
|
+
- `0.8.0` supersedes the unpublished `0.7.0-beta` line.
|
|
90
|
+
- This is a contract-establishing release for V4 runtime traces. Consumers upgrading from `0.6.6` should expect trace contract changes.
|
|
91
|
+
|
|
7
92
|
## [0.7.0-beta4] - 2026-05-10
|
|
8
93
|
|
|
9
94
|
### Changed
|
package/package.json
CHANGED
|
@@ -1082,7 +1082,7 @@
|
|
|
1082
1082
|
const tempSuffix = `${lineNumber}_${mutationTempCounter++}`;
|
|
1083
1083
|
const indexTemp = `__tracecodeIndex${tempSuffix}`;
|
|
1084
1084
|
const valueTemp = `__tracecodeValue${tempSuffix}`;
|
|
1085
|
-
return `{ var ${indexTemp} = ${indexExpression}; var ${valueTemp} = ${value}; java.util.List __tracecodeTarget = TraceHooks.readObjectListAtLine(${lineNumber}, "${name}", ${name}, ${indexTemp}, ${indexSourceArgument(indexExpression)}); __tracecodeTarget.add(${valueTemp}); TraceHooks.emitMutatingCallAtLine(${lineNumber}, "${name}", ${indexTemp}, "add", ${indexSourceArgument(indexExpression)}, ${valueTemp}); TraceHooks.emitIndexedWriteAtLine(${lineNumber}, "${name}", new Object[] { ${indexTemp}, __tracecodeTarget.size() - 1 }, ${valueTemp}, ${indexSourceArgument(indexExpression)}, null); TraceHooks.emitRuntimeSnapshotAtLine(${lineNumber}, "${name}", ${name}); }`;
|
|
1085
|
+
return `{ var ${indexTemp} = ${indexExpression}; var ${valueTemp} = ${value}; java.util.List __tracecodeTarget = TraceHooks.readObjectListAtLine(${lineNumber}, "${name}", ${name}, ${indexTemp}, ${indexSourceArgument(indexExpression)}); __tracecodeTarget.add(${valueTemp}); TraceHooks.emitMutatingCallAtLine(${lineNumber}, "${name}", ${indexTemp}, "add", ${indexSourceArgument(indexExpression)}, ${valueTemp}); TraceHooks.emitIndexedWriteAtLine(${lineNumber}, "${name}", new Object[] { ${indexTemp}, __tracecodeTarget.size() - 1 }, ${valueTemp}, ${indexSourceArgument(indexExpression)}, (String) null); TraceHooks.emitRuntimeSnapshotAtLine(${lineNumber}, "${name}", ${name}); }`;
|
|
1086
1086
|
});
|
|
1087
1087
|
|
|
1088
1088
|
const listGetPattern = new RegExp(`\\b${escapeRegExp(name)}\\.get\\(([^()\\n;]+)\\)`, 'g');
|
|
@@ -1105,7 +1105,7 @@
|
|
|
1105
1105
|
const keyTemp = `__tracecodeKey${tempSuffix}`;
|
|
1106
1106
|
const valueTemp = `__tracecodeValue${tempSuffix}`;
|
|
1107
1107
|
const target = `((java.util.Collection) (${name}).get(${keyTemp}))`;
|
|
1108
|
-
return `{ var ${keyTemp} = ${keyExpression}; var ${valueTemp} = ${value}; TraceHooks.emit("trace:{\\"kind\\":\\"read\\",\\"line\\":${lineNumber},\\"target\\":{\\"variable\\":\\"${name}\\",\\"path\\":[" + TraceHooks.serializeResult(${keyTemp}) + "]${escapedIndexSourcesTargetSegment(keyExpression)}},\\"value\\":null}"); java.util.Collection __tracecodeTarget = ${target}; __tracecodeTarget.${method}(${valueTemp}); TraceHooks.emitMutatingCallAtLine(${lineNumber}, "${name}", ${keyTemp}, "${method}", ${indexSourceArgument(keyExpression)}, ${valueTemp}); if (__tracecodeTarget instanceof java.util.List) TraceHooks.emitIndexedWriteAtLine(${lineNumber}, "${name}", new Object[] { ${keyTemp}, ((java.util.List) __tracecodeTarget).size() - 1 }, ${valueTemp}, ${indexSourceArgument(keyExpression)}, null); TraceHooks.emitRuntimeSnapshotAtLine(${lineNumber}, "${name}", ${name}); }`;
|
|
1108
|
+
return `{ var ${keyTemp} = ${keyExpression}; var ${valueTemp} = ${value}; TraceHooks.emit("trace:{\\"kind\\":\\"read\\",\\"line\\":${lineNumber},\\"target\\":{\\"variable\\":\\"${name}\\",\\"path\\":[" + TraceHooks.serializeResult(${keyTemp}) + "]${escapedIndexSourcesTargetSegment(keyExpression)}},\\"value\\":null}"); java.util.Collection __tracecodeTarget = ${target}; __tracecodeTarget.${method}(${valueTemp}); TraceHooks.emitMutatingCallAtLine(${lineNumber}, "${name}", ${keyTemp}, "${method}", ${indexSourceArgument(keyExpression)}, ${valueTemp}); if (__tracecodeTarget instanceof java.util.List) TraceHooks.emitIndexedWriteAtLine(${lineNumber}, "${name}", new Object[] { ${keyTemp}, ((java.util.List) __tracecodeTarget).size() - 1 }, ${valueTemp}, ${indexSourceArgument(keyExpression)}, (String) null); TraceHooks.emitRuntimeSnapshotAtLine(${lineNumber}, "${name}", ${name}); }`;
|
|
1109
1109
|
});
|
|
1110
1110
|
nextLine = replaceJavaReceiverCall(nextLine, name, 'containsKey', (key) =>
|
|
1111
1111
|
`TraceHooks.containsMapKeyAtLine(${lineNumber}, "${name}", ${name}, ${key}, ${indexSourceArgument(key)})`
|
|
@@ -530,7 +530,7 @@ public final class JavaRewriteLibrary {
|
|
|
530
530
|
if ("add".equals(method) && rawArgs.size() == 1) {
|
|
531
531
|
writeEvent = " if (" + target + " instanceof java.util.List) TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) +
|
|
532
532
|
", new Object[] { " + quote(field) + ", " + index + ", ((java.util.List) " + target + ").size() - 1 }, " +
|
|
533
|
-
rewrittenArgs.callArgs + ", null, " + indexSourceArgument(rawIndex) + ", null);";
|
|
533
|
+
rewrittenArgs.callArgs + ", (String) null, " + indexSourceArgument(rawIndex) + ", (String) null);";
|
|
534
534
|
}
|
|
535
535
|
String snapshotEvent = "this".equals(name) && frame.isField(field)
|
|
536
536
|
? "TraceHooks.emitRuntimeSnapshotAtLine(" + sourceLine + ", " + quote(field) + ", " + field + ");"
|
|
@@ -559,10 +559,10 @@ public final class JavaRewriteLibrary {
|
|
|
559
559
|
"addLast".equals(method) || "offerLast".equals(method)) {
|
|
560
560
|
writeEvent = " TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) +
|
|
561
561
|
", new Object[] { 0, " + quote(field) + ", ((java.util.Collection) " + temp + ").size() - 1 }, " +
|
|
562
|
-
rewrittenArgs.callArgs + ", null, null, null);";
|
|
562
|
+
rewrittenArgs.callArgs + ", (String) null, (String) null, (String) null);";
|
|
563
563
|
} else if ("addFirst".equals(method) || "offerFirst".equals(method)) {
|
|
564
564
|
writeEvent = " TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) +
|
|
565
|
-
", new Object[] { 0, " + quote(field) + ", 0 }, " + rewrittenArgs.callArgs + ", null, null, null);";
|
|
565
|
+
", new Object[] { 0, " + quote(field) + ", 0 }, " + rewrittenArgs.callArgs + ", (String) null, (String) null, (String) null);";
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
String snapshotEvent = "TraceHooks.emitRuntimeSnapshotAtLine(" + sourceLine + ", " + quote(name) + ", " + name + ");";
|
|
@@ -607,10 +607,10 @@ public final class JavaRewriteLibrary {
|
|
|
607
607
|
if (("add".equals(method) || "push".equals(method) || "addLast".equals(method) || "offerLast".equals(method)) && splitTopLevel(rawArgs).size() == 1) {
|
|
608
608
|
writeEvent = " TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) +
|
|
609
609
|
", new Object[] { " + quote(field) + ", ((java.util.Collection) " + target + ").size() - 1 }, " +
|
|
610
|
-
rewrittenArgs.callArgs + ", null, null);";
|
|
610
|
+
rewrittenArgs.callArgs + ", (String) null, (String) null);";
|
|
611
611
|
} else if (("addFirst".equals(method) || "offerFirst".equals(method)) && splitTopLevel(rawArgs).size() == 1) {
|
|
612
612
|
writeEvent = " TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) +
|
|
613
|
-
", new Object[] { " + quote(field) + ", 0 }, " + rewrittenArgs.callArgs + ", null, null);";
|
|
613
|
+
", new Object[] { " + quote(field) + ", 0 }, " + rewrittenArgs.callArgs + ", (String) null, (String) null);";
|
|
614
614
|
}
|
|
615
615
|
String snapshotEvent = "this".equals(name) && frame.isField(field)
|
|
616
616
|
? "TraceHooks.emitRuntimeSnapshotAtLine(" + sourceLine + ", " + quote(field) + ", " + field + ");"
|
|
@@ -681,7 +681,7 @@ public final class JavaRewriteLibrary {
|
|
|
681
681
|
if ("add".equals(method) && rawArgs.size() == 1) {
|
|
682
682
|
writeEvent = " if (" + temp + " instanceof java.util.List) TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) +
|
|
683
683
|
", new Object[] { " + index + ", ((java.util.List) " + temp + ").size() - 1 }, " +
|
|
684
|
-
rewrittenArgs.callArgs + ", " + indexSourceArgument(rawIndex) + ", null);";
|
|
684
|
+
rewrittenArgs.callArgs + ", " + indexSourceArgument(rawIndex) + ", (String) null);";
|
|
685
685
|
}
|
|
686
686
|
String snapshotEvent = "TraceHooks.emitRuntimeSnapshotAtLine(" + sourceLine + ", " + quote(name) + ", " + name + ");";
|
|
687
687
|
return indent + "{ " + indexExpression.prefix + "var " + temp + " = " + target + "; " + readEvent + " " + rewrittenArgs.prefix + temp + "." + method + "(" + rewrittenArgs.callArgs + "); " + mutateEvent + writeEvent + " " + snapshotEvent + " }";
|
|
@@ -795,7 +795,7 @@ public final class JavaRewriteLibrary {
|
|
|
795
795
|
if (("add".equals(method) || "push".equals(method)) && splitTopLevel(arrayIndexedMutatingCall.group(5).trim()).size() == 1) {
|
|
796
796
|
writeEvent = " TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) +
|
|
797
797
|
", new Object[] { " + index + ", ((java.util.Collection) " + target + ").size() - 1 }, " +
|
|
798
|
-
rewrittenArgs.callArgs + ", " + indexSourceArgument(rawIndex) + ", null);";
|
|
798
|
+
rewrittenArgs.callArgs + ", " + indexSourceArgument(rawIndex) + ", (String) null);";
|
|
799
799
|
}
|
|
800
800
|
String snapshotEvent = "TraceHooks.emitRuntimeSnapshotAtLine(" + sourceLine + ", " + quote(name) + ", " + name + ");";
|
|
801
801
|
return indent + "{ " + indexExpression.prefix + readEvent + " " + rewrittenArgs.prefix + target + "." + method + "(" + rewrittenArgs.callArgs + "); " + mutateEvent + writeEvent + " " + snapshotEvent + " }";
|
|
@@ -1943,7 +1943,7 @@ public final class JavaRewriteLibrary {
|
|
|
1943
1943
|
boolean frontAppend = ("addFirst".equals(method) || "offerFirst".equals(method)) && isDequeType(receiverType);
|
|
1944
1944
|
if (!backAppend && !frontAppend) return "";
|
|
1945
1945
|
String index = frontAppend ? "0" : "((" + (normalizedType.contains("List<") ? "java.util.List" : "java.util.Collection") + ") " + name + ").size() - 1";
|
|
1946
|
-
return " TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) + ", new Object[] { " + index + " }, " + callArgs + ", null);";
|
|
1946
|
+
return " TraceHooks.emitIndexedWriteAtLine(" + sourceLine + ", " + quote(name) + ", new Object[] { " + index + " }, " + callArgs + ", (String) null);";
|
|
1947
1947
|
}
|
|
1948
1948
|
private static int braceDelta(String line) {
|
|
1949
1949
|
int delta = 0;
|
|
Binary file
|
|
Binary file
|