Repository navigation
feat(skills): add content-hash digest + change-detection to partial skill loads - #304
Conversation
…kill loads Lever 6 of the progressive-skill-loading epic (#137), building on PR1 (#285). Each partial slice from sumo_qa_load_skill_context (section/module/full) now returns content_hash (sha256 of exactly the returned text) and estimated_tokens. A new optional known_hash arg lets a caller ask "has this slice changed since hash X?": a match returns changed=false with the body omitted (the token saving), a mismatch returns changed=true with the body. Change-detection is derived per call - the loader re-hashes the live slice and compares. No server-side session cache was added: MCP session identity is not reliable across the supported hosts, so a cache keyed on an unstable identity would leak across or silently miss sessions; re-hashing a small local slice is safer and stays deterministic and stateless. No network, embeddings, vector stores, or external model calls are introduced. Regenerated the tools/list snapshot (one new optional known_hash property on sumo_qa_load_skill_context). Updated docs/TOOLS.md and docs/ARCHITECTURE.md with the per-slice digest fields, the change-detection affordance, and the no-session-cache rationale. Closes #290
Merge-readiness evidence (finish-pr-batch)Per-file sumo-qa review ( Codex adversarial pass: clean — Behavioral verification (executed on a real skill, branch tip
Acceptance criteria (#290): all 4 met against the branch (partial loads return CI: full matrix green. Tests: 1496 passed, 1 xfailed, 100% coverage. |
Integration / user-flow verification (wave-2 batch: #301 #302 #303 #304)Per-PR CI is green only in isolation against Merge stack: this PR merges last and hits one conflict — Integrated user flow — verified:
Evals: not run here (no |
Live server smoke test — merged build run & prompted end-to-endStarted the actual merged
Full routing flow also confirmed live ( |
…ssive-skill-loading-pr6 # Conflicts: # docs/ARCHITECTURE.md
🤖 I have created a release *beep* *boop* --- ## [0.28.0](v0.27.0...v0.28.0) (2026-06-02) ### Features * **knowledge:** add per-entry and compact catalogue loaders ([#302](#302)) ([38ece06](38ece06)) * **skills:** add content-hash digest + change-detection to partial skill loads ([#304](#304)) ([1f16916](1f16916)) * **skills:** expose skill index as additive MCP resources/templates ([#303](#303)) ([0d8e662](0d8e662)) ### Tests * add cumulative token-budget tests + host docs for progressive skill loading ([#301](#301)) ([7ea5a82](7ea5a82)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <release-please[bot]@users.noreply.github.com>
Closes #290 (PR6 of epic #137 — progressive skill loading).
What changed
Content-hash digest / change-detection for partial loads (builds on #285's
content_hash/estimated_tokens). Each slice ofsumo_qa_load_skill_context(full / section / module) now returnscontent_hash(sha256 of exactly the returned text) +estimated_tokens, plus an optionalknown_hasharg: match →changed=false+ body omitted; mismatch →changed=true+ body included; omitted → body always returned. Stateless (no session cache — documented why: MCP session identity is unreliable across supported hosts). No network / embeddings / vector calls.Evidence
known_hash).content_hashis sha256 of exactly the returned bytes for every mode;known_hashnever reaches an error branch; the never-raises envelope contract is preserved (notable, as this is the same file that carried [Task]: Progressive skill loading PR1 — skill manifests + section/module index + partial skill-context loader #285's P2).