Files
marqdo-knowledge/docs/releases/0.1.0-beta.1.md
T
marqdo-knowledge 85458c1d93 release: 0.1.0-beta.1
First beta. This is not a stable claim.

- bump the tool version to 0.1.0-beta.1 in Cargo.toml/Cargo.lock,
  packaging/tool.json and the public contract; no protocol/schema revision
  changes (api_revision 1, analysis 3, sqlite schema 1)
- add CHANGELOG.md and docs/releases/0.1.0-beta.1.md with a detailed
  completed / explicitly NOT completed inventory, compatibility, security,
  install and upgrade notes
- record the beta platform claim (Linux x86_64 only) and the CI/CD pointers in
  README and docs/STATUS.md, keeping real-model semantic quality, §16
  retrieval/performance gates, non-Linux platforms, upstream batch Analysis,
  incremental write-volume and OKF absolute-link compile semantics as NOT RUN
  or documented limitations
2026-11-26 09:01:16 +08:00

195 lines
9.7 KiB
Markdown

# marqdo-knowledge 0.1.0-beta.1
Release date: 2026-11-26
Release channel: **beta** (first beta; not a stable-version claim)
Platform: Linux x86_64 (glibc), Rust release build
Core CLI integration baseline: `cflmy/marqdo-cli` `3.0.0-rc.4`
(`4bbefc92449ee480c8a2c89b0308feb4cda8d0e7`)
Contract versions:
| Boundary | Version |
|---|---|
| `marqdo.cli-tool` | revision 1 |
| tool API revision | 1 |
| consumed `marqdo.analysis` | revision 3 (current closed shape) |
| SQLite schema | revision 1 |
| result/error envelope | schema_version 1 |
| OKF | 0.3 |
## What this beta is
A runnable knowledge compiler and query tool for existing Markdown directories.
It compiles original sources into **one** rebuildable SQLite artifact at
`<ROOT>/.marqdo/knowledge.sqlite` and answers exact, lexical, fuzzy, graph and
optionally semantic queries plus bounded reading/dependency slices. It never
executes knowledge and never rewrites source files.
## What is complete in this beta
### Commands and contracts
- Exactly three business commands: `compile`, `check`, `query`, with stable
`knowledge.*` diagnostic codes and exit codes 0/1/2.
- Single machine envelope (`marqdo.knowledge.result`, schema_version 1) for
compile/check/query and a single error envelope.
- Source-of-truth rule: original Markdown plus explicit resources; the database
is derived and deletable. Content-based freshness, never mtimes.
- Explicit `compile --rebuild`; old/foreign databases are rejected, never
migrated or overwritten.
### Compilation
- Deterministic discovery and snapshot: sorted root-relative paths, skipped
`.git`/`.marqdo`/`target`/`node_modules`/hidden entries and symlinks, fixed
exclude globs, per-file/total/document budgets, exact UTF-8 bytes and SHA-256
digests, BOM/CRLF/CJK preserved.
- Plain `.md`: pinned CommonMark/GFM options (tables, footnotes, task lists,
strikethrough, autolink, dollar math, front matter) projected to exact
half-open UTF-8 spans.
- `.mq.md`: only the current public `marqdo check --emit` Analysis v3 artifact,
with closed-shape deserialization and semantic validation of identities,
source digests, spans, units/modes/ancestry, anchors, functions/signatures,
references states, calls, resources, diagnostics and budgets. Any other
revision or tampered field is rejected; no fallback parser.
- Unified graph: one `Node` type (document/namespace/section/function/
statement/resource/external), one `Edge` type (contains/references/imports/
calls) with origin/state/raw target/source span; repeated link occurrences are
separate edges; unresolved targets are never fabricated.
- OKF v0.3 metadata recognition (concept roles, `index.md`/`log.md` reserved
roles, metadata preservation, concept-id aliases, `resource` path edges) and
`check --okf` conformance/link notices.
- Incremental semantics equal to a full compile: unchanged documents reuse
digest-guarded facts; any `.mq.md`/manifest/lock/core-identity change re-runs
Analysis conservatively; plain-only edits do not invoke the core CLI; a
failure never replaces the last successful artifact.
- Semantic indexing (explicit): OpenAI-compatible embeddings, bounded batching,
strict response validation, float32 BLOB storage, config-change invalidation,
content/model-digest reuse and all-or-nothing publication.
### Search and retrieval
- Exact channel: canonical ids, exact aliases, unique exact names; ambiguous
names return candidates and never choose one.
- Lexical channel: FTS5 `unicode61` over CJK-bigram-segmented weighted fields.
- Fuzzy channel: bounded 2/3-gram recall plus edit-distance scoring, CJK
single-character and prefix fallbacks; no whole-corpus distance scan.
- Fusion: weighted RRF (exact 1.5, lexical/fuzzy/semantic 1.0); identity and
binding are never fuzzy.
- Graph expansion: default 1 hop, references bidirectional, contains children,
calls/imports directional with `--reverse`, depth/relation filters, seed/edge/
node budgets, 0.35 depth decay, `truncated` reported.
- Slices: document/execution/hybrid with exact source text, source path+span
provenance, module context/imports for execution, explicit external/dynamic
gaps, deterministic 32 KiB default byte budget.
- Semantic channel: explicit `--semantic`, exact cosine scan with bounded vector
budget; default queries remain offline even when vectors exist.
- Kind filters apply after candidate/graph expansion; human Markdown and machine
JSON outputs derive from the same result object.
### Safety and operations
- No execution paths; no plugin/foreign/attester/provider use; argv-only core
CLI invocation with timeout, private temp artifacts and exit verification.
- Root confinement, symlink refusal, percent-decoding once, NUL/path-escape
rejection; external URLs stored inert and never fetched.
- SQLite `foreign_keys=ON`, parameterised SQL, CHECK invariants, integrity
checks, owner-only file permissions, atomic rename publication and rollback.
- Package: `tool.json` (`marqdo.cli-tool` rev 1, `requires.api_revision: 1`,
`requires.analysis: 3`), release archive with `bin/marqdo-knowledge`, docs and
spec; cold install/dispatch/compile/query/check/remove verified with a real
`marqdo` binary in an isolated `MARQDO_TOOL_HOME`.
## Verification recorded for this release
- `cargo fmt --all -- --check`: clean.
- `cargo clippy --all-targets --locked -- -D warnings`: clean.
- `cargo test --workspace --locked` with the real rc.4 core binary:
**139 passed, 0 failed** (104 unit; compile 6; core_cli 3; embedding 4; OKF 7;
query 11; storage 4).
- `cargo build --release --locked`: clean.
- Release archive built by `scripts/package-release.sh` and cold-installed with
the real core CLI (the archive name and SHA-256 are recorded by the release
lane and the git tag annotation): install → dispatch
`knowledge --help` → compile `examples/mixed` (5 docs, 15 nodes, 15 edges,
13 search units) → query (hits with channels) → check (database current,
0 errors) → remove.
## What is NOT complete in this beta
These are explicit non-claims, not hidden gaps. Details in `docs/STATUS.md`.
1. **Real-model semantic quality benchmark**: only the protocol, validation,
storage, reuse and fusion are exercised (local mock). No pinned real model
was run; no semantic Recall@10 claim is made.
2. **Specification §16 retrieval and performance gates**: frozen multi-domain
dataset, held-out queries, Recall/MRR/nDCG, latency/RSS/build-time targets
and incremental write-volume benchmarks are NOT RUN. No performance number is
claimed.
3. **Platforms**: Linux x86_64 only. Windows/macOS are untested and not claimed.
4. **Upstream batch Analysis interface (U01)**: the current upstream exposes
per-entry `check --emit`; this beta invokes it per `.mq.md` entry and merges
contexts conservatively, as permitted for the development stage. The final
upstream batch/document-scan interface is not available in the pinned core.
5. **Incremental write granularity**: facts reuse avoids re-analysis for
plain-only edits, but the projection rows are rewritten in one transaction.
Semantics equal a full build; the write-volume benchmark is unmeasured.
6. **OKF compile-time absolute links**: bundle-root absolute links (`/path.md`)
receive OKF semantics only in `check --okf`. `compile` has no `--okf` flag and
keeps Native semantics, so such links are reported `out_of_scope` in the
compiled graph.
7. **Single-character CJK queries**: bounded title/symbol/body probe with
truncation reporting; not an exhaustive scan.
8. **No migration**: schema revision changes require an explicit
`compile --rebuild`. There is no legacy reader and no automatic upgrade.
9. **Release archive reproducibility**: the archive was built locally and
cold-installed; no public CI run URL or independent artifact attestation is
recorded for this beta.
## Install and first run
```sh
# From a checkout of this repository (Linux x86_64, Rust toolchain 1.89+):
scripts/cargo.sh build --release --locked
# Install the tool bundle through the core CLI:
marqdo tool install ./dist/marqdo-knowledge-0.1.0-beta.1-x86_64-unknown-linux-gnu
marqdo knowledge --help
marqdo knowledge compile ./examples/mixed --json
marqdo knowledge query '归一化' --root ./examples/mixed
marqdo knowledge check ./examples/mixed --json
marqdo tool remove knowledge
```
The tool requires a compatible core `marqdo` (`MARQDO_API_REVISION=1`,
Analysis revision 3) to be dispatched normally; direct development invocation
accepts `--marqdo-bin PATH`.
## Compatibility and upgrade notes
- There is no earlier released version; this is the first beta.
- Consumes only the current closed Analysis revision-3 shape (the same revision
number emitted by older rc build with a different shape is rejected).
- SQLite schema revision 1; any schema change in a future version requires
`compile --rebuild`.
- Database ownership: a file not created by this tool is never overwritten.
- Upgrade path for beta users: replace the tool bundle, then run
`marqdo knowledge compile <root> --rebuild` if the schema revision changed.
## Security notes
Default behavior is offline. The only network path is an explicitly configured
embedding endpoint (`--semantic` query or embedding options at compile); remote
endpoints require HTTPS and `--allow-remote-embedding`. The API key is read from
`MARQDO_KNOWLEDGE_EMBEDDING_API_KEY`; it is never stored in the database, logs or
output. Diagnostics and logs never contain source text, credentials or absolute
machine paths.
## Evidence
- `docs/evidence/2026-11-26-implementation.md` — executed test counts, real
Analysis integration, T01 install/dispatch and release-archive cold install.
- `docs/STATUS.md` — capability matrix with implemented/tested vs NOT RUN.
- Committed real Analysis fixture with provenance:
`tests/fixtures/analysis/`.