SIGN IN SIGN UP

fix: address PR #684 review — root-only match + missing test coverage

Reviewer flagged two issues that have the same root cause: predicates and
the auto-resolver matched `index.html` by basename anywhere in the tree.
The underscore prefix on the legacy name made collisions effectively
impossible; the bare `index.html` reintroduces them.

Failure mode without this fix: a user-authored `architecture/index.html`
gets silently excluded from BM25, dropped from query results, and during
merge the auto-resolver would regenerate the root index, silently filter
out the nested conflict, and potentially finalize the merge as if all
conflicts were resolved.

- `isDerivedArtifact` / `isExcludedFromSync` (derived-artifact.ts): match
  the navigation index by full path against the tree root, not basename.
  Legacy `_index.md` / `_manifest.json` keep basename matching — the
  underscore prefix protects them.
- `FileContextTreeMerger`: same root-only check on the skip path.
- `autoResolveIndexConflict` (vc-handler.ts): match `c.path === INDEX_HTML_FILE`
  so a nested `*/index.html` conflict surfaces normally instead of being
  silently dropped.
- Direct tests for `isExcludedFromSync('index.html') === false` and the
  nested-not-derived case. Negative assertion in `constants.test.ts`
  guarding against re-introduction of the gitignore entry.
- Best-effort `unlink('_index.html')` in the generator so trees touched
  by an earlier build of this branch drop the stale legacy file on the
  next regen instead of requiring manual cleanup.
- Comment at the auto-resolve regen site noting the interim index may
  miss entries when other topic files still carry conflict markers.
C
Cuong committed
00c570bc53d2a25642e8232b32a02870462ba113
Parent: 3bf6f06