p1-2: address spec review (drop user_id_alias mirror in user map)

Spec §"Behavior contract" line 74 says `id:` is captured into
`metadata.user_id_alias` only. Remove the redundant `user.insert`
that was also writing it into the user map, and update the snapshot
baseline accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-30 13:02:28 +00:00
parent 42a7d53e5d
commit 1fab6b0207
2 changed files with 3 additions and 10 deletions

View File

@@ -367,15 +367,9 @@ fn derive_metadata(
};
// ---- id alias ----
// `id:` field becomes `metadata.user_id_alias` AND is mirrored into the
// user map under `user_id_alias` (per design §4.2 — not a doc_id factor).
// `id:` field becomes `metadata.user_id_alias` only (spec §"Behavior
// contract" line 74). It is NOT mirrored into the user map.
let user_id_alias = raw.id;
if let Some(ref id) = user_id_alias {
user.insert(
"user_id_alias".to_string(),
Value::String(id.clone()),
);
}
Metadata {
aliases,

View File

@@ -22,8 +22,7 @@
"original_timestamps": {
"created_at": "2024-01-15T10:00:00+09:00"
},
"title": "Frontmatter Only",
"user_id_alias": "my-stable-handle"
"title": "Frontmatter Only"
}
},
"span_present": true,