Skip to content

[MN4][P2] Research and implement a Realm live-data adapter #9

Description

@evan188199-tech

Tracked by #10. Local plan: docs/roadmap/marginnote-4.md.

Goal (中文): 先调研 MN4 Realm schema、版本兼容、锁文件和只读安全。没有合法样本和可重复测试环境时保持 BLOCKED,UI 不展示 Realm 选项。默认严格只读。

Do you need to file a feature request?

  • I have searched the existing feature requests and this feature request is not already filed.
  • I believe this is a legitimate feature request, not just a question or bug.

Feature Request Description

Research, then possibly implement, a read-only Realm adapter for live MarginNote 4 data.

deeptutor/capabilities/marginnote/data/realm_adapter.py is only a stub. v1 officially supports export folders only. Realm access depends on MN4 schema knowledge, version compatibility, lock files, and a legal/repeatable sample environment.

Phase 1 is research only:

  • schema and MN4 version compatibility
  • lock-file / live-app concurrency
  • read-only safety
  • packaging (realm Python dependency) and license constraints

Default remains strictly read-only. Any write capability needs a separate design approval. Until legal samples and a repeatable test environment exist, this issue stays BLOCKED and the UI must not show a Realm option.

Related Module

Knowledge Base Management

Use Case

If live access becomes safe and testable, learners can skip the export step and let DeepTutor read the current MN4 notebook. Until then, the product must not pretend Realm sync is available.

Additional Context

Priority: P2
Phase: M3
Status: BLOCKED pending a real MN4 environment, schema, and legal sample data
Depends on: shared MarginNoteAdapter diagnostic contract from parser work
Non-goals for this issue

  • Enabling Realm in Create KB UI
  • Writing to the live MN4 database
  • Promising marginnote4:// live jump links

Key files

  • deeptutor/capabilities/marginnote/data/realm_adapter.py
  • deeptutor/capabilities/marginnote/data/base.py

Acceptance criteria

  • Research note covers schema, version compatibility, locks, read-only safety, and packaging/license.
  • Adapter remains unimplemented or hidden until fixtures and a repeatable environment exist.
  • Default is strict read-only; writes require a new design issue.
  • UI does not show a Realm option while this is BLOCKED.
  • If implemented later, it uses the same diagnostic interface as the export adapter.

Success metric
Either a documented BLOCKED research result, or a testable read-only adapter that never appears in UI before it is safe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions