Repository navigation
Group imports into one drive with a document and native issues table - #21
Merged
Merged
Conversation
…18) A Drive used to be keyed off each record's own namespace, so a nested collection like issue comments (namespaced per parent issue) fragmented into a separate Drive per issue instead of sharing the repository's one Drive. AtomicStorage now groups every record — root and nested — under one Drive per imported dataset (`with_dataset`, derived from API_CONSTANTS), with a DocumentV2 and a native AD table per root-level resource under it: root records file under the table (so they render as rows), nested records keep filing straight under the drive. The drive is also registered on DRIVE_OWNER's saved-drive list, and a leftover per-namespace drive from before this fix is migrated away automatically. Also adds `html_url` to the vendored issue schema as its source URL, so it flows through as a table column alongside number/title/state/body/ author/updated-at with no syncables-rs changes. Claude-Session: https://claude.ai/code/session_01RDCvJurQwKTv2STsa5Jfqc Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
michielbdejong
pushed a commit
that referenced
this pull request
Sep 7, 2026
Merging origin/main (#21, which grouped every record under one Drive/ Document/Table per imported dataset) auto-merged cleanly but left Config::dataset_namespace() referencing a `constants` field that this branch had already moved onto each PlatformConfig, and a single AtomicStorage shared across all configured platforms — which would collide every platform's records into the same dataset instead of keeping each platform's own Drive. Moves dataset_namespace() onto PlatformConfig (derived from that platform's own constants) and builds one AtomicStorage per platform, sharing the same underlying Db, matching the one-AtomicStorage-per- dataset pattern #21 already established for a single run with multiple namespaces. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015uMtEr3myMSRyBMaSWP3k5
michielbdejong
added a commit
that referenced
this pull request
Sep 7, 2026
* Support reflecting more than one platform in a single run Restructures spec/ into one subfolder per platform and adds a PLATFORMS environment variable: unset, behavior is unchanged (one `github` platform from the historical unprefixed variables); set, each named platform reads its own <PLATFORM>_-prefixed OpenAPI document/overlays/token/constants, falling back to built-in defaults for `github` and a new `google-calendar` platform (read-only: calendar-list entries and events). main.rs now syncs every configured platform into the same store, applying the GitHub OAuth fallback only to a platform actually named `github`. Clockify, also requested in the issue, needs syncables-rs to support apiKey-header credentials first (it only models Authorization: Bearer today) — documented in the README rather than added without working auth. Closes #15. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015uMtEr3myMSRyBMaSWP3k5 * Fix dataset_namespace after merging main's per-dataset drive grouping Merging origin/main (#21, which grouped every record under one Drive/ Document/Table per imported dataset) auto-merged cleanly but left Config::dataset_namespace() referencing a `constants` field that this branch had already moved onto each PlatformConfig, and a single AtomicStorage shared across all configured platforms — which would collide every platform's records into the same dataset instead of keeping each platform's own Drive. Moves dataset_namespace() onto PlatformConfig (derived from that platform's own constants) and builds one AtomicStorage per platform, sharing the same underlying Db, matching the one-AtomicStorage-per- dataset pattern #21 already established for a single run with multiple namespaces. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015uMtEr3myMSRyBMaSWP3k5 --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #18.
Summary
AtomicStoragepreviously keyed a Drive off each record's ownnamespace, so a nested collection like issue comments (namespaced per parent issue, e.g.owner/repo/42) fragmented into a separate Drive per issue instead of sharing the repository's one Drive.AtomicStoragenow takes adataset(with_dataset, e.g.owner/repo) — computed by a newConfig::dataset_namespace()fromAPI_CONSTANTS' values — and groups every record it ever writes, root or nested, under that one Drive.has_stored_resource-guarded like the existingensure_drive) the first time a matching root-level record isput. A root-level record'sparentbecomes its table (so it renders as a row); nested records (comments) keepparentpointing straight at the drive — same drive either way.drivealways points at the drive itself, independent ofparent, matching howatomic_lib's own rights resolution (parentchain) and fan-out (drivepointer) are documented to work.DRIVE_OWNERnames an agent that already has a local resource, the drive is added to that agent'sdrivesproperty (idempotently, on every sync) — a generalized,Storelike-level version ofatomic_lib's own (private,Db-specific)push_drive_to_list.put(persistalways rewritesparent/drivefrom scratch, and every sync re-puts every record today).html_urlto the vendoredissueschema so it flows through the existing (generic, GitHub-agnostic) ontology derivation as a table column alongside number/title/state/body/author/updated-at, with nosyncables-rschanges.Known scope limits (called out for review)
documentContentis a plain Markdown property, not the data browser's own collaborative loro-prosemirror CRDT tree. I looked for a way to construct that tree from Rust (see the session log) and found no reference implementation in this codebase or a vendored crate for it — hand-rolling an undocumented binary CRDT shape risked producing a document that fails to open in the real editor, which seemed worse than a plain, valid Markdown body. The Table is still structurallyparented under the Document either way.classtyperather than a second, narrower Class built just for the table. Since every property a Class recommends/requires becomes a column, the issues table ends up with a few extra columns (id,state_reason,labels) beyond the seven the issue names. Duplicating those property subjects into a parallel row Class felt like more risk (two class definitions to keep in sync) than benefit for a few extra columns.ontola/atomic-server's own Rust (hierarchy.rs,resources.rs) and TypeScript (createTableFromSpec.ts,useTableData.ts) source at the pinned revision, and against unit tests here, not a running UI.Testing
cargo fmt -- --checkcargo test(43 tests, incl. new coverage for containment record→table→document→drive, nested collections staying off the table, saved-drive registration idempotence, and legacy-drive migration)cargo clippy --all-targets -- -D warningscargo buildcargo build --target wasm32-unknown-unknown --libcargo clippy --target wasm32-unknown-unknown --lib -- -D warningsAll pass locally. Docs (
README.md,CLAUDE.md,.env.example) updated alongside the code, and a session log added underdocs/ai-logs/sessions/per this repo's NLnet disclosure policy.🤖 Generated with Claude Code
https://claude.ai/code/session_01RDCvJurQwKTv2STsa5Jfqc
Generated by Claude Code