Skip to content

feat(sync): put --watch one-way directory watch (minimal tier, carved from Phase 2 sync drive) #110

Description

@PeterGuy326
schemaVersion: requirement-record.v1
revision: R1
status: needs-design
priority: P2
productOwner: "@PeterGuy326"
technicalOwner: "unassigned"
userOutcome: "A user points mem at a local directory and new or changed files flow into the netdisk automatically via a one-way watch with a per-cycle import report — while the full sync drive stays a recorded Phase 2 item."
requirements:
  - REQ-001
  - REQ-002
  - REQ-003
  - REQ-004
acceptanceCriteria:
  - AC-001
  - AC-002
  - AC-003
  - AC-004
parent: null
dependencies: []
supersedes: []
lastDecisionAt: null

User problem and observable outcome

Founder query "does mem include scanning?" surfaced a baseline expectation: users expect to point at a folder and have content flow in automatically (netdisk baseline; GOAL promises "like an ordinary netdisk"). Current state (product-verified 2026-08-29): one-time recursive import exists (mem put -r); the one-way daemon mem put <path> --watch is designed in SPEC.md:604 but unimplemented (no watch anywhere in code, no --watch flag on put); the full sync drive is explicitly Phase 2 (SPEC.md:91/1045/1140, GOAL.md:123 unchecked). No tracking issue existed — this record is it. Implementation truth belongs to Tech P9.

Observable outcome: a watched directory yields automatic one-way ingestion of new/changed files with a per-cycle import report; the full sync drive remains recorded as Phase 2 with revival preconditions.

Requirements

  • REQ-001: One-way watch daemon — implement the SPEC.md:604 shape: mem put <path> --watch watches the designated directory and ingests new/changed files into mem; strictly local→mem one-way; flag semantics align with the SPEC design (if implementation must diverge, tech raises a SPEC-revision decision).
  • REQ-002: Per-cycle import report — each watch cycle emits an import report (added/unchanged/failed counts plus item locators); individual failures fail-closed with stable codes while the daemon continues; report content follows evidence vocabulary.
  • REQ-003: Boundary hard constraints — no write-back to the local disk, no deletion propagation (local deletions do not remove already-ingested mem content), no bidirectional sync, conflict merging, or remote sync — all explicitly Phase 2 (SPEC.md:91/1045/1140, GOAL.md:123).
  • REQ-004: Canon consolidation — this record is the formal tracking item for the scan/auto-sync family: the Phase 2 full sync drive stays deferred with recorded revival preconditions (rclone-lib route decision, adjacent to bundle v2 / incremental packages per GOAL.md:95); SPEC/GOAL/README scattered wording cross-references this record.

Acceptance criteria

  • AC-001: Watch fixture — new/changed files under a watched directory are ingested; report counts correct.
  • AC-002: Failure fixture — a failing file yields a stable code in the report; the daemon continues; no crash, no silent drop.
  • AC-003: Boundary fixture — local deletion does not propagate; no disk write-back observable; no bidirectional behavior.
  • AC-004: SPEC alignment — flag semantics match SPEC.md:604, or a tech-raised SPEC-revision decision is recorded.

Non-goals and forbidden shortcuts

  • No bidirectional sync, conflict resolution, deletion propagation, or remote sync (Phase 2, rclone route).
  • No mobile/share-link/preview scope creep (SPEC Phase 1 cut list holds).
  • No re-indexing behavior changes beyond what ingestion already triggers.

Lifecycle, status, priority, blockers, and open decisions

  • status=needs-design; priority P2; technicalOwner unassigned (assign at implementation kickoff; scheduling adjacent to bundle v2 / incremental packages, GOAL.md:95 migration-completeness cluster).
  • Blockers: none.
  • Open decisions: (1) daemon lifecycle (foreground vs background/service mode, restart behavior); (2) report shape and persistence (stdout only vs ledgered); (3) change detection semantics (mtime/hash) and scope of "changed"; (4) interaction with existing put path semantics (shared ingestion path vs watch-specific path) — tech adjudication.

Evidence plan

  • Fixtures first (watch/failure/boundary), deterministic; daemon behavior evidenced per three-axis discipline.
  • Evidence input: ops observation memo (2026-08-29) plus product-side anchor verification (SPEC.md:604/91/1045/1140, GOAL.md:123, cmds_file.go:91).

Decisions

  • DEC-MEM-110-001 (2026-08-29T03:54:00Z): product ruling recorded per founder-approved intake (2026-08-29): minimal tier promoted as P2 (one-way put --watch, carved from the full sync drive); full sync drive remains Phase 2 with revival preconditions recorded here; ops observation as evidence input; implementation truth belongs to Tech P9.

Revision history

  • R1 (2026-08-29T03:54:00Z): initial record created per founder-approved ruling (scan/auto-sync family consolidated).

Activity

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

    priority:p2Useful backlog work outside the immediate critical pathtype:featureA new user-facing capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions