You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Schema pack: an identity key per type (e.g. meeting_id) so the same record can't be filed twice
#8516
The same meeting reaches our brain by two routes: a member's nightly filing and a review that promotes pages to the shared source. Both carry the meeting tool's id in frontmatter (roam_meeting_id), but nothing checks it, so we get two pages. Import identity only looks at frontmatter.id, and it skips only when the content is identical too (#1309, src/core/import-identity.ts). put_page never checks. So the rule lives in agent prompts as "search before you write", which is racy and depends on every agent following it.
What does the solution look like?
A type in a schema pack can declare identity_key: roam_meeting_id (or a list of keys). On put_page, put_pages and import, if another page of that type in the same source has the same value, the call returns a conflict naming the existing slug (default). An optional mode updates that page instead. It is off unless a pack declares it.
Alternatives considered
Reuse id. It already means something else in many packs, and one record can have ids in several systems.
Search before writing, in prompts. That's what we do now; it fails when two runs overlap or a prompt drifts.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
What problem does this solve?
The same meeting reaches our brain by two routes: a member's nightly filing and a review that promotes pages to the shared source. Both carry the meeting tool's id in frontmatter (
roam_meeting_id), but nothing checks it, so we get two pages. Import identity only looks atfrontmatter.id, and it skips only when the content is identical too (#1309,src/core/import-identity.ts).put_pagenever checks. So the rule lives in agent prompts as "search before you write", which is racy and depends on every agent following it.What does the solution look like?
A type in a schema pack can declare
identity_key: roam_meeting_id(or a list of keys). Onput_page,put_pagesand import, if another page of that type in the same source has the same value, the call returns a conflict naming the existing slug (default). An optional mode updates that page instead. It is off unless a pack declares it.Alternatives considered
id. It already means something else in many packs, and one record can have ids in several systems.All reactions