feat(compiler): end-to-end compile and check orchestration

- resolve scope, discover exact snapshot, project plain Markdown, run real
  Analysis for .mq.md entries, cross-check module source bytes, merge contexts
  and reject uncovered/invalid Marqdo documents
- collect referenced local assets and known-missing paths before linking so a
  missing file is distinguished from an unindexed/excluded one
- incremental plan by content-digest change set: unchanged documents reuse
  digest-guarded facts; any .mq.md/manifest/lock/core-identity change triggers
  the conservative full re-analysis; plain-only edits never invoke Analysis
- no-op compiles preserve the stored snapshot and generation; rebuilds
  increment the generation and atomically replace the artifact
- recheck every source digest immediately before publishing, never mixing
  snapshots, and refuse to publish graphs with blocking diagnostics
- check validates sources, references, Analysis coverage, database structure
  and currentness, writes nothing and exits 1 for definite broken links
- add end-to-end tests for plain-only compile without a core binary, mixed
  real-Analysis compile, incremental/rebuild/no-op, stale database and broken
  links
This commit is contained in:
marqdo-knowledge committed 2026-11-26 01:21:29 +08:00
1 parent cca8fbdab1
commit 66f3e168c4
5 files changed
+1106 -14

No files matched your search

+1
View File
@@ -76,6 +76,7 @@ pub mod code {
pub const USAGE: &str = "knowledge.usage";
pub const NOT_IMPLEMENTED: &str = "knowledge.not_implemented";
pub const INTERNAL: &str = "knowledge.internal";
pub const COMPILATION_FAILED: &str = "knowledge.compilation_failed";
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]