fix(contracts): advertise NUL with a portable hex escape
Use the equivalent hex NUL spelling in named public contracts while preserving current path and reserved-name validation. Verify converted JSON Schema and real stdio catalog consumers. Closes #1329 Co-authored-by: Yi-111-a <97448247+Yi-111-a@users.noreply.github.com>
This commit is contained in:
@@ -79,9 +79,12 @@ it("advertises portable NUL escapes and patterns that compile in all JS modes",
|
||||
).toEqual([]);
|
||||
|
||||
// DeepSeek rejects the short NUL escape even though V8 accepts it in all
|
||||
// three modes. Schema compilation must not hide that interchange failure.
|
||||
expect(patterns.filter(({ pattern }) => pattern.includes("\\0"))).toEqual([]);
|
||||
expect(patterns.some(({ pattern }) => pattern.includes("\\u0000"))).toBe(
|
||||
true,
|
||||
);
|
||||
// three modes. Keep the shared hex spelling across the advertised catalog;
|
||||
// actual provider acceptance is verified separately from JS compilation.
|
||||
expect(
|
||||
patterns.filter(
|
||||
({ pattern }) => pattern.includes("\\0") || pattern.includes("\\u0000"),
|
||||
),
|
||||
).toEqual([]);
|
||||
expect(patterns.some(({ pattern }) => pattern.includes("\\x00"))).toBe(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user