feat(discovery): deterministic source snapshot with explicit boundaries

- resolve explicit dir/file roots, reject symlink roots and unsafe --exclude
  globs; keep the database at <root>/.marqdo/knowledge.sqlite
- walk without following symlinks, skip .git/.marqdo/target/node_modules and
  hidden entries, sort by byte-wise root-relative path
- read exact UTF-8 bytes with per-file/total/document budgets and digest
  based source-change detection before publishing
- record marqdo.yaml/marqdo.lock and referenced local assets as inputs;
  asset digests are bounded and never full-text indexed
- add validate_relative_path/resolve_link_path/safe_join primitives with
  traversal, drive/UNC, NUL and escape tests
This commit is contained in:
marqdo-knowledge committed 2026-11-25 22:29:42 +08:00
1 parent 430f950631
commit f2f3b38eca
6 files changed
+1147

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
//! Adapter for the core CLI's current public Analysis contract
//! (`marqdo.analysis`, revision 3, produced by `check ENTRY --emit PATH`).
//!
//! Implemented in the document milestone.