{"definition_raw":"---\nid: kg-sync\ntitle: Sync entity_graph.db (per-machine local KG build)\nschedule: \"30 3 * * *\"\ntimeout: 1200\nretry: true\nenabled: true\nnotify_on: failure\nrun_as: shell\ncommand: \"flock -n /tmp/kg-sync.lock python3 /home/lucienne/.claude/skills/knowledge-graph/cg.py sync --full\"\ntags: [infrastructure, kg, e7]\nruntime_profile: direct_python\n---\n**OVERRIDES runtime profile:** uses `direct_python` (plain Python, no model) because the command chain never invokes the `claude` CLI or any LLM API \u2014 pure-infra task; scheduler provider env injection is a no-op (MC-4942 U12 sweep).\n\n**Phase E.7 (2026-05-02): Per-machine local KG build.** Same model as vault-index:\nSecondBrain markdown is canonical, each machine builds its own\n`Vault/entity_graph.db` locally via `cg.py sync --full`. Runs 03:30 UTC nightly\non Luci, 30 min after vault-index so the FTS5 index is fresh first. Mac runs\nits own equivalent (LaunchAgent `com.elmar.kg-sync` at 01:00 UTC).\n\n`flock -n` guard prevents concurrent runs across overlapping schedule fires.\nKG includes nodes from people/entities/projects pages plus links extracted\nfrom meeting notes and source docs.\n","id":"kg-sync","last_run":{"duration_s":18.847126,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/413397.log","output":"\nSync complete: 1726 scanned, 1719 updated, 0 removed, 3159 nodes, 2944 edges, 0 errors (18616ms)\n","started_at":"2026-06-13T03:30:42.738949+02:00","status":"completed"},"next_run":"2026-06-14 03:30","next_run_iso":"2026-06-14T03:30:00+02:00","runs":[{"duration_s":18.847126,"finished_at":"2026-06-13T03:31:01.589006+02:00","id":413397,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/413397.log","output":"\nSync complete: 1726 scanned, 1719 updated, 0 removed, 3159 nodes, 2944 edges, 0 errors (18616ms)\n","started_at":"2026-06-13T03:30:42.738949+02:00","status":"completed","task_id":"kg-sync","task_name":"Sync entity_graph.db (per-machine local KG build)"},{"duration_s":18.382801,"finished_at":"2026-06-12T03:31:02.901348+02:00","id":409231,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/409231.log","output":"\nSync complete: 1779 scanned, 1772 updated, 0 removed, 3211 nodes, 2944 edges, 0 errors (18197ms)\n","started_at":"2026-06-12T03:30:44.515745+02:00","status":"completed","task_id":"kg-sync","task_name":"Sync entity_graph.db (per-machine local KG build)"},{"duration_s":18.122342,"finished_at":"2026-06-11T03:31:00.283123+02:00","id":404868,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/404868.log","output":"\nSync complete: 1777 scanned, 1770 updated, 0 removed, 3209 nodes, 2944 edges, 0 errors (17948ms)\n","started_at":"2026-06-11T03:30:42.157541+02:00","status":"completed","task_id":"kg-sync","task_name":"Sync entity_graph.db (per-machine local KG build)"},{"duration_s":18.64049,"finished_at":"2026-06-10T03:31:00.853952+02:00","id":400592,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/400592.log","output":"\nSync complete: 1777 scanned, 1770 updated, 0 removed, 3209 nodes, 2944 edges, 0 errors (18417ms)\n","started_at":"2026-06-10T03:30:42.210505+02:00","status":"completed","task_id":"kg-sync","task_name":"Sync entity_graph.db (per-machine local KG build)"},{"duration_s":17.953042,"finished_at":"2026-06-09T03:30:55.833044+02:00","id":396355,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/396355.log","output":"\nSync complete: 1700 scanned, 1693 updated, 0 removed, 3132 nodes, 2944 edges, 0 errors (17739ms)\n","started_at":"2026-06-09T03:30:37.877069+02:00","status":"completed","task_id":"kg-sync","task_name":"Sync entity_graph.db (per-machine local KG build)"},{"duration_s":17.41533,"finished_at":"2026-06-08T03:30:20.360874+02:00","id":392263,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/392263.log","output":"\nSync complete: 1699 scanned, 1692 updated, 0 removed, 3131 nodes, 2944 edges, 0 errors (17222ms)\n","started_at":"2026-06-08T03:30:02.942085+02:00","status":"completed","task_id":"kg-sync","task_name":"Sync entity_graph.db (per-machine local KG build)"},{"duration_s":15.997365,"finished_at":"2026-06-07T03:30:25.135158+02:00","id":387838,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/387838.log","output":"\nSync complete: 1699 scanned, 1692 updated, 0 removed, 3131 nodes, 2944 edges, 0 errors (15778ms)\n","started_at":"2026-06-07T03:30:09.134813+02:00","status":"completed","task_id":"kg-sync","task_name":"Sync entity_graph.db (per-machine local KG build)"},{"duration_s":16.621035,"finished_at":"2026-06-06T03:30:19.730541+02:00","id":383118,"log_path":"/home/lucienne/workspace/logs/task-runs/kg-sync/383118.log","output":"\nSync complete: 1699 scanned, 1692 updated, 0 removed, 3131 nodes, 2944 edges, 0 errors (16430ms)\n","started_at":"2026-06-06T03:30:03.107007+02:00","status":"completed","task_id":"kg-sync","task_name":"Sync entity_graph.db (per-machine local KG build)"}],"runs_limit":20,"schedule":"30 3 * * *","schedule_label":{"description":"Daily at 03:30","is_custom":false,"label":"Daily","sort":4,"sort_time":"03:30"},"stats":{"avg_duration":17.747441375,"completed":8,"failed":0,"timeout":0,"total":8},"task":{"_description":"**OVERRIDES runtime profile:** uses `direct_python` (plain Python, no model) because the command chain never invokes the `claude` CLI or any LLM API \u2014 pure-infra task; scheduler provider env injection is a no-op (MC-4942 U12 sweep).\n\n**Phase E.7 (2026-05-02): Per-machine local KG build.** Same model as vault-index:\nSecondBrain markdown is canonical, each machine builds its own\n`Vault/entity_graph.db` locally via `cg.py sync --full`. Runs 03:30 UTC nightly\non Luci, 30 min after vault-index so the FTS5 index is fresh first. Mac runs\nits own equivalent (LaunchAgent `com.elmar.kg-sync` at 01:00 UTC).\n\n`flock -n` guard prevents concurrent runs across overlapping schedule fires.\nKG includes nodes from people/entities/projects pages plus links extracted\nfrom meeting notes and source docs.","_file":"kg-sync.md","_path":"/home/lucienne/workspace/tasks/kg-sync.md","command":"flock -n /tmp/kg-sync.lock python3 /home/lucienne/.claude/skills/knowledge-graph/cg.py sync --full","enabled":true,"id":"kg-sync","notify_on":"failure","retry":true,"run_as":"shell","runtime_profile":"direct_python","schedule":"30 3 * * *","tags":["infrastructure","kg","e7"],"timeout":1200,"title":"Sync entity_graph.db (per-machine local KG build)"}}
