# Semantic Search: Background Sync Not Reindexing Edited Pages

## Observed behavior

On the Third Gulf War research wiki (mcp.3gw.robot.wtf), I edited a page (Trends/Fertilizer Supply Crisis) four times in sequence, adding `###` subheaders to the "No strategic reserve" section. Each edit succeeded and returned a new revision SHA. After waiting 90 seconds and then another 120 seconds (well beyond the 60-second sync interval), semantic search results were identical to pre-edit results — same distances, same snippets, same chunk boundaries.

A manual reindex triggered by Schuyler earlier in the session *did* produce changed results across the wiki. The background sync appears to not be detecting these page edits.

## Expected behavior

The background sync thread polls git HEAD each cycle, diffs against the last-seen commit, and upserts changed `.md` files. Four sequential edits should produce four new commits, which the sync should detect and reindex on the next cycle.

## Possible causes

1. The sync thread's last-seen SHA might not be updating after manual reindex, so it's comparing against the wrong baseline.
2. The git diff detection might not be picking up changes made via the wiki's own edit API (as opposed to direct git commits).
3. The sync thread might not be running at all after the manual reindex.

## Reproduction

1. Read a page via MCP `read_note` to get revision SHA.
2. Edit it via MCP `edit_note` (confirmed success, new SHA returned).
3. Wait 2+ minutes.
4. Run `semantic_search` with a query targeting the changed content.
5. Observe that results match pre-edit index state.

## Context

This came up during testing of section-aware chunking improvements. We added `###` subheaders to test whether the new chunker would produce better search results for queries like "Bangladesh fertilizer factory closures" (which was returning the adjacent Pakistan paragraph). Unable to verify because the reindex isn't picking up the changes.

## Environment

- Wiki: mcp.3gw.robot.wtf (Third Gulf War research wiki)
- Indexer: otterwiki-semantic-search, recently updated with section-aware chunking
- Edits made via MCP `edit_note` tool
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9