Skip to content

Software-review fixes (#14) + ADR-033 Datacore foundation → v2.3.0 - #15

Merged
owrede merged 8 commits into
mainfrom
fix/issue-14-indexer-version-review
Jul 1, 2026
Merged

Software-review fixes (#14) + ADR-033 Datacore foundation → v2.3.0#15
owrede merged 8 commits into
mainfrom
fix/issue-14-indexer-version-review

Conversation

@owrede

@owrede owrede commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Closes #14.

Issue #14 — software-review fixes

  • P1 fix(indexer): incremental full-vault mode now re-indexes changed notes (was deciding from chunk count alone → stale chunks/embeddings/sections/edges). Mirrors single.ts's 3-way decision. Also fixes a latent FK-order bug (sections before chunks).
  • P2 fix(server): VERSION derived from package.json via new src/version.ts (was hardcoded 1.0.0).
  • P3 chore: engines.node narrowed to >=22 <26 (Node 26+ has no better-sqlite3 prebuild). README updated.
  • P4 chore: all release versions reconciled to 2.3.0 (package.json, plugin/package.json, plugin/manifest.json, README, CHANGELOG, lockfile) + version-consistency.test.ts CI guard.
  • P5 chore: .gitignore hardened with **/.DS_Store (none tracked, verified).
  • Optional fix(write): long frontmatter strings serialize single-line, not as a >- block scalar.

Also included (per owner decision)

ADR-033 Datacore rendered-indexing foundation (Phases 1–2): query-source stripping + migration 016 notes.rendered_source_hash. Later ADR-033 phases remain incomplete — documented as such in CHANGELOG.

Verification

  • Full suite: 1747 passed / 11 skipped (145 files) under Node 22
  • npm run lint:check (full CI chain incl. adapter-seam invariants): green
  • npm run build: success, correct version inlined

New tests

incremental-reindex.test.ts (4), version.test.ts (2), version-consistency.test.ts (3), write frontmatter test (+1).

🤖 Generated with Claude Code

owrede and others added 8 commits June 30, 2026 02:12
… plugin

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…text (ADR-033)

A note's dynamic-view fences (datacorejsx/datacore/dataview/dataviewjs) hold JS
or query DSL that renders a different structure only inside Obsidian — never
persisted to disk. The headless indexer was indexing that SOURCE verbatim
(noise: 'dc.useQuery(...).filter(...)' etc.).

ParsedNote gains indexedContent: the body with each dynamic-view fence body
replaced by a neutral '[Datacore view]' placeholder. The chunker + section
builder consume indexedContent; hashing + wikilink extraction + read_note still
use the raw content (file identity + change-detection unchanged). No-op for
notes without dynamic-view blocks.

This is the headless/Datacore-inactive baseline; the Obsidian plugin overrides
it with actually-rendered content (phases 2-3). Pure stripper in
src/reader/datacore.ts with 7 unit tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sh (ADR-033)

Nullable column marking a note whose indexed content came from the Obsidian
plugin's RENDERED Datacore output, tagged with the source file's hash at render
time (staleness detection + raw fallback). NULL = raw-indexed (back-compat).
Idempotent PRAGMA-guarded column-add. The index_rendered_note MCP tool +
indexer ingest path + plugin render land on top of this.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
 P1)

indexVault() decided needsReindex from chunkCount alone, so a note whose
body changed but already had chunks kept stale chunks/embeddings/sections/
edges while its notes.hash/content were updated in place.

- Read the pre-upsert note state and mirror single.ts's 3-way decision:
  hash-unchanged (no-op) / body-hash-unchanged (frontmatter-only: refresh
  wikilinks+edges, keep chunks) / body-changed (full re-embed).
- Fix latent FK-order bug in the re-index loop: delete sections BEFORE
  chunks (sections reference chunks with no cascade). Only surfaced now
  that changed notes with existing sections are actually re-indexed.

Tests: new incremental-reindex.test.ts — body change re-chunks, wikilink
repoint updates edges, frontmatter-only skips re-embed, unchanged is no-op.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#14 P2)

server.ts hardcoded const VERSION = "1.0.0" while the package was 2.2.x, so
the MCP server advertised the wrong version and sink provisioning stamped a
stale sentinel. Add src/version.ts as the single source of truth (JSON import,
inlined by tsup at build) and consume it in server.ts. Regression test asserts
VERSION === package.json.version and rejects the historical 1.0.0 placeholder.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…, CI (#14 P3/P4/P5)

- Align all release versions to 2.3.0: package.json, plugin/package.json,
  plugin/manifest.json (already 2.3.0), package-lock.json, README "Latest".
- Add src/version-consistency.test.ts asserting CLI == plugin pkg ==
  plugin manifest, README badge, and a matching CHANGELOG section.
- Narrow engines.node to ">=22 <26" — Node 26+ has no better-sqlite3 prebuild
  for the new ABI. Update README prerequisites.
- Harden .gitignore with **/.DS_Store (none tracked; verified via git ls-files).
- Extend CI matrix to Node 22 + 24 (floor + one upper supported version).
- CHANGELOG: add 2.3.0 section. Rebuild dist with the corrected version.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… scalar (#14)

matter.stringify() ran with js-yaml's default lineWidth: 80, folding long
string values into a `>-` block scalar that Obsidian's Properties editor
mishandles. Pass lineWidth: -1 so values round-trip single-line. Test asserts
no `>-` marker and the value survives intact.

Also re-applies prettier formatting to the P1 indexer files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phases 1–2 (query-source stripping + migration 016 rendered_source_hash)
ship in this release; later ADR-033 phases remain incomplete.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@owrede
owrede merged commit 036580e into main Jul 1, 2026
2 checks passed
@owrede
owrede deleted the fix/issue-14-indexer-version-review branch July 1, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Software-review fixes: incremental indexer, version source-of-truth, node-engine honesty, version drift, .DS_Store

1 participant