GeezerVison is showing github.com — id: implement Notion importer slice 4: comments + degradation completion + export reader (design #6436) · Issue #13524 · developing-today/code
id: implement Notion importer slice 4: comments + degradation completion + export reader (design #6436) #13524DescriptionImplementation slice 4 of the Notion importer design for #6436, landed as doc/2026-11-10_design_id6436.md (PR #8416, amended PR #8558). Parent implementation issue: #6513. Depends on slices 2–3.
Scope (design §1.3, §2.4, §2.5; Implementation slicing item 4):
- Comment claims (§2.4): discussion comments become comment claims on the note (block-anchored comments name the block identity), with author recorded as Notion user provenance (ID + display name), timestamp, and body blob; replies chain by manifest-recorded parent comment ID; resolved discussions carry the resolution as a recorded provenance fact. Comments the acquisition path cannot see are absent and counted per page — never silently partial within a page the importer claims to have covered.
- Degradation completion (§2.5): the full block table — toggle / callout / columns / simple table / equation structure preserved with presentation attributes dropped-and-counted per attribute; embeds degraded to URL + link reference; synced blocks imported at the source block's page and replaced by a typed reference at every referencing page; table of contents, breadcrumb, template button, Notion AI blocks and unknown/future block types preserved as verbatim source blobs with provenance claims.
- Export-bundle reader (hybrid mode, §1.3; id: implement Notion importer per #6436 design #6513 scope step 5): parse a workspace export (Markdown+CSV flavour) and normalize it into the same pipeline as the API path; content matched to API inventory by UUID where the flavour carries it, otherwise by recorded title+path matching with every uncertain match named for the fidelity report. Export-only runs are the design's degraded mode: identity falls back to content-hash + path keys and the degradation is headlined, not hidden.
Acceptance:
- Design §8 check 7: every fixture comment the acquisition path could see exists as a claim on the expected note; every page it could not is listed in the comments-coverage accounting.
- Design §8 check 4: for every degradation class in §2.5's table present in the corpus, the counted total equals the corpus's known count.
- Export-only run over the same corpus asserts the degraded mode's weaker guarantees as such (§1.3, §8 failure-injection list).
Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 23, 2026 Filing note (per the file-and-enqueue rule): no pilot packet is enqueued for this slice in this pass. Felix's lane shortlist is operator-managed — slices are drawn from #6513's family in dependency order by the felix lane operation (the #13342 pattern), and slice 2 (#13522) is being landed directly under #6513 by the felix lane that filed this issue. Enqueue when the shortlist next refills if it has not been drawn by then.
dezren39 commented on Nov 24, 2026 Design record for this slice is up in #14118: doc/2026-11-24T06-05-00Z_design_id13524_notion_importer_slice4.md.
Nine sections + §10 sufficient-design conformance map, grounded in design #6436 (§2.4 comments, §2.5 degradation table, §1.3 hybrid rule) and the landed slice-2 code (id-import-notion content.rs verbatim-fallback deferral, classify_block table, Manifest::assign_page_identities):
- §1 goals/non-goals (consumes slices 1–3, feeds slice 5 counters; HTML flavour out)
- §2 design:
comments.rs claim shape + reply chaining + per-page coverage accounting; per-class converters with verbatim fallback; loss ledger (slice-5 input); export.rs Markdown+CSV normalization into one pipeline with match ledger; export-only degraded mode; additive manifest maps; six invariants
- §3 six decisions with reasons; §4 alternatives incl. do-nothing
- §5 five implementation sub-slices, dependency-ordered (3←2, 4←2, 5←4), each with acceptance mapping to the issue checks (7, 4, export-only)
- §6 rollout/rollback (additive, verbatim fallback as safety net); §7 verification (checks 4/7/export-only oracle, reconciliation property tests, recorded fixtures); §8 consequences
- §9 five open questions, each with a named decider (Drew: HTML scope, ambiguous-match policy; implementer/design owner: equation form; operator: size policy; implementer at start: slice-3 timing)
Note: slice 3 (#13523) implementation is not on main (branch commit exists elsewhere); §5 entry criteria let comment/database-adjacent work proceed on page notes and gate row-note cases on its landing. dezren39 commented on Nov 24, 2026 Progress: slice 4a (comment claims + coverage accounting, design §2.4 / §8 check 7) is open as PR #14150 (branch xaltha/13524-notion-slice4-comments, commit 4823c50). Verified by remote dispatch: https://github.com/developing-today/fleet/actions/runs/45338647720 — success (lib 17 passed; recorded_comments 2 passed; recorded_content 2 passed; recorded_inventory 1 passed).
Decisions recorded in the PR: reply chains are derived from discussion_id + created_time (the API carries no parent-comment ID); resolved is parsed when the transport supplies it and defaults false (the public list-comments response carries no resolution field).
Next slice: §2.5 degradation completion — structural conversion of toggle/callout/columns/table/equation, embeds to URL + link reference, synced blocks as typed references, with per-class counts equal to the corpus's known counts (§8 check 4). The export reader remains after that. dezren39 commented on Nov 24, 2026 Triage verdict (oc-code-08, task 22343, 2026-11-24): in review. Slice 4a is open as PR #14150 (remote dispatch green per the last progress note). No new packet needed; the PR and the remaining slice-4 items stay with the owning lane. dezren39 commented on Nov 24, 2026 Correction to my previous triage comment (oc-code-08, 2026-11-24): PR #14150 is MERGED, not open. The verdict still holds: slice 4a landed, and the remaining slice-4 items stay with the owning lane. dezren39 commented on Nov 24, 2026
Triage re-verify (lane oc-code-05, queue task 23164, 2026-11-24 ~12:50Z): prior verdict (task 22343) stands — in review, no new packet.
Fresh state: slice-4a PR #14150 is MERGED (2026-11-24T08:30:50Z); design record #14118 is MERGED. Remaining slice-4 items (§2.5 degradation completion, export reader) stay with the owning felix-lane operation, which draws slices from the #6513 family in dependency order — the family is live (slice-3 tasks 23183 queued / 22900 parked / triage 23185 queued; slice-5 triage 22345 claimed). No live task names #13524 besides this triage claim, which is correct per the operator-managed shortlist pattern. No follow-on packet routed. dezren39 commented on Nov 26, 2026 Claimed by lane 12, 2026-11-26T13:24Z
Taking design-record §5 sub-slice 2 (degraded converters: toggle, callout, columns, simple table, equation, embed, with the per-attribute loss ledger, §2.3–2.4). Synced blocks (sub-slice 3) and the export reader (sub-slices 4–5) stay open after this.
Generated by Claude Code dezren39 commented on Nov 26, 2026 Claimed by lane 9, 2026-11-26T13:58Z
Taking design-record §5 sub-slice 4 (export reader): a new export.rs that parses a Markdown+CSV export, matches files to pages by UUID first and title+path second, writes a match ledger, and turns the export into the inventory and block shapes content.rs already reads. This is a new file and doesn't overlap lane 12's converter work in sub-slice 2. Synced blocks (3) and export-only mode (5) stay open.
Generated by Claude Code dezren39 commented on Nov 26, 2026 Progress: sub-slices 2 and 3 of the slice-4 design (§5) landed in #15603 (squash 11b246f).
- Degraded converters: toggle, callout, column_list/column, table/table_row, equation, embed/link_preview and synced_block now convert structurally, with a per-page loss ledger (
Manifest.page_losses) counting each class, each dropped attribute, unsupported types and verbatim fallbacks.
- Synced blocks: the source converts once; in-set duplicates resolve to a block link plus a
SyncedBlock typed reference via resolve_synced_references; out-of-set sources stay verbatim and are counted as externalised.
- Remote run 45828332560:
cargo fmt --check, cargo test -p id-import-notion (all suites green, including the new recorded_degradation and recorded_synced), clippy with no new warnings.
Remaining: sub-slice 4 (export reader: Markdown + CSV with a match ledger) and sub-slice 5 (export-only degraded mode and coverage).
Generated by Claude Code
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|