fix(javascript): keep exact empty values in graph identities
#839 displayed empty artifact-local keys and source-map original names as `""` inside node identities, so `fetch("")` and `fetch('""')` (or `sources: ["", "\"\""]`) produced the same node ID and merged two distinct facts. Function nodes likewise exposed only a display label, so `['']()` and `['""']()` were indistinguishable. Admit the exact empty string in `artifact-local-key.key` and `source-map-original.original_source`, keep the `""` substitution for labels only, and record each function node's exact `name` in its properties. Regenerate the catalog digests for the relaxed output schema. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e7cbfe04fd
commit
63012eeb60
@@ -419,7 +419,8 @@ export const applicationNodeIdentitySchema = z.discriminatedUnion("strategy", [
|
||||
strategy: z.literal("source-map-original"),
|
||||
stability: z.literal("source-map-exact"),
|
||||
source_map_sha256: digestSchema,
|
||||
original_source: boundedTextSchema,
|
||||
// The exact `sources` entry; `""` is a legal relative reference.
|
||||
original_source: z.string(),
|
||||
source_sha256: digestSchema.nullable(),
|
||||
}),
|
||||
z.strictObject({
|
||||
@@ -451,7 +452,8 @@ export const applicationNodeIdentitySchema = z.discriminatedUnion("strategy", [
|
||||
stability: z.literal("artifact-version"),
|
||||
artifact_sha256: digestSchema,
|
||||
namespace: boundedKeySchema,
|
||||
key: boundedTextSchema,
|
||||
// The exact artifact-local value, such as `""` from `fetch("")`.
|
||||
key: z.string(),
|
||||
}),
|
||||
z.strictObject({
|
||||
strategy: z.literal("runtime-instance"),
|
||||
|
||||
Reference in New Issue
Block a user