ContextLattice v3.8.0 - Context Pack Quality Ledger
ContextLattice v3.8.0
Release date: 2026-07-01
v3.8.0 moves the gateway to the MongoDB Go driver v2 line and adds the Context Pack Quality Ledger: a bounded telemetry layer that separates exact prompt-token savings from confidence-banded inference avoidance.
Highlights
- Migrates the Go gateway from
go.mongodb.org/mongo-driverv1 togo.mongodb.org/mongo-driver/v2. - Adds
/telemetry/context-pack-qualityfor context-pack quality, exact prompt savings, modeled inference avoidance, and outcome calibration. - Adds
/telemetry/context-pack-quality/outcomeso agents can post compact first-pass, repair, retry, and follow-up-token outcomes. - Persists compact bounded quality rows without raw prompts, raw queries, or recalled source text.
- Adds
context_pack_qualityto context-pack responses with a sample id, query hash, quality score, counterfactual baseline, and confidence-banded modeled inference tokens avoided. - Updates the dashboard cockpit with a separate
modeled inference avoidedmetric so exact prompt-token savings are not mixed with counterfactual estimates.
Measurement Contract
v3.8.0 deliberately keeps two claims separate:
- Exact prompt-token savings: measured from tokenizer-aware context-pack token deltas.
- Modeled inference avoidance: confidence-banded estimate of extra retry or repair calls avoided by a better context pack.
The modeled value becomes stronger only when outcome rows are posted. Until then, the API marks it as modeled_counterfactual rather than exact.
Storage Contract
The quality ledger is designed for low data volume:
- Bounded NDJSON storage.
- Byte and sample caps.
- No raw prompt text.
- No raw source text.
- Query provenance is stored as a hash only.
- Public storage status exposes durability, caps, loaded rows, parse errors, write errors, and sanitized error codes.
Verification
- Gateway tests passed for MongoDB driver v2 migration, tokenizer-exact token impact, context-pack quality ledger persistence, outcome calibration, and native route ownership.
- Dashboard tests passed for exact token impact and context-pack quality parsing.
- Dashboard production build passed.
- Release-note hygiene passed for these notes.
Upgrade Guidance
Use v3.8.0 for new installs and upgrades from v3.7.x. No migration is required for the local token-impact ledger. The new context-pack quality ledger starts collecting compact rows when context packs are generated.