Commit Graph
2 Commits
Author SHA1 Message Date
marqdo-knowledge cca8fbdab1 feat(storage): one rebuildable SQLite projection with derived indexes
- add schema revision 1 with application id, singleton build row, documents,
  nodes, aliases, edges, contexts, inputs, diagnostics, search_units,
  FTS5 search_fts, grams and embeddings tables; spans and resolved-target
  invariants are enforced by CHECK constraints and foreign_keys=ON
- full rebuild stages a private database in the target directory and renames
  it atomically after source recheck and quick_check; a foreign or symlinked
  database is refused, never overwritten
- incremental publish replaces the projection inside one transaction, so
  readers see the old or the new complete snapshot and failures roll back to
  the last successful artifact
- store exact UTF-8 source bytes and digest-guarded normalised facts for the
  incremental re-analysis cache; inputs are content digests, never mtimes
- build one search unit per structural node/chunk with CJK bigram FTS
  segmentation, weighted FTS fields and bounded 2/3-gram fuzzy rows
- add read-only store API (nodes, aliases, edges, units, FTS/gram candidates,
  exact-name lookup, embeddings, diagnostics, integrity, currentness) and
  integration tests for publish/read/search/incremental/foreign-db safety
2026-11-26 01:10:39 +08:00
marqdo-knowledge 59d5afe10b feat(analysis): consume the current public Analysis v3 contract
- add the process boundary for the core CLI: explicit MARQDO_BIN/--marqdo-bin
  only (never PATH), argv-only invocation of check ENTRY --emit, bounded
  timeout, private temp artifact, exit checks and absolute-path sanitisation
- deserialize every Analysis record with closed serde shapes and validate
  semantic invariants that JSON Schema cannot express: identities, source
  digests, UTF-8 spans, unit tree/order/mode ancestry, anchors, functions and
  signatures, references states, calls, resources, diagnostics and budgets
- validate statement/expression trees structurally with depth and span checks
- convert accepted modules into DocumentFacts, preserving honest upstream
  reference states and one node per Exec unit/function
- merge modules across entry contexts only when identity and source agree,
  otherwise report knowledge.analysis_context_conflict
- add the real rc.4 Analysis positive fixture (with provenance and regeneration
  script), tamper negative tests and optional real-binary integration tests
2026-11-26 00:29:19 +08:00