# SYNOMAP DIGEST V1 — ABC NORMAL FLOW # PURPOSE: deterministic restart prompt for AI; includes context + algorithm. [CONTEXT] Project: Synomap (OMV+Synology+qBittorrent hardlink orchestrator). This digest corresponds to the functional specification v1 (ABC normal states). States beyond ABC (errors, mapping issues, FS drift, qB mismatches) are NOT included and handled in future documents (v2, v3...). This digest is to be pasted at start of new AI conversation to restore context. [GOAL] Ensure Synomap loop behaves deterministically over states: A = NEW_MAPPED B = MIRROR_CREATED_SAVE_ON_DATA C = OK_SYNO (fixed point) Condition of seed = seeding_time only (ratio disabled). [INVARIANTS] - mapping_entries.txt = source of truth (SRC_ABS, DST_ABS) - .state files = debug only - strategy: S2_SYNO_CENTRIC => qB save_path must end at Synology - one qB mutation per torrent per run; must readback-confirm before state change - A→B→C allowed in same run if all conditions satisfied - C is idempotent: no qB/FS changes allowed [STATE_MODEL] A: mapping ok, SRC present, DST missing, save_path=/data, no SYNO_OK B: mapping ok, SRC present, DST present, save_path=/data, no SYNO_OK (SYNO allowed) C: mapping ok, SRC/DST ok, save_path=Syno, tag=SYNO_OK, seed_ok=true [SEED_CONDITION] seed_ok := (seeding_time >= threshold) ratio := ignored (ratio_threshold = -1) [ALGO] for each torrent in mapping_entries: observe FS + qB + tags + seeding_time classify A/B/C A: if DST missing: create_DST() if not ok: stay A if ok: if seed_ok: qb_setLocation(SYNODIR) readback() if ok: tag=SYNO_OK ; state=C else: state=B else: tag=SYNO ; state=B B: if not seed_ok: tag=SYNO ; state=B else: qb_setLocation(SYNODIR) readback() if ok: tag=SYNO_OK ; state=C else: state=B C: if all conditions hold: SKIP (stay C) else: state=OTHER (handled in later specs) [WHAT_NEXT] Next documents: v2(mapping), v3(FS inconsistencies), v4(qB mismatches).