Skip to content

id: implement Notion importer slice 4: comments + degradation completion + export reader (design #6436) #13524

In progress

Description

@dezren39

Implementation 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).

Activity

  1. added
    kind/feature
    task/small-fix
    priority/normal
    app/id
    effort/m
    epic/id-program
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    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.

  4. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    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.

  5. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    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.

  6. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    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.

  7. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    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.

  8. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/ideffort/mepic/id-programkind/featurepriority/normalstatus:in-reviewtask/small-fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions