build: build the plugin-side change-feed emitter, the command-queue client, and the write-permission toggle UI, per the spec fr #6
Loading…
Reference in a new issue
No description provided.
Delete branch "build/6e2931f2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
build the plugin-side change-feed emitter, the command-queue client, and the write-permission toggle UI, per the spec from the read step
This task is one step of my plan: Build real-time Obsidian partnership infrastructure — change feed, write parity, command queue, permission model
Result of earlier step 1 (read: read connor/obsidian.py, the vault handlers in connor/service.py, and obsidian-c):
Done reading. Here are my notes and the four specs.
Reading notes: what the code does today
Vault to Connor is already push, not poll. The plugin registers four vault events at
src/main.ts:166-176. Create and modify go through a 4-second per-file debounce (queue, lines 377-386) intopushFile(388-400), which POSTs/vault/ingestwith the full text. Delete POSTs the same route withdeleted: true(404-410). Rename is not an event of its own: it is a delete of the old path plus a queued push of the new one (172-176). The service handler atconnor/service.py:976-983hands each toingest_note(connor/obsidian.py:159-188), which deletes every memory row for the note'ssource_refand re-ingests fresh. So a rename re-embeds the whole note. A failed push is only logged (396-399, 409): nothing is retried, nothing tells the service a change was missed. Only files passingeligible()(360-375) travel: markdown only, never under writeRoot, and only where a folder flag or the legacy allowlist says yes. The word "polling" in the task doesn't match anything live. The only poll that ever existed was the plugin polling/vault/outboxevery 30 seconds, and that is gone (maResult of earlier step 2 (backend: build the service-side change-feed ingestion endpoint, the write/modify parity e):
Done and green. The full suite runs 968 tests, OK: the 947 at baseline plus my 21 new ones, and nothing else changed. Here are my finishing notes.
One thing to know first
The four specs from my read step were clipped in memory after the reading notes, so I could not build from the spec text verbatim. I rebuilt each piece from those notes plus the decisions on record for item #34 and plan 47a864fb. Where I had to choose a wire shape, I chose the smallest one that fits what the service already does. Please read the contracts below against what you expected.
What I built, in
connor/obsidian.py,connor/service.py,connor/schema.sqlThe change feed. One POST of ordered events per vault replaces the one-file-at-a-time push. Each event is
{"kind", "path", "text"?, "old_path"?, "seq"?}, kinds create, modify, delete, rename. A rename now moves the mirror rows to the new source ref instead of deleting and re-embedding the whole note. The vault remembers the last seq applied: a batch replayed after a lost 200 is skipped, a seq that jumps past the cursor comes back flaggedgapso the plugin does a full resync, and one bad event is one bad result rather than a sunk batchBuilt by Connor's frontend backburner (dispatch
6e2931f2) in an isolated clone; shipped deterministically byship.py. The full build notes were spoken in conversation and stored in memory (agent-dispatch:6e2931f2). Review is the gate.