GeezerVison is showing github.com — feat(id): Notion importer slice 3 — database note identity and per-source schema claims by dezren39 · Pull Request #14026 · developing-today/code
Conversation
dezren39
commented
Nov 24, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
First slice of #13523 (Notion importer slice 3, design #6436 §2.2): database-note identity plus per-data-source schema claims — the first step toward §8 check 8.
Manifest::assign_database_identities assigns a destination note ID to every inventoried database (mirrors assign_page_identities, including cross-kind uniqueness so a database note can never collide with a page note).
convert_database (pkgs/id/crates/id-import-notion/src/databases.rs) records each data source's schema as provenance claims on the database note, scoped by data_source_id. Claim identity is (data_source_id, property_id): the same property name or id in another source is a different claim, never a merged one. Fails closed on unassigned note ID, non-database objects, missing properties, missing property id/type, and duplicate property ids within a source.
- Fixture: the multi-source fixture database gains the colliding property the acceptance needs —
Status is status in source-alpha and select in source-beta, both under property id status.
- New integration test
recorded_databases.rs asserts the §8 check-8 first half on the recorded fixtures: both sources recorded under the one database note; Status appears once per source with each source's type; all claim keys unique; definitions round-trip their types; checkpoint advances to Content; manifest round-trips the new identity map.
- Registry: the new test file is registered, and the previously unwired
recorded_content.rs is registered in the same entry (it was failing check-suite-registry.sh).
Refs #13523 (does not close it: row notes, relations, rollups/formulas, and system properties remain as follow-up slices).
Evidence
Not built here; verified by remote dispatch on the pushed commit c6b29ee3a (GitHub-hosted runner, fleet-build image):
runuser -u vscode -- env HOME=/home/vscode bash -lc 'git config --global --add safe.directory "$PWD" && cd pkgs/id && CARGO_TARGET_DIR=/tmp/id-target nix --extra-experimental-features "nix-command flakes" develop --command cargo test -p id-import-notion'
Run: https://github.com/developing-today/fleet/actions/runs/45310762393 — success (~25 min).
- lib unit tests:
20 passed; 0 failed (incl. new databases::tests::same_property_id_in_two_sources_stays_two_claims and the four fail-closed cases)
- integration:
recorded_multi_source_database_yields_disjoint_schema_claims ... ok (1 passed), recorded_inventory 2 passed, recorded_content 1 passed
bash .github/scripts/check-suite-registry.sh prints no FAIL lines for id-import-notion (verified locally — read-only check)
Before: no databases module, no database_id_to_note_id, no convert_database — the new test references symbols absent on origin/main, so it fails there for the reason this slice fixes, not for a missing fixture.
fleet queue dispatch itself is still blocked from this seat by TLS defect #13185, so verification went through the fleet-command.yml fallback.
Merge Danger
Low. Additive: one new module, one new #[serde(default)] manifest field (old manifests load unchanged), one fixture property added, one registry entry extended. No changes to slice 1/2 behavior; assign_page_identities only gains a cross-kind uniqueness check against database note IDs (no databases exist in pre-slice-3 manifests, so no behavior change there). No migration needed.
Next slice (same "after this PR" form)
After this PR, cargo test -p id-import-notion shows row notes converting with per-source schema validation plus relations as typed references (canonical dual-relation identity per §2.2) — the second half of §8 check 8 and the §8 check-2 relation subset.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-24T02:40:27Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": "/home/hatch/workspace/github-work/code-13523-xaltha",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/hatch/workspace/github-work/code-13523-xaltha",
"repo": "developing-today/code",
"branch": "xaltha/13523-notion-slice3",
"sha": "c6b29ee3a2bbaf05bf2495716c2acc43e44676db"
},
"auth_subject": "xaltha",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…urce schema claims
Database notes get assigned note IDs (Manifest::assign_database_identities,
mirroring pages, with cross-kind uniqueness) and convert_database records
each data source's schema as provenance claims on the database note,
scoped by data_source_id so colliding property names/ids never merge.
Adds the colliding Status property (status in source-alpha, select in
source-beta) to the multi-source fixture and a recorded_databases
integration test for design #6436 §8 check 8 (first half: identity +
disjoint schema claims). Registers the new test file and the previously
unwired recorded_content.rs in the suite registry.
Refs #13523
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 45 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
1072bd30-6e5a-47c1-9166-7c2dd2f24a14
Commits
-
Reviewing files that changed from the base of the PR and between 6aab3fc and c6b29ee.
Files selected for processing: 6
-
.github/test-suite-registry.json
pkgs/id/crates/id-import-notion/Cargo.toml
pkgs/id/crates/id-import-notion/src/databases.rs
pkgs/id/crates/id-import-notion/src/lib.rs
pkgs/id/crates/id-import-notion/tests/fixtures/data_sources.json
pkgs/id/crates/id-import-notion/tests/recorded_databases.rs
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|