Skip to content

[MN4][P1] Add end-to-end coverage and integration hardening #7

Description

@evan188199-tech

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

Goal (中文): 补齐 MN4 关键链路测试:probe/connect API、Capability 激活、Deep Research、写回 frontmatter、路径隔离和前端状态;加入 CI,并清理空的 tests/capabilities/marginnote4/ 遗留目录。

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

Turn the MarginNote integration from unit-tested pieces into a regression-safe workflow.

Current coverage includes adapter/capability/KB unit tests, but there is no router-level or end-to-end path from probe/connect through capability activation, Deep Research, and writeback. There is also an empty leftover tests/capabilities/marginnote4/ directory.

Add fixtures based on real (redacted) MN4 export formats and cover:

  • probe-marginnote and connect-marginnote
  • capability activation and owned-KB RAG exclusion
  • Deep Research read-only tool mounting
  • writeback Markdown/frontmatter
  • path-access isolation
  • frontend connect/detail states

Include the MN4 critical path in the CI regression set.

Related Module

API/Backend

Use Case

A later parser or UI change cannot silently break connect, research, or writeback. Contributors can run one focused suite and know the MN4 workflow still works.

Additional Context

Priority: P1
Phase: M2
Status: Planned
Depends on: P0 parser, probe, detail, and Deep Research work; should track writeback and cross-link as they land
Blocks: treating v1 as merge-ready

Key files

  • tests/api/test_knowledge_router.py
  • tests/knowledge/test_marginnote_kb.py
  • tests/capabilities/test_marginnote_capability.py
  • tests/capabilities/marginnote4/ (remove leftover empty directory)
  • CI workflow configs under .github/workflows

Acceptance criteria

  • Tests cover probe/connect, capability activation, Deep Research mounting, writeback frontmatter, path isolation, and frontend state contracts.
  • Real-format fixtures are checked in (redacted).
  • Empty tests/capabilities/marginnote4/ leftover is removed.
  • MN4 critical path is part of CI.
  • Empty folder, corrupted fixture, denied path, and remote-inaccessible path are tested.

Success metric
The MN4 workflow has an automated regression net rather than only local unit tests.

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