You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Knowledge-corpus sync M5.1+M5.2 — the .cck artifact and cce knowledge push / pull
(#56, per SPEC-SYNC-KNOWLEDGE). A built knowledge store now travels through the same
content-addressed cache as code indexes. sync::knowledge_artifact owns the canonical,
byte-exact .cck container (manifest + one line per chunk in store order, sorted-keys
compact JSON, the .cce base64 f64-LE embedding codec, zero provenance fields, checksum
computed with checksum:"") — a pure function of (feed, corpus_id), with a committed
golden checksum for the shared fixture feed and a refusal of embedding-less Phase-A
stores. cce knowledge push [--corpus <id>] [--remote <url>] exports the current local
store and lands artifact + current pointer + published corpus.json
(cce.knowledgemeta/v1, carrying pushed_at — deliberately outside the reproducible
artifact; the deterministic data_as_of lives inside it) in one commit, then applies
per-corpus knowledge.sync.retention (keep-last-<n> prunes oldest by the cache repo's
commit order; the current snapshot is never pruned; prune failures warn, never fail the
push). cce knowledge pull [--corpus <id>] [--latest | --snapshot <id>] [--force] [--remote <url>] verifies the manifest checksum (a mismatch is a hard failure naming the
key) and installs into .cce/knowledge/byte-identical to a local ingest, recording
the knowledge sync marker (synced.json with installed_sha256, the #55 mechanism —
the verify --checksum-only surface wires up in M5.3). Guards per the spec: corpus_id is
never derived (explicit --corpus or knowledge.sync.corpus_id, validated
sanitize-stable); pulling a different corpus refuses without --force; the raw feed
never travels and a planted secret arrives redacted in the artifact (knowledge index
has no bypass flag — asserted). Config: knowledge.sync.corpus_id / remote (per-corpus
§4.3 override; default sync.remote) / retention. serde_json gains the float_roundtrip feature so a loaded store's embeddings parse back to the exact doubles
that were written (push exports the loaded store; without it the .cck drifted a ULP
from a local ingest). Additive throughout: SYNC_FORMAT_VERSION, conformance.json,
code artifacts, and every existing golden are untouched (asserted, not assumed — a
knowledge corpus beside code artifacts leaves sync list --json byte-identical).
Knowledge-corpus sync M5.3+M5.4 — the consumer surface and the ingestion reference
(#56, completing SPEC-SYNC-KNOWLEDGE). Corpora are now first-class on every consumer
surface. cce sync list grows the §6 knowledge section: a human block after the repos
table (corpus / current / snapshots / LFS-aware bytes / data as-of) and an OPTIONAL knowledge array on the unchanged cce.synclist/v1 JSON — emitted only when the cache
carries a corpus, so knowledge-free listings stay byte-identical (nullable fields stay
present as null). cce sync pull --all [--corpus <id>] installs the cache's corpus
into the consumer workspace root .cce/knowledge/ via the knowledge pull machinery
verbatim (store, current, and marker byte-identical to a direct pull): an explicit --corpus wins, a single-corpus cache auto-installs, several corpora warn-and-skip
naming the ids (one active corpus per root; member pulls never fail because of
knowledge), and refresh is marker-idempotent — an unmoved remote current reports up-to-date with no fetch, a moved one refreshes exactly the corpus. cce sync verify --checksum-only gains the knowledge row: re-hash of the installed snapshot against the
marker's installed_sha256, with member semantics (pass row; a mismatch fails loudly
naming the corpus — plus the honest sharpening that knowledge has NO rebuild-verify
escalation path at all; a marker without the hash is an explicit notice at exit 0), and
a knowledge-only root verifies too. MCP index_status gains the §4.4 knowledge block
(corpus or (local ingest), snapshot, records/chunks, data as-of, best-effort
offline-safe remote current / behind remote mirroring the code freshness rules);
reports without a knowledge store are byte-identical. M5.4 ships the reference
scheduled-adapter workflow docs/ci/cce-knowledge-sync.yml (fetch → emit cce.knowledge/v1 → cce knowledge index (redacts) → cce knowledge push; a builder
job, never a serving process; the feed is ephemeral and never committed; disjoint
source-READ vs cache-WRITE secrets) and the documentation pass: docs/knowledge.md M5
un-deferred with the full sync/consumer/freshness/trust story, docs/sync.md consumer
mode covers corpora in list/pull --all/verify, docs/mcp.md documents the index_status knowledge block, README and llms.txt updated. One pinned surface moved
by design: the #69 additivity test now asserts the M5.3 shape (every pre-existing
listing field byte-stable beside a corpus; the corpus visible only as the new optional
key).
Documentation
SPEC-SYNC-KNOWLEDGE.md — the normative build spec for M5, knowledge-corpus sync (#56).
The SPEC-SYNC pattern reapplied to the v2.6 knowledge system: a canonical, provenance-free .cck corpus artifact (the built, redacted store — never the raw feed) under an additive knowledge/<contract_version>/<corpus_id>/ key space in the same git+LFS cache, with a current pointer and a published corpus.json per corpus. Settles the six M5 decisions
normatively (corpus identity, the honest trust-the-pusher posture with a code-vs-knowledge
comparison table, access boundary, freshness signals, per-corpus retention, index-time
redaction), specs cce knowledge push/pull, the cce sync list knowledge section (still cce.synclist/v1 — additive optional key, knowledge-free listings byte-identical), pull --all corpus install at the workspace root, and verify --checksum-only coverage,
plus the CI-cron builder reference workflow and milestones M5.1–M5.4. Spec-first: no
implementation in this change; SYNC_FORMAT_VERSION, code artifacts, and all goldens
untouched. docs/knowledge.md's M5 deferral note now points at the spec.