Skip to content

Harden experimental source adapters with parity privacy and contract fixtures #73

Description

@catoncat

Review umbrella: #69

Problem

Claude Code and Pi source support are public but experimental. The deep review found that Claude Code privacy filtering is not empty work; it is already partially covered. The remaining issue is to turn source adapter behavior into a clear, parity-tested contract across supported public sources.

This maps to the paper's memory extraction and maintenance modules: source adapters decide what becomes memory, what is ignored, and how robust the system is under upstream format drift.

Local Evidence

  • src/sources/types.ts:SessionSourceAdapter defines the adapter boundary: default root, root resolution, file collection, inventory, snapshot, and parseFile.
  • src/sources/registry.ts registers codex, claude-code, and pi.
  • src/sources/codex-parser.ts parses Codex event_msg user/assistant messages and stores compact/reasoning as session-level fields.
  • src/sources/claude-code-parser.ts accepts only policy-approved text records and leaves compact/reasoning empty.
  • src/sources/pi-parser.ts accepts message and compaction records and builds compact text.
  • src/sources/claude-code.test.ts already verifies that meta, sidechain, tool_result, thinking, and attachment-like records do not leak into searchable projection.
  • docs/ARCHITECTURE.md and docs/USAGE.md describe Claude/Pi support as public but experimental.

Scope

Make source adapter contracts explicit and parity-tested.

Work items:

  • Document accepted vs rejected record classes for each public source.
  • Add or extend negative fixtures for private/diagnostic/tool/attachment/thinking/sidechain-like records.
  • Add malformed transcript fixtures and format-drift smoke tests.
  • Add source-aware recall/eval cases that cover find, read-range, and read-page across public sources where fixtures exist.
  • Keep Claude Code and Pi experimental until the contract and fixtures justify stronger claims.

Acceptance Criteria

  • Adapter tests distinguish already-supported behavior from new hardening.
  • Unsupported/private record types are filtered by default and covered by tests.
  • Source-aware session refs remain deterministic and isolated.
  • Docs accurately state experimental status and contract limits.
  • P0: Strengthen retrieval eval into an evidence-level acceptance gate #70 has at least basic source-aware eval coverage.

Non-Goals

  • Do not broaden accepted record types just to improve recall.
  • Do not index tool outputs, attachments, diagnostics, or private metadata without an explicit privacy design.
  • Do not promise stable upstream format support beyond tested contracts.

Trace

  • deep review request: cxs_deep_review_correction_20260626T040901Z_api_append
  • issue update request: cxs_update_issues_after_review_20260626T044426Z_api_append

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions